Commit 0cdd04cc authored by Valentin Platzgummer's avatar Valentin Platzgummer

321

parent e7ca9e92
error when loading wima file
if polygon vertex clicked: remove circle option
can't switch between polygons on first insert
#include <QGuiApplication>
#include <QQmlApplicationEngine>
#include "CircularSurveyComplexItem.h"
#include <QQmlContext>
#include <QObject>
int main(int argc, char *argv[])
{
QCoreApplication::setAttribute(Qt::AA_EnableHighDpiScaling);
QGuiApplication app(argc, argv);
QQmlApplicationEngine engine;
CircularSurveyComplexItem survey;
const QUrl url(QStringLiteral("qrc:/main.qml"));
QObject::connect(&engine, &QQmlApplicationEngine::objectCreated,
&app, [url](QObject *obj, const QUrl &objUrl) {
if (!obj && url == objUrl)
QCoreApplication::exit(-1);
}, Qt::QueuedConnection);
engine.rootContext()->setContextProperty("survey", &survey);
engine.load(url);
return app.exec();
}
import QtQuick 2.11
import QtQuick.Window 2.11
import QtLocation 5.5
import "../../../src/WimaView"
Window {
visible: true
width: 640
height: 480
title: qsTr("Hello World")
Map{
id: map
anchors.fill: parent
plugin: Plugin {
name: "osm" // "mapboxgl", "esri", ...
// specify plugin parameters if necessary
// PluginParameter {
// name:
// value:
// }
}
Repeater{
model: survey
SphericalSurveyMapVisual{
map: map
}
}
}
}
QT += quick
QT += positioning
CONFIG += c++11
# The following define makes your compiler emit warnings if you use
# any Qt feature that has been marked deprecated (the exact warnings
# depend on your compiler). Refer to the documentation for the
# deprecated API to know how to port your code away from it.
DEFINES += QT_DEPRECATED_WARNINGS
# You can also make your code fail to compile if it uses deprecated APIs.
# In order to do so, uncomment the following line.
# You can also select to disable deprecated APIs only up to a certain version of Qt.
#DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0x060000 # disables all the APIs deprecated before Qt 6.0.0
SOURCES += \
main.cpp
RESOURCES += qml.qrc
# Additional import path used to resolve QML modules in Qt Creator's code model
QML_IMPORT_PATH = $$PWD/../../../src/WimaView
# Additional import path used to resolve QML modules just for Qt Quick Designer
QML_DESIGNER_IMPORT_PATH =
# Default rules for deployment.
qnx: target.path = /tmp/$${TARGET}/bin
else: unix:!android: target.path = /opt/$${TARGET}/bin
!isEmpty(target.path): INSTALLS += target
INCLUDEPATH += $$PWD/../../../src/Wima
INCLUDEPATH += $$PWD/../../../src/MissionManager
INCLUDEPATH += $$PWD/../../../src/comm
INCLUDEPATH += $$PWD/../../../libs/mavlink/include/mavlink/v2.0/
<RCC>
<qresource prefix="/">
<file>main.qml</file>
</qresource>
</RCC>
......@@ -365,6 +365,7 @@ void CircularSurveyComplexItem::_rebuildTransectsPhase1()
using namespace PolygonCalculus;
using namespace PlanimetryCalculus;
// rebuild not necessary?
if (!_isInitialized || _referencePointBeingChanged)
return;
......@@ -429,11 +430,11 @@ void CircularSurveyComplexItem::_rebuildTransectsPhase1()
// fetch input data
double dalpha = _deltaAlpha.rawValue().toDouble()/180.0*M_PI; // radiants
double dr = _deltaR.rawValue().toDouble(); // meter
double lmin = _transectMinLength.rawValue().toDouble();
double r_min = dr; // meter
double r_max = (*std::max_element(distances.begin(), distances.end())); // meter
double dalpha = _deltaAlpha.rawValue().toDouble()/180.0*M_PI; // radiants
double dr = _deltaR.rawValue().toDouble(); // meter
double lmin = _transectMinLength.rawValue().toDouble();
double r_min = dr; // meter
double r_max = (*std::max_element(distances.begin(), distances.end())); // meter
QPointF origin(0, 0);
IntersectType type;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment