version 2.9.0
Graphic DateTime axis release
This commit is contained in:
@@ -3,8 +3,8 @@ cmake_policy(SET CMP0017 NEW) # need include() with .cmake
|
|||||||
cmake_policy(SET CMP0072 NEW) # FindOpenGL prefers GLVND by default
|
cmake_policy(SET CMP0072 NEW) # FindOpenGL prefers GLVND by default
|
||||||
project(QAD)
|
project(QAD)
|
||||||
set(QAD_MAJOR 2)
|
set(QAD_MAJOR 2)
|
||||||
set(QAD_MINOR 8)
|
set(QAD_MINOR 9)
|
||||||
set(QAD_REVISION 4)
|
set(QAD_REVISION 0)
|
||||||
set(QAD_SUFFIX )
|
set(QAD_SUFFIX )
|
||||||
set(QAD_COMPANY SHS)
|
set(QAD_COMPANY SHS)
|
||||||
set(QAD_DOMAIN org.SHS)
|
set(QAD_DOMAIN org.SHS)
|
||||||
|
|||||||
@@ -30,6 +30,17 @@
|
|||||||
# endif
|
# endif
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
enum DateComponent {
|
||||||
|
DateMSecs,
|
||||||
|
DateSecs,
|
||||||
|
DateMinutes,
|
||||||
|
DateHours,
|
||||||
|
DateDays,
|
||||||
|
DateMonths,
|
||||||
|
DateYears,
|
||||||
|
DateComponentCount
|
||||||
|
};
|
||||||
|
|
||||||
const char _button_prop_name_[] = "_button_";
|
const char _button_prop_name_[] = "_button_";
|
||||||
const double rad2deg_qpie = 45. / atan(1.);
|
const double rad2deg_qpie = 45. / atan(1.);
|
||||||
|
|
||||||
@@ -80,6 +91,7 @@ Graphic::Graphic(QWidget * parent): QFrame(parent), canvas(0), line_x_min(this),
|
|||||||
ui->setupUi(this);
|
ui->setupUi(this);
|
||||||
ui->scrollLegend->layout()->addWidget(new LegendScrollArea(ui->widgetLegend));
|
ui->scrollLegend->layout()->addWidget(new LegendScrollArea(ui->widgetLegend));
|
||||||
ui->scrollLegend->hide();
|
ui->scrollLegend->hide();
|
||||||
|
fillDateFormats();
|
||||||
#ifdef NO_BUTTONS
|
#ifdef NO_BUTTONS
|
||||||
ui->widgetLeft->hide();
|
ui->widgetLeft->hide();
|
||||||
ui->widgetRight->hide();
|
ui->widgetRight->hide();
|
||||||
@@ -211,6 +223,7 @@ void Graphic::changeEvent(QEvent * e) {
|
|||||||
QFrame::changeEvent(e);
|
QFrame::changeEvent(e);
|
||||||
if (e->type() == QEvent::LanguageChange) {
|
if (e->type() == QEvent::LanguageChange) {
|
||||||
ui->retranslateUi(this);
|
ui->retranslateUi(this);
|
||||||
|
fillDateFormats();
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -1285,12 +1298,13 @@ void Graphic::drawGrid() {
|
|||||||
painter->drawLine(cx, hei + 5, cx, 0);
|
painter->drawLine(cx, hei + 5, cx, 0);
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
int dt_add[7] = {0,0,0,0,0,0,0};
|
int dt_add[DateComponentCount];
|
||||||
int dt_add_lo[7] = {0,0,0,0,0,0,0};
|
int dt_add_lo[DateComponentCount];
|
||||||
const char * formats[3];
|
for (int i = 0; i < DateComponentCount; ++i) dt_add_lo[i] = dt_add[i] = 0;
|
||||||
|
DateFormats formats;
|
||||||
step = splitRangeDate(range, wid / gridx / font_sz.width() / 1.5, formats, dt_add);
|
step = splitRangeDate(range, wid / gridx / font_sz.width() / 1.5, formats, dt_add);
|
||||||
for (int i = 0; i < 6; ++i) dt_add_lo[i + 1] = dt_add[i];
|
for (int i = 0; i < DateComponentCount - 1; ++i) dt_add_lo[i + 1] = dt_add[i];
|
||||||
bool is_years = QString(formats[1]).isEmpty();
|
bool is_years = formats.center.isEmpty();
|
||||||
if (step > 0.) {
|
if (step > 0.) {
|
||||||
int up_y = cy - font_sz.height() * 2;
|
int up_y = cy - font_sz.height() * 2;
|
||||||
int ce_y = cy - font_sz.height();
|
int ce_y = cy - font_sz.height();
|
||||||
@@ -1310,7 +1324,7 @@ void Graphic::drawGrid() {
|
|||||||
}
|
}
|
||||||
//qDebug() << cd << cur_scl[0] << cur_scl[1] << cur_scl[2] << cur_scl[3] << cur_scl[4] << cur_scl[5] << cur_scl[6];
|
//qDebug() << cd << cur_scl[0] << cur_scl[1] << cur_scl[2] << cur_scl[3] << cur_scl[4] << cur_scl[5] << cur_scl[6];
|
||||||
struct Anchor {
|
struct Anchor {
|
||||||
int pix_x[2];
|
int x_start, x_end;
|
||||||
QDateTime date;
|
QDateTime date;
|
||||||
};
|
};
|
||||||
QVector<Anchor> areas_ce, areas_lo;
|
QVector<Anchor> areas_ce, areas_lo;
|
||||||
@@ -1329,15 +1343,15 @@ void Graphic::drawGrid() {
|
|||||||
int cxc = real2canvasX(cdc.toMSecsSinceEpoch() / grid_numbers_x);
|
int cxc = real2canvasX(cdc.toMSecsSinceEpoch() / grid_numbers_x);
|
||||||
//qDebug() << cx << cxc << ddx << pcx;
|
//qDebug() << cx << cxc << ddx << pcx;
|
||||||
if ((qAbs(cxc - cx) < ddx) && (cx != cxc)) need_text = false;
|
if ((qAbs(cxc - cx) < ddx) && (cx != cxc)) need_text = false;
|
||||||
areas_ce << Anchor{{area_start, qMin(cxc, right)}, cdp};
|
areas_ce << Anchor{area_start, qMin(cxc, right), cdp};
|
||||||
area_start = areas_ce.back().pix_x[1];
|
area_start = areas_ce.back().x_end;
|
||||||
cd = cdl = cdp = cdc;
|
cd = cdl = cdp = cdc;
|
||||||
cx = cxc;
|
cx = cxc;
|
||||||
roundDateTime(cdl, dt_add_lo);
|
roundDateTime(cdl, dt_add_lo);
|
||||||
if (cdlp != cdl) {
|
if (cdlp != cdl) {
|
||||||
areas_lo << Anchor{{area_start_lo, qMin(cxc, right)}, cdlp};
|
areas_lo << Anchor{area_start_lo, qMin(cxc, right), cdlp};
|
||||||
cdlp = cdl;
|
cdlp = cdl;
|
||||||
area_start_lo = areas_lo.back().pix_x[1];
|
area_start_lo = areas_lo.back().x_end;
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
ddx = (cx - pcx) * 0.95;
|
ddx = (cx - pcx) * 0.95;
|
||||||
@@ -1354,35 +1368,35 @@ void Graphic::drawGrid() {
|
|||||||
painter->setPen(text_color);
|
painter->setPen(text_color);
|
||||||
int dx = -font_sz.height() / 4.;
|
int dx = -font_sz.height() / 4.;
|
||||||
painter->setFont(nf);
|
painter->setFont(nf);
|
||||||
painter->drawText(cx + dx, up_y, cd.toString(formats[0]));
|
painter->drawText(cx + dx, up_y, cd.toString(formats.upper));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (!is_years) {
|
if (!is_years) {
|
||||||
if (area_start < right)
|
if (area_start < right)
|
||||||
areas_ce << Anchor{{area_start, right}, cdc};
|
areas_ce << Anchor{area_start, right, cdc};
|
||||||
if (area_start_lo < right)
|
if (area_start_lo < right)
|
||||||
areas_lo << Anchor{{area_start_lo, right}, cdl};
|
areas_lo << Anchor{area_start_lo, right, cdl};
|
||||||
//qDebug() << areas_lo.size() << formats[2] << areas_lo[0].date;
|
//qDebug() << areas_lo.size() << formats.upper << areas_lo[0].date;
|
||||||
painter->setPen(grid_pen);
|
painter->setPen(grid_pen);
|
||||||
for (const auto & a: areas_ce) {
|
for (const auto & a: areas_ce) {
|
||||||
painter->drawLine(a.pix_x[0], hei + 5, a.pix_x[0], ce_y);
|
painter->drawLine(a.x_start, hei + 5, a.x_start, ce_y);
|
||||||
}
|
}
|
||||||
for (const auto & a: areas_lo) {
|
for (const auto & a: areas_lo) {
|
||||||
painter->drawLine(a.pix_x[0], ce_y, a.pix_x[0], lo_y);
|
painter->drawLine(a.x_start, ce_y, a.x_start, lo_y);
|
||||||
}
|
}
|
||||||
|
|
||||||
painter->setPen(text_color);
|
painter->setPen(text_color);
|
||||||
painter->setFont(nf);
|
painter->setFont(nf);
|
||||||
auto pfm = painter->fontMetrics();
|
auto pfm = painter->fontMetrics();
|
||||||
for (const auto & a: areas_ce) {
|
for (const auto & a: areas_ce) {
|
||||||
ds = a.date.toString(formats[1]);
|
ds = a.date.toString(formats.center);
|
||||||
auto str_rect = pfm.boundingRect(ds);
|
auto str_rect = pfm.boundingRect(ds);
|
||||||
painter->drawText(a.pix_x[0] + (a.pix_x[1] - a.pix_x[0] - str_rect.width()) / 2, ce_y, ds);
|
painter->drawText(a.x_start + (a.x_end - a.x_start - str_rect.width()) / 2, ce_y, ds);
|
||||||
}
|
}
|
||||||
for (const auto & a: areas_lo) {
|
for (const auto & a: areas_lo) {
|
||||||
ds = a.date.toString(formats[2]);
|
ds = a.date.toString(formats.lower);
|
||||||
auto str_rect = pfm.boundingRect(ds);
|
auto str_rect = pfm.boundingRect(ds);
|
||||||
painter->drawText(a.pix_x[0] + (a.pix_x[1] - a.pix_x[0] - str_rect.width()) / 2, lo_y, ds);
|
painter->drawText(a.x_start + (a.x_end - a.x_start - str_rect.width()) / 2, lo_y, ds);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -1420,6 +1434,26 @@ QPair<QString, QString> Graphic::gridMark(double v) const {
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
void Graphic::fillDateFormats() {
|
||||||
|
date_formats.clear();
|
||||||
|
QString tr_ms = tr("ms"), tr_s = tr("s"), tr_m = tr("m"), tr_h = tr("h");
|
||||||
|
auto trFunc = [&](const DateFormats & src)->DateFormats{
|
||||||
|
DateFormats ret;
|
||||||
|
ret.upper = QString(src.upper ).replace("%1", tr_ms).replace("%2", tr_s).replace("%3", tr_m).replace("%4", tr_h);
|
||||||
|
ret.center = QString(src.center).replace("%1", tr_ms).replace("%2", tr_s).replace("%3", tr_m).replace("%4", tr_h);
|
||||||
|
ret.lower = QString(src.lower ).replace("%1", tr_ms).replace("%2", tr_s).replace("%3", tr_m).replace("%4", tr_h);
|
||||||
|
return ret;
|
||||||
|
};
|
||||||
|
date_formats << trFunc(DateFormats{"zzz '%1'", "h '%4' mm '%3' ss '%2'", "yyyy MMM dd(ddd)"});
|
||||||
|
date_formats << trFunc(DateFormats{"ss '%2'" , "h '%4' mm '%3'" , "yyyy MMM dd(ddd)"});
|
||||||
|
date_formats << trFunc(DateFormats{"mm '%3'" , "h '%4'" , "yyyy MMM dd(ddd)"});
|
||||||
|
date_formats << trFunc(DateFormats{"h '%4'" , "dd(ddd)" , "yyyy MMM" });
|
||||||
|
date_formats << trFunc(DateFormats{"dd(ddd)" , "MMM" , "yyyy" });
|
||||||
|
date_formats << trFunc(DateFormats{"MMM" , "yyyy" , "" });
|
||||||
|
date_formats << trFunc(DateFormats{"yyyy" , "" , "" });
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
void Graphic::drawGraphics() {
|
void Graphic::drawGraphics() {
|
||||||
if (isHover)
|
if (isHover)
|
||||||
ui->status->setText(tr("Cursor: ") + pointCoords(canvas2real(QPointF(curpos))));
|
ui->status->setText(tr("Cursor: ") + pointCoords(canvas2real(QPointF(curpos))));
|
||||||
@@ -1698,7 +1732,7 @@ double Graphic::splitRange(double range, int count) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
double Graphic::splitRangeDate(double range, int count, const char ** formats, int step[7]) {
|
double Graphic::splitRangeDate(double range, int count, DateFormats & formats, int step[7]) {
|
||||||
static const qint64
|
static const qint64
|
||||||
to_sec = 1000LL,
|
to_sec = 1000LL,
|
||||||
to_min = 1000LL * 60,
|
to_min = 1000LL * 60,
|
||||||
@@ -1706,31 +1740,16 @@ double Graphic::splitRangeDate(double range, int count, const char ** formats, i
|
|||||||
to_day = 1000LL * 60 * 60 * 24,
|
to_day = 1000LL * 60 * 60 * 24,
|
||||||
to_month = 1000LL * 60 * 60 * 24 * 30,
|
to_month = 1000LL * 60 * 60 * 24 * 30,
|
||||||
to_year = 1000LL * 60 * 60 * 24 * 30 * 12;
|
to_year = 1000LL * 60 * 60 * 24 * 30 * 12;
|
||||||
static const struct {
|
|
||||||
const char * upper;
|
|
||||||
const char * center;
|
|
||||||
const char * lower;
|
|
||||||
} date_formats[] = {
|
|
||||||
{"ss.zzz 's'", "h 'h' mm 'm'", "yyyy MMM dd(ddd)"},
|
|
||||||
{"ss 's'" , "h 'h' mm 'm'", "yyyy MMM dd(ddd)"},
|
|
||||||
{"mm 'm'" , "h 'h'" , "yyyy MMM dd(ddd)"},
|
|
||||||
{"h 'h'" , "dd(ddd)" , "yyyy MMM"},
|
|
||||||
{"dd(ddd)" , "MMM" , "yyyy"},
|
|
||||||
{"MMM" , "yyyy" , ""},
|
|
||||||
{"yyyy" , "" , ""}
|
|
||||||
};
|
|
||||||
double ret = splitRange(range, count);
|
double ret = splitRange(range, count);
|
||||||
int format_index = 6;
|
int format_index = DateYears;
|
||||||
if (ret < to_sec / 2 ) {format_index = 0; step[0] = qRound64(ret);}
|
if (ret < to_sec / 1 ) {format_index = DateMSecs ; step[DateMSecs ] = qRound64(ret);}
|
||||||
else if (ret < to_min / 2 ) {format_index = 1; step[1] = roundToNearest(ret / to_sec , {1, 2, 5, 10, 15, 20, 30});}
|
else if (ret < to_min / 2 ) {format_index = DateSecs ; step[DateSecs ] = roundToNearest(ret / to_sec , {1, 2, 5, 10, 15, 20, 30});}
|
||||||
else if (ret < to_hour ) {format_index = 2; step[2] = roundToNearest(ret / to_min , {1, 2, 5, 10, 15, 20, 30});}
|
else if (ret < to_hour ) {format_index = DateMinutes; step[DateMinutes] = roundToNearest(ret / to_min , {1, 2, 5, 10, 15, 20, 30});}
|
||||||
else if (ret < to_day ) {format_index = 3; step[3] = roundToNearest(ret / to_hour , {1, 2, 3, 4, 6, 8, 12});}
|
else if (ret < to_day ) {format_index = DateHours ; step[DateHours ] = roundToNearest(ret / to_hour , {1, 2, 3, 4, 6, 8, 12});}
|
||||||
else if (ret < to_month / 1.6) {format_index = 4; step[4] = roundToNearest(ret / to_day , {1, 2, 5, 10});}
|
else if (ret < to_month / 1.6) {format_index = DateDays ; step[DateDays ] = roundToNearest(ret / to_day , {1, 2, 5, 10});}
|
||||||
else if (ret < to_year ) {format_index = 5; step[5] = roundToNearest(ret / to_month, {1, 2, 3, 4, 6});}
|
else if (ret < to_year ) {format_index = DateMonths ; step[DateMonths ] = roundToNearest(ret / to_month, {1, 2, 3, 4, 6});}
|
||||||
else {format_index = 6; step[6] = qRound64(ret / to_year);}
|
else {format_index = DateYears ; step[DateYears ] = qRound64(ret / to_year);}
|
||||||
formats[0] = date_formats[format_index].upper;
|
formats = date_formats[format_index];
|
||||||
formats[1] = date_formats[format_index].center;
|
|
||||||
formats[2] = date_formats[format_index].lower;
|
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1741,26 +1760,26 @@ double Graphic::roundTo(double value, double round_to) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void Graphic::roundDateTime(QDateTime & dt, int c[7]) {
|
void Graphic::roundDateTime(QDateTime & dt, int * c) {
|
||||||
QDate d(dt.date()); QTime t(dt.time());
|
QDate d(dt.date()); QTime t(dt.time());
|
||||||
if (c[0] != 0) t.setHMS(t.hour(), t.minute(), t.second());
|
if (c[DateMSecs ] != 0) t.setHMS(t.hour(), t.minute(), t.second());
|
||||||
if (c[1] != 0) t.setHMS(t.hour(), t.minute(), 0);
|
if (c[DateSecs ] != 0) t.setHMS(t.hour(), t.minute(), 0);
|
||||||
if (c[2] != 0) t.setHMS(t.hour(), 0, 0);
|
if (c[DateMinutes] != 0) t.setHMS(t.hour(), 0, 0);
|
||||||
if (c[3] != 0) {t.setHMS(0, 0, 0); d.setDate(d.year(), d.month(), d.day());}
|
if (c[DateHours ] != 0) {t.setHMS(0, 0, 0); d.setDate(d.year(), d.month(), d.day());}
|
||||||
if (c[4] != 0) {t.setHMS(0, 0, 0); d.setDate(d.year(), d.month(), 1);}
|
if (c[DateDays ] != 0) {t.setHMS(0, 0, 0); d.setDate(d.year(), d.month(), 1);}
|
||||||
if (c[5] != 0 || c[6] != 0) {t.setHMS(0, 0, 0); d.setDate(d.year(), 1, 1);}
|
if (c[DateMonths ] != 0 || c[DateYears] != 0) {t.setHMS(0, 0, 0); d.setDate(d.year(), 1, 1);}
|
||||||
dt = QDateTime(d, t);
|
dt = QDateTime(d, t);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void Graphic::addDateTime(QDateTime & dt, int c[7], qint64 mul) {
|
void Graphic::addDateTime(QDateTime & dt, int * c, qint64 mul) {
|
||||||
if (c[0] != 0) dt = dt.addMSecs(mul * c[0]);
|
if (c[DateMSecs ] != 0) dt = dt.addMSecs (mul * c[DateMSecs ]);
|
||||||
if (c[1] != 0) dt = dt.addSecs(mul * c[1]);
|
if (c[DateSecs ] != 0) dt = dt.addSecs (mul * c[DateSecs ]);
|
||||||
if (c[2] != 0) dt = dt.addSecs(mul * c[2] * 60);
|
if (c[DateMinutes] != 0) dt = dt.addSecs (mul * c[DateMinutes] * 60);
|
||||||
if (c[3] != 0) dt = dt.addSecs(mul * c[3] * 60 * 60);
|
if (c[DateHours ] != 0) dt = dt.addSecs (mul * c[DateHours ] * 60 * 60);
|
||||||
if (c[4] != 0) dt = dt.addDays(mul * c[4]);
|
if (c[DateDays ] != 0) dt = dt.addDays (mul * c[DateDays ]);
|
||||||
if (c[5] != 0) dt = dt.addMonths(mul * c[5]);
|
if (c[DateMonths ] != 0) dt = dt.addMonths(mul * c[DateMonths ]);
|
||||||
if (c[6] != 0) dt = dt.addYears(mul * c[6]);
|
if (c[DateYears ] != 0) dt = dt.addYears (mul * c[DateYears ]);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -358,12 +358,18 @@ public slots:
|
|||||||
|
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
virtual void changeEvent(QEvent * e);
|
struct DateFormats {
|
||||||
virtual void resizeEvent(QResizeEvent * );
|
QString upper;
|
||||||
virtual void showEvent(QShowEvent * );
|
QString center;
|
||||||
virtual QSize sizeHint() const {return QSize(400, 300);}
|
QString lower;
|
||||||
virtual void timerEvent(QTimerEvent * e);
|
};
|
||||||
virtual bool eventFilter(QObject * o, QEvent * e);
|
|
||||||
|
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 prepareCanvas(QWidget * w);
|
||||||
void procGesture(QGesture * g);
|
void procGesture(QGesture * g);
|
||||||
@@ -388,13 +394,14 @@ protected:
|
|||||||
void setRectToLines();
|
void setRectToLines();
|
||||||
void checkLines();
|
void checkLines();
|
||||||
double splitRange(double range, int count = 1);
|
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);
|
double roundTo(double value, double round_to);
|
||||||
void roundDateTime(QDateTime & dt, int c[7]);
|
void roundDateTime(QDateTime & dt, int * c);
|
||||||
void addDateTime(QDateTime & dt, int c[7], qint64 mul = 1);
|
void addDateTime(QDateTime & dt, int * c, qint64 mul = 1);
|
||||||
QPointF absPoint(QPointF point) {return QPointF(qAbs(point.x()), qAbs(point.y()));}
|
QPointF absPoint(QPointF point) {return QPointF(qAbs(point.x()), qAbs(point.y()));}
|
||||||
QString pointCoords(QPointF point, bool x = true, bool y = true);
|
QString pointCoords(QPointF point, bool x = true, bool y = true);
|
||||||
QPair<QString, QString> gridMark(double v) const;
|
QPair<QString, QString> gridMark(double v) const;
|
||||||
|
void fillDateFormats();
|
||||||
|
|
||||||
Ui::Graphic * ui;
|
Ui::Graphic * ui;
|
||||||
UGLWidget * canvas_gl;
|
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 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;
|
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;
|
std::function<QString(double val)> func_gridMarkX, func_gridMarkY;
|
||||||
|
QVector<DateFormats> date_formats;
|
||||||
QList<QImage> record_imgs;
|
QList<QImage> record_imgs;
|
||||||
|
|
||||||
protected slots:
|
protected slots:
|
||||||
|
|||||||
@@ -19,28 +19,28 @@
|
|||||||
<translation type="unfinished"></translation>
|
<translation type="unfinished"></translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../graphic.ui" line="428"/>
|
<location filename="../graphic.ui" line="442"/>
|
||||||
<source>Free</source>
|
<source>Free</source>
|
||||||
<translation type="unfinished"></translation>
|
<translation type="unfinished"></translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../graphic.ui" line="436"/>
|
<location filename="../graphic.ui" line="450"/>
|
||||||
<source>Trace X</source>
|
<source>Trace X</source>
|
||||||
<translation type="unfinished"></translation>
|
<translation type="unfinished"></translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../graphic.ui" line="444"/>
|
<location filename="../graphic.ui" line="458"/>
|
||||||
<source>Trace Y</source>
|
<source>Trace Y</source>
|
||||||
<translation type="unfinished"></translation>
|
<translation type="unfinished"></translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../graphic.ui" line="460"/>
|
<location filename="../graphic.ui" line="474"/>
|
||||||
<location filename="../graphic.ui" line="463"/>
|
<location filename="../graphic.ui" line="477"/>
|
||||||
<source>Only expand Y</source>
|
<source>Only expand Y</source>
|
||||||
<translation type="unfinished"></translation>
|
<translation type="unfinished"></translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../graphic.ui" line="452"/>
|
<location filename="../graphic.ui" line="466"/>
|
||||||
<source>Only expand X</source>
|
<source>Only expand X</source>
|
||||||
<translation type="unfinished"></translation>
|
<translation type="unfinished"></translation>
|
||||||
</message>
|
</message>
|
||||||
@@ -80,94 +80,124 @@
|
|||||||
<translation type="unfinished"></translation>
|
<translation type="unfinished"></translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../graphic.ui" line="210"/>
|
<location filename="../graphic.ui" line="194"/>
|
||||||
|
<source>Record graphic</source>
|
||||||
|
<translation type="unfinished"></translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../graphic.ui" line="224"/>
|
||||||
<source>Clear</source>
|
<source>Clear</source>
|
||||||
<translation type="unfinished"></translation>
|
<translation type="unfinished"></translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../graphic.ui" line="221"/>
|
<location filename="../graphic.ui" line="235"/>
|
||||||
<source>Close</source>
|
<source>Close</source>
|
||||||
<translation type="unfinished"></translation>
|
<translation type="unfinished"></translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../graphic.ui" line="252"/>
|
<location filename="../graphic.ui" line="266"/>
|
||||||
<source>Cursor: ( ; )</source>
|
<source>Cursor: ( ; )</source>
|
||||||
<translation type="unfinished"></translation>
|
<translation type="unfinished"></translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../graphic.ui" line="471"/>
|
<location filename="../graphic.ui" line="485"/>
|
||||||
<location filename="../graphic.ui" line="474"/>
|
<location filename="../graphic.ui" line="488"/>
|
||||||
<source>Snap trace</source>
|
<source>Snap trace</source>
|
||||||
<translation type="unfinished"></translation>
|
<translation type="unfinished"></translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../graphic.cpp" line="459"/>
|
<location filename="../graphic.cpp" line="483"/>
|
||||||
<location filename="../graphic.cpp" line="1327"/>
|
<location filename="../graphic.cpp" line="1459"/>
|
||||||
<source>Cursor: </source>
|
<source>Cursor: </source>
|
||||||
<translation type="unfinished"></translation>
|
<translation type="unfinished"></translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../graphic.cpp" line="474"/>
|
<location filename="../graphic.cpp" line="498"/>
|
||||||
<source>Selection</source>
|
<source>Selection</source>
|
||||||
<translation type="unfinished"></translation>
|
<translation type="unfinished"></translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../graphic.cpp" line="475"/>
|
<location filename="../graphic.cpp" line="499"/>
|
||||||
<source>Size</source>
|
<source>Size</source>
|
||||||
<translation type="unfinished"></translation>
|
<translation type="unfinished"></translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../graphic.cpp" line="479"/>
|
<location filename="../graphic.cpp" line="503"/>
|
||||||
<location filename="../graphic.cpp" line="485"/>
|
<location filename="../graphic.cpp" line="509"/>
|
||||||
<source>Range</source>
|
<source>Range</source>
|
||||||
<translation type="unfinished"></translation>
|
<translation type="unfinished"></translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../graphic.cpp" line="480"/>
|
<location filename="../graphic.cpp" line="504"/>
|
||||||
<location filename="../graphic.cpp" line="486"/>
|
<location filename="../graphic.cpp" line="510"/>
|
||||||
<source>Length</source>
|
<source>Length</source>
|
||||||
<translation type="unfinished"></translation>
|
<translation type="unfinished"></translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../graphic.cpp" line="591"/>
|
<location filename="../graphic.cpp" line="615"/>
|
||||||
<location filename="../graphic.cpp" line="640"/>
|
<location filename="../graphic.cpp" line="664"/>
|
||||||
<source>Cursor</source>
|
<source>Cursor</source>
|
||||||
<translation type="unfinished"></translation>
|
<translation type="unfinished"></translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../graphic.cpp" line="926"/>
|
<location filename="../graphic.cpp" line="951"/>
|
||||||
<location filename="../graphic.cpp" line="1906"/>
|
<location filename="../graphic.cpp" line="2072"/>
|
||||||
<source>Export graphics</source>
|
<source>Export graphics</source>
|
||||||
<translation type="unfinished"></translation>
|
<translation type="unfinished"></translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../graphic.cpp" line="926"/>
|
<location filename="../graphic.cpp" line="951"/>
|
||||||
<source>Can`t open file "%1"!</source>
|
<source>Can`t open file "%1"!</source>
|
||||||
<translation type="unfinished"></translation>
|
<translation type="unfinished"></translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../graphic.cpp" line="1899"/>
|
<location filename="../graphic.cpp" line="1439"/>
|
||||||
|
<source>ms</source>
|
||||||
|
<translation type="unfinished"></translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../graphic.cpp" line="1439"/>
|
||||||
|
<source>s</source>
|
||||||
|
<translation type="unfinished"></translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../graphic.cpp" line="1439"/>
|
||||||
|
<source>m</source>
|
||||||
|
<translation type="unfinished"></translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../graphic.cpp" line="1439"/>
|
||||||
|
<source>h</source>
|
||||||
|
<translation type="unfinished"></translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../graphic.cpp" line="2065"/>
|
||||||
<source>Save Image</source>
|
<source>Save Image</source>
|
||||||
<translation type="unfinished"></translation>
|
<translation type="unfinished"></translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../graphic.cpp" line="1013"/>
|
<location filename="../graphic.cpp" line="1046"/>
|
||||||
<location filename="../graphic.cpp" line="1015"/>
|
<location filename="../graphic.cpp" line="1048"/>
|
||||||
<source>y(x)</source>
|
<source>y(x)</source>
|
||||||
<translation type="unfinished"></translation>
|
<translation type="unfinished"></translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../graphic.cpp" line="1911"/>
|
<location filename="../graphic.cpp" line="2077"/>
|
||||||
<source>Select decimal point</source>
|
<source>Select decimal point</source>
|
||||||
<translation type="unfinished"></translation>
|
<translation type="unfinished"></translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../graphic.cpp" line="1911"/>
|
<location filename="../graphic.cpp" line="2077"/>
|
||||||
<source>Decimal point:</source>
|
<source>Decimal point:</source>
|
||||||
<translation type="unfinished"></translation>
|
<translation type="unfinished"></translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../graphic.cpp" line="1959"/>
|
<location filename="../graphic.cpp" line="2090"/>
|
||||||
|
<source>Save GIF</source>
|
||||||
|
<translation type="unfinished"></translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../graphic.cpp" line="2160"/>
|
||||||
<source>Check all</source>
|
<source>Check all</source>
|
||||||
<translation type="unfinished"></translation>
|
<translation type="unfinished"></translation>
|
||||||
</message>
|
</message>
|
||||||
|
|||||||
@@ -19,28 +19,28 @@
|
|||||||
<translation>Плавающие оси</translation>
|
<translation>Плавающие оси</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../graphic.ui" line="428"/>
|
<location filename="../graphic.ui" line="442"/>
|
||||||
<source>Free</source>
|
<source>Free</source>
|
||||||
<translation>Свободный</translation>
|
<translation>Свободный</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../graphic.ui" line="436"/>
|
<location filename="../graphic.ui" line="450"/>
|
||||||
<source>Trace X</source>
|
<source>Trace X</source>
|
||||||
<translation>Трассировка по X</translation>
|
<translation>Трассировка по X</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../graphic.ui" line="444"/>
|
<location filename="../graphic.ui" line="458"/>
|
||||||
<source>Trace Y</source>
|
<source>Trace Y</source>
|
||||||
<translation>Трассировка по Y</translation>
|
<translation>Трассировка по Y</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../graphic.ui" line="460"/>
|
<location filename="../graphic.ui" line="474"/>
|
||||||
<location filename="../graphic.ui" line="463"/>
|
<location filename="../graphic.ui" line="477"/>
|
||||||
<source>Only expand Y</source>
|
<source>Only expand Y</source>
|
||||||
<translation>Только расширять Y</translation>
|
<translation>Только расширять Y</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../graphic.ui" line="452"/>
|
<location filename="../graphic.ui" line="466"/>
|
||||||
<source>Only expand X</source>
|
<source>Only expand X</source>
|
||||||
<translation>Только расширять X</translation>
|
<translation>Только расширять X</translation>
|
||||||
</message>
|
</message>
|
||||||
@@ -80,23 +80,28 @@
|
|||||||
<translation>Экспорт графиков ...</translation>
|
<translation>Экспорт графиков ...</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../graphic.ui" line="210"/>
|
<location filename="../graphic.ui" line="194"/>
|
||||||
|
<source>Record graphic</source>
|
||||||
|
<translation>Запись графика</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../graphic.ui" line="224"/>
|
||||||
<source>Clear</source>
|
<source>Clear</source>
|
||||||
<translation>Очистить</translation>
|
<translation>Очистить</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../graphic.ui" line="221"/>
|
<location filename="../graphic.ui" line="235"/>
|
||||||
<source>Close</source>
|
<source>Close</source>
|
||||||
<translation>Закрыть</translation>
|
<translation>Закрыть</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../graphic.ui" line="252"/>
|
<location filename="../graphic.ui" line="266"/>
|
||||||
<source>Cursor: ( ; )</source>
|
<source>Cursor: ( ; )</source>
|
||||||
<translation>Курсор: ( ; )</translation>
|
<translation>Курсор: ( ; )</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../graphic.ui" line="471"/>
|
<location filename="../graphic.ui" line="485"/>
|
||||||
<location filename="../graphic.ui" line="474"/>
|
<location filename="../graphic.ui" line="488"/>
|
||||||
<source>Snap trace</source>
|
<source>Snap trace</source>
|
||||||
<translation>Трассировка с привязкой</translation>
|
<translation>Трассировка с привязкой</translation>
|
||||||
</message>
|
</message>
|
||||||
@@ -105,73 +110,98 @@
|
|||||||
<translation type="vanished">Свободная трассировка</translation>
|
<translation type="vanished">Свободная трассировка</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../graphic.cpp" line="459"/>
|
<location filename="../graphic.cpp" line="483"/>
|
||||||
<location filename="../graphic.cpp" line="1327"/>
|
<location filename="../graphic.cpp" line="1459"/>
|
||||||
<source>Cursor: </source>
|
<source>Cursor: </source>
|
||||||
<translation>Курсор: </translation>
|
<translation>Курсор: </translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../graphic.cpp" line="474"/>
|
<location filename="../graphic.cpp" line="498"/>
|
||||||
<source>Selection</source>
|
<source>Selection</source>
|
||||||
<translation>Выделение</translation>
|
<translation>Выделение</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../graphic.cpp" line="475"/>
|
<location filename="../graphic.cpp" line="499"/>
|
||||||
<source>Size</source>
|
<source>Size</source>
|
||||||
<translation>Размер</translation>
|
<translation>Размер</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../graphic.cpp" line="479"/>
|
<location filename="../graphic.cpp" line="503"/>
|
||||||
<location filename="../graphic.cpp" line="485"/>
|
<location filename="../graphic.cpp" line="509"/>
|
||||||
<source>Range</source>
|
<source>Range</source>
|
||||||
<translation>Диапазон</translation>
|
<translation>Диапазон</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../graphic.cpp" line="480"/>
|
<location filename="../graphic.cpp" line="504"/>
|
||||||
<location filename="../graphic.cpp" line="486"/>
|
<location filename="../graphic.cpp" line="510"/>
|
||||||
<source>Length</source>
|
<source>Length</source>
|
||||||
<translation>Длина</translation>
|
<translation>Длина</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../graphic.cpp" line="591"/>
|
<location filename="../graphic.cpp" line="615"/>
|
||||||
<location filename="../graphic.cpp" line="640"/>
|
<location filename="../graphic.cpp" line="664"/>
|
||||||
<source>Cursor</source>
|
<source>Cursor</source>
|
||||||
<translation>Курсор</translation>
|
<translation>Курсор</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../graphic.cpp" line="926"/>
|
<location filename="../graphic.cpp" line="951"/>
|
||||||
<location filename="../graphic.cpp" line="1906"/>
|
<location filename="../graphic.cpp" line="2072"/>
|
||||||
<source>Export graphics</source>
|
<source>Export graphics</source>
|
||||||
<translation>Экспорт графиков</translation>
|
<translation>Экспорт графиков</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../graphic.cpp" line="926"/>
|
<location filename="../graphic.cpp" line="951"/>
|
||||||
<source>Can`t open file "%1"!</source>
|
<source>Can`t open file "%1"!</source>
|
||||||
<translation>Невозможно открыть файл "%1"!</translation>
|
<translation>Невозможно открыть файл "%1"!</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../graphic.cpp" line="1899"/>
|
<location filename="../graphic.cpp" line="1439"/>
|
||||||
|
<source>ms</source>
|
||||||
|
<translation>мс</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../graphic.cpp" line="1439"/>
|
||||||
|
<source>s</source>
|
||||||
|
<translation>сек</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../graphic.cpp" line="1439"/>
|
||||||
|
<source>m</source>
|
||||||
|
<translation>мин</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../graphic.cpp" line="1439"/>
|
||||||
|
<source>h</source>
|
||||||
|
<translation>ч</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../graphic.cpp" line="2065"/>
|
||||||
<source>Save Image</source>
|
<source>Save Image</source>
|
||||||
<translation>Сохранить изображение</translation>
|
<translation>Сохранить изображение</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../graphic.cpp" line="1013"/>
|
<location filename="../graphic.cpp" line="1046"/>
|
||||||
<location filename="../graphic.cpp" line="1015"/>
|
<location filename="../graphic.cpp" line="1048"/>
|
||||||
<source>y(x)</source>
|
<source>y(x)</source>
|
||||||
<translation></translation>
|
<translation></translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../graphic.cpp" line="1911"/>
|
<location filename="../graphic.cpp" line="2077"/>
|
||||||
<source>Select decimal point</source>
|
<source>Select decimal point</source>
|
||||||
<translation>Выберите десятичный разделитель</translation>
|
<translation>Выберите десятичный разделитель</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../graphic.cpp" line="1911"/>
|
<location filename="../graphic.cpp" line="2077"/>
|
||||||
<source>Decimal point:</source>
|
<source>Decimal point:</source>
|
||||||
<translation>Десятичный разделитель:</translation>
|
<translation>Десятичный разделитель:</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../graphic.cpp" line="1959"/>
|
<location filename="../graphic.cpp" line="2090"/>
|
||||||
|
<source>Save GIF</source>
|
||||||
|
<translation>Сохранить GIF</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../graphic.cpp" line="2160"/>
|
||||||
<source>Check all</source>
|
<source>Check all</source>
|
||||||
<translation>Выбрать все</translation>
|
<translation>Выбрать все</translation>
|
||||||
</message>
|
</message>
|
||||||
|
|||||||
Reference in New Issue
Block a user