4 * Created on: Apr 29, 2014
8 #ifndef XGUI_PROPERTYPANEL_H_
9 #define XGUI_PROPERTYPANEL_H_
13 #include <ModuleBase_ModelWidget.h>
15 #include <QDockWidget>
21 class XGUI_EXPORT XGUI_PropertyPanel: public QDockWidget
25 XGUI_PropertyPanel(QWidget* theParent);
26 virtual ~XGUI_PropertyPanel();
28 QWidget* contentWidget();
29 void setModelWidgets(const QList<ModuleBase_ModelWidget*>& theWidgets);
34 virtual bool eventFilter(QObject *theObject, QEvent *theEvent);
37 void updateContentWidget(FeaturePtr theFeature);
38 /// slot to set the focus to the widget visualized an attribute with the given name
39 /// \param theAttributteName
40 void onFocusActivated(const std::string& theAttributeName);
41 /// slot to activate the next widget in the property panel
42 /// \param theWidget a widget. The next widget should be activated
43 void onActivateNextWidget(ModuleBase_ModelWidget* theWidget);
46 /// The signal about key release on the control, that corresponds to the attribute
47 /// \param theAttributeName a name of the attribute
48 /// \param theEvent key release event
49 void keyReleased(const std::string& theAttributeName, QKeyEvent* theEvent);
50 /// The signal about the widget activation
51 /// \param theWidget the activated widget
52 void widgetActivated(ModuleBase_ModelWidget* theWidget);
54 /// Signal about the point 2d set to the feature
55 /// \param the feature
56 /// \param the attribute of the feature
57 void storedPoint2D(FeaturePtr theFeature, const std::string& theAttribute);
60 /// Activate the widget, which means the focus on the widget.
61 /// The signal about the widget activation is emitted
63 void activateWidget(ModuleBase_ModelWidget* theWidget);
66 QWidget* myCustomWidget;
68 QList<ModuleBase_ModelWidget*> myWidgets;
70 QVBoxLayout* myMainLayout;
73 #endif /* XGUI_PROPERTYPANEL_H_ */