Loading...
Searching...
No Matches
DrawThread.h
Go to the documentation of this file.
1/* Copyright (C) 2008 National Institute For Space Research (INPE) - Brazil.
2
3This file is part of the TerraLib - a Framework for building GIS enabled applications.
4
5TerraLib is free software: you can redistribute it and/or modify
6it under the terms of the GNU Lesser General Public License as published by
7the Free Software Foundation, either version 3 of the License,
8or (at your option) any later version.
9
10TerraLib is distributed in the hope that it will be useful,
11but WITHOUT ANY WARRANTY; without even the implied warranty of
12MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13GNU Lesser General Public License for more details.
14
15You should have received a copy of the GNU Lesser General Public License
16along with TerraLib. See COPYING. If not, write to
17TerraLib Team at <terralib-team@terralib.org>.
18*/
19
20/*!
21\file terralib/qt/widgets/canvas/DrawThread.h
22
23\brief Thread to draw a Layer in a PaintDevice.
24*/
25
26#ifndef __TERRALIB_QT_WIDGETS_INTERNAL_DRAWTHREAD_H
27#define __TERRALIB_QT_WIDGETS_INTERNAL_DRAWTHREAD_H
28
29//TerraLib
30#include "../../../maptools/Enums.h"
31#include "../Config.h"
32
33// Qt
34#include <QColor>
35#include <QObject>
36#include <QRunnable>
37
38class QPaintDevice;
39class QSize;
40
41namespace te
42{
43 namespace gm
44 {
45 class Envelope;
46 }
47
48 namespace map
49 {
50 class AbstractLayer;
51 }
52
53 namespace qt
54 {
55 namespace widgets
56 {
57 class TEQTWIDGETSEXPORT DrawThread : public QObject, public QRunnable
58 {
59 Q_OBJECT
60
61 public:
62
63 DrawThread(QPaintDevice* dev, te::map::AbstractLayer* layer, te::gm::Envelope* env, const QColor& bckGround, int srid, double scale,
65
67
68 void run();
69
70 bool hasFinished() const;
71
72 QString errorMessage() const;
73
74 QString layerId() const;
75
76 Q_SIGNALS:
77
78 void finished();
79
80 protected:
81
82 QPaintDevice* m_device;
83
85
87
89
90 int m_srid;
91
92 double m_scale;
93
94 te::map::AlignType m_hAlign; //!< The display horizontal align.
95
96 te::map::AlignType m_vAlign; //!< The display vertical align.
97
98 public:
99
101
102 protected:
103
105
107 };
108 }
109 }
110}
111
112#endif //__TERRALIB_QT_WIDGETS_INTERNAL_DRAWTHREAD_H
An Envelope defines a 2D rectangular region.
Definition: Envelope.h:52
This is the base class for layers.
Definition: AbstractLayer.h:78
te::map::AlignType m_hAlign
The display horizontal align.
Definition: DrawThread.h:94
QPaintDevice * m_device
Definition: DrawThread.h:82
te::map::AlignType m_vAlign
The display vertical align.
Definition: DrawThread.h:96
DrawThread(QPaintDevice *dev, te::map::AbstractLayer *layer, te::gm::Envelope *env, const QColor &bckGround, int srid, double scale, te::map::AlignType hAlign, te::map::AlignType vAlign)
te::gm::Envelope * m_envelope
Definition: DrawThread.h:86
QString errorMessage() const
te::map::AbstractLayer * m_layer
Definition: DrawThread.h:84
AlignType
This enum contains values to control the alignment of components (like Canvas and MapDisplay).
Definition: Enums.h:126
TerraLib.
#define TEQTWIDGETSEXPORT
You can use this macro in order to export/import classes and functions from this module.
Definition: Config.h:63