All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
ObjectInspectorOutside.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 ObjectInspectorOutside.h
22 
23  \brief Tree of names of all the items entered on the scene, MVC components, using Qt to present the name of each item and its class. Object Inspector.
24 
25  \ingroup layout
26 */
27 
28 #ifndef __TERRALIB_LAYOUT_INTERNAL_OBJECTINSPECTOR_OUTSIDE_H
29 #define __TERRALIB_LAYOUT_INTERNAL_OBJECTINSPECTOR_OUTSIDE_H
30 
31 // TerraLib
32 #include "../../core/pattern/mvc/OutsideObserver.h"
33 #include "../../../geometry/Envelope.h"
34 #include "../../core/Config.h"
35 #include "../core/propertybrowser/PropertyBrowser.h"
36 
37 // STL
38 #include <string>
39 
40 // Qt
41 #include <QWidget>
42 #include <QtPropertyBrowser/QtProperty>
43 
44 class QGraphicsItem;
45 
46 namespace te
47 {
48  namespace layout
49  {
50  class ItemObserver;
51  /*!
52  \brief Tree of names of all the items entered on the scene, MVC components, using Qt to present the name of each item and its class. Object Inspector.
53 
54  \ingroup layout
55 
56  \sa te::layout::OutsideObserver
57  */
58  class TELAYOUTEXPORT ObjectInspectorOutside : public QWidget, public OutsideObserver
59  {
60  Q_OBJECT //for slots/signals
61 
62  public:
63 
64  ObjectInspectorOutside(OutsideController* controller, Observable* o, PropertyBrowser* propertyBrowser = 0);
65 
66  virtual ~ObjectInspectorOutside();
67 
68  virtual void updateObserver(ContextItem context);
69 
70  virtual void setPosition(const double& x, const double& y);
71 
72  virtual te::gm::Coord2D getPosition();
73 
74  virtual void itemsInspector(QList<QGraphicsItem*> graphicsItems);
75 
76  virtual void selectItems(QList<QGraphicsItem*> graphicsItems);
77 
78  virtual PropertyBrowser* getObjectInspector();
79 
80  protected slots:
81 
82  virtual void onRemoveProperties(std::vector<std::string> names);
83 
84  virtual bool hasMoveItemGroup(QList<QGraphicsItem*> graphicsItems);
85 
86  protected:
87 
88  virtual QtProperty* addProperty(QGraphicsItem* item);
89 
90  virtual Property createProperty(ItemObserver* item);
91 
92  virtual void createSubProperty(QGraphicsItem* item, QtProperty* prop);
93 
94  virtual bool hasProperty(Property property);
95 
97  QList<QGraphicsItem*> m_graphicsItems;
98  };
99  }
100 }
101 
102 #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
QList< QGraphicsItem * > m_graphicsItems
#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...
Abstract class to represent an observer. "View" part of MVC component. All classes representing the g...
Definition: ItemObserver.h:52
An utility struct for representing 2D coordinates.
Definition: Coord2D.h:40
Tree of names of all the items entered on the scene, MVC components, using Qt to present the name of ...
Manage properties variants values. Maps the QProperty properties (Qt) and Property (Layout) and add t...
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