plotjuggler_app
plot_background.h
Go to the documentation of this file.
1
/*
2
* This Source Code Form is subject to the terms of the Mozilla Public
3
* License, v. 2.0. If a copy of the MPL was not distributed with this
4
* file, You can obtain one at https://mozilla.org/MPL/2.0/.
5
*/
6
7
#ifndef PLOT_BACKGROUND_H
8
#define PLOT_BACKGROUND_H
9
10
#include <QBrush>
11
#include "
qwt_plot_zoneitem.h
"
12
13
#include "
PlotJuggler/plotdata.h
"
14
#include "
color_map.h
"
15
16
class
BackgroundColorItem
:
public
QwtPlotItem
17
{
18
public
:
19
BackgroundColorItem
(
const
PJ::PlotData
&
data
, QString colormap_name);
20
21
virtual
~BackgroundColorItem
()
override
=
default
;
22
23
void
setTimeOffset
(
double
* time_offset)
24
{
25
_time_offset
= time_offset;
26
}
27
28
int
rtti
()
const override
29
{
30
return
QwtPlotItem::Rtti_PlotZone
;
31
}
32
33
virtual
void
draw
(QPainter* painter,
const
QwtScaleMap
&,
const
QwtScaleMap
&,
34
const
QRectF& canvasRect)
const override
;
35
36
virtual
QRectF
boundingRect
()
const override
;
37
38
QString
colormapName
()
const
39
{
40
return
_colormap_name
;
41
}
42
43
QString
dataName
()
const
44
{
45
return
_data_name
;
46
}
47
48
private
:
49
const
PJ::PlotData
&
_data
;
50
QString
_data_name
;
51
QString
_colormap_name
;
52
double
*
_time_offset
=
nullptr
;
53
};
54
55
#endif // PLOT_BACKGROUND_H
color_map.h
PJ::TimeseriesBase
Definition:
timeseries.h:16
BackgroundColorItem::draw
virtual void draw(QPainter *painter, const QwtScaleMap &, const QwtScaleMap &, const QRectF &canvasRect) const override
Draw the item.
Definition:
plot_background.cpp:18
BackgroundColorItem::setTimeOffset
void setTimeOffset(double *time_offset)
Definition:
plot_background.h:23
BackgroundColorItem::_data_name
QString _data_name
Definition:
plot_background.h:50
BackgroundColorItem::dataName
QString dataName() const
Definition:
plot_background.h:43
BackgroundColorItem::_data
const PJ::PlotData & _data
Definition:
plot_background.h:49
BackgroundColorItem::~BackgroundColorItem
virtual ~BackgroundColorItem() override=default
BackgroundColorItem::boundingRect
virtual QRectF boundingRect() const override
Definition:
plot_background.cpp:72
qwt_plot_zoneitem.h
BackgroundColorItem::_time_offset
double * _time_offset
Definition:
plot_background.h:52
BackgroundColorItem::rtti
int rtti() const override
Definition:
plot_background.h:28
BackgroundColorItem::BackgroundColorItem
BackgroundColorItem(const PJ::PlotData &data, QString colormap_name)
Definition:
plot_background.cpp:11
QwtPlotItem
Base class for items on the plot canvas.
Definition:
qwt_plot_item.h:66
QwtScaleMap
A scale map.
Definition:
qwt_scale_map.h:26
plotdata.h
mqtt_test.data
dictionary data
Definition:
mqtt_test.py:22
BackgroundColorItem::_colormap_name
QString _colormap_name
Definition:
plot_background.h:51
BackgroundColorItem
Definition:
plot_background.h:16
BackgroundColorItem::colormapName
QString colormapName() const
Definition:
plot_background.h:38
QwtPlotItem::Rtti_PlotZone
@ Rtti_PlotZone
For QwtPlotZoneItem.
Definition:
qwt_plot_item.h:126
plotjuggler
Author(s): Davide Faconti
autogenerated on Mon Nov 11 2024 03:23:45