AbstractFormItem.h
Go to the documentation of this file.
1 /* Copyright (C) 2011-2012 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 src/terralib/qt/plugins/mobile/core/form/AbstractFormItem.h
22 
23 \brief This file defines the abstract class for a form item.
24 */
25 
26 #ifndef __TE_QT_PLUGINS_TERRAMOBILE_INTERNAL_ABSTRACTITEM_H
27 #define __TE_QT_PLUGINS_TERRAMOBILE_INTERNAL_ABSTRACTITEM_H
28 
29 #define BOOLFORMITEMTYPE "boolean"
30 #define DATEFORMITEMTYPE "date"
31 #define DOUBLEFORMITEMTYPE "double"
32 #define INTFORMITEMTYPE "integer"
33 #define LABELFORMITEMTYPE "label"
34 #define PICTUREFORMITEMTYPE "pictures"
35 #define STRINGCOMBOFORMITEMTYPE "stringcombo"
36 #define STRINGFORMITEMTYPE "string"
37 #define TIMEFORMITEMTYPE "time"
38 
39 // TerraLib
40 #include "../../Config.h"
41 
42 // STL
43 #include <string>
44 #include <vector>
45 
46 // Boost
47 #include <boost/property_tree/ptree.hpp>
48 
49 namespace te
50 {
51  namespace qt
52  {
53  namespace plugins
54  {
55  namespace terramobile
56  {
57  /*!
58  \class AbstractFormItem
59 
60  \brief This file defines the abstract class for a form item.
61  */
62 
64  {
65  public:
66 
67  /* \brief Default Constructor */
69 
70  /* \brief Default Destructor*/
71  virtual ~AbstractFormItem();
72 
73  public:
74 
75  std::string getKey() { return m_key; }
76 
77  void setKey(std::string key) { m_key = key; }
78 
79  std::string getLabel() { return m_label; }
80 
81  void setLabel(std::string label) { m_label = label; }
82 
83  std::string getType() { return m_type; }
84 
86 
87  std::string getStrDefaultValue();
88 
89  std::vector<std::string> getValues();
90 
91  protected:
92 
93  virtual void toString() = 0;
94 
95  protected:
96 
97  std::string m_key;
98  std::string m_label;
99  std::string m_type;
100 
101  std::string m_defaultValue;
102  std::vector<std::string> m_values;
103 
105 
106  };
107 
108  } // end namespace thirdParty
109  } // end namespace plugins
110  } // end namespace qt
111 } // end namespace te
112 
113 
114 #endif // __TE_QT_PLUGINS_TERRAMOBILE_INTERNAL_ABSTRACTITEM_H
std::vector< std::string > getValues()
This file defines the abstract class for a form item.
URI C++ Library.