comparison ui/administratorwindow.cpp @ 426:d7cda835abd6

Some wording and Layout in TrustBridge Administration.
author Raimund Renkert <rrenkert@intevation.de>
date Thu, 17 Apr 2014 12:06:57 +0200
parents b19290d6b148
children d08e39b913ee
comparison
equal deleted inserted replaced
424:81cf25402cb0 426:d7cda835abd6
71 QVBoxLayout *headerTextLayout = new QVBoxLayout; 71 QVBoxLayout *headerTextLayout = new QVBoxLayout;
72 QHBoxLayout *bottomLayout = new QHBoxLayout; 72 QHBoxLayout *bottomLayout = new QHBoxLayout;
73 73
74 // The certificate list 74 // The certificate list
75 QGroupBox *certBox = new QGroupBox( 75 QGroupBox *certBox = new QGroupBox(
76 tr("All managed root certificates of the certificate list:")); 76 tr("All managed root certificates of the certificate list: "));
77 certificateView = new QTableView; 77 certificateView = new QTableView;
78 certificateModel = new CertificateTabelModel(); 78 certificateModel = new CertificateTabelModel();
79 QSortFilterProxyModel *filterModel = new QSortFilterProxyModel(this); 79 QSortFilterProxyModel *filterModel = new QSortFilterProxyModel(this);
80 filterModel->setSourceModel(certificateModel); 80 filterModel->setSourceModel(certificateModel);
81 CertificateTableDelegate *delegate = new CertificateTableDelegate(certificateView); 81 CertificateTableDelegate *delegate = new CertificateTableDelegate(certificateView);
82 certificateView->setModel(filterModel); 82 certificateView->setModel(filterModel);
83 certificateView->setItemDelegate(delegate); 83 certificateView->setItemDelegate(delegate);
84 certificateView->horizontalHeader()->setStretchLastSection(true);
84 certificateView->resizeColumnsToContents(); 85 certificateView->resizeColumnsToContents();
85 certificateView->setColumnWidth(0, 60); 86 certificateView->setColumnWidth(0, 60);
86 certificateView->setSelectionBehavior(QAbstractItemView::SelectRows); 87 certificateView->setSelectionBehavior(QAbstractItemView::SelectRows);
87 connect(certificateView, SIGNAL(clicked(const QModelIndex&)), this, 88 connect(certificateView, SIGNAL(clicked(const QModelIndex&)), this,
88 SLOT(clickedCertificate(const QModelIndex&))); 89 SLOT(clickedCertificate(const QModelIndex&)));
137 void AdministratorWindow::loadCertificateFile() 138 void AdministratorWindow::loadCertificateFile()
138 { 139 {
139 QString path = QStandardPaths::locate( 140 QString path = QStandardPaths::locate(
140 QStandardPaths::DataLocation, QString("certlist_last.txt")); 141 QStandardPaths::DataLocation, QString("certlist_last.txt"));
141 QString certFile = QFileDialog::getOpenFileName( 142 QString certFile = QFileDialog::getOpenFileName(
142 this, tr("Select certificate file"), path, "*.txt"); 143 this, tr("Select certificate list file"), path, "*.txt");
143 qDebug() << "selected: " + certFile; 144 qDebug() << "selected: " + certFile;
144 certList.readList(certFile.toLocal8Bit().constData()); 145 certList.readList(certFile.toLocal8Bit().constData());
145 if (!certList.isValid()) { 146 if (!certList.isValid()) {
146 qDebug() << "Not a valid list."; 147 qDebug() << "Not a valid list.";
147 } 148 }

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