version 2.9.0

Graphic DateTime axis release
This commit is contained in:
2022-11-24 15:26:38 +03:00
parent 2e22a393dc
commit 5e49446607
5 changed files with 218 additions and 131 deletions

View File

@@ -358,12 +358,18 @@ public slots:
protected:
virtual void changeEvent(QEvent * e);
virtual void resizeEvent(QResizeEvent * );
virtual void showEvent(QShowEvent * );
virtual QSize sizeHint() const {return QSize(400, 300);}
virtual void timerEvent(QTimerEvent * e);
virtual bool eventFilter(QObject * o, QEvent * e);
struct DateFormats {
QString upper;
QString center;
QString lower;
};
void changeEvent(QEvent * e) override;
void resizeEvent(QResizeEvent * ) override;
void showEvent(QShowEvent * ) override;
QSize sizeHint() const override {return QSize(400, 300);}
void timerEvent(QTimerEvent * e) override;
bool eventFilter(QObject * o, QEvent * e) override;
void prepareCanvas(QWidget * w);
void procGesture(QGesture * g);
@@ -388,13 +394,14 @@ protected:
void setRectToLines();
void checkLines();
double splitRange(double range, int count = 1);
double splitRangeDate(double range, int count, const char ** formats, int step[7]);
double splitRangeDate(double range, int count, DateFormats & formats, int step[7]);
double roundTo(double value, double round_to);
void roundDateTime(QDateTime & dt, int c[7]);
void addDateTime(QDateTime & dt, int c[7], qint64 mul = 1);
void roundDateTime(QDateTime & dt, int * c);
void addDateTime(QDateTime & dt, int * c, qint64 mul = 1);
QPointF absPoint(QPointF point) {return QPointF(qAbs(point.x()), qAbs(point.y()));}
QString pointCoords(QPointF point, bool x = true, bool y = true);
QPair<QString, QString> gridMark(double v) const;
void fillDateFormats();
Ui::Graphic * ui;
UGLWidget * canvas_gl;
@@ -434,6 +441,7 @@ protected:
bool aalias, aupdate, grid, guides, isFit, isOGL, isHover, bufferActive, cancel, pause_, gestures, m_LODOptimization, m_fakeGL, need_createGL;
bool hasLblX, hasLblY, navigation, only_expand_y, only_expand_x, is_lines_update, leg_update, visible_update, fullscr, need_mouse_pan, was_trace;
std::function<QString(double val)> func_gridMarkX, func_gridMarkY;
QVector<DateFormats> date_formats;
QList<QImage> record_imgs;
protected slots: