-
Notifications
You must be signed in to change notification settings - Fork 8
Expand file tree
/
Copy pathqchartpiece.h
More file actions
33 lines (27 loc) · 767 Bytes
/
qchartpiece.h
File metadata and controls
33 lines (27 loc) · 767 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
#ifndef QCHARTPIECE_H
#define QCHARTPIECE_H
#include "global_header.h"
#include <QObject>
#include <QColor>
#include <QVector>
class SHAREDLIBSHARED_EXPORT QChartPiece : public QObject
{
Q_OBJECT
public:
explicit QChartPiece(QObject *parent = 0);
QChartPiece(const QChartPiece&p);
void operator =(const QChartPiece& p);
float value() const{return (values.isEmpty()) ? 0 : values.at(0);}
QVector<float> getValues() const{return values;}
void addValue(float f){i_values.append(f);values.append(0);}
void addValue(QVector<float> f){i_values=f;}
void setPercent(float f);
QString nombre;
QColor color;
private:
QVector<float> values;
QVector<float> i_values;
signals:
public slots:
};
#endif // QCHARTPIECE_H