1 // Copyright (C) 2014-20xx CEA/DEN, EDF R&D
4 * ModuleBase_IPropertyPanel.h
6 * Created on: Oct 01, 2014
10 #ifndef ModuleBase_PROPERTYPANEL_H_
11 #define ModuleBase_PROPERTYPANEL_H_
13 #include "ModuleBase.h"
15 #include <QDockWidget>
18 class ModuleBase_ModelWidget;
20 class MODULEBASE_EXPORT ModuleBase_IPropertyPanel : public QDockWidget
24 ModuleBase_IPropertyPanel(QWidget* theParent) : QDockWidget(theParent), myIsEditing(false) {}
26 /// Returns currently active widget
27 virtual ModuleBase_ModelWidget* activeWidget() const = 0;
29 /// Returns all property panel's widget created by WidgetFactory
30 virtual const QList<ModuleBase_ModelWidget*>& modelWidgets() const = 0;
32 /// Editing mode depends on mode of current operation. This value is defined by it.
33 void setEditingMode(bool isEditing) { myIsEditing = isEditing; }
34 bool isEditingMode() const { return myIsEditing; }
37 /// The signal about key release on the control, that corresponds to the attribute
38 /// \param theEvent key release event
39 void keyReleased(QKeyEvent* theEvent);
41 /// The signal about the widget activation
42 /// \param theWidget the activated widget
43 void widgetActivated(ModuleBase_ModelWidget* theWidget);
45 /// Emited when there is no next widget
49 /// Activate the next widget in the property panel
50 /// \param theWidget a widget. The next widget should be activated
51 virtual void activateNextWidget(ModuleBase_ModelWidget* theWidget) = 0;
53 /// Activate the next from current widget in the property panel
54 virtual void activateNextWidget() = 0;
56 // Makes the given widget active, highlights it and removes
57 // highlighting from the previous active widget
58 // emits widgetActivated(theWidget) signal
59 virtual void activateWidget(ModuleBase_ModelWidget* theWidget) = 0;