Merge branch 'feature/popups'
authorTiina Kivilinna-Korhola <tiina.kivilinna-korhola@fudeco.com>
Wed, 31 Mar 2010 10:12:10 +0000 (13:12 +0300)
committerTiina Kivilinna-Korhola <tiina.kivilinna-korhola@fudeco.com>
Wed, 31 Mar 2010 10:12:10 +0000 (13:12 +0300)
Conflicts:
Client/mainwindow.cpp
Client/mainwindow.h

1  2 
Client/accelerationstart.cpp
Client/accelerationstart.h
Client/mainwindow.cpp
Client/mainwindow.h
Client/resultdialog.cpp
Client/routedialog.cpp
Client/settingsdialog.cpp
Client/settingsdialog.h

Simple merge
Simple merge
@@@ -25,12 -24,15 +25,16 @@@ MainWindow::MainWindow(QWidget *parent
      QCoreApplication::setOrganizationDomain("fudeco.com");
      QCoreApplication::setApplicationName("Speed Freak");
  
 +    routeDialog = new RouteDialog;
+     accstart = NULL;
      creditsDialog = new CreditsDialog;
      routeSaveDialog = new RouteSaveDialog;
+     routeDialog = new RouteDialog;
+     connect(routeDialog,SIGNAL(sendroute()),this,SLOT(clientSendRoute()));
      settingsDialog = new SettingsDialog;
-     connect(settingsDialog,SIGNAL(sendregistration()),this,SLOT(regUserToServer()));
-     connect(settingsDialog,SIGNAL(userNameChanged()),this,SLOT(userLogin()));
+     connect(settingsDialog,SIGNAL(sendregistration()),this,SLOT(clientRegUserToServer()));
+     connect(settingsDialog,SIGNAL(userNameChanged()),this,SLOT(clientUserLogin()));
      topResultDialog = new TopResultDialog;
      connect(topResultDialog, SIGNAL(refreshCategoryList()), this, SLOT(clientRequestCategoryList()));
      connect(topResultDialog, SIGNAL(refreshTopList(int)), this, SLOT(clientRequestTopList(int)));
@@@ -190,10 -153,7 +187,10 @@@ void MainWindow::clientRegUserToServer(
      httpClient->requestRegistration();
  }
  
 +/**
 +  * This function performs login to server
 +  */
- void MainWindow::userLogin()
+ void MainWindow::clientUserLogin()
  {
      httpClient->checkLogin();
  }
  #include "accelerationstart.h"
  #include "topresultdialog.h"
  #include "httpclient.h"
 +#include "routedialog.h"
+ #include "resultdialog.h"
 +
  namespace Ui {
      class MainWindow;
  }
@@@ -40,7 -42,7 +44,8 @@@ public
      accelerationstart* accstart;
      TopResultDialog *topResultDialog;
      HttpClient *httpClient;
 +    RouteDialog *routeDialog;
+     ResultDialog *resultDialog;
  
  protected:
      void changeEvent(QEvent *e);
Simple merge
Simple merge
@@@ -16,23 -7,8 +16,23 @@@ SettingsDialog::SettingsDialog(QWidget 
  {
      ui->setupUi(this);
      this->setWindowTitle("Settings");
-     this->ui->regEMailLineEdit->setText("@meili.fi");
+     this->ui->regEMailLineEdit->setText("@");
      instructionsDialog = new InstructionsDialog;
 +
 +    if (loginSaved())
 +    {
 +        QString uName, pWord;
 +
 +        getLoginInfo( &uName, &pWord);
 +        this->username = uName;
 +        this->password = pWord;
 +
 +        ui->setUserPasswordLineEdit->setText(this->password);
 +        ui->setUserUsernameLineEdit->setText(this->username);
 +
 +        // Already someone as user - change button text to "Change"
 +        ui->setUserPushButton->setText("Change user");
 +    }
  }
  
  SettingsDialog::~SettingsDialog()
@@@ -115,21 -91,9 +115,22 @@@ void SettingsDialog::on_setUserPushButt
      this->username = ui->setUserUsernameLineEdit->text();
      this->password = ui->setUserPasswordLineEdit->text();
  
 +    // Save these also to usersettings
 +    saveLogin( this->username, this->password);
 +
 +    // Set "Set/Change User" button text
 +    if (this->username.length() > 0)
 +    {
 +        ui->setUserPushButton->setText("Change user");
 +    }
 +    else
 +    {   // Username "cleared"
 +        ui->setUserPushButton->setText("Set user");
 +    }
 +
      emit userNameChanged();
-     close();
+     //close();  //using close() hides popup-window which reports error from server
  }
  
  // Next 4 functions can be removed if Settingsdialog is implemented without
Simple merge