2 * ModuleBase_IPropertyPanel.h
4 * Created on: Oct 01, 2014
8 #ifndef ModuleBase_PROPERTYPANEL_H_
9 #define ModuleBase_PROPERTYPANEL_H_
11 #include "ModuleBase.h"
13 #include <QDockWidget>
16 class ModuleBase_ModelWidget;
18 class MODULEBASE_EXPORT ModuleBase_IPropertyPanel : public QDockWidget
22 ModuleBase_IPropertyPanel(QWidget* theParent) : QDockWidget(theParent), myIsEditing(false) {}
24 /// Returns currently active widget
25 virtual ModuleBase_ModelWidget* activeWidget() const = 0;
27 /// Returns all property panel's widget created by WidgetFactory
28 virtual const QList<ModuleBase_ModelWidget*>& modelWidgets() const = 0;
30 /// Editing mode depends on mode of current operation. This value is defined by it.
31 void setEditingMode(bool isEditing) { myIsEditing = isEditing; }
32 bool isEditingMode() const { return myIsEditing; }
35 /// The signal about key release on the control, that corresponds to the attribute
36 /// \param theEvent key release event
37 void keyReleased(QKeyEvent* theEvent);
39 /// The signal about the widget activation
40 /// \param theWidget the activated widget
41 void widgetActivated(ModuleBase_ModelWidget* theWidget);
43 /// Emited when there is no next widget
47 /// Activate the next widget in the property panel
48 /// \param theWidget a widget. The next widget should be activated
49 virtual void activateNextWidget(ModuleBase_ModelWidget* theWidget) = 0;
51 /// Activate the next from current widget in the property panel
52 virtual void activateNextWidget() = 0;
54 // Makes the given widget active, highlights it and removes
55 // highlighting from the previous active widget
56 // emits widgetActivated(theWidget) signal
57 virtual void activateWidget(ModuleBase_ModelWidget* theWidget) = 0;