All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
PropertiesOutside.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 PropertiesOutside.h
22 
23  \brief Properties tree for any item, MVC component, using Qt for presentation and editing.
24 
25  \ingroup layout
26 */
27 
28 #ifndef __TERRALIB_LAYOUT_INTERNAL_PROPERTIES_OUTSIDE_H
29 #define __TERRALIB_LAYOUT_INTERNAL_PROPERTIES_OUTSIDE_H
30 
31 // Qt
32 #include <QWidget>
33 
34 // QtPropertyBrowser
35 #include <QtPropertyBrowser/QtTreePropertyBrowser>
36 
37 // TerraLib
38 #include "../../core/pattern/mvc/OutsideObserver.h"
39 #include "../../../geometry/Envelope.h"
40 #include "../../core/Config.h"
41 
42 // STL
43 #include <vector>
44 
45 class QGraphicsItem;
46 class QGraphicsProxyWidget;
47 
48 class QtBrowserIndex;
49 class QLabel;
50 class QLineEdit;
51 class QToolButton;
52 
53 namespace te
54 {
55  namespace layout
56  {
57  class PropertyBrowser;
58  class Properties;
59  class SharedProperties;
60  class MapItem;
61  class MapModel;
62  class PropertiesUtils;
63 
64  /*!
65  \brief Properties tree for any item, MVC component, using Qt for presentation and editing.
66 
67  \ingroup layout
68 
69  \sa te::layout::OutsideObserver
70  */
71  class TELAYOUTEXPORT PropertiesOutside : public QWidget, public OutsideObserver
72  {
73  Q_OBJECT //for slots/signals
74 
75  public:
76 
77  PropertiesOutside(OutsideController* controller, Observable* o, PropertyBrowser* propertyBrowser = 0);
78 
79  virtual ~PropertiesOutside();
80 
81  virtual void updateObserver(ContextItem context);
82 
83  virtual void setPosition(const double& x, const double& y);
84 
85  virtual te::gm::Coord2D getPosition();
86 
87  virtual void itemsSelected(QList<QGraphicsItem*> graphicsItems, QList<QGraphicsItem*> allItems);
88 
89  virtual void refreshOutside();
90 
91  protected slots:
92 
93  virtual void onClear(std::vector<std::string> names);
94 
95  private slots:
96 
97  void onChangePropertyValue(Property property);
98 
99  protected:
100 
101  virtual void closeEvent ( QCloseEvent * event );
102 
103  virtual void createLayout();
104 
105  virtual void changeMapVisitable(Property property);
106 
107  virtual MapModel* getMapModel(std::string nameMap);
108 
109  virtual bool sendPropertyToSelectedItems(Property property);
110 
111  virtual bool sendPropertyToSelectedItem(Property property);
112 
113  protected:
114 
116 
117  QList<QGraphicsItem*> m_graphicsItems;
118  QList<QGraphicsItem*> m_allItems;
119  QLabel* m_nameLabel;
125  };
126  }
127 }
128 
129 #endif
Abstract class to represent an observable. "Model" part of MVC component.
Definition: Observable.h:56
Class responsible for maintaining the drawing context of a MVC component. It is always used by the "M...
Definition: ContextItem.h:49
Properties tree for any item, MVC component, using Qt for presentation and editing.
#define TELAYOUTEXPORT
You can use this macro in order to export/import classes and functions from this module.
Definition: Config.h:99
Abstract class to represent an observer. "View" part of MVC widget. All classes representing the grap...
An utility struct for representing 2D coordinates.
Definition: Coord2D.h:40
QList< QGraphicsItem * > m_allItems
Manage properties variants values. Maps the QProperty properties (Qt) and Property (Layout) and add t...
Class that represents a "Model" part of Map MVC component. Its coordinate system is the same of scene...
Definition: MapModel.h:61
Utility class with functions to facilitate handling of qt properties and properties layout module...
QList< QGraphicsItem * > m_graphicsItems
Abstract class to represent a controller. "Controller" part of MVC widget. All classes representing t...
A property acts like a attribute member of a object and stores the state of this attribute. A set of properties stores the state of an object. Any data type, not included in the convertValue method in the class te::layout::Variant, it will be by default "std::string" value.
Definition: Property.h:47
PropertyBrowser * m_layoutPropertyBrowser