Mercurial > trustbridge
comparison ui/administratorwindow.cpp @ 335:811eec4e1b99
Use a table view with the new certificate table model in administrator app.
author | Raimund Renkert <rrenkert@intevation.de> |
---|---|
date | Wed, 09 Apr 2014 12:44:44 +0200 |
parents | de94c4ec22b1 |
children | e3d6de930c90 |
comparison
equal
deleted
inserted
replaced
334:36be67070dcb | 335:811eec4e1b99 |
---|---|
10 #include <QGroupBox> | 10 #include <QGroupBox> |
11 #include <QSplitter> | 11 #include <QSplitter> |
12 #include <QLabel> | 12 #include <QLabel> |
13 #include <QImage> | 13 #include <QImage> |
14 #include <QCheckBox> | 14 #include <QCheckBox> |
15 #include <QHeaderView> | |
16 | |
17 #include "certificatetablemodel.h" | |
15 | 18 |
16 AdministratorWindow::AdministratorWindow() { | 19 AdministratorWindow::AdministratorWindow() { |
17 createActions(); | 20 createActions(); |
18 createMenuBar(); | 21 createMenuBar(); |
19 createContent(); | 22 createContent(); |
55 QVBoxLayout *headerTextLayout = new QVBoxLayout; | 58 QVBoxLayout *headerTextLayout = new QVBoxLayout; |
56 QHBoxLayout *bottomLayout = new QHBoxLayout; | 59 QHBoxLayout *bottomLayout = new QHBoxLayout; |
57 | 60 |
58 // The certificate list | 61 // The certificate list |
59 QGroupBox *certBox = new QGroupBox(tr("Managed Certificates")); | 62 QGroupBox *certBox = new QGroupBox(tr("Managed Certificates")); |
60 certificateList = new QListWidget(); | 63 certificateView = new QTableView; |
61 certLayout->addWidget(certificateList); | 64 certificateView->setModel(new CertificateTabelModel()); |
65 certificateView->setColumnWidth(0, 30); | |
66 certificateView->setColumnWidth(2, 130); | |
67 certificateView->setColumnWidth(3, 130); | |
68 certificateView->setColumnWidth(4, 200); | |
69 | |
70 certLayout->addWidget(certificateView); | |
62 certBox->setLayout(certLayout); | 71 certBox->setLayout(certLayout); |
63 | 72 |
64 // The header (icon, about text) | 73 // The header (icon, about text) |
65 QImage *logoImage = new QImage(":/img/logo.png"); | 74 QImage *logoImage = new QImage(":/img/logo.png"); |
66 QLabel *logo = new QLabel; | 75 QLabel *logo = new QLabel; |
94 | 103 |
95 // QMainWindow allready has a layout. All child layouts and widgets are | 104 // QMainWindow allready has a layout. All child layouts and widgets are |
96 // managed in the central widget. | 105 // managed in the central widget. |
97 base->setLayout(mainLayout); | 106 base->setLayout(mainLayout); |
98 setCentralWidget(base); | 107 setCentralWidget(base); |
108 certificateView->horizontalHeader()->setSectionResizeMode(1, | |
109 QHeaderView::Stretch); | |
99 } | 110 } |
100 | 111 |
101 void AdministratorWindow::showSettings() | 112 void AdministratorWindow::showSettings() |
102 { | 113 { |
103 qDebug() << "show settingsdialog"; | 114 qDebug() << "show settingsdialog"; |