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;
21 * A class for Property panel object definition
23 class MODULEBASE_EXPORT ModuleBase_IPropertyPanel : public QDockWidget
28 /// \param theParent is a parent of the property panel
29 ModuleBase_IPropertyPanel(QWidget* theParent) : QDockWidget(theParent), myIsEditing(false) {}
31 /// Returns currently active widget
32 virtual ModuleBase_ModelWidget* activeWidget() const = 0;
34 /// Returns all property panel's widget created by WidgetFactory
35 virtual const QList<ModuleBase_ModelWidget*>& modelWidgets() const = 0;
37 /// Editing mode depends on mode of current operation. This value is defined by it.
38 /// \param isEditing state of editing mode flag
39 virtual void setEditingMode(bool isEditing) { myIsEditing = isEditing; }
41 /// \return State of editing mode flag
42 bool isEditingMode() const { return myIsEditing; }
44 /// Set Enable/Disable state of Cancel button
45 /// \param theEnabled Enable/Disable state of Cancel button
46 virtual void setCancelEnabled(bool theEnabled) = 0;
48 /// \return Enable/Disable state of Cancel button
49 virtual bool isCancelEnabled() const = 0;
52 /// The signal about key release on the control, that corresponds to the attribute
53 /// \param theEvent key release event
54 void keyReleased(QKeyEvent* theEvent);
56 /// The signal about the widget activation
57 /// \param theWidget the activated widget
58 void beforeWidgetActivated(ModuleBase_ModelWidget* theWidget);
60 /// The signal about the widget activation
61 /// \param theWidget the activated widget
62 void widgetActivated(ModuleBase_ModelWidget* theWidget);
64 /// Emited when there is no next widget
68 /// Activate the next widget in the property panel
69 /// \param theWidget a widget. The next widget should be activated
70 virtual void activateNextWidget(ModuleBase_ModelWidget* theWidget) = 0;
72 /// Activate the next from current widget in the property panel
73 virtual void activateNextWidget() = 0;
76 * Makes the given widget active, highlights it and removes
77 * highlighting from the previous active widget
78 * emits widgetActivated(theWidget) signal
79 * \param theWidget which has to be activated
81 virtual void activateWidget(ModuleBase_ModelWidget* theWidget) = 0;
85 /// Flag which shows that current operation is in editing mode