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

    00001 /************************************************************************************
    00002 TerraView - visualization and exploration of geographical databases
    00003 using TerraLib.
    00004 Copyright � 2001-2004 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_QTGRAPH_H
    00023 #define  __TERRALIB_INTERNAL_QTGRAPH_H
    00024
    00025 #include <qwidget.h>
    00026 #include <qpainter.h>
    00027 #include <qpixmap.h>
    00028 #include "../../kernel/TeGraph.h"
    00029 //#include <>
    00030
    00031 class TL_DLL TeQtGraphPlot : public TeGraphPlot
    00032 {
    00033 public :
    00034            TeQtGraphPlot (QWidget *parent=0, const char *name=0);
    00035            ~TeQtGraphPlot ();
    00036            virtual void plot ();
    00037            void plotRectangle (int x, int y, int dx, int dy);
    00038            void value_to_pixel(double px, double py, int* x, int* y);
    00039            int        pwidth_;
    00040            int        pheight_;
    00041            int         getWidth ();
    00042            int         getHeight ();
    00043            QPixmap* getPixmap() {return pixmap_;}
    00044            QWidget* widget_;
    00045            void plotOnWindow();
    00046            void plotOnPixmap();
    00047            void copyPixmapToWindow();
    00048            void copyPixmapToWindow(int, int, int, int);
    00049            void copyPixmapToPrinter();
    00050            void setLineAttributes (TeColor c, int , int );
    00051            void setFillAreaColor (TeColor c);
    00052            void setTextColor (TeColor c);
    00053            void fillRectangle (int x, int y, int dx, int dy);
    00054            void drawRectangle (int x, int y, int dx, int dy);
    00055            void drawLine (int sx, int sy, int dx, int dy);
    00056            void drawText (int x, int y, char*t, double angle = 0);
    00057            void fillArc (int xc, int yc, int w, int h, double a1, double a2, TeColor c);
    00058            void drawArc (int xc, int yc, int w, int h, double a1, double a2, TeColor c);
    00059            void textExtent ( string &str, int &w, int &h, double angle = 0.);
    00060            void resize(int, int);
    00061
    00062 private :
    00063            QPainter   painter_;
    00064            QPixmap*   pixmap_;
    00065            QPen                  linePen_;
    00066            QColor                lineColor_;
    00067            QBrush                polygonBrush_;
    00068            QColor                polygonColor_;
    00069            QPen                  textPen_;
    00070            map<TePolyBasicType, Qt::BrushStyle> brushStyleMap_;
    00071            map<TeLnBasicType, Qt::PenStyle> penStyleMap_;
    00072 };
    00073
    00074 class TL_DLL TePlotWidget : public TeQtGraphPlot {
    00075 public:
    00076
    00077 // Initialization
    00078            TePlotWidget(QWidget *parent=0, const char *name=0);
    00079            ~TePlotWidget() {}
    00080            void erase (int order = 0);
    00081            void plot ();
    00082 };
    00083
    00084 #endif

All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines