Marlin  1.17.1
 All Classes Namespaces Functions Variables Enumerations Friends Pages
gparamdelegate.h
1 #ifndef GPARAMDELEGATE_H
2 #define GPARAMDELEGATE_H
3 
11 #include <QItemDelegate>
12 
13 #include "marlin/StringParameters.h"
14 
15 class QTableWidget;
16 class QMainWindow;
17 
18 using namespace marlin;
19 
20 class GParamDelegate : public QItemDelegate
21 {
22  Q_OBJECT
23 
24 public:
25  GParamDelegate(const GParamDelegate&) = default ;
26  GParamDelegate& operator=(const GParamDelegate&) = default ;
27  GParamDelegate(StringParameters* p, QMainWindow* mw, QObject *parent = 0);
28 
29  QWidget *createEditor(QWidget *parent, const QStyleOptionViewItem &option, const QModelIndex &index) const;
30  void setEditorData(QWidget *editor, const QModelIndex &index) const;
31  void setModelData(QWidget *editor, QAbstractItemModel *model, const QModelIndex &index) const;
32 
33 private:
34  StringParameters* _p{};
35  QMainWindow* _mw{};
36  QTableWidget* _parent{};
37 };
38 
39 #endif
Definition: gparamdelegate.h:20
Simple parameters class for Marlin.
Definition: StringParameters.h:34