| 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/TeQtTextEdit.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_QTTEXTEDIT_H
    00023 #define  __TERRALIB_INTERNAL_QTTEXTEDIT_H
    00024
    00025 #include "../../kernel/TeCoord2D.h"
    00026 #include "TeQtCanvas.h"
    00027 #include "../../kernel/TeTheme.h"
    00028
    00029 #include "../../kernel/TeDefines.h"
    00030
    00031 #include <qpoint.h>
    00032 #include <set>
    00033
    00034 class TL_DLL TeQtTextEdit
    00035 {
    00036            QPoint                                      pLeft_;
    00037            QPoint                                      pRight_;
    00038            QPoint                                      pTop_;
    00039            QPoint                                      pBottom_;
    00040            QPoint                                      pCenter_;
    00041            bool                                        edit_;
    00042            int                                                    mode_;
    00043            TeQtCanvas*                                 canvas_;
    00044            TeTheme*                         theme_;
    00045            TeVisual                         visual_;
    00046            TeText                                      text_;
    00047
    00048 public:
    00049
    00050     TeQtTextEdit();
    00051     TeQtTextEdit(TeText& tx, TeVisual v, TeQtCanvas* canvas);
    00052
    00053            ~TeQtTextEdit ();
    00054
    00055            void init(TeText& tx, TeVisual v, TeQtCanvas* canvas);
    00056
    00057            void change();
    00058
    00059            void change(QPoint p, bool apxAngle=false);
    00060
    00061            int        apx(double d);
    00062
    00063            int located(QPoint& p);
    00064
    00065            bool isHotPoint(QPoint& p);
    00066
    00067            void endEdit();
    00068
    00069            int mode();
    00070
    00071            void mode(int m);
    00072
    00073            bool edit();
    00074
    00075            TeText text();
    00076
    00077            void text(TeText t);
    00078
    00079            void height(double h);
    00080
    00081            void angle(double a);
    00082
    00083            void addPosition(TeCoord2D p);
    00084
    00085            TeQtCanvas*           canvas();
    00086
    00087            TeVisual   visual() {return visual_;}
    00088
    00089            void       visual(const TeVisual& visual) {visual_ = visual;}
    00090
    00091            QRect      getRect();
    00092
    00093            QRect      getHRect();
    00094 };
    00095
    00096
    00097 class TL_DLL TeQtMultiTextEdit
    00098 {
    00099            vector<TeQtTextEdit> textVec_;
    00100            set<int>                          geomIdSet_;
    00101            int                                                     current_;
    00102            bool                                         selMode_;
    00103
    00104 public:
    00105
    00106     TeQtMultiTextEdit();
    00107            ~TeQtMultiTextEdit();
    00108
    00109            int size();
    00110
    00111            void push(TeQtTextEdit t);
    00112
    00113            void change();
    00114
    00115            void change(QPoint p, bool apxAngle=false);
    00116
    00117            int located(QPoint& p);
    00118
    00119            bool isHotPoint(QPoint& p);
    00120
    00121            void endEdit();
    00122
    00123            int mode();
    00124
    00125            void mode(int m);
    00126
    00127            bool selMode();
    00128
    00129            void selMode(bool m);
    00130
    00131            bool edit();
    00132
    00133            TeText text(int i);
    00134
    00135            TeVisual visual(int i);
    00136
    00137            void visual(const TeVisual&);
    00138
    00139            void height(double h);
    00140
    00141            void angle(double a);
    00142
    00143            void addPosition(TeCoord2D p);
    00144
    00145            void clear() {textVec_.clear(); geomIdSet_.clear();}
    00146
    00147            QRect      getRect();
    00148
    00149            int getTextIndex(QPoint p);
    00150
    00151            void updateText(int index, string t);
    00152 };
    00153 #endif

All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines