Salome HOME
Make property panel as a GUI of an operation
[modules/shaper.git] / src / ModuleBase / ModuleBase_IPropertyPanel.h
1 /*
2  * ModuleBase_IPropertyPanel.h
3  *
4  *  Created on: Oct 01, 2014
5  *      Author: vsv
6  */
7
8 #ifndef ModuleBase_PROPERTYPANEL_H_
9 #define ModuleBase_PROPERTYPANEL_H_
10
11 #include "ModuleBase.h"
12
13 #include <QDockWidget>
14 #include <QKeyEvent>
15
16 class ModuleBase_ModelWidget;
17
18 class MODULEBASE_EXPORT ModuleBase_IPropertyPanel : public QDockWidget
19 {
20 Q_OBJECT
21 public:
22   ModuleBase_IPropertyPanel(QWidget* theParent) : QDockWidget(theParent) {}
23
24   /// Returns currently active widget
25   virtual ModuleBase_ModelWidget* activeWidget() const = 0;
26
27 signals:
28   /// The signal about key release on the control, that corresponds to the attribute
29   /// \param theEvent key release event
30   void keyReleased(QKeyEvent* theEvent);
31   /// The signal about the widget activation
32   /// \param theWidget the activated widget
33   void widgetActivated(ModuleBase_ModelWidget* theWidget);
34
35 public slots:
36   /// Activate the next widget in the property panel
37   /// \param theWidget a widget. The next widget should be activated
38   virtual void activateNextWidget(ModuleBase_ModelWidget* theWidget) = 0;
39
40   /// Activate the next from current widget in the property panel
41   virtual void activateNextWidget() = 0;
42 };
43
44 #endif