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 class UpdateCheckThread
;
32 //UIC forward declartion
38 class UpdateDialog
: public QDialog
43 UpdateDialog(SettingsModel
*settings
, QWidget
*parent
= 0);
46 bool getSuccess(void) { return m_success
; }
47 bool updateReadyToInstall(void) { return m_updateReadyToInstall
; }
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);
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
;
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
;
84 unsigned long m_updaterProcess
;
87 bool m_updateReadyToInstall
;
90 void testKnownHosts(void);