comparison ui/administratorwindow.cpp @ 368:f9c98f9e9f76

Show the new dialog on save button click.
author Raimund Renkert <rrenkert@intevation.de>
date Tue, 15 Apr 2014 09:44:32 +0200
parents 857ae1ffdd6f
children 9731d28b95af
comparison
equal deleted inserted replaced
367:9491782a8f5a 368:f9c98f9e9f76
15 #include <QHeaderView> 15 #include <QHeaderView>
16 #include <QFileDialog> 16 #include <QFileDialog>
17 17
18 #include "certificatetabledelegate.h" 18 #include "certificatetabledelegate.h"
19 #include "createinstallerdialog.h" 19 #include "createinstallerdialog.h"
20 #include "createcertlistdialog.h"
20 21
21 AdministratorWindow::AdministratorWindow() { 22 AdministratorWindow::AdministratorWindow() {
22 createActions(); 23 createActions();
23 createMenuBar(); 24 createMenuBar();
24 createContent(); 25 createContent();
91 headerLayout->setStretch(1, 10); 92 headerLayout->setStretch(1, 10);
92 93
93 // The buttons. 94 // The buttons.
94 bottomLayout->setAlignment(Qt::AlignBottom); 95 bottomLayout->setAlignment(Qt::AlignBottom);
95 saveButton = new QPushButton(tr("Save")); 96 saveButton = new QPushButton(tr("Save"));
97 connect(saveButton, SIGNAL(clicked()), this, SLOT(saveCertificateFile()));
96 loadButton = new QPushButton(tr("Load")); 98 loadButton = new QPushButton(tr("Load"));
97 connect(loadButton, SIGNAL(clicked()), this, SLOT(loadCertificateFile())); 99 connect(loadButton, SIGNAL(clicked()), this, SLOT(loadCertificateFile()));
98 addButton = new QPushButton(tr("Add")); 100 addButton = new QPushButton(tr("Add"));
99 connect(addButton, SIGNAL(clicked()), this, SLOT(addCertificates())); 101 connect(addButton, SIGNAL(clicked()), this, SLOT(addCertificates()));
100 removeButton = new QPushButton(tr("Remove")); 102 removeButton = new QPushButton(tr("Remove"));
127 qDebug() << "Not a valid list."; 129 qDebug() << "Not a valid list.";
128 } 130 }
129 else { 131 else {
130 loadCertificateTable(); 132 loadCertificateTable();
131 } 133 }
134 }
135
136 void AdministratorWindow::saveCertificateFile()
137 {
138 CreateCertListDialog *dialog = new CreateCertListDialog(this);
139 dialog->show();
132 } 140 }
133 141
134 void AdministratorWindow::addCertificates() 142 void AdministratorWindow::addCertificates()
135 { 143 {
136 QString certFile = QFileDialog::getOpenFileName( 144 QString certFile = QFileDialog::getOpenFileName(

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