| 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/TeQtCheckListItem.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_QTCHECKLISTITEM_H
    00023 #define  __TERRALIB_INTERNAL_QTCHECKLISTITEM_H
    00024
    00025 #include <qlistview.h>
    00026 #include <vector>
    00027 #include <qpainter.h>
    00028 #include <qpalette.h>
    00029
    00030 #include <../../kernel/TeDefines.h>
    00031
    00032 using namespace std;
    00033
    00034
    00035 class TL_DLL TeQtCheckListItem : public QCheckListItem
    00036 {
    00037
    00038 public:
    00039            enum ItemType {DATABASE, INFOLAYER, VIEW, THEME, LEGENDTITLE, LEGEND, CHARTTITLE, CHART};
    00040
    00041     TeQtCheckListItem(QListView *parent, QString text, QCheckListItem::Type ctype = QCheckListItem::Controller)
    00042                       : QCheckListItem(parent, text, ctype) {}
    00043
    00044            TeQtCheckListItem(QListViewItem *parent, QString text, QCheckListItem::Type ctype = QCheckListItem::Controller)
    00045                       : QCheckListItem(parent, text, ctype) {}
    00046
    00047            TeQtCheckListItem(QCheckListItem *parent, QString text, QCheckListItem::Type ctype = QCheckListItem::Controller)
    00048            : QCheckListItem(parent, text, ctype) {}
    00049
    00050            virtual ~TeQtCheckListItem() {}
    00051
    00052            ItemType getType() {return type_;}
    00053
    00054            int order()
    00055                       {return order_;}
    00056
    00057            void order(int order)
    00058                       {order_ = order;}
    00059
    00060            virtual int compare(QListViewItem * i, int col, bool ascending) const;
    00061
    00062            virtual QString key(int column, bool ascending) const;
    00063
    00064            vector<QListViewItem*> getChildren();
    00065
    00066            void unselectChildren();
    00067
    00068            bool isChild(QListViewItem *item);
    00069
    00070            void cancelRename(int col)
    00071                       { QListViewItem::cancelRename(col); }
    00072
    00073            virtual void paintCell(QPainter* p, const QColorGroup& cg, int column, int width, int align)
    00074                       { QCheckListItem::paintCell(p, cg, column, width, align); }
    00075
    00076
    00077 protected:
    00078            ItemType type_;
    00079            int order_;
    00080 };
    00081
    00082 #endif

All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines