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 virtual void setEditingMode(bool isEditing) { myIsEditing = isEditing; }
34 bool isEditingMode() const { return myIsEditing; }
36 /// Set Enable/Disable state of Ok button
37 virtual void setOkEnabled(bool theEnabled) = 0;
39 /// Returns state of Ok button
40 virtual bool isOkEnabled() const = 0;
42 /// Set Enable/Disable state of Ok button
43 virtual void setCancelEnabled(bool theEnabled) = 0;
45 /// Returns state of Ok button
46 virtual bool isCancelEnabled() const = 0;
49 /// The signal about key release on the control, that corresponds to the attribute
50 /// \param theEvent key release event
51 void keyReleased(QKeyEvent* theEvent);
53 /// The signal about the widget activation
54 /// \param theWidget the activated widget
55 void widgetActivated(ModuleBase_ModelWidget* theWidget);
57 /// Emited when there is no next widget
61 /// Activate the next widget in the property panel
62 /// \param theWidget a widget. The next widget should be activated
63 virtual void activateNextWidget(ModuleBase_ModelWidget* theWidget) = 0;
65 /// Activate the next from current widget in the property panel
66 virtual void activateNextWidget() = 0;
68 // Makes the given widget active, highlights it and removes
69 // highlighting from the previous active widget
70 // emits widgetActivated(theWidget) signal
71 virtual void activateWidget(ModuleBase_ModelWidget* theWidget) = 0;