SilentEye 0.4.1
|
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 CONTROLLER_H_ 00017 #define CONTROLLER_H_ 00018 00019 #include <QNetworkProxy> 00020 #include <QNetworkAccessManager> 00021 #include <QAuthenticator> 00022 00023 #include <config.h> 00024 #include <logger.h> 00025 00026 using namespace SilentEyeFramework; 00027 00028 namespace SilentEye { 00029 00031 class Controller : public QObject 00032 { 00033 Q_OBJECT; 00034 00035 private: 00036 static QPointer<Controller> m_pointer; 00037 00038 QPointer<Logger> m_logger; 00039 00040 Controller(QObject* parent=0); 00041 00042 public: 00043 ~Controller(); 00044 00045 Config config; 00046 QString appPath; 00047 QNetworkAccessManager networkManager; 00048 00049 static QPointer<Controller> instance(); 00050 00051 public slots: 00052 void updateProxySettings(); 00053 00054 private slots: 00055 void proxyAuthentication(const QNetworkProxy&, QAuthenticator*); 00056 }; 00057 } 00058 00059 #endif