Merge pull request 'version 2.2.3' (#15) from graphic_fix into master
Reviewed-on: https://git.shs.tools/SHS/qad/pulls/15
This commit was merged in pull request #15.
This commit is contained in:
@@ -4,7 +4,7 @@ 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 2)
|
set(qad_MINOR 2)
|
||||||
set(qad_REVISION 2)
|
set(qad_REVISION 3)
|
||||||
set(qad_SUFFIX )
|
set(qad_SUFFIX )
|
||||||
set(qad_COMPANY SHS)
|
set(qad_COMPANY SHS)
|
||||||
set(qad_DOMAIN org.SHS)
|
set(qad_DOMAIN org.SHS)
|
||||||
|
|||||||
@@ -1035,7 +1035,7 @@ void Graphic::drawAction() {
|
|||||||
void Graphic::drawGrid() {
|
void Graphic::drawGrid() {
|
||||||
int gbx = gridborder.x(), gby = gridborder.y(), cwid = canvas->width(), chei = canvas->height();
|
int gbx = gridborder.x(), gby = gridborder.y(), cwid = canvas->width(), chei = canvas->height();
|
||||||
double px, py, range, step, start;
|
double px, py, range, step, start;
|
||||||
int wid = cwid - gbx - 5, hei = chei - gby - 5, cx, cy, cnt;
|
int wid = cwid - gbx - 5, hei = chei - gby - 5, cx, cy, cnt, right = cwid + gbx;
|
||||||
QRect rect;
|
QRect rect;
|
||||||
QPair<QString, QString> str;
|
QPair<QString, QString> str;
|
||||||
|
|
||||||
@@ -1099,7 +1099,7 @@ void Graphic::drawGrid() {
|
|||||||
if (axis_type_x == Graphic::Numeric) {
|
if (axis_type_x == Graphic::Numeric) {
|
||||||
if (grad_x == Graphic::Auto) step = splitRange(range, wid / gridx / font_sz.width() * 1.4);
|
if (grad_x == Graphic::Auto) step = splitRange(range, wid / gridx / font_sz.width() * 1.4);
|
||||||
else step = gridx;
|
else step = gridx;
|
||||||
start = roundTo(canvas2realX(wid), step) + step;
|
start = roundTo(canvas2realX(right), step);
|
||||||
px = start + step;
|
px = start + step;
|
||||||
if (step > 0.) {
|
if (step > 0.) {
|
||||||
cnt = 1000;
|
cnt = 1000;
|
||||||
@@ -1107,7 +1107,7 @@ void Graphic::drawGrid() {
|
|||||||
px -= step;
|
px -= step;
|
||||||
if (fabs(px) < step * .5) px = 0.;
|
if (fabs(px) < step * .5) px = 0.;
|
||||||
cx = real2canvasX(px);
|
cx = real2canvasX(px);
|
||||||
if (cx > cwid) continue;
|
if (cx > right) continue;
|
||||||
if (cx < gbx) break;
|
if (cx < gbx) break;
|
||||||
painter->setPen(grid_pen);
|
painter->setPen(grid_pen);
|
||||||
painter->drawLine(cx, hei + 5, cx, 0);
|
painter->drawLine(cx, hei + 5, cx, 0);
|
||||||
@@ -1126,7 +1126,7 @@ void Graphic::drawGrid() {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
cx = real2canvasX(0.);
|
cx = real2canvasX(0.);
|
||||||
if (cx <= cwid && cx >= gbx) {
|
if (cx <= right && cx >= gbx) {
|
||||||
QPen _p(grid_pen);
|
QPen _p(grid_pen);
|
||||||
_p.setStyle(Qt::SolidLine);
|
_p.setStyle(Qt::SolidLine);
|
||||||
painter->setPen(_p);
|
painter->setPen(_p);
|
||||||
@@ -1135,7 +1135,7 @@ void Graphic::drawGrid() {
|
|||||||
} else {
|
} else {
|
||||||
int cur_scl[7] = {0,0,0,0,0,0,0};
|
int cur_scl[7] = {0,0,0,0,0,0,0};
|
||||||
step = splitRangeDate(range, wid / gridx / font_sz.width() * 1.4, &df, cur_scl);
|
step = splitRangeDate(range, wid / gridx / font_sz.width() * 1.4, &df, cur_scl);
|
||||||
start = roundTo(canvas2realX(wid), step) + step;
|
start = roundTo(canvas2realX(right), step);
|
||||||
px = start + step;
|
px = start + step;
|
||||||
QDateTime cd = QDateTime::fromMSecsSinceEpoch(px * grid_numbers_x);
|
QDateTime cd = QDateTime::fromMSecsSinceEpoch(px * grid_numbers_x);
|
||||||
roundDateTime(cd, cur_scl);
|
roundDateTime(cd, cur_scl);
|
||||||
@@ -1145,7 +1145,7 @@ void Graphic::drawGrid() {
|
|||||||
while (cnt-- > 0) {
|
while (cnt-- > 0) {
|
||||||
addDateTime(cd, cur_scl, -1);
|
addDateTime(cd, cur_scl, -1);
|
||||||
cx = real2canvasX(cd.toMSecsSinceEpoch() / grid_numbers_x);
|
cx = real2canvasX(cd.toMSecsSinceEpoch() / grid_numbers_x);
|
||||||
if (cx > cwid) continue;
|
if (cx > right) continue;
|
||||||
if (cx < gbx) break;
|
if (cx < gbx) break;
|
||||||
painter->setPen(grid_pen);
|
painter->setPen(grid_pen);
|
||||||
painter->drawLine(cx, hei + 5, cx, 0);
|
painter->drawLine(cx, hei + 5, cx, 0);
|
||||||
|
|||||||
@@ -8,7 +8,7 @@
|
|||||||
|
|
||||||
|
|
||||||
int main(int argc, char * argv[]) {
|
int main(int argc, char * argv[]) {
|
||||||
PIINTROSPECTION_START
|
PIINTROSPECTION_START(piconnedit)
|
||||||
QApplication a(argc, argv);
|
QApplication a(argc, argv);
|
||||||
enableHighDPI();
|
enableHighDPI();
|
||||||
ConnectionEdit w;
|
ConnectionEdit w;
|
||||||
|
|||||||
@@ -9,7 +9,7 @@ if (PIP_FOUND AND BUILDING_pip)
|
|||||||
else()
|
else()
|
||||||
set(APP_ICON "")
|
set(APP_ICON "")
|
||||||
endif()
|
endif()
|
||||||
set(APP_INFO "PIConnection GUI editor")
|
set(APP_INFO "PIIntrospector")
|
||||||
include(PIPMacros)
|
include(PIPMacros)
|
||||||
set(PII_ROOT "${pip_ROOT_SRC}/libs/main/introspection")
|
set(PII_ROOT "${pip_ROOT_SRC}/libs/main/introspection")
|
||||||
pip_code_model(CCM "${PII_ROOT}/piintrospection_server_p.h" "${PII_ROOT}/piintrospection_threads_p.h" OPTIONS "-DPIP_EXPORT" "-Es" ABSOLUTE)
|
pip_code_model(CCM "${PII_ROOT}/piintrospection_server_p.h" "${PII_ROOT}/piintrospection_threads_p.h" OPTIONS "-DPIP_EXPORT" "-Es" ABSOLUTE)
|
||||||
|
|||||||
Reference in New Issue
Block a user