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 <QPainter>
12#include <QModelIndex>
13
14namespace dbe
15{
16class CustomDelegate: public QItemDelegate
17{
18 Q_OBJECT
19public:
20 explicit CustomDelegate ( QObject * parent = 0 );
21
22 QWidget * createEditor ( QWidget * parent, const QStyleOptionViewItem & option,
23 const QModelIndex & index ) const;
24
25 void setEditorData ( QWidget * editor, const QModelIndex & index ) const;
26
27 void setModelData ( QWidget * editor, QAbstractItemModel * model,
28 const QModelIndex & index ) const;
29
30 void updateEditorGeometry ( QWidget * editor, const QStyleOptionViewItem & option,
31 const QModelIndex & index ) const;
32
33 bool eventFilter ( QObject * editor, QEvent * event );
34
35 bool editorEvent ( QEvent * event, QAbstractItemModel * model,
36 const QStyleOptionViewItem & option, const QModelIndex & index );
37
38 void paint ( QPainter * painter, const QStyleOptionViewItem & option,
39 const QModelIndex & index ) const;
40
41private slots:
42 void CommitAndClose();
43 void Close();
44
45signals:
46 void CreateObjectEditorSignal ( tref Object ) const;
47};
48} // end namespace dbe
49#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:35