DUNE-DAQ
DUNE Trigger and Data Acquisition software
Loading...
Searching...
No Matches
CustomDelegate.hpp
Go to the documentation of this file.
1// DUNE DAQ modification notice:
2// This file has been modified from the original ATLAS dbe source for the DUNE DAQ project.
3// Fork baseline commit: dbe-02-12-17 (2022-05-12).
4// Renamed since fork: yes (from dbe/CustomDelegate.h to include/dbe/CustomDelegate.hpp).
5
6#ifndef CUSTOMDELEGATE_H
7#define CUSTOMDELEGATE_H
8
10#include <QItemDelegate>
11#include <QModelIndex>
12#include <QPainter>
13
14namespace dbe {
15class CustomDelegate : public QItemDelegate
16{
17 Q_OBJECT
18public:
19 explicit CustomDelegate(QObject* parent = 0);
20
21 QWidget* createEditor(QWidget* parent, const QStyleOptionViewItem& option, const QModelIndex& index) const;
22
23 void setEditorData(QWidget* editor, const QModelIndex& index) const;
24
25 void setModelData(QWidget* editor, QAbstractItemModel* model, const QModelIndex& index) const;
26
27 void updateEditorGeometry(QWidget* editor, const QStyleOptionViewItem& option, const QModelIndex& index) const;
28
29 bool eventFilter(QObject* editor, QEvent* event);
30
31 bool editorEvent(QEvent* event,
32 QAbstractItemModel* model,
33 const QStyleOptionViewItem& option,
34 const QModelIndex& index);
35
36 void paint(QPainter* painter, const QStyleOptionViewItem& option, const QModelIndex& index) const;
37
38private slots:
39 void CommitAndClose();
40 void Close();
41
42signals:
43 void CreateObjectEditorSignal(tref Object) const;
44};
45} // end namespace dbe
46#endif // CUSTOMDELEGATE_H
CustomDelegate(QObject *parent=0)
QWidget * createEditor(QWidget *parent, const QStyleOptionViewItem &option, const QModelIndex &index) const
bool editorEvent(QEvent *event, QAbstractItemModel *model, const QStyleOptionViewItem &option, const QModelIndex &index)
void updateEditorGeometry(QWidget *editor, const QStyleOptionViewItem &option, const QModelIndex &index) const
void setEditorData(QWidget *editor, const QModelIndex &index) const
void CreateObjectEditorSignal(tref Object) const
void paint(QPainter *painter, const QStyleOptionViewItem &option, const QModelIndex &index) const
bool eventFilter(QObject *editor, QEvent *event)
void setModelData(QWidget *editor, QAbstractItemModel *model, const QModelIndex &index) const
Include QT Headers.
inner::configobject::tref tref
Definition tref.hpp:36