comparison ui/mainwindow.cpp @ 10:fe39d93f1261

Start on Downloader component
author Andre Heinecke <aheinecke@intevation.de>
date Thu, 13 Feb 2014 14:43:15 +0000
parents 992c0ec57660
children 7e2f14c7aba2
comparison
equal deleted inserted replaced
9:2ad9a96518e3 10:fe39d93f1261
7 #include <QDialog> 7 #include <QDialog>
8 #include <QMenu> 8 #include <QMenu>
9 #include <QApplication> 9 #include <QApplication>
10 10
11 #include "certificatelist.h" 11 #include "certificatelist.h"
12 #include "downloader.h"
12 13
13 MainWindow::MainWindow() { 14 MainWindow::MainWindow() {
14 createActions(); 15 createActions();
15 createTrayIcon(); 16 createTrayIcon();
16 17
33 } 34 }
34 } 35 }
35 36
36 void MainWindow::showMessage() 37 void MainWindow::showMessage()
37 { 38 {
38 CertificateList * myCertList = new CertificateList((char*)"foo");
39 mTrayIcon->showMessage("Hello", "World", QSystemTrayIcon::Information, 39 mTrayIcon->showMessage("Hello", "World", QSystemTrayIcon::Information,
40 10000); 40 10000);
41 } 41 }
42 void MainWindow::manualCheck() 42 void MainWindow::manualCheck()
43 { 43 {
44 QMessageBox::information(0, "Yay", 44 Downloader* downloader = new Downloader(this, QString::fromLatin1(""));
45 "It Woarx.\n"); 45 connect(downloader, &Downloader::finished, downloader, &QObject::deleteLater);
46 downloader->start();
46 } 47 }
47 48
48 void MainWindow::createActions() 49 void MainWindow::createActions()
49 { 50 {
50 mCheckUpdates = new QAction(tr("Check for Updates"), this); 51 mCheckUpdates = new QAction(tr("Check for Updates"), this);

http://wald.intevation.org/projects/trustbridge/