Compare commits
12 Commits
b8e8a1300e
...
master
| Author | SHA1 | Date | |
|---|---|---|---|
| 681a79a672 | |||
| 88bcc7f2e9 | |||
| 04d9cf6edf | |||
| 66dc481d6e | |||
| f8e361190b | |||
| 745376adfb | |||
| 13d4e6cb75 | |||
| 0f13cf5196 | |||
| d403d0a242 | |||
| c959a712f7 | |||
| f9a8f5d6b1 | |||
| 49ae1473f9 |
@@ -135,7 +135,7 @@ JavaScriptWrapImports: true
|
|||||||
KeepEmptyLinesAtTheStartOfBlocks: false
|
KeepEmptyLinesAtTheStartOfBlocks: false
|
||||||
LambdaBodyIndentation: Signature
|
LambdaBodyIndentation: Signature
|
||||||
MacroBlockBegin: "PRIVATE_DEFINITION_START|STATIC_INITIALIZER_BEGIN"
|
MacroBlockBegin: "PRIVATE_DEFINITION_START|STATIC_INITIALIZER_BEGIN"
|
||||||
MacroBlockEnd: "PRIVATE_DEFINITION_END|STATIC_INITIALIZER_END"
|
MacroBlockEnd: "PRIVATE_DEFINITION_END|PRIVATE_DEFINITION_END_NO_INITIALIZE|STATIC_INITIALIZER_END"
|
||||||
MaxEmptyLinesToKeep: 2
|
MaxEmptyLinesToKeep: 2
|
||||||
NamespaceIndentation: None
|
NamespaceIndentation: None
|
||||||
ObjCBinPackProtocolList: Auto
|
ObjCBinPackProtocolList: Auto
|
||||||
|
|||||||
@@ -1,10 +1,10 @@
|
|||||||
cmake_minimum_required(VERSION 3.0)
|
cmake_minimum_required(VERSION 3.13)
|
||||||
cmake_policy(SET CMP0017 NEW) # need include() with .cmake
|
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 32)
|
set(QAD_MINOR 32)
|
||||||
set(QAD_REVISION 1)
|
set(QAD_REVISION 2)
|
||||||
set(QAD_SUFFIX )
|
set(QAD_SUFFIX )
|
||||||
set(QAD_COMPANY SHS)
|
set(QAD_COMPANY SHS)
|
||||||
set(QAD_DOMAIN org.SHS)
|
set(QAD_DOMAIN org.SHS)
|
||||||
|
|||||||
@@ -137,6 +137,9 @@ endif()
|
|||||||
if (POLICY CMP0074)
|
if (POLICY CMP0074)
|
||||||
cmake_policy(SET CMP0074 NEW) # ignore <PackageName>_ROOT variables
|
cmake_policy(SET CMP0074 NEW) # ignore <PackageName>_ROOT variables
|
||||||
endif()
|
endif()
|
||||||
|
if (POLICY CMP0177)
|
||||||
|
cmake_policy(SET CMP0177 OLD)
|
||||||
|
endif()
|
||||||
set(__qt_bug_modules "UiTools")
|
set(__qt_bug_modules "UiTools")
|
||||||
|
|
||||||
set(__qt_modules_4 "CLucene;Core;Declarative;Gui;Help;main;Multimedia;Network;OpenGL;\
|
set(__qt_modules_4 "CLucene;Core;Declarative;Gui;Help;main;Multimedia;Network;OpenGL;\
|
||||||
@@ -723,7 +726,7 @@ macro(qad_target_link_libraries _NAME)
|
|||||||
list(APPEND _ARGS ${_i})
|
list(APPEND _ARGS ${_i})
|
||||||
endif()
|
endif()
|
||||||
endforeach()
|
endforeach()
|
||||||
target_link_libraries(${_TARGET} ${Qt${_v}_LIBRARIES} ${_ARGS})
|
target_link_libraries(${_TARGET} ${_ARGS} ${Qt${_v}_LIBRARIES})
|
||||||
#message("link ${_TARGET}: ${Qt${_v}_LIBRARIES} ${_ARGS}")
|
#message("link ${_TARGET}: ${Qt${_v}_LIBRARIES} ${_ARGS}")
|
||||||
endif()
|
endif()
|
||||||
endforeach()
|
endforeach()
|
||||||
|
|||||||
@@ -342,6 +342,7 @@ void Graphic::procGesture(QGesture * g) {
|
|||||||
QPointF dp = -pg->delta();
|
QPointF dp = -pg->delta();
|
||||||
dp.rx() /= getScaleX();
|
dp.rx() /= getScaleX();
|
||||||
dp.ry() /= getScaleY();
|
dp.ry() /= getScaleY();
|
||||||
|
dp.ry() = -dp.y();
|
||||||
selrect.translate(dp);
|
selrect.translate(dp);
|
||||||
totalUpdate();
|
totalUpdate();
|
||||||
} break;
|
} break;
|
||||||
@@ -357,11 +358,7 @@ void Graphic::procGesture(QGesture * g) {
|
|||||||
} break;
|
} break;
|
||||||
case Qt::TapAndHoldGesture: {
|
case Qt::TapAndHoldGesture: {
|
||||||
QTapAndHoldGesture * pg = (QTapAndHoldGesture *)g;
|
QTapAndHoldGesture * pg = (QTapAndHoldGesture *)g;
|
||||||
if (pg->state() == Qt::GestureStarted)
|
if (pg->state() == Qt::GestureStarted) QMetaObject::invokeMethod(this, [this]() { showMenu(); }, Qt::QueuedConnection);
|
||||||
QMetaObject::invokeMethod(
|
|
||||||
this,
|
|
||||||
[this]() { showMenu(); },
|
|
||||||
Qt::QueuedConnection);
|
|
||||||
} break;
|
} break;
|
||||||
default: break;
|
default: break;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -255,7 +255,7 @@
|
|||||||
</property>
|
</property>
|
||||||
<property name="icon">
|
<property name="icon">
|
||||||
<iconset resource="qad_graphic.qrc">
|
<iconset resource="qad_graphic.qrc">
|
||||||
<normaloff>:/icons/zoom-original.png</normaloff>:/icons/zoom-original.png</iconset>
|
<normaloff>:/icons/zoom-original.png</normaloff>:/icons/zoom-original.png</iconset>
|
||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
@@ -505,6 +505,9 @@
|
|||||||
<property name="shortcut">
|
<property name="shortcut">
|
||||||
<string>Esc</string>
|
<string>Esc</string>
|
||||||
</property>
|
</property>
|
||||||
|
<property name="shortcutContext">
|
||||||
|
<enum>Qt::WidgetShortcut</enum>
|
||||||
|
</property>
|
||||||
</action>
|
</action>
|
||||||
<action name="actionCheck_all">
|
<action name="actionCheck_all">
|
||||||
<property name="icon">
|
<property name="icon">
|
||||||
|
|||||||
@@ -182,6 +182,7 @@ void GraphicAnalysis::updateGraphic(int index) {
|
|||||||
void GraphicAnalysis::updateAllGraphic() {
|
void GraphicAnalysis::updateAllGraphic() {
|
||||||
for (int i = 0; i < graphicsCount(); ++i)
|
for (int i = 0; i < graphicsCount(); ++i)
|
||||||
updateGraphic(i);
|
updateGraphic(i);
|
||||||
|
updateGraphics();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -261,11 +262,13 @@ void GraphicAnalysis::addPoint(const QPointF & p, int graphic, bool update_) {
|
|||||||
|
|
||||||
void GraphicAnalysis::setGraphicTransformFunction(std::function<QPolygonF(const QPolygonF &)> f) {
|
void GraphicAnalysis::setGraphicTransformFunction(std::function<QPolygonF(const QPolygonF &)> f) {
|
||||||
tf_gr = f;
|
tf_gr = f;
|
||||||
|
updateAllGraphic();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void GraphicAnalysis::setSpectrumTransformFunction(std::function<QPolygonF(const QPolygonF &)> f) {
|
void GraphicAnalysis::setSpectrumTransformFunction(std::function<QPolygonF(const QPolygonF &)> f) {
|
||||||
tf_fft = f;
|
tf_fft = f;
|
||||||
|
updateAllGraphic();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -9,7 +9,7 @@
|
|||||||
MapViewTileProvider_MapTiler::MapViewTileProvider_MapTiler() {
|
MapViewTileProvider_MapTiler::MapViewTileProvider_MapTiler() {
|
||||||
nam = new QNetworkAccessManager();
|
nam = new QNetworkAccessManager();
|
||||||
PIValueTree p;
|
PIValueTree p;
|
||||||
p.addChild(PIValueTree("url", "https://api.maptiler.com/maps"));
|
p.addChild(PIValueTree("url", "https://api.maptiler.com/tiles"));
|
||||||
p.addChild(PIValueTree("key", ""));
|
p.addChild(PIValueTree("key", ""));
|
||||||
p.addChild(PIValueTree("tileset", ""));
|
p.addChild(PIValueTree("tileset", ""));
|
||||||
initParameters(p);
|
initParameters(p);
|
||||||
@@ -32,11 +32,15 @@ bool MapViewTileProvider_MapTiler::requestTile(MapViewTypes::TileIndex index) {
|
|||||||
req.setHeader(QNetworkRequest::UserAgentHeader, "Qt/5");
|
req.setHeader(QNetworkRequest::UserAgentHeader, "Qt/5");
|
||||||
auto * r = nam->get(req);
|
auto * r = nam->get(req);
|
||||||
if (!r) return false;
|
if (!r) return false;
|
||||||
// qDebug() << "Reqst:" << index.z << index.x << index.y;
|
// qDebug() << "Reqst:" << index.z << index.x << index.y << req.url().toString();
|
||||||
connect(r, &QNetworkReply::finished, this, [this, r, index]() {
|
connect(r, &QNetworkReply::finished, this, [this, r, index]() {
|
||||||
r->deleteLater();
|
r->deleteLater();
|
||||||
QPixmap tim;
|
QPixmap tim;
|
||||||
if (r->error() != QNetworkReply::NoError) {
|
if (r->error() != QNetworkReply::NoError) {
|
||||||
|
if (r->error() == QNetworkReply::ContentAccessDenied) {
|
||||||
|
qDebug() << "Error:" << index.z << index.x << index.y << r->error();
|
||||||
|
return;
|
||||||
|
}
|
||||||
qDebug() << "Retry:" << index.z << index.x << index.y << r->error();
|
qDebug() << "Retry:" << index.z << index.x << index.y << r->error();
|
||||||
QTimer::singleShot(500, this, [this, index] { requestTile(index); });
|
QTimer::singleShot(500, this, [this, index] { requestTile(index); });
|
||||||
return;
|
return;
|
||||||
|
|||||||
@@ -8,7 +8,7 @@
|
|||||||
MapViewTileProvider_OSM::MapViewTileProvider_OSM() {
|
MapViewTileProvider_OSM::MapViewTileProvider_OSM() {
|
||||||
nam = new QNetworkAccessManager();
|
nam = new QNetworkAccessManager();
|
||||||
PIValueTree p;
|
PIValueTree p;
|
||||||
p.addChild(PIValueTree("url", "http://tile.openstreetmap.org"));
|
p.addChild(PIValueTree("url", "https://tile.openstreetmap.org"));
|
||||||
initParameters(p);
|
initParameters(p);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -608,7 +608,7 @@ void PIValueTreeEdit::applyVariantEdit(PIVariantEdit * ve, const PIValueTree & v
|
|||||||
ve->setAttributes(attributesWithRO(vt.attributes()));
|
ve->setAttributes(attributesWithRO(vt.attributes()));
|
||||||
ve->setValue(vt.value());
|
ve->setValue(vt.value());
|
||||||
ve->setFullEditMode(is_full_edit);
|
ve->setFullEditMode(is_full_edit);
|
||||||
ve->setToolTip(PI2QString(vt.attribute(PIValueTree::Attribute::toolTip).toString()));
|
ve->setToolTip(PIVariantEditorBase::vtTr(vt.attribute(PIValueTree::Attribute::toolTip).toString()));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -4,6 +4,7 @@
|
|||||||
|
|
||||||
#include <QHeaderView>
|
#include <QHeaderView>
|
||||||
#include <QKeyEvent>
|
#include <QKeyEvent>
|
||||||
|
#include <QScreen>
|
||||||
|
|
||||||
|
|
||||||
QCodeEditCompleter::QCodeEditCompleter(QWidget * parent): QTreeWidget(parent) {
|
QCodeEditCompleter::QCodeEditCompleter(QWidget * parent): QTreeWidget(parent) {
|
||||||
@@ -79,8 +80,13 @@ void QCodeEditCompleter::invoke(QPoint global_pos) {
|
|||||||
setCurrentItem(topLevelItem(1));
|
setCurrentItem(topLevelItem(1));
|
||||||
if (isHidden()) move(global_pos);
|
if (isHidden()) move(global_pos);
|
||||||
if (topLevelItemCount() > 0) {
|
if (topLevelItemCount() > 0) {
|
||||||
|
const auto screen = qApp->screenAt(global_pos);
|
||||||
setVisible(true);
|
setVisible(true);
|
||||||
adjust();
|
adjust();
|
||||||
|
if (global_pos.y() + height() > screen->availableSize().height()) {
|
||||||
|
global_pos.setY(global_pos.y() -height() - fontHeight(this));
|
||||||
|
}
|
||||||
|
move(global_pos);
|
||||||
} else {
|
} else {
|
||||||
hide();
|
hide();
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user