| 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/TeQtGridSource.h
Go to the documentation of this file.

    00001 #ifndef TEQTGRIDSOURCE_H
    00002 #define TEQTGRIDSOURCE_H
    00003
    00004 #include <TeQtDataSource.h>
    00005 #include "../../kernel/TeDatabase.h"
    00006
    00007 #include <string>
    00008
    00009 #include <qcolor.h>
    00010
    00011 class TeAppTheme;
    00012
    00013 using namespace std;
    00014
    00015
    00016 class TL_DLL TeQtGridSource : public TeQtDataSource
    00017 {
    00018            Q_OBJECT
    00019
    00020 public:
    00021            TeQtGridSource() : theme_(0), portal_(0), nRows_(0), nCols_(0)
    00022            { }
    00023
    00024            ~TeQtGridSource() {}
    00025
    00026            bool setPortal(TeAppTheme* theme);
    00027            bool reloadPortal(bool updateGrid2PortalColRelation = false);
    00028
    00029            TeAppTheme* getTheme() const { return theme_; }
    00030
    00031            bool changePortalQuery(const string& orderBy);
    00032
    00033            string& getOrderBy()
    00034            { return orderBy_; }
    00035
    00036            void clearPortal();
    00037
    00038            QVariant cell(int row, int col);
    00039            void setCell(int row, int col, const QVariant &text);
    00040
    00041            string getErrorMessage() const { return errorMessage_; }
    00042
    00043            int numRows() const { return nRows_; }
    00044            int numCols() const { return nCols_; }
    00045
    00046            string getUniqueId(int gridRow);
    00047            string getObjectId(int gridRow);
    00048            QString getPortalInfo(int gridCol);
    00049
    00050            vector<QColor>& gridColorsVec() { return gridColorsVec_; }
    00051
    00052            map<string, int>& uid2PortalRowMap() { return uid2PortalRowMap_; }
    00053            vector<int>& grid2PortalRowVec() { return grid2PortalRowVec_; }
    00054            vector<int>& portal2GridRowVec() { return portal2GridRowVec_; }
    00055            vector<int>& grid2PortalColVec() { return grid2PortalColVec_; }
    00056
    00057            vector<string> getItemsToggled(int begin, int end);
    00058            bool isDateTimeRegistered(int gridCol);
    00059            void sortColumns(const vector<int>& gridColsVec, const string& order);
    00060
    00061            int getNextGridRowPointed(int gridRow);
    00062            int getPrevGridRowPointed(int gridRow);
    00063            int getNextGridRowQueried(int gridRow);
    00064            int getPrevGridRowQueried(int gridRow);
    00065
    00066 signals:
    00067            void setColNamesSignal();
    00068
    00069 protected slots:
    00070            void setGridColorsVec();
    00071
    00072 protected:
    00073            TeAppTheme* theme_;
    00074            TeDatabasePortal* portal_;
    00075            mutable string errorMessage_;
    00076            vector<QColor> gridColorsVec_;
    00077            map<string, int> uid2PortalRowMap_;
    00078            vector<int> grid2PortalRowVec_;
    00079            vector<int>           portal2GridRowVec_;
    00080            vector<int> grid2PortalColVec_;
    00081            string orderBy_;
    00082
    00083            int nRows_;
    00084            int nCols_;
    00085 };
    00086
    00087
    00088 #endif

All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines