Marlin  01.17.01
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
gparamdelegate.h
Go to the documentation of this file.
1 #ifndef GPARAMDELEGATE_H
2 #define GPARAMDELEGATE_H
3 
11 #include <QItemDelegate>
12 
14 
15 class QTableWidget;
16 class QMainWindow;
17 
18 using namespace marlin;
19 
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:
35  QMainWindow* _mw{};
36  QTableWidget* _parent{};
37 };
38 
39 #endif
Simple parameters class for Marlin.