Mercurial > trustbridge
comparison ui/certificatelistwidget.cpp @ 651:7cd6602e3fa2 trustbridge-refactor
Updated certificate list/details layout.
author | Raimund Renkert <rrenkert@intevation.de> |
---|---|
date | Wed, 25 Jun 2014 14:51:43 +0200 |
parents | c1b35edb097f |
children | 39f03316f675 |
comparison
equal
deleted
inserted
replaced
650:9c3e7754b76b | 651:7cd6602e3fa2 |
---|---|
21 } | 21 } |
22 | 22 |
23 void CertificateListWidget::setupGUI() | 23 void CertificateListWidget::setupGUI() |
24 { | 24 { |
25 QHBoxLayout *mainLayout = new QHBoxLayout; | 25 QHBoxLayout *mainLayout = new QHBoxLayout; |
26 QVBoxLayout *detailMainLayout = new QVBoxLayout; | |
26 mCertificateList = new QListWidget; | 27 mCertificateList = new QListWidget; |
27 mCertificateList->setFixedWidth(250); | 28 mCertificateList->setFixedWidth(250); |
28 connect(mCertificateList, | 29 connect(mCertificateList, |
29 SIGNAL(currentItemChanged(QListWidgetItem*, QListWidgetItem*)), | 30 SIGNAL(currentItemChanged(QListWidgetItem*, QListWidgetItem*)), |
30 this, | 31 this, |
31 SLOT(updateDetails(QListWidgetItem*))); | 32 SLOT(updateDetails(QListWidgetItem*))); |
32 | 33 |
33 QHBoxLayout *detailLayout = new QHBoxLayout; | 34 QHBoxLayout *detailLayout = new QHBoxLayout; |
34 QVBoxLayout *detailLabelLayout = new QVBoxLayout; | 35 QVBoxLayout *detailLabelLayout = new QVBoxLayout; |
35 QVBoxLayout *detailContentLayout = new QVBoxLayout; | 36 QVBoxLayout *detailContentLayout = new QVBoxLayout; |
36 QGroupBox *detailBox = new QGroupBox(); | 37 QGroupBox *detailBox = new QGroupBox(tr("Details")); |
37 QLabel *subjectCN = new QLabel(tr("Subject Common Name:")); | 38 QLabel *subjectCN = new QLabel(tr("Subject Common Name:")); |
38 QLabel *subjectOU = new QLabel(tr("Subject Organisation:")); | 39 QLabel *subjectOU = new QLabel(tr("Subject Organisation:")); |
39 QLabel *issuerCN = new QLabel(tr("Issuer Common Name:")); | 40 QLabel *issuerCN = new QLabel(tr("Issuer Common Name:")); |
40 QLabel *issuerOU = new QLabel(tr("Issuer Organisation:")); | 41 QLabel *issuerOU = new QLabel(tr("Issuer Organisation:")); |
41 QLabel *validFrom = new QLabel(tr("Valid from:")); | 42 QLabel *validFrom = new QLabel(tr("Valid from:")); |
64 detailContentLayout->addWidget(mValidTo); | 65 detailContentLayout->addWidget(mValidTo); |
65 detailContentLayout->addWidget(mFingerprint); | 66 detailContentLayout->addWidget(mFingerprint); |
66 detailLayout->addLayout(detailLabelLayout); | 67 detailLayout->addLayout(detailLabelLayout); |
67 detailLayout->addLayout(detailContentLayout); | 68 detailLayout->addLayout(detailContentLayout); |
68 detailBox->setLayout(detailLayout); | 69 detailBox->setLayout(detailLayout); |
70 detailMainLayout->addWidget(detailBox); | |
71 detailMainLayout->addStretch(1); | |
69 | 72 |
70 mainLayout->addWidget(mCertificateList); | 73 mainLayout->addWidget(mCertificateList); |
71 mainLayout->addWidget(detailBox); | 74 mainLayout->addLayout(detailMainLayout); |
72 this->setLayout(mainLayout); | 75 this->setLayout(mainLayout); |
73 } | 76 } |
74 | 77 |
75 void CertificateListWidget::addCertificate( | 78 void CertificateListWidget::addCertificate( |
76 const Certificate &certificate, | 79 const Certificate &certificate, |