SilentEye 0.4.1

updatedialog.h

Go to the documentation of this file.
00001 //  This file is part of SilentEye.
00002 //
00003 //  SilentEye is free software: you can redistribute it and/or modify
00004 //  it under the terms of the GNU General Public License as published by
00005 //  the Free Software Foundation, either version 3 of the License, or
00006 //  (at your option) any later version.
00007 //
00008 //  SilentEye is distributed in the hope that it will be useful,
00009 //  but WITHOUT ANY WARRANTY; without even the implied warranty of
00010 //  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00011 //  GNU General Public License for more details.
00012 //
00013 //  You should have received a copy of the GNU General Public License
00014 //  along with SilentEye.  If not, see <http://www.gnu.org/licenses/>.
00015 
00016 #ifndef UPDATEDIALOG_H_
00017 #define UPDATEDIALOG_H_
00018 
00019 #include <QDialog>
00020 #include <QPointer>
00021 #include <QShowEvent>
00022 #include <QNetworkReply>
00023 
00024 #include "ui_updatedialog.h"
00025 #include <logger.h>
00026 
00027 using namespace SilentEyeFramework;
00028 
00029 namespace SilentEye {
00030 
00032     class UpdateDialog : public QDialog, public Ui::UpdateDialog
00033     {
00034         Q_OBJECT;
00035 
00036     private:
00037         QUrl m_url;
00038         QNetworkReply* m_reply;
00039         QString m_buffer;
00040 
00041         QPointer<Logger> m_logger;
00042 
00043     public:
00044         UpdateDialog(QWidget* parent=0);
00045         ~UpdateDialog();
00046 
00047     private slots:
00048         void showEvent(QShowEvent*);
00049 
00050         void download(QUrl);
00051         void httpReadyRead();
00052         void httpFinished();
00053     };
00054 
00055 }
00056 
00057 #endif