2012-08-06 20:50:30 +00:00
|
|
|
/* sparkline_delegate.h
|
|
|
|
*
|
|
|
|
* Wireshark - Network traffic analyzer
|
|
|
|
* By Gerald Combs <gerald@wireshark.org>
|
|
|
|
* Copyright 1998 Gerald Combs
|
|
|
|
*
|
2018-02-07 11:26:45 +00:00
|
|
|
* SPDX-License-Identifier: GPL-2.0-or-later*/
|
2012-08-06 20:50:30 +00:00
|
|
|
|
2012-08-03 23:30:47 +00:00
|
|
|
#ifndef SPARKLINE_DELEGATE_H
|
|
|
|
#define SPARKLINE_DELEGATE_H
|
|
|
|
|
|
|
|
#include <QStyledItemDelegate>
|
|
|
|
|
|
|
|
class SparkLineDelegate : public QStyledItemDelegate
|
|
|
|
{
|
|
|
|
public:
|
|
|
|
SparkLineDelegate(QWidget *parent = 0) : QStyledItemDelegate(parent) {}
|
|
|
|
|
2012-08-14 00:25:42 +00:00
|
|
|
protected:
|
2012-08-03 23:30:47 +00:00
|
|
|
void paint(QPainter *painter, const QStyleOptionViewItem &option,
|
|
|
|
const QModelIndex &index) const;
|
|
|
|
QSize sizeHint(const QStyleOptionViewItem &option,
|
|
|
|
const QModelIndex &index) const;
|
2014-08-06 21:50:48 +00:00
|
|
|
QWidget *createEditor(QWidget *parent, const QStyleOptionViewItem &option, const QModelIndex &index) const;
|
2012-08-03 23:30:47 +00:00
|
|
|
|
|
|
|
signals:
|
2012-08-06 10:59:00 +00:00
|
|
|
|
2012-08-03 23:30:47 +00:00
|
|
|
public slots:
|
2012-08-06 10:59:00 +00:00
|
|
|
|
2012-08-03 23:30:47 +00:00
|
|
|
};
|
|
|
|
|
2017-01-11 12:55:23 +00:00
|
|
|
Q_DECLARE_METATYPE(QList<int>)
|
2012-08-03 23:30:47 +00:00
|
|
|
|
|
|
|
#endif // SPARKLINE_DELEGATE_H
|
2012-09-04 08:18:31 +00:00
|
|
|
|
|
|
|
/*
|
|
|
|
* Editor modelines
|
|
|
|
*
|
|
|
|
* Local Variables:
|
|
|
|
* c-basic-offset: 4
|
|
|
|
* tab-width: 8
|
|
|
|
* indent-tabs-mode: nil
|
|
|
|
* End:
|
|
|
|
*
|
|
|
|
* ex: set shiftwidth=4 tabstop=8 expandtab:
|
|
|
|
* :indentSize=4:tabSize=8:noTabs=true:
|
|
|
|
*/
|