aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authornils <nils@34ebc366-c3a9-4b3c-9f84-69acf7962910>2012-01-24 23:13:38 +0000
committernils <nils@34ebc366-c3a9-4b3c-9f84-69acf7962910>2012-01-24 23:13:38 +0000
commita968178f19399740be05ef220d0fad828ab0a87a (patch)
treecc424a7506bc3bb7d705bb947e823087b6058bd7
parentresized images for integrated help by 50% (diff)
downloadgpg4usb-a968178f19399740be05ef220d0fad828ab0a87a.tar.gz
gpg4usb-a968178f19399740be05ef220d0fad828ab0a87a.zip
moved layout definitions from header to sourcefile where possible
git-svn-id: http://cpunk.de/svn/src/gpg4usb/trunk@775 34ebc366-c3a9-4b3c-9f84-69acf7962910
-rw-r--r--editorpage.h1
-rw-r--r--keydetailsdialog.cpp12
-rw-r--r--keydetailsdialog.h7
-rw-r--r--keyimportdetaildialog.cpp12
-rw-r--r--keyimportdetaildialog.h3
-rwxr-xr-xkeymgmt.cpp1
-rwxr-xr-xsettingsdialog.h1
-rw-r--r--verifydetailsdialog.cpp2
-rw-r--r--verifydetailsdialog.h1
-rw-r--r--verifykeydetailbox.cpp2
-rw-r--r--verifykeydetailbox.h1
-rw-r--r--verifynotification.cpp2
-rw-r--r--verifynotification.h1
-rw-r--r--wizard.cpp8
-rw-r--r--wizard.h2
15 files changed, 17 insertions, 39 deletions
diff --git a/editorpage.h b/editorpage.h
index 52513b4..55b66e0 100644
--- a/editorpage.h
+++ b/editorpage.h
@@ -85,7 +85,6 @@ public:
private:
QTextEdit *textPage; /** The textedit of the tab */
QVBoxLayout *mainLayout; /** The layout for the tab */
- QHBoxLayout *notificationWidgetLayout; /** layout for the notification-widget */
QWidget *notificationWidget; /** The notification widget shown at the buttom of the tab */
QMenu *verifyMenu; /** The menu in the notifiaction widget */
QString fullFilePath; /** The path to the file handled in the tab */
diff --git a/keydetailsdialog.cpp b/keydetailsdialog.cpp
index 8cff661..0c24164 100644
--- a/keydetailsdialog.cpp
+++ b/keydetailsdialog.cpp
@@ -24,7 +24,6 @@
KeyDetailsDialog::KeyDetailsDialog(GpgME::GpgContext* ctx, gpgme_key_t key, QWidget *parent)
: QDialog(parent)
{
-
mCtx = ctx;
keyid = new QString(key->subkeys->keyid);
@@ -84,9 +83,9 @@ KeyDetailsDialog::KeyDetailsDialog(GpgME::GpgContext* ctx, gpgme_key_t key, QWid
createdVarLabel = new QLabel(keyCreatedVal);
algorithmVarLabel = new QLabel(keyAlgoVal);
- mvbox = new QVBoxLayout();
- vboxKD = new QGridLayout();
- vboxOD = new QGridLayout();
+ QVBoxLayout *mvbox = new QVBoxLayout();
+ QGridLayout *vboxKD = new QGridLayout();
+ QGridLayout *vboxOD = new QGridLayout();
vboxOD->addWidget(nameLabel, 0, 0);
vboxOD->addWidget(emailLabel, 1, 0);
@@ -113,7 +112,6 @@ KeyDetailsDialog::KeyDetailsDialog(GpgME::GpgContext* ctx, gpgme_key_t key, QWid
keyBox->setLayout(vboxKD);
mvbox->addWidget(keyBox);
- vboxFP = new QVBoxLayout();
fingerPrintVarLabel = new QLabel(beautifyFingerprint(key->subkeys->fpr));
fingerPrintVarLabel->setTextInteractionFlags(Qt::TextSelectableByMouse);
fingerPrintVarLabel->setStyleSheet("margin-left: 20; margin-right: 20;");
@@ -134,9 +132,9 @@ KeyDetailsDialog::KeyDetailsDialog(GpgME::GpgContext* ctx, gpgme_key_t key, QWid
mvbox->addWidget(fingerprintBox);
// If key has more than primary uid, also show the other uids
- gpgme_user_id_t addUserIds= key->uids->next;
+ gpgme_user_id_t addUserIds = key->uids->next;
if (addUserIds !=NULL) {
- vboxUID = new QVBoxLayout();
+ QVBoxLayout *vboxUID = new QVBoxLayout();
while (addUserIds != NULL){
addUserIdsVarLabel = new QLabel(addUserIds->name+ QString(" <")+addUserIds->email+">");
addUserIdsVarLabel->setTextInteractionFlags(Qt::TextSelectableByMouse);
diff --git a/keydetailsdialog.h b/keydetailsdialog.h
index 15e4946..0fbba41 100644
--- a/keydetailsdialog.h
+++ b/keydetailsdialog.h
@@ -59,13 +59,6 @@ private:
QGroupBox *additionalUidBox;
QDialogButtonBox *buttonBox;
- QVBoxLayout *mvbox;
- QGridLayout *vboxKD;
- QGridLayout *vboxOD;
- QVBoxLayout *vboxFP;
- QVBoxLayout *vboxUID;
-
-
QLabel *nameLabel;
QLabel *emailLabel;
QLabel *commentLabel;
diff --git a/keyimportdetaildialog.cpp b/keyimportdetaildialog.cpp
index 4072d80..ebee76e 100644
--- a/keyimportdetaildialog.cpp
+++ b/keyimportdetaildialog.cpp
@@ -32,11 +32,16 @@ KeyImportDetailDialog::KeyImportDetailDialog(GpgME::GpgContext* ctx, GpgImportIn
return;
}
- mvbox = new QVBoxLayout();
+ QVBoxLayout *mvbox = new QVBoxLayout();
this->createGeneralInfoBox();
+ mvbox->addWidget(generalInfoBox);
+
this->createKeysTable();
+ mvbox->addWidget(keysTable);
+
this->createButtonBox();
+ mvbox->addWidget(buttonBox);
this->setLayout(mvbox);
this->setWindowTitle(tr("Key import details"));
@@ -48,7 +53,7 @@ void KeyImportDetailDialog::createGeneralInfoBox()
{
// GridBox for general import information
generalInfoBox = new QGroupBox(tr("Genral key import info"));
- generalInfoBoxLayout = new QGridLayout(generalInfoBox);
+ QGridLayout *generalInfoBoxLayout = new QGridLayout(generalInfoBox);
generalInfoBoxLayout->addWidget(new QLabel(tr("Considered:")),1,0);
generalInfoBoxLayout->addWidget(new QLabel(QString::number(mResult.considered)),1,1);
@@ -83,7 +88,6 @@ void KeyImportDetailDialog::createGeneralInfoBox()
generalInfoBoxLayout->addWidget(new QLabel(QString::number(mResult.secret_unchanged)),row,1);
row++;
}
- mvbox->addWidget(generalInfoBox);
}
void KeyImportDetailDialog::createKeysTable()
@@ -112,7 +116,6 @@ void KeyImportDetailDialog::createKeysTable()
keysTable->setItem(row,3,new QTableWidgetItem(getStatusString(impKey.importStatus)));
row++;
}
- mvbox->addWidget(keysTable);
}
QString KeyImportDetailDialog::getStatusString(int keyStatus)
@@ -152,5 +155,4 @@ void KeyImportDetailDialog::createButtonBox()
{
buttonBox = new QDialogButtonBox(QDialogButtonBox::Ok);
connect(buttonBox, SIGNAL(accepted()), this, SLOT(close()));
- mvbox->addWidget(buttonBox);
}
diff --git a/keyimportdetaildialog.h b/keyimportdetaildialog.h
index 849f36b..dde1f54 100644
--- a/keyimportdetaildialog.h
+++ b/keyimportdetaildialog.h
@@ -49,9 +49,6 @@ private:
QGroupBox *generalInfoBox;
QGroupBox *keyInfoBox;
QDialogButtonBox *buttonBox;
- QVBoxLayout *mvbox;
- QGridLayout *generalInfoBoxLayout;
- QGridLayout *keyInfoBoxLayout;
GpgImportInformation mResult;
};
diff --git a/keymgmt.cpp b/keymgmt.cpp
index c6bf1f6..690de89 100755
--- a/keymgmt.cpp
+++ b/keymgmt.cpp
@@ -159,6 +159,7 @@ void KeyMgmt::importKeys(QByteArray inBuffer)
{
GpgImportInformation result = mCtx->importKey(inBuffer);
new KeyImportDetailDialog(mCtx, result, this);
+
}
void KeyMgmt::importKeyFromFile()
diff --git a/settingsdialog.h b/settingsdialog.h
index b27864e..e4ca8e6 100755
--- a/settingsdialog.h
+++ b/settingsdialog.h
@@ -151,7 +151,6 @@ public slots:
private:
QTabWidget *tabWidget;
QDialogButtonBox *buttonBox;
- QVBoxLayout *vbox;
};
#endif // __SETTINGSDIALOG_H__
diff --git a/verifydetailsdialog.cpp b/verifydetailsdialog.cpp
index 58eefcd..98746f1 100644
--- a/verifydetailsdialog.cpp
+++ b/verifydetailsdialog.cpp
@@ -44,7 +44,7 @@ void VerifyDetailsDialog::refresh()
mVbox->close();
mVbox = new QWidget();
- mVboxLayout = new QVBoxLayout(mVbox);
+ QVBoxLayout *mVboxLayout = new QVBoxLayout(mVbox);
mainLayout->addWidget(mVbox);
// Get signature information of current text
diff --git a/verifydetailsdialog.h b/verifydetailsdialog.h
index f857b67..4feee35 100644
--- a/verifydetailsdialog.h
+++ b/verifydetailsdialog.h
@@ -39,7 +39,6 @@ private:
GpgME::GpgContext *mCtx;
KeyList *mKeyList;
QHBoxLayout *mainLayout;
- QVBoxLayout *mVboxLayout;
QWidget *mVbox;
QTextEdit *mTextpage; /** Textedit associated to the notification */
QDialogButtonBox* buttonBox;
diff --git a/verifykeydetailbox.cpp b/verifykeydetailbox.cpp
index d94915c..62574da 100644
--- a/verifykeydetailbox.cpp
+++ b/verifykeydetailbox.cpp
@@ -28,7 +28,7 @@ VerifyKeyDetailBox::VerifyKeyDetailBox(QWidget *parent, GpgME::GpgContext* ctx,
this->mKeyList = keyList;
this->fpr=signature->fpr;
- grid = new QGridLayout();
+ QGridLayout *grid = new QGridLayout();
switch (gpg_err_code(signature->status))
{
diff --git a/verifykeydetailbox.h b/verifykeydetailbox.h
index adfea1c..1c31ae0 100644
--- a/verifykeydetailbox.h
+++ b/verifykeydetailbox.h
@@ -41,7 +41,6 @@ private:
KeyList* mKeyList;
QString beautifyFingerprint(QString fingerprint);
QString fpr;
- QGridLayout *grid;
};
#endif // __VERIFYKEYDETAILBOX_H__
diff --git a/verifynotification.cpp b/verifynotification.cpp
index 0319c31..284d511 100644
--- a/verifynotification.cpp
+++ b/verifynotification.cpp
@@ -46,7 +46,7 @@ VerifyNotification::VerifyNotification(QWidget *parent, GpgME::GpgContext *ctx,
keysNotInList = new QStringList();
detailsButton = new QPushButton("Details",this);
detailsButton->setMenu(detailMenu);
- notificationWidgetLayout = new QHBoxLayout(this);
+ QHBoxLayout *notificationWidgetLayout = new QHBoxLayout(this);
notificationWidgetLayout->setContentsMargins(10,0,0,0);
notificationWidgetLayout->addWidget(verifyLabel,2);
notificationWidgetLayout->addWidget(detailsButton);
diff --git a/verifynotification.h b/verifynotification.h
index 29da1c6..e1b4f1b 100644
--- a/verifynotification.h
+++ b/verifynotification.h
@@ -102,7 +102,6 @@ private:
GpgME::GpgContext *mCtx; /** GpgME Context */
KeyList *mKeyList; /** Table holding the keys */
QTextEdit *mTextpage; /** Textedit associated to the notification */
- QHBoxLayout *notificationWidgetLayout; /** Layout for verify-notification */
QVector<QString> verifyDetailStringVector; /** Vector containing the text for labels in verifydetaildialog */
QVector<verify_label_status> verifyDetailStatusVector; /** Vector containing the status for labels in verifydetaildialog */
diff --git a/wizard.cpp b/wizard.cpp
index ad7bb46..c38b66e 100644
--- a/wizard.cpp
+++ b/wizard.cpp
@@ -313,7 +313,7 @@ KeyGenPage::KeyGenPage(GpgME::GpgContext *ctx, QWidget *parent)
createKeyButton = new QPushButton(tr("Create New Key"));
createKeyButtonBoxLayout->addWidget(createKeyButton);
createKeyButtonBoxLayout->addStretch(1);
- layout = new QVBoxLayout();
+ QVBoxLayout *layout = new QVBoxLayout();
layout->addWidget(topLabel);
layout->addWidget(linkLabel);
layout->addWidget(createKeyButtonBox);
@@ -330,15 +330,9 @@ int KeyGenPage::nextId() const
void KeyGenPage::generateKeyDialog()
{
KeyGenDialog *keyGenDialog = new KeyGenDialog(mCtx, this);
- connect(mCtx, SIGNAL(keyDBChanged()), this, SLOT(showKeyGeneratedMessage()));
keyGenDialog->show();
}
-void KeyGenPage::showKeyGeneratedMessage()
-{
- layout->addWidget(new QLabel(tr("key generated. Now you can crypt and sign texts.")));
-}
-
ConclusionPage::ConclusionPage(QWidget *parent)
: QWizardPage(parent)
{
diff --git a/wizard.h b/wizard.h
index 23cfb46..8f1d9e4 100644
--- a/wizard.h
+++ b/wizard.h
@@ -134,13 +134,11 @@ public:
private slots:
void generateKeyDialog();
- void showKeyGeneratedMessage();
private:
QLabel *topLabel;
QPushButton *createKeyButton;
GpgME::GpgContext *mCtx;
- QVBoxLayout *layout;
};
class ConclusionPage : public QWizardPage