All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
PaperConfig.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 PaperConfig.h
22 
23  \brief Class responsible for paper setting. Size, orientation, custom size, etc.
24 
25  \ingroup layout
26 */
27 
28 #ifndef __TERRALIB_LAYOUT_INTERNAL_PAPER_CONFIG_H
29 #define __TERRALIB_LAYOUT_INTERNAL_PAPER_CONFIG_H
30 
31 // TerraLib
32 #include "../core/enum/AbstractType.h"
33 #include "../../geometry/Envelope.h"
34 #include "Config.h"
35 
36 namespace te
37 {
38  namespace layout
39  {
40  /*!
41  \brief Class responsible for paper setting. Size, orientation, custom size, etc.
42 
43  \ingroup layout
44  */
46  {
47  public:
48 
49  /*!
50  \brief Constructor
51  */
52  PaperConfig();
53 
54  /*!
55  \brief Constructor
56 
57  \param paperType paper type. Ex.: A4
58  */
60 
61  /*!
62  \brief Destructor
63  */
64  virtual ~PaperConfig();
65 
66  /*!
67  \brief Custom paper size.
68 
69  \param w width
70  \param h height
71  */
72  virtual void setPaperSizeCustom(double w, double h);
73 
74  /*!
75  \brief Sets paper type enum. Ex.: A4.
76 
77  \param paperType paper type enum
78  */
79  virtual void setPaperType(LayoutAbstractPaperType paperType);
80 
81  /*!
82  \brief Returns paper type.
83 
84  \param paper type enum
85  */
86  virtual LayoutAbstractPaperType getPaperType();
87 
88  /*!
89  \brief Returns paper size. Height and Width.
90 
91  \param w returns width
92  \param h returns height
93  */
94  virtual void getPaperSize(double &w, double &h);
95 
96  /*!
97  \brief Sets paper orientation type enum. Ex.: Portrait.
98 
99  \param paper orientation type enum
100  */
101  virtual void setPaperOrientation(LayoutOrientationType orientation);
102 
103  /*!
104  \brief Returns paper orientation type enum.
105 
106  \param paper orientation type enum
107  */
108  virtual LayoutOrientationType getPaperOrientantion();
109 
110  protected:
111 
112  LayoutAbstractPaperType m_paperType; //!< paper type enum. Ex.: A4
113  LayoutOrientationType m_paperOrientationType; //!< paper orientation type enum. Ex.: Portrait
114  double m_customW; //!< custom paper size width
115  double m_customH; //!< custom paper size height
116  };
117  }
118 }
119 
120 #endif
Class responsible for paper setting. Size, orientation, custom size, etc.
Definition: PaperConfig.h:45
LayoutAbstractPaperType
Enum TdkAbstractComponentType. This is the enumeration of the components types.
Definition: AbstractType.h:65
#define TELAYOUTEXPORT
You can use this macro in order to export/import classes and functions from this module.
Definition: Config.h:99
double m_customH
custom paper size height
Definition: PaperConfig.h:115
LayoutAbstractPaperType m_paperType
paper type enum. Ex.: A4
Definition: PaperConfig.h:112
LayoutOrientationType m_paperOrientationType
paper orientation type enum. Ex.: Portrait
Definition: PaperConfig.h:113
Configuration flags for the Terrralib Layout module.
double m_customW
custom paper size width
Definition: PaperConfig.h:114