comparison ui/administratorwindow.cpp @ 457:c17c1da7108d

merged.
author Raimund Renkert <rrenkert@intevation.de>
date Wed, 23 Apr 2014 14:00:38 +0200
parents 6dec8101793c
children 091ad56c2715
comparison
equal deleted inserted replaced
456:37a97621b466 457:c17c1da7108d
31 31
32 AdministratorWindow::AdministratorWindow() { 32 AdministratorWindow::AdministratorWindow() {
33 setWindowTitle(tr("TrustBridge Administration")); 33 setWindowTitle(tr("TrustBridge Administration"));
34 QString path = QStandardPaths::locate( 34 QString path = QStandardPaths::locate(
35 QStandardPaths::DataLocation, QString("certlist_last.txt")); 35 QStandardPaths::DataLocation, QString("certlist_last.txt"));
36 certList.readList(path.toLocal8Bit()); 36 mCertList.readList(path.toLocal8Bit());
37 createActions(); 37 createActions();
38 createMenuBar(); 38 createMenuBar();
39 createContent(); 39 createContent();
40 loadCertificateTable(); 40 loadCertificateTable();
41 resize(1190, 700); 41 resize(1190, 700);
141 QString path = QStandardPaths::locate( 141 QString path = QStandardPaths::locate(
142 QStandardPaths::DataLocation, QString("certlist_last.txt")); 142 QStandardPaths::DataLocation, QString("certlist_last.txt"));
143 QString certFile = QFileDialog::getOpenFileName( 143 QString certFile = QFileDialog::getOpenFileName(
144 this, tr("Select certificate list file"), path, "*.txt"); 144 this, tr("Select certificate list file"), path, "*.txt");
145 qDebug() << "selected: " + certFile; 145 qDebug() << "selected: " + certFile;
146 certList.readList(certFile.toLocal8Bit().constData()); 146 mCertList.readList(certFile.toLocal8Bit().constData());
147 if (!certList.isValid()) { 147 if (!mCertList.isValid()) {
148 qDebug() << "Not a valid list."; 148 qDebug() << "Not a valid list.";
149 } 149 }
150 else { 150 else {
151 certificateModel->removeAll(); 151 certificateModel->removeAll();
152 loadCertificateTable(); 152 loadCertificateTable();
179 certificateModel->removeRow(list.at(i).row(), list.at(i)); 179 certificateModel->removeRow(list.at(i).row(), list.at(i));
180 } 180 }
181 } 181 }
182 182
183 void AdministratorWindow::loadCertificateTable() { 183 void AdministratorWindow::loadCertificateTable() {
184 foreach(const Certificate &cert, certList.getCertificates()) { 184 foreach(const Certificate &cert, mCertList.getCertificates()) {
185 certificateModel->addCertificate(cert, true); 185 certificateModel->addCertificate(cert, true);
186 } 186 }
187 certificateView->resizeColumnsToContents(); 187 certificateView->resizeColumnsToContents();
188 certificateView->setColumnWidth(0, 60); 188 certificateView->setColumnWidth(0, 60);
189 } 189 }

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