From 5545f852e19143a199e625edd106675adf05e493 Mon Sep 17 00:00:00 2001 From: Andrey Date: Mon, 21 Mar 2022 15:25:08 +0300 Subject: [PATCH] graphic getters --- libs/graphic/graphic.h | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/libs/graphic/graphic.h b/libs/graphic/graphic.h index 5ae3c6d..8b44bcd 100644 --- a/libs/graphic/graphic.h +++ b/libs/graphic/graphic.h @@ -155,22 +155,33 @@ public: QString labelX() const {return label_x;} QString labelY() const {return label_y;} QString graphicName() const {return graphics[curGraphic].name;} + QString graphicName(int index) const {return graphics[index].name;} QColor backgroundColor() const {return back_color;} QColor textColor() const {return text_color;} QColor graphicColor() const {return graphics[curGraphic].pen.color();} + QColor graphicColor(int index) const {return graphics[index].pen.color();} QColor gridColor() const {return grid_pen.color();} QColor selectionColor() const {return selpen.color();} Qt::PenStyle graphicStyle() const {return graphics[curGraphic].pen.style();} + Qt::PenStyle graphicStyle(int index) const {return graphics[index].pen.style();} Qt::PenStyle gridStyle() const {return grid_pen.style();} Qt::PenStyle selectionStyle() const {return selpen.style();} double graphicLineWidth() const {return graphics[curGraphic].pen.widthF();} + double graphicLineWidth(int index) const {return graphics[index].pen.widthF();} double graphicPointWidth() const {return graphics[curGraphic].pointWidth;} + double graphicPointWidth(int index) const {return graphics[index].pointWidth;} QColor graphicFillColor() const {return graphics[curGraphic].fill_color;} + QColor graphicFillColor(int index) const {return graphics[index].fill_color;} bool graphicVisible() const {return graphics[curGraphic].visible;} + bool graphicVisible(int index) const {return graphics[index].visible;} bool graphicLinesEnabled() const {return graphics[curGraphic].lines;} + bool graphicLinesEnabled(int index) const {return graphics[index].lines;} bool graphicPointsEnabled() const {return graphics[curGraphic].points;} + bool graphicPointsEnabled(int index) const {return graphics[index].points;} bool graphicFillEnabled() const {return graphics[curGraphic].fill;} + bool graphicFillEnabled(int index) const {return graphics[index].fill;} QPen graphicPen() const {return graphics[curGraphic].pen;} + QPen graphicPen(int index) const {return graphics[index].pen;} QPen gridPen() const {return grid_pen;} QPen selectionPen() const {return selpen;} QBrush selectionBrush() const {return selbrush;} @@ -209,7 +220,8 @@ public: double graduationStepY() const {return gridy;} AxisType axisType() const {return axis_type_x;} FloatingAxisType floatingAxisType() const {return floating_axis_type;} - QVector graphicData(const int index = 0) const {return graphics[index].polyline;} + QVector graphicData() const {return graphics[curGraphic].polyline;} + QVector graphicData(int index) const {return graphics[index].polyline;} GraphicsData graphicsData() const; QByteArray graphicsDataRaw() const; QWidget * viewport() const {return canvas;}