comparison ui/administratorwindow.cpp @ 1317:d009da9cfa10

(issue157) Reload list after successful creation
author Andre Heinecke <andre.heinecke@intevation.de>
date Mon, 13 Oct 2014 17:41:12 +0200
parents ff9cd05e861e
children 45082ec23e76
comparison
equal deleted inserted replaced
1316:ff9cd05e861e 1317:d009da9cfa10
35 35
36 #define HELP_PATH "/doc/index.html" 36 #define HELP_PATH "/doc/index.html"
37 37
38 AdministratorWindow::AdministratorWindow() { 38 AdministratorWindow::AdministratorWindow() {
39 setWindowTitle(tr("TrustBridge Administration")); 39 setWindowTitle(tr("TrustBridge Administration"));
40 QString path = QStandardPaths::locate(
41 QStandardPaths::DataLocation, QString("current_certificates.txt"));
42 mCertList.readList(path.toLocal8Bit());
43 createActions(); 40 createActions();
44 createMenuBar(); 41 createMenuBar();
45 createContent(); 42 createContent();
43 loadCurrentCertificates();
44 resize(1190, 500);
45 }
46
47 void AdministratorWindow::loadCurrentCertificates()
48 {
49 QString path = QStandardPaths::locate(
50 QStandardPaths::DataLocation, QString("current_certificates.txt"));
51 certificateModel->removeAll();
52 mCertList.readList(path.toLocal8Bit());
46 loadCertificateTable(); 53 loadCertificateTable();
47 resize(1190, 500);
48 } 54 }
49 55
50 void AdministratorWindow::createActions() 56 void AdministratorWindow::createActions()
51 { 57 {
52 } 58 }
168 CertificateDiffDialog *diffDialog = new CertificateDiffDialog(this); 174 CertificateDiffDialog *diffDialog = new CertificateDiffDialog(this);
169 int ret = diffDialog->exec(); 175 int ret = diffDialog->exec();
170 if (ret == QDialog::Accepted) { 176 if (ret == QDialog::Accepted) {
171 CreateCertListDialog *dialog = new CreateCertListDialog(this); 177 CreateCertListDialog *dialog = new CreateCertListDialog(this);
172 dialog->show(); 178 dialog->show();
179 connect (dialog, SIGNAL(creationSuccessful()), this, SLOT(loadCurrentCertificates()));
173 } 180 }
174 } 181 }
175 182
176 void AdministratorWindow::addCertificates() 183 void AdministratorWindow::addCertificates()
177 { 184 {

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