Salome HOME
Call show method of the error dialog in it's thread. Fixes #79
[modules/shaper.git] / src / XGUI / XGUI_PropertyPanel.h
1 /*
2  * XGUI_PropertyPanel.h
3  *
4  *  Created on: Apr 29, 2014
5  *      Author: sbh
6  */
7
8 #ifndef XGUI_PROPERTYPANEL_H_
9 #define XGUI_PROPERTYPANEL_H_
10
11 #include "XGUI.h"
12
13 #include <ModuleBase_ModelWidget.h>
14
15 #include <QDockWidget>
16 #include <QList>
17
18 class QKeyEvent;
19
20 class XGUI_EXPORT XGUI_PropertyPanel: public QDockWidget
21 {
22   Q_OBJECT
23 public:
24   XGUI_PropertyPanel(QWidget* theParent);
25   virtual ~XGUI_PropertyPanel();
26
27   QWidget* contentWidget();
28   void setModelWidgets(const QList<ModuleBase_ModelWidget*>& theWidgets);
29
30   virtual bool eventFilter(QObject *theObject, QEvent *theEvent);
31
32 public slots:
33   void updateContentWidget(boost::shared_ptr<ModelAPI_Feature> theFeature);
34   /// slot to set the focus to the widget visualized an attribute with the given name
35   /// \param theAttributteName
36   void onFocusActivated(const std::string& theAttributeName);
37
38 signals:
39   /// The signal about key release on the control, that corresponds to the attribute
40   /// \param theAttributeName a name of the attribute
41   /// \param theEvent key release event
42   void keyReleased(const std::string& theAttributeName, QKeyEvent* theEvent);
43
44 private:
45   QWidget* myCustomWidget;
46
47   QList<ModuleBase_ModelWidget*> myWidgets;
48 };
49
50 #endif /* XGUI_PROPERTYPANEL_H_ */