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
virtual void paint(QPainter *painter, const QStyleOptionViewItem &option, const QModelIndex &index) const override
void setRange(double min, double max)
~BarDelegate() override=default
BarDelegate(QObject *parent=0)


rqt_rosmon
Author(s): Max Schwarz
autogenerated on Sat Jan 9 2021 03:35:46