Mercurial > trustbridge
comparison ui/listupdatedialog.cpp @ 82:1f27d6db5ee3
Polarssl based certificate handling
author | Andre Heinecke <aheinecke@intevation.de> |
---|---|
date | Wed, 19 Mar 2014 18:04:14 +0000 |
parents | 01286d0872ca |
children | e52df5870c4f |
comparison
equal
deleted
inserted
replaced
81:112228bd7e4b | 82:1f27d6db5ee3 |
---|---|
23 QHBoxLayout *listLayout = new QHBoxLayout; | 23 QHBoxLayout *listLayout = new QHBoxLayout; |
24 QPushButton *executeUpdate = new QPushButton(tr("Update Stores")); | 24 QPushButton *executeUpdate = new QPushButton(tr("Update Stores")); |
25 | 25 |
26 /* The remove groups */ | 26 /* The remove groups */ |
27 QVBoxLayout *removeGroupLayout = new QVBoxLayout; | 27 QVBoxLayout *removeGroupLayout = new QVBoxLayout; |
28 QListWidget *removeListWidget = new QListWidget; | 28 mRemoveListWidget = new QListWidget; |
29 removeGroupLayout->addWidget(removeListWidget); | 29 removeGroupLayout->addWidget(mRemoveListWidget); |
30 QGroupBox *removeGroup = new QGroupBox(tr("Select certificates to be removed")); | 30 QGroupBox *removeGroup = new QGroupBox(tr("Select certificates to be removed")); |
31 removeGroup->setLayout(removeGroupLayout); | 31 removeGroup->setLayout(removeGroupLayout); |
32 | 32 |
33 foreach (const Certificate& cert, mCertificateList.getRemoveCertificates()) { | |
34 if (!cert.isValid()) { | |
35 qWarning() << "Invalid certificate in list"; | |
36 continue; | |
37 } | |
38 QListWidgetItem* item = new QListWidgetItem(cert.shortDescription()); | |
39 item->setFlags(item->flags() | Qt::ItemIsUserCheckable); | |
40 item->setCheckState(Qt::Checked); | |
41 mRemoveListWidget->addItem(item); | |
42 } | |
43 | |
33 /* The install group */ | 44 /* The install group */ |
34 QVBoxLayout *installGroupLayout = new QVBoxLayout; | 45 QVBoxLayout *installGroupLayout = new QVBoxLayout; |
35 QListWidget *installListWidget = new QListWidget; | 46 mInstallListWidget = new QListWidget; |
36 QGroupBox *installGroup = new QGroupBox(tr("Select certificates to install")); | 47 QGroupBox *installGroup = new QGroupBox(tr("Select certificates to install")); |
37 installGroupLayout->addWidget(installListWidget); | 48 installGroupLayout->addWidget(mInstallListWidget); |
38 installGroup->setLayout(installGroupLayout); | 49 installGroup->setLayout(installGroupLayout); |
39 | 50 |
40 foreach (const Certificate& cert, mCertificateList.getInstallCertificates()) { | 51 foreach (const Certificate& cert, mCertificateList.getInstallCertificates()) { |
41 if (!cert.isValid()) { | 52 if (!cert.isValid()) { |
42 qWarning() << "Invalid certificate in list"; | 53 qWarning() << "Invalid certificate in list"; |
43 continue; | 54 continue; |
44 } | 55 } |
45 QListWidgetItem* item = new QListWidgetItem(cert.shortDescription()); | 56 QListWidgetItem* item = new QListWidgetItem(cert.shortDescription()); |
46 item->setFlags(item->flags() | Qt::ItemIsUserCheckable); | 57 item->setFlags(item->flags() | Qt::ItemIsUserCheckable); |
47 item->setCheckState(Qt::Checked); | 58 item->setCheckState(Qt::Checked); |
48 installListWidget->addItem(item); | 59 mInstallListWidget->addItem(item); |
49 } | 60 } |
50 | 61 |
51 /* Add groups to layout */ | 62 /* Add groups to layout */ |
52 listLayout->addWidget(installGroup); | 63 listLayout->addWidget(installGroup); |
53 listLayout->addWidget(removeGroup); | 64 listLayout->addWidget(removeGroup); |
58 | 69 |
59 setLayout(topLayout); | 70 setLayout(topLayout); |
60 | 71 |
61 return; | 72 return; |
62 } | 73 } |
74 | |
75 void ListUpdateDialog::executeUpdate() { | |
76 | |
77 } |