qrc fixed, graphic FloatingAxisType, qpicalculator moved to PIEvaluator

This commit is contained in:
2020-08-27 17:23:18 +03:00
parent b92a1fa558
commit 05874e9d7e
20 changed files with 240 additions and 203 deletions

View File

@@ -53,7 +53,7 @@ class QAD_GRAPHIC_EXPORT Graphic: public QFrame
{
Q_OBJECT
Q_FLAGS(Buttons)
Q_ENUMS(Alignment Graduation AxisType)
Q_ENUMS(Alignment Graduation AxisType FloatingAxisType)
Q_PROPERTY(QString caption READ caption WRITE setCaption)
Q_PROPERTY(QString labelX READ labelX WRITE setLabelX)
@@ -113,6 +113,7 @@ class QAD_GRAPHIC_EXPORT Graphic: public QFrame
Q_PROPERTY(double graduationStepX READ graduationStepX WRITE setGraduationStepX)
Q_PROPERTY(double graduationStepY READ graduationStepY WRITE setGraduationStepY)
Q_PROPERTY(AxisType axisType READ axisType WRITE setAxisType)
Q_PROPERTY(FloatingAxisType floatingAxisType READ floatingAxisType WRITE setFloatingAxisType)
Q_PROPERTY(Graphic::GraphicsData graphicsData READ graphicsData WRITE setGraphicsData)
Q_PROPERTY(QByteArray graphicsDataRaw READ graphicsDataRaw WRITE setGraphicsDataRaw)
@@ -143,6 +144,7 @@ public:
enum Alignment {Left, Right};
enum Graduation {Auto, Fixed};
enum AxisType {Numeric, DateTime};
enum FloatingAxisType {Free, TraceX, TraceY};
Q_DECLARE_FLAGS(Buttons, Button)
QString caption() const;
@@ -200,6 +202,7 @@ public:
double graduationStepX() const {return gridx;}
double graduationStepY() const {return gridy;}
AxisType axisType() const {return axis_type_x;}
FloatingAxisType floatingAxisType() const {return floating_axis_type;}
QVector<QPointF> graphicData(const int index = 0) const {return graphics[index].polyline;}
GraphicsData graphicsData() const;
QByteArray graphicsDataRaw() const;
@@ -294,6 +297,7 @@ public slots:
void setGraduationStepY(double sy) {gridy = sy; if (aupdate) update();}
void setGraduationSteps(double sx, double sy) {gridx = sx; gridy = sy; if (aupdate) update();}
void setAxisType(AxisType t) {axis_type_x = t; if (aupdate) update();}
void setFloatingAxisType(FloatingAxisType t) {floating_axis_type = t; setGuidesCursor(); if (aupdate) update();}
void addPoint(const QPointF & p, int graphic, bool update_ = true);
void addPoint(const QPointF & p, bool update = true) {addPoint(p, curGraphic, update);}
@@ -346,6 +350,7 @@ protected:
void updateLegend(bool es = true);
void updateLegendChecks();
void setCanvasCursor(QCursor cursor);
void setGuidesCursor();
void swapToBuffer();
void swapToNormal() {bufferActive = false;}
void setRectToLines();
@@ -388,6 +393,7 @@ protected:
QImage icon_pause_b, icon_pause_f;
Graduation grad_x, grad_y;
AxisType axis_type_x;
FloatingAxisType floating_axis_type;
double gridx, gridy, history, visible_time, inc_x, grid_numbers_x, grid_numbers_y, LN10;
double eminx, eminy, emaxx, emaxy, pause_phase, gesture_angle;
int lastw, lasth, min_repaint_int, timer_pause, thick;
@@ -422,6 +428,7 @@ protected slots:
void on_checkBorderInputs_toggled(bool checked) {setBorderInputsVisible(checked);}
void on_checkLegend_toggled(bool checked) {setLegendVisible(checked);}
void on_checkPause_toggled(bool checked) {setPaused(checked);}
void actionGuidesTriggered(QAction * a);
void enterFullscreen();
void leaveFullscreen();