summaryrefslogtreecommitdiff
path: root/noncore/net/wellenreiter/gui/mainwindow.cpp
Side-by-side diff
Diffstat (limited to 'noncore/net/wellenreiter/gui/mainwindow.cpp') (more/less context) (show whitespace changes)
-rw-r--r--noncore/net/wellenreiter/gui/mainwindow.cpp15
1 files changed, 14 insertions, 1 deletions
diff --git a/noncore/net/wellenreiter/gui/mainwindow.cpp b/noncore/net/wellenreiter/gui/mainwindow.cpp
index 05a8913..b462afd 100644
--- a/noncore/net/wellenreiter/gui/mainwindow.cpp
+++ b/noncore/net/wellenreiter/gui/mainwindow.cpp
@@ -36,2 +36,3 @@
#include <qstatusbar.h>
+#include <qspinbox.h>
#include <qtextstream.h>
@@ -135,2 +136,3 @@ WellenreiterMainWindow::WellenreiterMainWindow( QWidget * parent, const char * n
demo->insertItem( tr( "&Add something" ), this, SLOT( demoAddStations() ) );
+ demo->insertItem( tr( "&Read from GPSd" ), this, SLOT( demoReadFromGps() ) );
@@ -225,3 +227,3 @@ void WellenreiterMainWindow::demoAddStations()
{
- //mw = 0; // test SIGSGV handling
+ //mw = 0; // test SIGSEGV handling
@@ -235,2 +237,13 @@ void WellenreiterMainWindow::demoAddStations()
+void WellenreiterMainWindow::demoReadFromGps()
+{
+ WellenreiterConfigWindow* configwindow = WellenreiterConfigWindow::instance();
+ GPS* gps = new GPS( this );
+ gps->open( configwindow->gpsdHost->currentText(), configwindow->gpsdPort->value() );
+ GpsLocation loc = gps->position();
+
+ QMessageBox::information( this, "Wellenreiter/Opie", tr( "GPS said:\n$1" ).arg( loc.dmsPosition() ) );
+}
+
+
QString WellenreiterMainWindow::getFileName( bool save )