comparison ui/mainwindow.cpp @ 447:b1b14daf2116

Save the select state of certificate items when closing the app.
author Raimund Renkert <rrenkert@intevation.de>
date Wed, 23 Apr 2014 11:56:37 +0200
parents 43090637d6ae
children 023b565a02fc
comparison
equal deleted inserted replaced
446:43090637d6ae 447:b1b14daf2116
268 connect(update, SIGNAL(triggered()), this, SLOT(checkUpdates())); 268 connect(update, SIGNAL(triggered()), this, SLOT(checkUpdates()));
269 connect(settings, SIGNAL(triggered()), this, SLOT(showSettings())); 269 connect(settings, SIGNAL(triggered()), this, SLOT(showSettings()));
270 connect(status, SIGNAL(triggered()), this, SLOT(showStatus())); 270 connect(status, SIGNAL(triggered()), this, SLOT(showStatus()));
271 connect(help, SIGNAL(triggered()), this, SLOT(showHelp())); 271 connect(help, SIGNAL(triggered()), this, SLOT(showHelp()));
272 connect(about, SIGNAL(triggered()), this, SLOT(showAbout())); 272 connect(about, SIGNAL(triggered()), this, SLOT(showAbout()));
273 connect(quit, SIGNAL(triggered()), qApp, SLOT(quit())); 273 connect(quit, SIGNAL(triggered()), this, SLOT(closeApp()));
274 setMenuBar(mMenuBar); 274 setMenuBar(mMenuBar);
275 } 275 }
276 276
277 void MainWindow::createContent() 277 void MainWindow::createContent()
278 { 278 {
328 installButton->setFixedHeight(80); 328 installButton->setFixedHeight(80);
329 connect(installButton, SIGNAL(clicked()), this, SLOT(resizeButtons())); 329 connect(installButton, SIGNAL(clicked()), this, SLOT(resizeButtons()));
330 connect(installButton, SIGNAL(clicked()), this, SLOT(installCerts())); 330 connect(installButton, SIGNAL(clicked()), this, SLOT(installCerts()));
331 quitButton = new QPushButton(tr("Quit")); 331 quitButton = new QPushButton(tr("Quit"));
332 quitButton->setFixedHeight(20); 332 quitButton->setFixedHeight(20);
333 connect(quitButton, SIGNAL(clicked()), qApp, SLOT(quit())); 333 connect(quitButton, SIGNAL(clicked()), this, SLOT(closeApp()));
334 bottomLayout->insertStretch(0, 10); 334 bottomLayout->insertStretch(0, 10);
335 bottomLayout->addWidget(installButton); 335 bottomLayout->addWidget(installButton);
336 bottomLayout->setAlignment(installButton, Qt::AlignBottom); 336 bottomLayout->setAlignment(installButton, Qt::AlignBottom);
337 bottomLayout->addWidget(quitButton); 337 bottomLayout->addWidget(quitButton);
338 bottomLayout->setAlignment(quitButton, Qt::AlignBottom); 338 bottomLayout->setAlignment(quitButton, Qt::AlignBottom);
631 } 631 }
632 mSettings.endGroup(); 632 mSettings.endGroup();
633 mSettings.sync(); 633 mSettings.sync();
634 return mSettings.status() == QSettings::NoError; 634 return mSettings.status() == QSettings::NoError;
635 } 635 }
636
637 void MainWindow::closeApp()
638 {
639 saveUnselectedCertificates();
640 qApp->quit();
641 }

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