| 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/TeQtDatabasesListView.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_QTDATABASESLISTVIEW_H
    00023 #define  __TERRALIB_INTERNAL_QTDATABASESLISTVIEW_H
    00024
    00025
    00026 class QPopupMenu;
    00027 class TeQtCheckListItem;
    00028 class TeQtDatabaseItem;
    00029 class TeQtLayerItem;
    00030 class TeLayer;
    00031
    00032 #include "../../kernel/TeDefines.h"
    00033
    00034 #include <qlistview.h>
    00035 #include <vector>
    00036
    00037
    00038 class TL_DLL TeQtDatabasesListView : public QListView
    00039 {
    00040            Q_OBJECT
    00041
    00042 public:
    00043     TeQtDatabasesListView(QWidget *parent = 0, const char *name = 0);
    00044
    00045            ~TeQtDatabasesListView();
    00046
    00047            TeQtDatabaseItem* currentDatabaseItem()
    00048                       { return currentDatabaseItem_; }
    00049
    00050            TeQtLayerItem* currentLayerItem()
    00051                       { return currentLayerItem_; }
    00052
    00053            TeQtCheckListItem *popupItem()
    00054                       { return popupItem_; }
    00055
    00056     void setPopupItem(TeQtCheckListItem* item)
    00057         { popupItem_ = item; }
    00058
    00059            QPopupMenu* getPopupMenu()
    00060                       { return popupMenu_; }
    00061
    00062            void selectItem(QListViewItem *item);
    00063
    00064            void selectLayerItem(TeLayer *layer);
    00065
    00066            void removeItem(QListViewItem *item);
    00067
    00068            std::vector<TeQtDatabaseItem*>  getDatabaseItemVec();
    00069
    00070
    00071 signals:
    00072            void itemChanged(QListViewItem*);
    00073            void popupSignal();
    00074
    00077            void databaseItemRemoved();
    00078
    00080            void layerItemRemoved();
    00081
    00082 protected slots:
    00083            virtual void clicked(QListViewItem *item);
    00084            void contextMenuRequested(QListViewItem*, const QPoint&, int);
    00085
    00086 protected:
    00087            TeQtDatabaseItem      *currentDatabaseItem_;
    00088            TeQtLayerItem                    *currentLayerItem_;
    00089            bool                                        rightMouseWasClicked_;
    00090            TeQtCheckListItem     *popupItem_;
    00091            QPopupMenu                       *popupMenu_;
    00092
    00093            void contentsMousePressEvent(QMouseEvent *e);
    00094
    00095            void unselectAllItems();
    00096 };
    00097
    00098
    00099 #endif
    00100

All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines