diff options
| author | nils <nils@34ebc366-c3a9-4b3c-9f84-69acf7962910> | 2011-11-23 23:19:11 +0100 |
|---|---|---|
| committer | nils <nils@34ebc366-c3a9-4b3c-9f84-69acf7962910> | 2011-11-23 23:19:11 +0100 |
| commit | 18c470623ff39a7cb4cb8b4a785ecfed815a6e2f (patch) | |
| tree | 313d13e800d263b5a9d5aa59d5518dc11a335b93 /importdetaildialog.cpp | |
| parent | added files for import information (diff) | |
| download | gpg4usb-18c470623ff39a7cb4cb8b4a785ecfed815a6e2f.tar.gz gpg4usb-18c470623ff39a7cb4cb8b4a785ecfed815a6e2f.zip | |
added button to importdetails to show/hide details for individual keys
git-svn-id: http://cpunk.de/svn/src/gpg4usb/trunk@647 34ebc366-c3a9-4b3c-9f84-69acf7962910
Diffstat (limited to 'importdetaildialog.cpp')
| -rw-r--r-- | importdetaildialog.cpp | 38 |
1 files changed, 35 insertions, 3 deletions
diff --git a/importdetaildialog.cpp b/importdetaildialog.cpp index 4b30887..758a89d 100644 --- a/importdetaildialog.cpp +++ b/importdetaildialog.cpp @@ -31,19 +31,51 @@ ImportDetailDialog::ImportDetailDialog(GpgME::GpgContext* ctx, KeyList* keyList, mvbox = new QVBoxLayout(); this->createGeneralInfoBox(); + + QWidget *detailButtonBox = new QWidget(this); + QHBoxLayout *detailButtonBoxLayout = new QHBoxLayout(detailButtonBox); + + detailButton = new QPushButton(tr("Show Details"),detailButtonBox); + detailButtonBoxLayout->addWidget(detailButton,Qt::AlignLeft); + connect(detailButton, SIGNAL(clicked()), this, SLOT(showHideDetails())); + + QPushButton *closeButton = new QPushButton(tr("Close"),detailButtonBox); + detailButtonBoxLayout->addWidget(closeButton,Qt::AlignRight); + connect(closeButton, SIGNAL(clicked()), this, SLOT(close())); + + detailButtonBox->setLayout(detailButtonBoxLayout); + + mvbox->addWidget(detailButtonBox); this->createKeyInfoBox(); // Create ButtonBox for OK-Button - okButtonBox = new QDialogButtonBox(QDialogButtonBox::Close); - connect(okButtonBox, SIGNAL(rejected()), this, SLOT(close())); - mvbox->addWidget(okButtonBox); + //okButtonBox = new QDialogButtonBox(QDialogButtonBox::Close); + //connect(okButtonBox, SIGNAL(rejected()), this, SLOT(close())); + //mvbox->addWidget(okButtonBox); + + detailsShown=true; this->setLayout(mvbox); this->setWindowTitle(tr("Key import details")); this->setModal(true); + showHideDetails(); this->exec(); } +void ImportDetailDialog::showHideDetails() +{ + if (detailsShown) { + detailButton->setText(tr("Show Details")); + keyInfoBox->hide(); + detailsShown=false; + } else { + detailButton->setText(tr("Hide Details")); + keyInfoBox->show(); + detailsShown=true; + } + +} + void ImportDetailDialog::createGeneralInfoBox() { // GridBox for general import information |
