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

    00001 #ifndef TEQTLEGENDSOURCE_H
    00002 #define TEQTLEGENDSOURCE_H
    00003
    00004 #include "TeQtDataSource.h"
    00005 #include <TeAppTheme.h>
    00006 #include "../../utils/TeColorUtils.h"
    00007 #include <string>
    00008
    00009 #include "../../kernel/TeDefines.h"
    00010
    00011 class TeDatabase;
    00012
    00013 using namespace std;
    00014
    00015
    00016 class TL_DLL TeQtLegendSource : public TeQtDataSource
    00017 {
    00018            Q_OBJECT
    00019
    00020            public:
    00021            TeQtLegendSource();
    00022            ~TeQtLegendSource() {}
    00023
    00024            QVariant cell(int row, int col);
    00025            void setCell(int row, int col, const QVariant &v);
    00026
    00027            bool generateLegends(const TeGrouping& groupingParams, double minValue = 0., double maxValue = 0.);
    00028            void putColorOnLegend(string& groupingColors, bool invertColor);
    00029            void putColorOnLegend(vector<ColorBar>& colorVec, vector<ColorBar>& colorBVec);
    00030            void getColorNameVector(string& groupingColors, vector<string>& colorNameVec);
    00031
    00032            QPixmap createPixmap(int row);
    00033            void drawPolygonRep(int w, int h, int offset, int row, QPixmap *pixmap);
    00034            void drawLineRep(int offset, int row, QPixmap *pixmap);
    00035            void drawPointRep(int pw, int ph, int offset, int row, QPixmap *pixmap);
    00036
    00037            void copyAppThemeContents(const TeAppTheme& appTheme);
    00038            TeAppTheme& getAppTheme() { return appTheme_; }
    00039            vector<map<string, string> >& mapObjValVec() { return mapObjValVec_; }
    00040            void setGroupingColors(const QString& gc)
    00041                       { appTheme_.groupColor(gc.latin1()); }
    00042
    00043            void setLegends(const vector<TeLegendEntry>& legVec);
    00044            void setGroupingParams(const TeGrouping& gParams);
    00045
    00046            int numRows() const { return nRows_; }
    00047            int numCols() const { return nCols_; }
    00048
    00049 private:
    00050            TeDatabase* db_;
    00051            TeAppTheme appTheme_;
    00052
    00053     vector<double> dValuesVec_;
    00054     vector<map<string, string> >mapObjValVec_;
    00055     map<TePolyBasicType, Qt::BrushStyle> brushStyleMap_;
    00056     map<TeLnBasicType, Qt::PenStyle> penStyleMap_;
    00057
    00058            QString errorMessage_;
    00059            QString groupingColors_;
    00060
    00061            int nRows_;
    00062            int nCols_;
    00063 };
    00064
    00065
    00066 #endif

All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines