All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
AbstractRuler.h
Go to the documentation of this file.
1 /* Copyright (C) 2008 National Institute For Space Research (INPE) - Brazil.
2 
3  This file is part of the TerraLib - a Framework for building GIS enabled applications.
4 
5  TerraLib is free software: you can redistribute it and/or modify
6  it under the terms of the GNU Lesser General Public License as published by
7  the Free Software Foundation, either version 3 of the License,
8  or (at your option) any later version.
9 
10  TerraLib is distributed in the hope that it will be useful,
11  but WITHOUT ANY WARRANTY; without even the implied warranty of
12  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13  GNU Lesser General Public License for more details.
14 
15  You should have received a copy of the GNU Lesser General Public License
16  along with TerraLib. See COPYING. If not, write to
17  TerraLib Team at <terralib-team@terralib.org>.
18  */
19 
20 /*!
21  \file AbstractRuler.h
22 
23  \brief Abstract class representing a ruler.
24 
25  \ingroup layout
26 */
27 
28 #ifndef __TERRALIB_LAYOUT_INTERNAL_ABSTRACT_RULER_H
29 #define __TERRALIB_LAYOUT_INTERNAL_ABSTRACT_RULER_H
30 
31 // TerraLib
32 #include "../../core/Config.h"
33 
34 // Qt
35 #include <QGraphicsView>
36 #include <QPainter>
37 
38 namespace te
39 {
40  namespace layout
41  {
42  /*!
43  \brief Abstract class representing a ruler.
44 
45  \ingroup layout
46  */
48  {
49  public:
50 
51  AbstractRuler();
52 
53  virtual ~AbstractRuler(void);
54 
55  virtual void setVisible(bool visible);
56 
57  virtual bool isVisible();
58 
59  virtual double getLongLine();
60 
61  virtual void setLongLine(double size);
62 
63  virtual double getMediumLine();
64 
65  virtual void setMediumLine(double size);
66 
67  virtual double getSmallLine();
68 
69  virtual void setSmallLine(double size);
70 
71  virtual double getBlockSize();
72 
73  virtual void setBlockSize(double size);
74 
75  virtual double getMiddleBlockSize();
76 
77  virtual void setMiddleBlockSize(double size);
78 
79  virtual double getSmallBlockSize();
80 
81  virtual void setSmallBlockSize(double size);
82 
83  virtual double getHeight();
84 
85  virtual void setHeight(double size);
86 
87  virtual double getCornerSize();
88 
89  virtual void setCornerSize(double size);
90 
91  virtual double getSpacingLineText();
92 
93  virtual void setSpacingLineText(double size);
94 
95  protected:
96 
97  virtual void drawRuler(QGraphicsView* view, QPainter* painter, double scale) = 0;
98 
99  virtual void drawText(QPoint p, std::string txt, double angle, QPainter* painter);
100 
101  protected:
102 
103  bool m_visible;
104 
105  double m_longLine;
106  double m_mediumLine;
107  double m_smallLine;
111  double m_height;
112  double m_cornerSize;
114  };
115  }
116 }
117 
118 #endif
#define TELAYOUTEXPORT
You can use this macro in order to export/import classes and functions from this module.
Definition: Config.h:99
Abstract class representing a ruler.
Definition: AbstractRuler.h:47