Added theme scheduler, poi support and speed alarm features.
[jspeed] / src / mainwindow.cpp
index 39b41b3..0d1294a 100644 (file)
 #include "mainmenu.h"
 #include "odometer.h"
 #include "widgetscreen.h"
+#include "poialerts.h"
+#include "speedalarm.h"
 
 MainWindow::MainWindow(): QMainWindow(0), menu_(0), themeLoader_(0), mainScreen_(0)
 {
     setWindowTitle(tr("jSpeed"));
     showFullScreen();
     Odometer::instance().start();
+    PoiAlerts::instance().start();
+    SpeedAlarm::instance().start();
     addScreens();
     startBacklight();
 }
@@ -115,6 +119,8 @@ void MainWindow::openMenu()
         connect(menu_, SIGNAL(flip()), stack_, SLOT(flip()));
         connect(menu_, SIGNAL(themeChanged()), this, SLOT(loadTheme()));
         connect(menu_, SIGNAL(unitChanged()), &(Odometer::instance()), SLOT(updateUnit()));
+        connect(menu_, SIGNAL(poiSettingsChanged()), &(PoiAlerts::instance()), SLOT(loadConfig()));
+        connect(menu_, SIGNAL(speedAlarmSettingsChanged()), &(SpeedAlarm::instance()), SLOT(loadConfig()));
     }
 
     menu_->show();