move graph data store to graphical item helper

It is required by custom graphs. X-AW-Count parameter (which is only
    recognized by Graph item type) has been introduced
This commit is contained in:
2016-03-14 12:04:38 +03:00
parent 7f665fef77
commit 52b1255d3f
6 changed files with 114 additions and 32 deletions

View File

@ -32,10 +32,10 @@ public:
virtual ~GraphicalItemHelper();
// parameters
void setParameters(const QColor active, const QColor inactive,
const int width, const int height);
const int width, const int height, const int count);
// paint methods
void paintCircle(const float &percent);
void paintGraph(const QList<float> &value);
void paintGraph(const float &value);
void paintHorizontal(const float &percent);
void paintVertical(const float &percent);
// additional conversion methods
@ -44,11 +44,15 @@ public:
QColor stringToColor(const QString &color);
private:
void storeValue(const float &value);
QGraphicsScene *m_scene = nullptr;
int m_count;
QColor m_activeColor;
QColor m_inactiveColor;
int m_width;
int m_height;
// list of values which will be used to store data for graph type only
QList<float> m_values;
};