X-Git-Url: http://git.maemo.org/git/?a=blobdiff_plain;ds=inline;f=Client%2Fcarmainwindow.cpp;h=9b6c57ed2ccdfb1a75adf47bde2e5ccdd4fef78d;hb=93cfba3f8bf9649fff7f71602558042151f92e8f;hp=b8af9feb8218412e04e48d635edd53e063331c28;hpb=cd05761834f2faaeb31b59a18d5c8afbe6bfc499;p=speedfreak diff --git a/Client/carmainwindow.cpp b/Client/carmainwindow.cpp index b8af9fe..9b6c57e 100644 --- a/Client/carmainwindow.cpp +++ b/Client/carmainwindow.cpp @@ -1,9 +1,11 @@ #include "carmainwindow.h" #include "ui_carmainwindow.h" #include "stringlistmodel.h" +#include "loginwindow.h" #include #include #include +#include /** *Constructor of this class. @@ -18,6 +20,12 @@ CarMainWindow::CarMainWindow(QWidget *parent):QMainWindow(parent), ui(new Ui::Ca initUnitCompoBox(); initSpeedListView(); initCategoryCompoBox(); + + myLogin = new LoginWindow(this); + myRegistration = new Registration(this); + manager = new QNetworkAccessManager(this); + connect(manager,SIGNAL(finished(QNetworkReply*)),this,SLOT(networkResponse(QNetworkReply*))); + } /** @@ -168,3 +176,40 @@ void CarMainWindow::openResultView() // Show result dialog. result->show(); } + +/** + *This slot function is called when the server has finished guery. + */ +void CarMainWindow::networkResponse(QNetworkReply *reply) +{ +} + +/** + *This slot function is called when the user will to send data to server. + */ +void CarMainWindow::on_pushButton_clicked() +{ + QNetworkRequest postData; + postData.setUrl(QString("http://weather.yahooapis.com/forecastrss?p=FIXX0013&u=c")); + manager->get(postData); + +} + +/** + *This slot function is called when login/logout button is clicked. + */ +void CarMainWindow::on_loginLogoutButton_clicked() +{ + //LoginWindow myLogin; + + myLogin->show(); + //ui->loginLogoutButton->setText("logout"); +} + +/** + *This slot function is called when registrate button is clicked. + */ +void CarMainWindow::on_registratePushButton_clicked() +{ + myRegistration->show(); +}