-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathproxy_item_delegate.cpp
More file actions
64 lines (51 loc) · 1.93 KB
/
proxy_item_delegate.cpp
File metadata and controls
64 lines (51 loc) · 1.93 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
#include "proxy_item_delegate.hpp"
#include <QApplication>
#include <QEvent>
#include <QMouseEvent>
#include <QTableView>
ProxyItemDelegate::ProxyItemDelegate(QAbstractItemDelegate * delegate, QObject * parent)
: TBase(parent)
, m_delegate(delegate)
{
Q_ASSERT(m_delegate != nullptr);
}
void ProxyItemDelegate::paint(QPainter * painter, QStyleOptionViewItem const & option, QModelIndex const & index) const
{
m_delegate->paint(painter, option, index);
}
QSize ProxyItemDelegate::sizeHint(QStyleOptionViewItem const & option, QModelIndex const & index) const
{
return m_delegate->sizeHint(option, index);
}
QWidget * ProxyItemDelegate::createEditor(QWidget * parent, QStyleOptionViewItem const & option, QModelIndex const & index) const
{
return m_delegate->createEditor(parent, option, index);
}
void ProxyItemDelegate::destroyEditor(QWidget * editor, QModelIndex const & index) const
{
m_delegate->destroyEditor(editor, index);
}
void ProxyItemDelegate::setEditorData(QWidget * editor, QModelIndex const & index) const
{
m_delegate->setEditorData(editor, index);
}
void ProxyItemDelegate::setModelData(QWidget * editor, QAbstractItemModel * model, QModelIndex const & index) const
{
m_delegate->setModelData(editor, model, index);
}
void ProxyItemDelegate::updateEditorGeometry(QWidget * editor, QStyleOptionViewItem const & option, QModelIndex const & index) const
{
m_delegate->updateEditorGeometry(editor, option, index);
}
bool ProxyItemDelegate::editorEvent(QEvent * event, QAbstractItemModel * model, QStyleOptionViewItem const & option, QModelIndex const & index)
{
return m_delegate->editorEvent(event, model, option, index);
}
bool ProxyItemDelegate::helpEvent(QHelpEvent * event, QAbstractItemView * view, QStyleOptionViewItem const & option, QModelIndex const & index)
{
return m_delegate->helpEvent(event, view, option, index);
}
QVector<int> ProxyItemDelegate::paintingRoles() const
{
return m_delegate->paintingRoles();
}