aboutsummaryrefslogtreecommitdiffstats
path: root/keyimportdetaildialog.cpp
diff options
context:
space:
mode:
authornils <nils@34ebc366-c3a9-4b3c-9f84-69acf7962910>2012-01-24 23:34:19 +0000
committernils <nils@34ebc366-c3a9-4b3c-9f84-69acf7962910>2012-01-24 23:34:19 +0000
commit3fe1b5abe11cc573848b861b7cf1c7e9f406a46c (patch)
tree6a234f6e8f045eb8c47910c33c6799530011d016 /keyimportdetaildialog.cpp
parentmoved layout definitions from header to sourcefile where possible (diff)
downloadgpg4usb-3fe1b5abe11cc573848b861b7cf1c7e9f406a46c.tar.gz
gpg4usb-3fe1b5abe11cc573848b861b7cf1c7e9f406a46c.zip
switched fpr and status columns in importdetaildialog and resize keytable columns to content
git-svn-id: http://cpunk.de/svn/src/gpg4usb/trunk@776 34ebc366-c3a9-4b3c-9f84-69acf7962910
Diffstat (limited to 'keyimportdetaildialog.cpp')
-rw-r--r--keyimportdetaildialog.cpp14
1 files changed, 8 insertions, 6 deletions
diff --git a/keyimportdetaildialog.cpp b/keyimportdetaildialog.cpp
index ebee76e..ad24ecc 100644
--- a/keyimportdetaildialog.cpp
+++ b/keyimportdetaildialog.cpp
@@ -45,6 +45,7 @@ KeyImportDetailDialog::KeyImportDetailDialog(GpgME::GpgContext* ctx, GpgImportIn
this->setLayout(mvbox);
this->setWindowTitle(tr("Key import details"));
+ this->resize(QSize(600,300));
this->setModal(true);
this->show();
}
@@ -100,11 +101,9 @@ void KeyImportDetailDialog::createKeysTable()
keysTable->setSelectionMode(QAbstractItemView::NoSelection);
QStringList headerLabels;
- headerLabels << tr("Name") << tr("Email") << tr("Fingerprint") << tr("Status");
- keysTable->horizontalHeader()->setResizeMode(0, QHeaderView::ResizeToContents);
- keysTable->horizontalHeader()->setStretchLastSection(true);
-
+ headerLabels << tr("Name") << tr("Email") << tr("Status") << tr("Fingerprint");
keysTable->verticalHeader()->hide();
+
keysTable->setHorizontalHeaderLabels(headerLabels);
int row = 0;
foreach (GpgImportedKey impKey, mResult.importedKeys) {
@@ -112,10 +111,13 @@ void KeyImportDetailDialog::createKeysTable()
GpgKey key = mCtx->getKeyByFpr(impKey.fpr);
keysTable->setItem(row, 0, new QTableWidgetItem(key.name));
keysTable->setItem(row, 1, new QTableWidgetItem(key.email));
- keysTable->setItem(row, 2, new QTableWidgetItem(impKey.fpr));
- keysTable->setItem(row,3,new QTableWidgetItem(getStatusString(impKey.importStatus)));
+ keysTable->setItem(row, 2 ,new QTableWidgetItem(getStatusString(impKey.importStatus)));
+ keysTable->setItem(row, 3, new QTableWidgetItem(impKey.fpr));
row++;
}
+ keysTable->horizontalHeader()->setResizeMode(0, QHeaderView::ResizeToContents);
+ keysTable->horizontalHeader()->setStretchLastSection(true);
+ keysTable->resizeColumnsToContents();
}
QString KeyImportDetailDialog::getStatusString(int keyStatus)