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

    00001 /************************************************************************************
    00002  TerraLib - a library for developing GIS applications.
    00003 Copyright � 2001-2007 INPE and Tecgraf/PUC-Rio.
    00004
    00005 This code is part of the TerraLib library.
    00006 This library is free software; you can redistribute it and/or
    00007 modify it under the terms of the GNU Lesser General Public
    00008 License as published by the Free Software Foundation; either
    00009 version 2.1 of the License, or (at your option) any later version.
    00010
    00011 You should have received a copy of the GNU Lesser General Public
    00012 License along with this library.
    00013
    00014 The authors reassure the license terms regarding the warranties.
    00015 They specifically disclaim any warranties, including, but not limited to,
    00016 the implied warranties of merchantability and fitness for a particular purpose.
    00017 The library provided hereunder is on an "as is" basis, and the authors have no
    00018 obligation to provide maintenance, support, updates, enhancements, or modifications.
    00019 In no event shall INPE and Tecgraf / PUC-Rio be held liable to any party for direct,
    00020 indirect, special, incidental, or consequential damages arising out of the use
    00021 of this library and its documentation.
    00022 *************************************************************************************/
    00026 #ifndef  __TERRALIB_INTERNAL_THEMEAPLICATION_H
    00027 #define  __TERRALIB_INTERNAL_THEMEAPLICATION_H
    00028
    00029 #include "../../kernel/TeAbstractTheme.h"
    00030 #include <set>
    00031
    00032 #include "../../kernel/TeDefines.h"
    00033
    00034 class TeLayer;
    00035
    00036
    00038 /*
    00039 \internal
    00040 */
    00041 struct TL_DLL RepMap {
    00042            map<int, TePolygon> polygonMap_;
    00043            map<int, TeLine2D> lineMap_;
    00044 };
    00045
    00047 /*
    00048 This class extends the definition of a Theme in TerraLib adding some application
    00049 funcionalities such as the insertion of graph charts (pie and bar). This extension
    00050 materalizes the needs of TerraView like applications.
    00051 */
    00052 class TL_DLL TeAppTheme
    00053 {
    00054 public:
    00055
    00057            TeAppTheme(TeAbstractTheme* theme = 0);
    00058
    00060            ~TeAppTheme();
    00061
    00062            // Copy constructor
    00063            TeAppTheme(const TeAppTheme& other);
    00064
    00065            // Assignment operator
    00066            TeAppTheme& operator =(const TeAppTheme& other);
    00067
    00069            TeAbstractTheme* getTheme()
    00070            { return theme_;}
    00071
    00073            bool outOfCollectionVisibility()
    00074            { return outOfCollectionVisibility_;}
    00076            void outOfCollectionVisibility(bool v)
    00077            { outOfCollectionVisibility_ = v;}
    00078
    00080            bool withoutDataConnectionVisibility()
    00081            { return withoutDataConnectionVisibility_;}
    00083            void withoutDataConnectionVisibility(bool v)
    00084            { withoutDataConnectionVisibility_ = v;}
    00085
    00087            string refineAttributeWhere() { return refineAttributeWhere_; }
    00089            void refineAttributeWhere(const string& s) { refineAttributeWhere_ = s; }
    00090
    00092            string refineSpatialWhere() { return refineSpatialWhere_; }
    00094            void refineSpatialWhere(const string& s) { refineSpatialWhere_ = s; }
    00095
    00097            string refineTemporalWhere() { return refineTemporalWhere_; }
    00099            void refineTemporalWhere(const string& t) { refineTemporalWhere_ = t; }
    00100
    00102            string groupColor () { return groupColor_ ; }
    00104            void groupColor (const string& c) { groupColor_ = c; }
    00105
    00107            TeColorDirection groupColorDir() { return groupColorDir_; }
    00109            void groupColorDir(TeColorDirection n){ groupColorDir_ = n; }
    00110
    00112            TeSelectedObjects groupObjects() { return groupObjects_; }
    00114            void groupObjects(TeSelectedObjects n) { groupObjects_ = n; }
    00115
    00117            double pieDiameter() { return pieDiameter_; };
    00119            void pieDiameter(double n) { pieDiameter_ = n; };
    00120
    00122            string pieDimAttribute() { return pieAttr_; }
    00124            void pieDimAttribute(const string& s) { pieAttr_ = s; }
    00125
    00127            double pieMinDiameter() { return pieMinDiameter_; };
    00129            void pieMinDiameter(double n) { pieMinDiameter_ = n; };
    00130
    00132            double pieMaxDiameter() { return pieMaxDiameter_; };
    00134            void pieMaxDiameter(double n) { pieMaxDiameter_ = n; };
    00135
    00137            double barMinHeight() { return barMinHeight_; };
    00139            void barMinHeight(double n) { barMinHeight_ = n; };
    00140
    00142            double barMaxHeight() { return barMaxHeight_; };
    00144            void barMaxHeight(double n) { barMaxHeight_ = n; };
    00145
    00147            double barWidth() { return barWidth_; };
    00149            void barWidth(double n) { barWidth_ = n; };
    00150
    00152            TeChartType           chartType() {return chartType_;}
    00154            void chartType(TeChartType n) { chartType_ = n; }
    00155
    00157            string chartFunction() { return chartFunction_; }
    00158
    00160            void chartFunction(string s) { chartFunction_ = s; }
    00161
    00163            TeSelectedObjects chartObjects() { return chartObjects_; };
    00165            void chartObjects(TeSelectedObjects n) { chartObjects_ = n; };
    00166
    00168            double chartMaxVal() { return chartMaxVal_; }
    00170            void chartMaxVal(double n) { chartMaxVal_ = n; }
    00171
    00173            double chartMinVal() { return chartMinVal_; }
    00175            void chartMinVal(double n) { chartMinVal_ = n; }
    00176
    00178            int        keepDimension() { return keepDimension_; };
    00180            void keepDimension(int n) { keepDimension_ = n; };
    00181
    00183            bool showCanvasLegend()
    00184            {          return showCanvasLegend_; }
    00186            void showCanvasLegend(bool cl)
    00187            {          showCanvasLegend_ = cl; }
    00188
    00190            TeCoord2D canvasLegUpperLeft()
    00191            {          return canvasLegUpperLeft_; }
    00193            void canvasLegUpperLeft(TeCoord2D c)
    00194            {          canvasLegUpperLeft_ = c; }
    00196            double canvasLegWidth()
    00197            {          return canvasLegWidth_; }
    00199            void canvasLegWidth(double w)
    00200            {          canvasLegWidth_ = w; }
    00202            double canvasLegHeight()
    00203            {          return canvasLegHeight_; }
    00205            void canvasLegHeight(double h)
    00206            {          canvasLegHeight_ = h; }
    00207
    00209            TeGeomRep editRep() {return editRep_;}
    00211            void editRep(TeGeomRep r) {editRep_ = r;}
    00212
    00214            unsigned int getTableIndexFromField(string fieldName);
    00215
    00216            bool mixColor()
    00217            {          return mix_color_; }
    00218
    00219            void mixColor(bool mixcolor)
    00220            {          mix_color_ = mixcolor;           }
    00221
    00222            bool countObj()
    00223            {          return count_obj_; }
    00224
    00225            void countObj(bool countobj)
    00226            {          count_obj_ = countobj;           }
    00227
    00229            string textTable() { return textTable_; }
    00230
    00232            void textTable(const string& t) { textTable_ = t; }
    00233
    00234            bool locateText       (TeCoord2D &pt, TeText &text, const double& tol = 0.0);
    00235
    00236            TeVisual getTextVisual(const TeText &text);
    00237
    00238            bool setAlias(string att, string attAlias);
    00239
    00240            string getLegendTitleAlias();
    00241
    00242            string getPieBarAlias(string atr);
    00243
    00244            void removeAlias(string att);
    00245
    00246            void removeAllAlias();
    00247
    00248            void concatTableName(string &attr);
    00249
    00251            int  numObjects();
    00252
    00254            TeBox& boundingBox();
    00255
    00256 //         TeBox getPieBarBox(TeQtCanvas* canvas);
    00257
    00259            vector<TeColor> chartColors_;
    00261            vector<string>        chartAttributes_;
    00262
    00263            string                chartSelected_;
    00264            TeCoord2D  chartPoint_;
    00265            TePoint               tePoint_;
    00266
    00268            TeTheme*              getSourceTheme();
    00269
    00271            TeDatabase*                      getLocalDatabase();
    00272
    00274            string                           getLocalCollectionTable();
    00275
    00276
    00277 private:
    00278
    00279            TeAbstractTheme* theme_;
    00280
    00281            bool                             outOfCollectionVisibility_;
    00282            bool                             withoutDataConnectionVisibility_;
    00283
    00284            // Refining
    00285            string                           refineAttributeWhere_;
    00286            string                           refineSpatialWhere_;
    00287            string                           refineTemporalWhere_;
    00288
    00289            string                                      groupColor_;
    00290            TeColorDirection      groupColorDir_;
    00291            TeSelectedObjects     groupObjects_;
    00292
    00293            double                           pieDiameter_;
    00294            string                           pieAttr_;
    00295            double                           pieMinDiameter_;
    00296            double                           pieMaxDiameter_;
    00297
    00298            double                           barMinHeight_;
    00299            double                           barMaxHeight_;
    00300            double                           barWidth_;
    00301
    00302            double                             chartMaxVal_;
    00303            double                             chartMinVal_;
    00304            TeChartType                        chartType_;
    00305            TeSelectedObjects chartObjects_;
    00306            string                             chartFunction_;
    00307
    00308            int                                         keepDimension_;
    00309
    00310            bool                             showCanvasLegend_;               //to show or not the legend in the canvas
    00311            TeCoord2D             canvasLegUpperLeft_;  //legend�s upper left point
    00312            double                           canvasLegWidth_;                 //legend width
    00313            double                           canvasLegHeight_;                //legend height
    00314
    00315            TeGeomRep             editRep_;
    00316
    00317            bool                             mix_color_;
    00318            bool                             count_obj_;
    00319
    00320            string                           textTable_;
    00321 };
    00322
    00323
    00324 #endif
    00325

All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines