aboutsummaryrefslogtreecommitdiffstats
path: root/importdetaildialog.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'importdetaildialog.cpp')
-rw-r--r--importdetaildialog.cpp38
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