1 // Copyright (C) 2014-20xx CEA/DEN, EDF R&D -->
3 // File: ParametersPlugin_WidgetParamsMgr.h
4 // Created: 11 Apr 2016
5 // Author: Vitaly SMETANNIKOV
7 #ifndef ParametersPlugin_WidgetParamsMgr_H_
8 #define ParametersPlugin_WidgetParamsMgr_H_
10 #include <ModuleBase_ModelWidget.h>
11 #include <QModelIndex>
12 #include <QAbstractItemDelegate>
15 class QTreeWidgetItem;
16 class ParametersPlugin_ItemDelegate;
20 * Represent a content of the property panel to show/modify parameters of some feature.
22 class ParametersPlugin_WidgetParamsMgr : public ModuleBase_ModelWidget
26 /// Constructs a model widget
27 ParametersPlugin_WidgetParamsMgr(QWidget* theParent, const Config_WidgetAPI* theData);
29 /// Destructs the model widget
30 virtual ~ParametersPlugin_WidgetParamsMgr() {}
32 /// Returns list of widget controls
33 /// \return a control list
34 virtual QList<QWidget*> getControls() const;
37 /// Saves the internal parameters to the given feature
38 /// \return True in success
39 virtual bool storeValueCustom() const;
41 /// Restore value from attribute data to the widget's control
42 virtual bool restoreValueCustom();
44 /// The method called when widget is activated
45 virtual void activateCustom();
48 void onDoubleClick(const QModelIndex&);
49 void onCloseEditor(QWidget* theEditor, QAbstractItemDelegate::EndEditHint theHint);
54 QTreeWidgetItem* myFeatures;
55 QTreeWidgetItem* myParameters;
56 ParametersPlugin_ItemDelegate* myDelegate;
57 QModelIndex myEditingIndex;
59 QList<FeaturePtr> myFeatureList;