| 25 | //============================================================================== |
| 26 | |
| 27 | Window::Window(QWidget *parent) |
| 28 | : QMainWindow(parent) |
| 29 | { |
| 30 | m_ui = new Ui::Window; |
| 31 | m_ui->setupUi(this); |
| 32 | |
| 33 | setWindowTitle(qApp->applicationName()); |
| 34 | |
| 35 | /* QSimpleUpdater is single-instance */ |
| 36 | m_updater = QSimpleUpdater::getInstance(); |
| 37 | |
| 38 | /* Check for updates when the "Check For Updates" button is clicked */ |
| 39 | connect(m_updater, SIGNAL(checkingFinished(QString)), this, SLOT(updateChangelog(QString))); |
| 40 | connect(m_updater, SIGNAL(appcastDownloaded(QString, QByteArray)), this, SLOT(displayAppcast(QString, QByteArray))); |
| 41 | |
| 42 | /* React to button clicks */ |
| 43 | connect(m_ui->resetButton, SIGNAL(clicked()), this, SLOT(resetFields())); |
| 44 | connect(m_ui->closeButton, SIGNAL(clicked()), this, SLOT(close())); |
| 45 | connect(m_ui->checkButton, SIGNAL(clicked()), this, SLOT(checkForUpdates())); |
| 46 | |
| 47 | /* Resize the dialog to fit */ |
| 48 | setMinimumSize(minimumSizeHint()); |
| 49 | resize(minimumSizeHint()); |
| 50 | |
| 51 | /* Reset the UI state */ |
| 52 | resetFields(); |
| 53 | } |
| 54 | |
| 55 | //============================================================================== |
| 56 | // Window::~Window |
nothing calls this directly
no outgoing calls
no test coverage detected