version 2.2.3 #15
@@ -4,7 +4,7 @@ cmake_policy(SET CMP0072 NEW) # FindOpenGL prefers GLVND by default
|
||||
project(qad)
|
||||
set(qad_MAJOR 2)
|
||||
set(qad_MINOR 2)
|
||||
set(qad_REVISION 2)
|
||||
set(qad_REVISION 3)
|
||||
set(qad_SUFFIX )
|
||||
set(qad_COMPANY SHS)
|
||||
set(qad_DOMAIN org.SHS)
|
||||
|
||||
@@ -1035,7 +1035,7 @@ void Graphic::drawAction() {
|
||||
void Graphic::drawGrid() {
|
||||
int gbx = gridborder.x(), gby = gridborder.y(), cwid = canvas->width(), chei = canvas->height();
|
||||
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;
|
||||
QPair<QString, QString> str;
|
||||
|
||||
@@ -1099,7 +1099,7 @@ void Graphic::drawGrid() {
|
||||
if (axis_type_x == Graphic::Numeric) {
|
||||
if (grad_x == Graphic::Auto) step = splitRange(range, wid / gridx / font_sz.width() * 1.4);
|
||||
else step = gridx;
|
||||
start = roundTo(canvas2realX(wid), step) + step;
|
||||
start = roundTo(canvas2realX(right), step);
|
||||
px = start + step;
|
||||
if (step > 0.) {
|
||||
cnt = 1000;
|
||||
@@ -1107,7 +1107,7 @@ void Graphic::drawGrid() {
|
||||
px -= step;
|
||||
if (fabs(px) < step * .5) px = 0.;
|
||||
cx = real2canvasX(px);
|
||||
if (cx > cwid) continue;
|
||||
if (cx > right) continue;
|
||||
if (cx < gbx) break;
|
||||
painter->setPen(grid_pen);
|
||||
painter->drawLine(cx, hei + 5, cx, 0);
|
||||
@@ -1126,7 +1126,7 @@ void Graphic::drawGrid() {
|
||||
}
|
||||
}
|
||||
cx = real2canvasX(0.);
|
||||
if (cx <= cwid && cx >= gbx) {
|
||||
if (cx <= right && cx >= gbx) {
|
||||
QPen _p(grid_pen);
|
||||
_p.setStyle(Qt::SolidLine);
|
||||
painter->setPen(_p);
|
||||
@@ -1135,7 +1135,7 @@ void Graphic::drawGrid() {
|
||||
} else {
|
||||
int cur_scl[7] = {0,0,0,0,0,0,0};
|
||||
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;
|
||||
QDateTime cd = QDateTime::fromMSecsSinceEpoch(px * grid_numbers_x);
|
||||
roundDateTime(cd, cur_scl);
|
||||
@@ -1145,7 +1145,7 @@ void Graphic::drawGrid() {
|
||||
while (cnt-- > 0) {
|
||||
addDateTime(cd, cur_scl, -1);
|
||||
cx = real2canvasX(cd.toMSecsSinceEpoch() / grid_numbers_x);
|
||||
if (cx > cwid) continue;
|
||||
if (cx > right) continue;
|
||||
if (cx < gbx) break;
|
||||
painter->setPen(grid_pen);
|
||||
painter->drawLine(cx, hei + 5, cx, 0);
|
||||
|
||||
@@ -1,33 +1,33 @@
|
||||
#include <QApplication>
|
||||
#include "piqt_connection_edit.h"
|
||||
#include <QFileDialog>
|
||||
#include <qpiconfig.h>
|
||||
#include <qad_types.h>
|
||||
#include <evalspinbox.h>
|
||||
#include <piintrospection_server.h>
|
||||
|
||||
|
||||
int main(int argc, char * argv[]) {
|
||||
PIINTROSPECTION_START
|
||||
QApplication a(argc, argv);
|
||||
enableHighDPI();
|
||||
ConnectionEdit w;
|
||||
if (a.arguments().size() > 1) {
|
||||
QPIConfig cfg(a.arguments()[1]);
|
||||
QByteArray model = cfg.getValue("connectionmodel").toByteArray();
|
||||
if (!model.isEmpty()) w.setModel(model);
|
||||
}
|
||||
if (w.exec() == QDialog::Accepted) {
|
||||
QString c = QFileDialog::getSaveFileName(&w, "Save config to file", a.applicationDirPath(), "*.conf");
|
||||
if (!c.isEmpty()) {
|
||||
QFile f(c);
|
||||
if (f.open(QIODevice::WriteOnly)) {
|
||||
QTextStream ts(&f);
|
||||
ts << w.configuration();
|
||||
ts << "connectionmodel = " << QByteArray2QString(w.model()) << "\n";
|
||||
f.close();
|
||||
}
|
||||
}
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
#include <QApplication>
|
||||
#include "piqt_connection_edit.h"
|
||||
#include <QFileDialog>
|
||||
#include <qpiconfig.h>
|
||||
#include <qad_types.h>
|
||||
#include <evalspinbox.h>
|
||||
#include <piintrospection_server.h>
|
||||
|
||||
|
||||
int main(int argc, char * argv[]) {
|
||||
PIINTROSPECTION_START(piconnedit)
|
||||
QApplication a(argc, argv);
|
||||
enableHighDPI();
|
||||
ConnectionEdit w;
|
||||
if (a.arguments().size() > 1) {
|
||||
QPIConfig cfg(a.arguments()[1]);
|
||||
QByteArray model = cfg.getValue("connectionmodel").toByteArray();
|
||||
if (!model.isEmpty()) w.setModel(model);
|
||||
}
|
||||
if (w.exec() == QDialog::Accepted) {
|
||||
QString c = QFileDialog::getSaveFileName(&w, "Save config to file", a.applicationDirPath(), "*.conf");
|
||||
if (!c.isEmpty()) {
|
||||
QFile f(c);
|
||||
if (f.open(QIODevice::WriteOnly)) {
|
||||
QTextStream ts(&f);
|
||||
ts << w.configuration();
|
||||
ts << "connectionmodel = " << QByteArray2QString(w.model()) << "\n";
|
||||
f.close();
|
||||
}
|
||||
}
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -1,24 +1,24 @@
|
||||
find_package(PIP)
|
||||
if (PIP_FOUND AND BUILDING_pip)
|
||||
|
||||
project(piintrospector)
|
||||
if(APPLE)
|
||||
set(APP_ICON "")
|
||||
elseif(WIN32)
|
||||
set(APP_ICON "")
|
||||
else()
|
||||
set(APP_ICON "")
|
||||
endif()
|
||||
set(APP_INFO "PIConnection GUI editor")
|
||||
include(PIPMacros)
|
||||
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)
|
||||
qad_application(piintrospector "Gui;Widgets" "qad_utils;qad_widgets;qad_application;qad_piqt_utils" ${CCM})
|
||||
|
||||
foreach(_v ${_QT_VERSIONS_})
|
||||
if (LOCAL_FOUND${_v})
|
||||
add_dependencies(qad_piqt_utils${_v} pip_cmg)
|
||||
endif()
|
||||
endforeach()
|
||||
|
||||
endif()
|
||||
find_package(PIP)
|
||||
if (PIP_FOUND AND BUILDING_pip)
|
||||
|
||||
project(piintrospector)
|
||||
if(APPLE)
|
||||
set(APP_ICON "")
|
||||
elseif(WIN32)
|
||||
set(APP_ICON "")
|
||||
else()
|
||||
set(APP_ICON "")
|
||||
endif()
|
||||
set(APP_INFO "PIIntrospector")
|
||||
include(PIPMacros)
|
||||
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)
|
||||
qad_application(piintrospector "Gui;Widgets" "qad_utils;qad_widgets;qad_application;qad_piqt_utils" ${CCM})
|
||||
|
||||
foreach(_v ${_QT_VERSIONS_})
|
||||
if (LOCAL_FOUND${_v})
|
||||
add_dependencies(qad_piqt_utils${_v} pip_cmg)
|
||||
endif()
|
||||
endforeach()
|
||||
|
||||
endif()
|
||||
|
||||
Reference in New Issue
Block a user