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 /// Returns main widget of the property panel, which children will be created
29 /// by WidgetFactory using the XML definition
30 QWidget* contentWidget();
31 /// Brings back all widget created by widget factory for signal/slot
32 /// connections and further processing
33 void setModelWidgets(const QList<ModuleBase_ModelWidget*>& theWidgets);
34 /// Returns all property panel's widget created by WidgetFactory
35 const QList<ModuleBase_ModelWidget*>& modelWidgets() const;
36 /// Removes all widgets in the widget area of the property panel
40 void updateContentWidget(FeaturePtr theFeature);
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);
44 // Enables / disables "ok" ("accept") button
45 void setAcceptEnabled(bool);
48 /// The signal about key release on the control, that corresponds to the attribute
49 /// \param theEvent key release event
50 void keyReleased(QKeyEvent* theEvent);
51 /// The signal about the widget activation
52 /// \param theWidget the activated widget
53 void widgetActivated(ModuleBase_ModelWidget* theWidget);
55 /// Signal about the point 2d set to the feature
56 /// \param the feature
57 /// \param the attribute of the feature
58 void storedPoint2D(ObjectPtr theFeature, const std::string& theAttribute);
61 QWidget* myCustomWidget;
62 QList<ModuleBase_ModelWidget*> myWidgets;
63 QVBoxLayout* myMainLayout;
66 #endif /* XGUI_PROPERTYPANEL_H_ */