MNE-CPP  beta 1.0
eventdelegate.h
Go to the documentation of this file.
1 //=============================================================================================================
38 #ifndef EVENTDELEGATE_H
39 #define EVENTDELEGATE_H
40 
41 //*************************************************************************************************************
42 //=============================================================================================================
43 // INCLUDES
44 //=============================================================================================================
45 
46 #include "../Models/eventmodel.h"
47 
48 
49 //*************************************************************************************************************
50 //=============================================================================================================
51 // QT INCLUDES
52 //=============================================================================================================
53 
54 #include <QItemDelegate>
55 #include <QSpinBox>
56 #include <QDoubleSpinBox>
57 #include <QComboBox>
58 #include <QDebug>
59 #include <QSettings>
60 
61 
62 //*************************************************************************************************************
63 //=============================================================================================================
64 // DEFINE NAMESPACE MNEBrowseRawQt
65 //=============================================================================================================
66 
67 namespace MNEBrowseRawQt
68 {
69 
70 
71 //=============================================================================================================
75 class EventDelegate : public QItemDelegate
76 {
77  Q_OBJECT
78 
79 public:
80  EventDelegate(QObject *parent = 0);
81 
82  //=========================================================================================================
87  QWidget *createEditor(QWidget *parent, const QStyleOptionViewItem &option, const QModelIndex &index) const;
88  void setEditorData(QWidget *editor, const QModelIndex &index) const;
89  void setModelData(QWidget *editor, QAbstractItemModel *model, const QModelIndex &index) const;
90  void updateEditorGeometry(QWidget *editor, const QStyleOptionViewItem &option, const QModelIndex &index) const;
91 
92 private:
93  QSettings m_qSettings;
94 };
95 
96 } //NAMESPACE
97 
98 #endif // EVENTDELEGATE_H
QWidget * createEditor(QWidget *parent, const QStyleOptionViewItem &option, const QModelIndex &index) const