From 172164935645ee70f7221d6f956dc09862d8e36d Mon Sep 17 00:00:00 2001 From: "tiina.kivilinna-korhola@windowslive.com" Date: Tue, 9 Mar 2010 13:00:45 +0200 Subject: [PATCH] Added HttpClient class skeleton. --- Client/UI.pro | 10 ++++------ Client/httpclient.cpp | 18 ++++++++++++++++++ Client/httpclient.h | 31 +++++++++++++++++++++++++++++++ 3 files changed, 53 insertions(+), 6 deletions(-) create mode 100644 Client/httpclient.cpp create mode 100644 Client/httpclient.h diff --git a/Client/UI.pro b/Client/UI.pro index 924d9d7..763244b 100644 --- a/Client/UI.pro +++ b/Client/UI.pro @@ -1,11 +1,9 @@ # ------------------------------------------------- # Project created by QtCreator 2010-02-23T14:17:30 -# # @author Speed Freak team # @copyright (c) 2010 Speed Freak team # @license http://opensource.org/licenses/gpl-license.php GNU Public License # ------------------------------------------------- - QT += network \ xml TARGET = UI @@ -21,8 +19,8 @@ SOURCES += main.cpp \ registration.cpp \ measures.cpp \ xmlwriter.cpp \ - xmlreader.cpp - + xmlreader.cpp \ + httpclient.cpp HEADERS += carmainwindow.h \ resultdialog.h \ stringlistmodel.h \ @@ -33,8 +31,8 @@ HEADERS += carmainwindow.h \ registration.h \ measures.h \ xmlwriter.h \ - xmlreader.h - + xmlreader.h \ + httpclient.h FORMS += carmainwindow.ui \ resultdialog.ui \ measuredialog.ui \ diff --git a/Client/httpclient.cpp b/Client/httpclient.cpp new file mode 100644 index 0000000..79231a1 --- /dev/null +++ b/Client/httpclient.cpp @@ -0,0 +1,18 @@ +#include "httpclient.h" + +/** + *@brief Constructor, connects object to GUI + *@param Pointer to carmainwindow, which is temporarily used during development + */ +HttpClient::HttpClient() +{ + netManager = new QNetworkAccessManager(); +} + +/** + *@brief Destructor + */ +HttpClient::~HttpClient() +{ + +} diff --git a/Client/httpclient.h b/Client/httpclient.h new file mode 100644 index 0000000..0ade96c --- /dev/null +++ b/Client/httpclient.h @@ -0,0 +1,31 @@ +/* + * Http client Connects application to server. + * + * @author Tiina Kivilinna-Korhola + * @copyright (c) 2010 Speed Freak team + * license http://opensource.org/licenses/gpl-license.php GNU Public License + */ + +#ifndef HTTPCLIENT_H +#define HTTPCLIENT_H + +#include +#include +#include + + +class HttpClient : public QObject +{ + Q_OBJECT +public: + HttpClient(); + ~HttpClient(); + +private: + QNetworkAccessManager *netManager; + +public slots: + +}; + +#endif // HTTPCLIENT_H -- 1.7.9.5