1 ///////////////////////////////////////////////////////////////////////////////
2 // LameXP - Audio Encoder Front-End
3 // Copyright (C) 2004-2014 LoRd_MuldeR <MuldeR2@GMX.de>
5 // This program is free software; you can redistribute it and/or modify
6 // it under the terms of the GNU General Public License as published by
7 // the Free Software Foundation; either version 2 of the License, or
8 // (at your option) any later version, but always including the *additional*
9 // restrictions defined in the "License.txt" file.
11 // This program is distributed in the hope that it will be useful,
12 // but WITHOUT ANY WARRANTY; without even the implied warranty of
13 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 // GNU General Public License for more details.
16 // You should have received a copy of the GNU General Public License along
17 // with this program; if not, write to the Free Software Foundation, Inc.,
18 // 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
20 // http://www.gnu.org/licenses/gpl-2.0.txt
21 ///////////////////////////////////////////////////////////////////////////////
30 //MUtils forward declaration
36 //UIC forward declartion
42 class UpdateDialog : public QDialog
47 UpdateDialog(SettingsModel *settings, QWidget *parent = 0);
50 bool getSuccess(void) { return m_success; }
51 bool updateReadyToInstall(void) { return m_updateReadyToInstall; }
54 void updateInit(void);
55 void checkForUpdates(void);
56 void linkActivated(const QString &link);
57 void applyUpdate(void);
58 void logButtonClicked(void);
59 void progressBarValueChanged(int value);
61 void threadStatusChanged(const int status);
62 void threadProgressChanged(const int progress);
63 void threadMessageLogged(const QString &message);
64 void threadFinished(void);
67 virtual void showEvent(QShowEvent *event);
68 virtual void closeEvent(QCloseEvent *event);
69 virtual void keyPressEvent(QKeyEvent *e);
70 virtual bool winEvent(MSG *message, long *result);
71 virtual bool event(QEvent *e);
73 const bool m_betaUpdates;
76 Ui::UpdateDialog *ui; //for Qt UIC
78 const QString m_binaryWGet;
79 const QString m_binaryGnuPG;
80 const QString m_binaryKeys;
81 const QString m_binaryUpdater;
83 MUtils::UpdateChecker *m_thread;
84 QStringList *m_logFile;
85 SettingsModel *m_settings;
88 unsigned long m_updaterProcess;
91 bool m_updateReadyToInstall;
94 void testKnownHosts(void);