UniversalIndentGUI 1.2.0
|
00001 /*************************************************************************** 00002 * Copyright (C) 2006-2012 by Thomas Schweitzer * 00003 * thomas-schweitzer(at)arcor.de * 00004 * * 00005 * This program is free software; you can redistribute it and/or modify * 00006 * it under the terms of the GNU General Public License version 2.0 as * 00007 * published by the Free Software Foundation. * 00008 * * 00009 * This program is distributed in the hope that it will be useful, * 00010 * but WITHOUT ANY WARRANTY; without even the implied warranty of * 00011 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * 00012 * GNU General Public License for more details. * 00013 * * 00014 * You should have received a copy of the GNU General Public License * 00015 * along with this program in the file LICENSE.GPL; if not, write to the * 00016 * Free Software Foundation, Inc., * 00017 * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * 00018 ***************************************************************************/ 00019 00020 #ifndef UPDATECHECKDIALOG_H 00021 #define UPDATECHECKDIALOG_H 00022 00023 #include <QDialog> 00024 #include <QDialogButtonBox> 00025 00026 class UiGuiSettings; 00027 namespace Ui { 00028 class UpdateCheckDialog; 00029 } 00030 00031 class QTimer; 00032 class QDesktopServices; 00033 class QNetworkAccessManager; 00034 class QNetworkReply; 00035 00036 00037 class UpdateCheckDialog : public QDialog 00038 { 00039 Q_OBJECT 00040 00041 public: 00042 UpdateCheckDialog(QSharedPointer<UiGuiSettings> settings, QWidget *parent = NULL); 00043 ~UpdateCheckDialog(); 00044 00045 public slots: 00046 void checkForUpdateAndShowDialog(); 00047 void checkForUpdate(); 00048 00049 private slots: 00050 void checkResultsOfFetchedPadXMLFile(QNetworkReply *networkReply); 00051 void handleUpdateCheckDialogButtonClicked(QAbstractButton *clickedButton); 00052 void updateUpdateCheckProgressBar(); 00053 void initProxySettings(); 00054 00055 private: 00056 Ui::UpdateCheckDialog *_updateCheckDialogForm; 00057 00058 void getPadXMLFile(); 00059 void showCheckingForUpdateDialog(); 00060 void showNewVersionAvailableDialog(QString newVersion); 00061 void showNoNewVersionAvailableDialog(); 00062 int convertVersionStringToNumber(QString versionString); 00063 00064 QSharedPointer<UiGuiSettings> _settings; 00065 bool _manualUpdateRequested; 00066 QNetworkAccessManager *_networkAccessManager; 00067 QNetworkReply *_currentNetworkReply; 00068 QDialogButtonBox::ButtonRole _roleOfClickedButton; 00069 QTimer *_updateCheckProgressTimer; 00070 int _updateCheckProgressCounter; 00071 }; 00072 00073 #endif // UPDATECHECKDIALOG_H