src
bar_delegate.h
Go to the documentation of this file.
1
// Renders a colored bar graph behind the data
2
// Author: Max Schwarz <max.schwarz@uni-bonn.de>
3
4
#ifndef BAR_DELEGATE_H
5
#define BAR_DELEGATE_H
6
7
#include <QStyledItemDelegate>
8
9
namespace
rqt_rosmon
10
{
11
12
class
BarDelegate
:
public
QStyledItemDelegate
13
{
14
public
:
15
explicit
BarDelegate
(QObject* parent = 0);
16
~BarDelegate
()
override
=
default
;
17
18
void
setRange
(
double
min,
double
max);
19
20
virtual
void
paint
(QPainter* painter,
const
QStyleOptionViewItem& option,
const
QModelIndex& index)
const override
;
21
private
:
22
double
m_min
;
23
double
m_max
;
24
};
25
26
}
27
28
#endif
rqt_rosmon::BarDelegate::setRange
void setRange(double min, double max)
Definition:
bar_delegate.cpp:18
rqt_rosmon::BarDelegate::paint
virtual void paint(QPainter *painter, const QStyleOptionViewItem &option, const QModelIndex &index) const override
Definition:
bar_delegate.cpp:24
rqt_rosmon::BarDelegate::m_min
double m_min
Definition:
bar_delegate.h:22
rqt_rosmon
Definition:
bar_delegate.cpp:8
rqt_rosmon::BarDelegate::~BarDelegate
~BarDelegate() override=default
rqt_rosmon::BarDelegate::BarDelegate
BarDelegate(QObject *parent=0)
Definition:
bar_delegate.cpp:11
rqt_rosmon::BarDelegate
Definition:
bar_delegate.h:12
rqt_rosmon::BarDelegate::m_max
double m_max
Definition:
bar_delegate.h:23
rqt_rosmon
Author(s): Max Schwarz
autogenerated on Wed Feb 21 2024 04:01:19