Added counter to gps_tool
This commit is contained in:
@ -143,6 +143,11 @@ class Ui_MainWindow(object):
|
||||
font1.setBold(True)
|
||||
font1.setWeight(75)
|
||||
self.label_14.setFont(font1)
|
||||
self.txtCount = QLabel(self.centralwidget)
|
||||
self.txtCount.setObjectName(u"txtCount")
|
||||
self.txtCount.setGeometry(QRect(150, 10, 61, 16))
|
||||
self.txtCount.setFrameShape(QFrame.Panel)
|
||||
self.txtCount.setFrameShadow(QFrame.Sunken)
|
||||
MainWindow.setCentralWidget(self.centralwidget)
|
||||
self.menubar = QMenuBar(MainWindow)
|
||||
self.menubar.setObjectName(u"menubar")
|
||||
@ -186,5 +191,6 @@ class Ui_MainWindow(object):
|
||||
self.toggleLogging.setText(QCoreApplication.translate("MainWindow", u"Start", None))
|
||||
self.label_12.setText(QCoreApplication.translate("MainWindow", u"GPX Data Logging:", None))
|
||||
self.label_14.setText(QCoreApplication.translate("MainWindow", u"GPS Tool (gpsd client)", None))
|
||||
self.txtCount.setText(QCoreApplication.translate("MainWindow", u"0", None))
|
||||
# retranslateUi
|
||||
|
||||
|
||||
@ -101,6 +101,7 @@ class QtGPSWindow(MainWindow):
|
||||
|
||||
self.log_enabled = 0
|
||||
self.dirname = "."
|
||||
self.num_count = 0
|
||||
self.num_points = 0
|
||||
|
||||
self.my_thread = DataThread()
|
||||
@ -150,6 +151,8 @@ class QtGPSWindow(MainWindow):
|
||||
point.time = datetime.now()
|
||||
self.gpx_segment.points.append(point)
|
||||
self.num_points += 1
|
||||
self.num_count += 1
|
||||
self.txtCount.setText(str(self.num_count))
|
||||
|
||||
elif report['class'] == 'SKY':
|
||||
self.txtHDOP.setText(str(getattr(report, 'hdop', 0.0)))
|
||||
|
||||
@ -481,6 +481,28 @@
|
||||
<string>GPS Tool (gpsd client)</string>
|
||||
</property>
|
||||
</widget>
|
||||
<widget class="QLabel" name="txtCount">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>150</x>
|
||||
<y>10</y>
|
||||
<width>61</width>
|
||||
<height>16</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="frameShape">
|
||||
<enum>QFrame::Panel</enum>
|
||||
</property>
|
||||
<property name="frameShadow">
|
||||
<enum>QFrame::Sunken</enum>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>0</string>
|
||||
</property>
|
||||
<property name="alignment">
|
||||
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
|
||||
</property>
|
||||
</widget>
|
||||
</widget>
|
||||
<widget class="QMenuBar" name="menubar">
|
||||
<property name="geometry">
|
||||
|
||||
Reference in New Issue
Block a user