-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
19 changed files
with
393 additions
and
67 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,69 @@ | ||
|
||
import os | ||
import json | ||
import statistics | ||
import time | ||
|
||
|
||
from qgis.PyQt import QtWidgets, uic | ||
from qgis.PyQt.QtWidgets import QDialog | ||
from PyQt5 import QtCore | ||
|
||
from qgis.core import QgsMessageLog | ||
|
||
from ..recording.indicator import Indicator | ||
from ...utils.utils import Utils | ||
|
||
|
||
UI_CLASS, _ = uic.loadUiType(os.path.join(os.path.dirname(__file__), 'precision.ui')) | ||
|
||
class PrecisionNote(QtWidgets.QWidget, UI_CLASS): | ||
""" | ||
PrecisionNote class. | ||
Shows a dialog with a note about the precision of the measurement. | ||
""" | ||
|
||
addToMap = QtCore.pyqtSignal(object, list) | ||
|
||
def __init__(self, interface): | ||
"""Constructor.""" | ||
|
||
_translate = QtCore.QCoreApplication.translate | ||
|
||
QDialog.__init__(self, interface.mainWindow()) | ||
self.setupUi(self) | ||
|
||
self.indicator = Indicator(interface, 25, 25) | ||
self.lfbPrecition.insertWidget(0, self.indicator) | ||
|
||
self.lfbShowPrecitionBad.hide() | ||
self.lfbShowPrecitionGood.hide() | ||
|
||
|
||
self.lfbShowPrecitionBad.setText(_translate("Form", "qualityNoteBad")) | ||
#self.lfbShowPrecitionGoodsetText(self._translate("Form", "qualityNoteGood")) | ||
|
||
self.hide() | ||
|
||
def hideGroup(self): | ||
"""Hides the group""" | ||
QgsMessageLog.logMessage('Hide precision note', 'gnavs') | ||
|
||
self.hide() | ||
|
||
def updateIndicator(self, gpsInfo): | ||
"""Updates the color indicator""" | ||
|
||
self.indicator.setColor(gpsInfo) | ||
|
||
def update(self, gpsInfos): | ||
self.show() | ||
"""Updates the note indicator""" | ||
showNote = self.indicator.getAggregatedNote(gpsInfos) | ||
|
||
if showNote: | ||
self.lfbShowPrecitionBad.show() | ||
#self.lfbShowPrecitionGood.hide() | ||
else: | ||
self.lfbShowPrecitionBad.hide() | ||
#self.lfbShowPrecitionGood.show() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,109 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<ui version="4.0"> | ||
<class>Form</class> | ||
<widget class="QWidget" name="Form"> | ||
<property name="geometry"> | ||
<rect> | ||
<x>0</x> | ||
<y>0</y> | ||
<width>850</width> | ||
<height>206</height> | ||
</rect> | ||
</property> | ||
<property name="windowTitle"> | ||
<string>Form</string> | ||
</property> | ||
<layout class="QGridLayout" name="gridLayout"> | ||
<property name="leftMargin"> | ||
<number>0</number> | ||
</property> | ||
<property name="topMargin"> | ||
<number>0</number> | ||
</property> | ||
<property name="rightMargin"> | ||
<number>0</number> | ||
</property> | ||
<property name="bottomMargin"> | ||
<number>0</number> | ||
</property> | ||
<item row="0" column="0"> | ||
<widget class="QGroupBox" name="groupBox"> | ||
<property name="title"> | ||
<string>Precision</string> | ||
</property> | ||
<layout class="QGridLayout" name="gridLayout_2"> | ||
<property name="leftMargin"> | ||
<number>4</number> | ||
</property> | ||
<property name="topMargin"> | ||
<number>20</number> | ||
</property> | ||
<property name="rightMargin"> | ||
<number>4</number> | ||
</property> | ||
<property name="bottomMargin"> | ||
<number>4</number> | ||
</property> | ||
<item row="0" column="0"> | ||
<layout class="QHBoxLayout" name="lfbPrecition"> | ||
<property name="topMargin"> | ||
<number>0</number> | ||
</property> | ||
<item> | ||
<widget class="QLabel" name="lfbShowPrecitionBad"> | ||
<property name="sizePolicy"> | ||
<sizepolicy hsizetype="Expanding" vsizetype="Preferred"> | ||
<horstretch>0</horstretch> | ||
<verstretch>0</verstretch> | ||
</sizepolicy> | ||
</property> | ||
<property name="styleSheet"> | ||
<string notr="true">color:#f00;</string> | ||
</property> | ||
<property name="text"> | ||
<string>Die Qualitätsparameter sind so schlecht, dass auf eine Messung verzichtet oder durch die Einmessung von mindestens drei Hilfspunkten mit Azimut und Distanz für eine anschließende Fehlerberrechnung und -ausgleichsrechnung erfolgen sollte.</string> | ||
</property> | ||
<property name="wordWrap"> | ||
<bool>true</bool> | ||
</property> | ||
</widget> | ||
</item> | ||
<item> | ||
<widget class="QLabel" name="lfbShowPrecitionGood"> | ||
<property name="sizePolicy"> | ||
<sizepolicy hsizetype="Expanding" vsizetype="Preferred"> | ||
<horstretch>0</horstretch> | ||
<verstretch>0</verstretch> | ||
</sizepolicy> | ||
</property> | ||
<property name="text"> | ||
<string>Qualität ist ausreichend!</string> | ||
</property> | ||
</widget> | ||
</item> | ||
<item> | ||
<spacer name="horizontalSpacer"> | ||
<property name="orientation"> | ||
<enum>Qt::Horizontal</enum> | ||
</property> | ||
<property name="sizeType"> | ||
<enum>QSizePolicy::Expanding</enum> | ||
</property> | ||
<property name="sizeHint" stdset="0"> | ||
<size> | ||
<width>40</width> | ||
<height>20</height> | ||
</size> | ||
</property> | ||
</spacer> | ||
</item> | ||
</layout> | ||
</item> | ||
</layout> | ||
</widget> | ||
</item> | ||
</layout> | ||
</widget> | ||
<resources/> | ||
<connections/> | ||
</ui> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.