2
* Copyright (C) 2010 Petri Damsten <damu@iki.fi>
4
* This program is free software; you can redistribute it and/or modify
5
* it under the terms of the GNU Library General Public License version 2 as
6
* published by the Free Software Foundation
8
* This program is distributed in the hope that it will be useful,
9
* but WITHOUT ANY WARRANTY; without even the implied warranty of
10
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11
* GNU General Public License for more details
13
* You should have received a copy of the GNU Library General Public
14
* License along with this program; if not, write to the
15
* Free Software Foundation, Inc.,
16
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
19
#ifndef SM_PLOTTER_HEADER
20
#define SM_PLOTTER_HEADER
22
#include <QGraphicsWidget>
24
#include "sm_export.h"
26
class QGraphicsLinearLayout;
36
class SM_EXPORT Plotter : public QGraphicsWidget
40
Plotter(QGraphicsItem* parent = 0, Qt::WindowFlags wFlags = 0);
43
void addSample(const QList<double>& values);
44
void setAnalog(bool analog);
45
void setMinMax(double min, double max);
46
const QString& title();
47
void setTitle(const QString& title);
48
void setUnit(const QString& unit);
49
void setPlotCount(int count);
50
void setCustomPlots(const QList<QColor>& colors);
51
void setScale(qreal scale);
52
void setStackPlots(bool stack);
59
void setOverlayText(const QString& text);
60
virtual void resizeEvent(QGraphicsSceneResizeEvent* event);
63
QGraphicsLinearLayout *m_layout;
64
Plasma::SignalPlotter *m_plotter;
65
Plasma::Meter *m_meter;
71
Plasma::Frame* m_overlayFrame;
72
bool m_showAnalogValue;