2021-06-14 15:48:31 +00:00
|
|
|
/*
|
|
|
|
SPDX-FileCopyrightText: 2009 Tony Murray <murraytony@gmail.com>
|
|
|
|
|
|
|
|
SPDX-License-Identifier: GPL-2.0-or-later
|
|
|
|
*/
|
2008-03-21 21:37:35 +00:00
|
|
|
|
2010-01-22 07:36:29 +00:00
|
|
|
#ifndef CONNECTIONDELEGATE_H
|
|
|
|
#define CONNECTIONDELEGATE_H
|
2008-03-21 21:37:35 +00:00
|
|
|
|
2010-01-22 07:36:29 +00:00
|
|
|
#include <QStyledItemDelegate>
|
2008-03-21 21:37:35 +00:00
|
|
|
|
2010-01-22 07:36:29 +00:00
|
|
|
class ConnectionDelegate : public QStyledItemDelegate
|
2008-03-21 21:37:35 +00:00
|
|
|
{
|
2010-01-22 07:36:29 +00:00
|
|
|
Q_OBJECT
|
2008-03-21 21:37:35 +00:00
|
|
|
public:
|
2018-04-23 20:47:28 +00:00
|
|
|
explicit ConnectionDelegate(QObject *parent = nullptr);
|
2024-01-28 15:16:19 +00:00
|
|
|
QString displayText(const QVariant &value, const QLocale &locale) const override;
|
2018-04-23 20:46:32 +00:00
|
|
|
void paint(QPainter *painter, const QStyleOptionViewItem &option, const QModelIndex &index) const override;
|
|
|
|
QSize sizeHint(const QStyleOptionViewItem &option, const QModelIndex &index) const override;
|
2008-03-21 21:37:35 +00:00
|
|
|
};
|
|
|
|
|
2010-01-22 07:36:29 +00:00
|
|
|
#endif // CONNECTIONDELEGATE_H
|