Diffstat (limited to 'noncore/net/wellenreiter/gui/mainwindow.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r-- | noncore/net/wellenreiter/gui/mainwindow.cpp | 15 |
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 @@ | |||
36 | #include <qstatusbar.h> | 36 | #include <qstatusbar.h> |
37 | #include <qspinbox.h> | ||
37 | #include <qtextstream.h> | 38 | #include <qtextstream.h> |
@@ -135,2 +136,3 @@ WellenreiterMainWindow::WellenreiterMainWindow( QWidget * parent, const char * n | |||
135 | demo->insertItem( tr( "&Add something" ), this, SLOT( demoAddStations() ) ); | 136 | demo->insertItem( tr( "&Add something" ), this, SLOT( demoAddStations() ) ); |
137 | demo->insertItem( tr( "&Read from GPSd" ), this, SLOT( demoReadFromGps() ) ); | ||
136 | 138 | ||
@@ -225,3 +227,3 @@ void WellenreiterMainWindow::demoAddStations() | |||
225 | { | 227 | { |
226 | //mw = 0; // test SIGSGV handling | 228 | //mw = 0; // test SIGSEGV handling |
227 | 229 | ||
@@ -235,2 +237,13 @@ void WellenreiterMainWindow::demoAddStations() | |||
235 | 237 | ||
238 | void WellenreiterMainWindow::demoReadFromGps() | ||
239 | { | ||
240 | WellenreiterConfigWindow* configwindow = WellenreiterConfigWindow::instance(); | ||
241 | GPS* gps = new GPS( this ); | ||
242 | gps->open( configwindow->gpsdHost->currentText(), configwindow->gpsdPort->value() ); | ||
243 | GpsLocation loc = gps->position(); | ||
244 | |||
245 | QMessageBox::information( this, "Wellenreiter/Opie", tr( "GPS said:\n$1" ).arg( loc.dmsPosition() ) ); | ||
246 | } | ||
247 | |||
248 | |||
236 | QString WellenreiterMainWindow::getFileName( bool save ) | 249 | QString WellenreiterMainWindow::getFileName( bool save ) |