ifdef for maemo
[googlelatitude] / src / latitude.cpp
index c215f01..aa742f1 100644 (file)
@@ -1,8 +1,10 @@
 #include "latitude.h"
 
 LatitudeGUI::LatitudeGUI(QMainWindow *parent) : QMainWindow(parent) {
 #include "latitude.h"
 
 LatitudeGUI::LatitudeGUI(QMainWindow *parent) : QMainWindow(parent) {
+#ifdef Q_WS_MAEMO_5
     setAttribute(Qt::WA_Maemo5AutoOrientation, true);
     setAttribute(Qt::WA_Maemo5AutoOrientation, true);
-    setWindowTitle(tr("Google Latitude Updater"));
+#endif
+    setWindowTitle(tr("Latitude & Buzz"));
 
     setting = new QSettings();
 
 
     setting = new QSettings();
 
@@ -41,7 +43,11 @@ LatitudeGUI::LatitudeGUI(QMainWindow *parent) : QMainWindow(parent) {
 }
 
 void LatitudeGUI::set() {
 }
 
 void LatitudeGUI::set() {
-    QMaemo5InformationBox::information(this, "New gps position", 1000);
+#ifdef Q_WS_MAEMO_5
+    QMaemo5InformationBox::information(this, "new position...", 1000);
+#else
+    qDebug() << "new position...";
+#endif
     glatitude->login(setting->value("user","my_username").toString(),
                      setting->value("pass","my_password").toString());
     glatitude->set(gps->get_lat(),
     glatitude->login(setting->value("user","my_username").toString(),
                      setting->value("pass","my_password").toString());
     glatitude->set(gps->get_lat(),
@@ -50,11 +56,19 @@ void LatitudeGUI::set() {
 }
 
 void LatitudeGUI::latitude_OK() {
 }
 
 void LatitudeGUI::latitude_OK() {
-    QMaemo5InformationBox::information(this, "Location Sent!", 1000);
+#ifdef Q_WS_MAEMO_5
+    QMaemo5InformationBox::information(this, "...location Sent!", 1000);
+#else
+    qDebug() << "...location Sent!";
+#endif
 }
 
 void LatitudeGUI::latitude_ERROR() {
 }
 
 void LatitudeGUI::latitude_ERROR() {
+#ifdef Q_WS_MAEMO_5
     QMaemo5InformationBox::information(this, "Error in Authentification !", 3000);
     QMaemo5InformationBox::information(this, "Error in Authentification !", 3000);
+#else
+    qDebug() << "Error in Authentification !";
+#endif
 }
 
 void LatitudeGUI::save_user(QString _user) {
 }
 
 void LatitudeGUI::save_user(QString _user) {