Updated MediaInfo binaries to v0.7.70 (2014-09-03), compiled with ICL 15.0 and MSVC...
[LameXP.git] / src / Dialog_Update.h
blob2961e19e21885c5bf6cf46433ad33c9a17a86f54
1 ///////////////////////////////////////////////////////////////////////////////
2 // LameXP - Audio Encoder Front-End
3 // Copyright (C) 2004-2014 LoRd_MuldeR <MuldeR2@GMX.de>
4 //
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 ///////////////////////////////////////////////////////////////////////////////
23 #pragma once
25 #include <QDialog>
27 class UpdateInfo;
28 class SettingsModel;
29 class QMovie;
30 class UpdateCheckThread;
32 //UIC forward declartion
33 namespace Ui {
34 class UpdateDialog;
37 //UpdateDialog class
38 class UpdateDialog : public QDialog
40 Q_OBJECT
42 public:
43 UpdateDialog(SettingsModel *settings, QWidget *parent = 0);
44 ~UpdateDialog(void);
46 bool getSuccess(void) { return m_success; }
47 bool updateReadyToInstall(void) { return m_updateReadyToInstall; }
49 private slots:
50 void updateInit(void);
51 void checkForUpdates(void);
52 void linkActivated(const QString &link);
53 void applyUpdate(void);
54 void logButtonClicked(void);
55 void progressBarValueChanged(int value);
57 void threadStatusChanged(const int status);
58 void threadProgressChanged(const int progress);
59 void threadMessageLogged(const QString &message);
60 void threadFinished(void);
62 protected:
63 virtual void showEvent(QShowEvent *event);
64 virtual void closeEvent(QCloseEvent *event);
65 virtual void keyPressEvent(QKeyEvent *e);
66 virtual bool winEvent(MSG *message, long *result);
67 virtual bool event(QEvent *e);
69 const bool m_betaUpdates;
71 private:
72 Ui::UpdateDialog *ui; //for Qt UIC
74 const QString m_binaryWGet;
75 const QString m_binaryGnuPG;
76 const QString m_binaryKeys;
77 const QString m_binaryUpdater;
79 UpdateCheckThread *m_thread;
80 QStringList *m_logFile;
81 SettingsModel *m_settings;
82 QMovie *m_animator;
84 unsigned long m_updaterProcess;
86 bool m_success;
87 bool m_updateReadyToInstall;
88 bool m_firstShow;
90 void testKnownHosts(void);