00001 #include "updaterdialog.h"
00002 #include "../Data/settings.h"
00003 #include <QDebug>
00004
00005 UpdaterDialog::UpdaterDialog(Settings &settings, QWidget *parent) : QDialog(parent)
00006 {
00007 setupUi(this);
00008 setAttribute(Qt::WA_DeleteOnClose, true);
00009 setUpdateInformation();
00010
00011 if(checkForUpdates())
00012 {
00013 connect(buttonInstallUpdate, SIGNAL(clicked()), this, SLOT(startUpdate()));
00014 }
00015 else
00016 {
00017 buttonInstallUpdate->setEnabled(false);
00018 }
00019
00020 connect(buttonClose, SIGNAL(clicked()), this, SLOT(buttonCloseClicked()));
00021 }
00022
00023 void UpdaterDialog::setUpdateInformation()
00024 {
00025 textCurrentVersion->setText(QApplication::applicationVersion());
00026
00027
00028
00029
00030
00031 }
00032
00033 bool UpdaterDialog::checkForUpdates()
00034 {
00035
00036 if(true)
00037 {
00038
00039
00040 return true;
00041 }
00042 return false;
00043 }
00044
00045 void UpdaterDialog::startUpdate()
00046 {
00047
00048 }
00049
00050 void UpdaterDialog::buttonCloseClicked()
00051 {
00052 this->close();
00053 }