| TerraLib 4.1

- Main Page
- Related Pages
- Modules
- Namespaces
- Classes
- Files
- Examples

- File List
- File Members

E:/Projetos_Primeiro_Semestre_2012/TerraView/terralib/src/terralib/drivers/qt/TeQtViewsListView.h
Go to the documentation of this file.

    00001 /************************************************************************************
    00002 TerraView - visualization and exploration of geographical databases
    00003 using TerraLib.
    00004 Copyright � 2001-2007 INPE and Tecgraf/PUC-Rio.
    00005 This file is part of TerraView. TerraView is free software; you can redistribute it
    00006 and/or modify it under the terms of the GNU General Public License as published by
    00007 the Free Software Foundation; either version 2 of the License, or
    00008 (at your option) any later version.
    00009
    00010 You should have received a copy of the GNU General Public License
    00011 along with TerraView.
    00012 The authors reassure the license terms regarding the warranties.
    00013 They specifically disclaim any warranties, including, but not limited to,
    00014 the implied warranties of merchantability and fitness for a particular purpose.
    00015 The software provided hereunder is on an "as is" basis, and the authors have no
    00016 obligation to provide maintenance, support, updates, enhancements, or modifications.
    00017 In no event shall INPE and Tecgraf / PUC-Rio be held liable to any party for direct,
    00018 indirect, special, incidental, or consequential damages arising out of the use of
    00019 this program and its documentation.
    00020 *************************************************************************************/
    00021
    00022 #ifndef  __TERRALIB_INTERNAL_QTVIEWSLISTVIEW_H
    00023 #define  __TERRALIB_INTERNAL_QTVIEWSLISTVIEW_H
    00024
    00025 #include <qlistview.h>
    00026 #include "../../kernel/TeDataTypes.h"
    00027
    00028 #include "../../kernel/TeDefines.h"
    00029 class QPopupMenu;
    00030 class TeView;
    00031 class TeQtThemeItem;
    00032 class TeQtViewItem;
    00033 class TeQtCheckListItem;
    00034 class TeAppTheme;
    00035
    00036 class TL_DLL TeQtViewsListView : public QListView
    00037 {
    00038            Q_OBJECT
    00039
    00040 public:
    00041
    00042     TeQtViewsListView(QWidget *parent = 0, const char *name = 0);
    00043
    00044            ~TeQtViewsListView();
    00045
    00046            TeQtViewItem* currentViewItem()
    00047            { return currentViewItem_; }
    00048
    00049            TeQtThemeItem* currentThemeItem()
    00050            { return currentThemeItem_; }
    00051
    00052            TeQtCheckListItem *popupItem()
    00053                       { return popupItem_; }
    00054
    00055     void setPopupItem(TeQtCheckListItem* item)
    00056         { popupItem_ = item; }
    00057
    00058            QPopupMenu* getPopupMenu()
    00059                       { return popupMenu_; }
    00060
    00061            void selectItem(QListViewItem *item);
    00062
    00063            void selectViewItem(TeView *view);
    00064
    00065            TeQtViewItem* getViewItem(TeView *view);
    00066
    00067            TeQtViewItem* getViewItem(TeQtThemeItem* themeItem);
    00068
    00069            TeQtThemeItem* getThemeItem(TeAppTheme* appTheme);
    00070
    00071            TeQtThemeItem* getThemeItem(int themeId);
    00072
    00073            void removeViewItem(TeView *view);
    00074
    00075            void removeThemeItem(TeAppTheme* appTheme);
    00076
    00077            void removeThemeItem(int themeId);
    00078
    00079            void removeItem(QListViewItem *item);
    00080
    00081            void checkItemStateChanged(QCheckListItem*, bool);
    00082
    00083            void setOpenViewItem(QCheckListItem *checkListItem, bool visible)
    00084                       { setOpen(checkListItem, visible); }
    00085
    00086            void openViewItems();
    00087
    00088            void reset();
    00089
    00090            void setOn(QCheckListItem*, bool);
    00091
    00092            vector<TeQtViewItem*> getViewItemVec();
    00093
    00094            vector<TeQtThemeItem*> getThemeItemVec();
    00095
    00096            map<TePolyBasicType, Qt::BrushStyle>& getBrushStyleMap() {return brushStyleMap_;}
    00097            map<TeLnBasicType, Qt::PenStyle>& getPenStyleMap() {return penStyleMap_;}
    00098
    00099 signals:
    00100            void itemChanged(QListViewItem*);
    00101            void popupSignal();
    00102            void checkListItemVisChanged(QCheckListItem*, bool);
    00103            void dragDropItems(TeQtThemeItem*, TeQtViewItem*, TeQtViewItem*);
    00104
    00105 protected slots:
    00106            void clicked(QListViewItem *item);
    00107            void contextMenuRequested(QListViewItem*, const QPoint&, int);
    00108
    00109 protected:
    00110            TeQtViewItem                     *currentViewItem_;
    00111            TeQtThemeItem                    *currentThemeItem_;
    00112            bool                                        rightMouseWasClicked_;
    00113            bool                                        checkItemStateChanged_;
    00114            bool                                        drag_;
    00115            bool                                        themeOpen_;
    00116            bool                                        leftButtonPressed_;
    00117            QPoint                                      pressedPosition_;
    00118            TeQtCheckListItem*    popupItem_;
    00119            QPopupMenu*                                 popupMenu_;
    00120            map<TePolyBasicType, Qt::BrushStyle>        brushStyleMap_;
    00121            map<TeLnBasicType, Qt::PenStyle>            penStyleMap_;
    00122            TeQtThemeItem                    *pressedThemeItem_;
    00123            TeQtCheckListItem     *refThemeItemForVis_;  //reference theme item for visibility of another one
    00124
    00125            void contentsMousePressEvent(QMouseEvent *e);
    00126
    00127            void contentsMouseReleaseEvent(QMouseEvent *e);
    00128
    00129            void contentsMouseMoveEvent(QMouseEvent* e);
    00130
    00131            void contentsDragMoveEvent(QDragMoveEvent *e);
    00132
    00133            void contentsDropEvent(QDropEvent *e);
    00134
    00135            void unselectAllItems();
    00136 };
    00137
    00138
    00139 #endif

All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines