aboutsummaryrefslogtreecommitdiffstats
path: root/attachments.cpp
diff options
context:
space:
mode:
authorubbo <ubbo@34ebc366-c3a9-4b3c-9f84-69acf7962910>2010-05-12 18:14:37 +0000
committerubbo <ubbo@34ebc366-c3a9-4b3c-9f84-69acf7962910>2010-05-12 18:14:37 +0000
commitdb1e9b6d984203eec671c2e1b21f8dc863976866 (patch)
treed8715beaf9fc55e1e87c1dc48b005beefee38b41 /attachments.cpp
parentmimeparsing optional by settings (diff)
downloadgpg4usb-db1e9b6d984203eec671c2e1b21f8dc863976866.tar.gz
gpg4usb-db1e9b6d984203eec671c2e1b21f8dc863976866.zip
visual polishing of attachment-view, testfile for more attachments, add test-icon for pdf
git-svn-id: http://cpunk.de/svn/src/gpg4usb/trunk@325 34ebc366-c3a9-4b3c-9f84-69acf7962910
Diffstat (limited to 'attachments.cpp')
-rw-r--r--attachments.cpp15
1 files changed, 15 insertions, 0 deletions
diff --git a/attachments.cpp b/attachments.cpp
index 0b12525..dc248a4 100644
--- a/attachments.cpp
+++ b/attachments.cpp
@@ -19,6 +19,13 @@
* MA 02110-1301, USA.
*/
+/* TODO:
+ * - check content encoding (base64 / quoted-printable) and apply appropriate opperation (maybe already in mime.cpp)
+ * - add option to settingsdialog for mimeparsing
+ * - check memory usage, use less copy operations / more references
+ * - try table-model-view for mimeparts
+ */
+
#include "attachments.h"
Attachments::Attachments(QString iconpath, QWidget *parent)
@@ -29,12 +36,20 @@ Attachments::Attachments(QString iconpath, QWidget *parent)
mAttachmentTable = new QTableWidget(this);
mAttachmentTable->setColumnCount(2);
+ mAttachmentTable->setSelectionBehavior(QAbstractItemView::SelectRows);
+ mAttachmentTable->setEditTriggers(QAbstractItemView::NoEditTriggers);
+ mAttachmentTable->setFocusPolicy(Qt::NoFocus);
+ mAttachmentTable->setAlternatingRowColors(true);
+ mAttachmentTable->verticalHeader()->hide();
+ mAttachmentTable->setShowGrid(false);
+ mAttachmentTable->setColumnWidth(0, 300);
attachmentBodys = new QList<QByteArray>();
QStringList labels;
labels << "filename" << "content-type";
mAttachmentTable->setHorizontalHeaderLabels(labels);
+ mAttachmentTable->horizontalHeader()->setStretchLastSection(true);
QVBoxLayout *layout = new QVBoxLayout;
layout->addWidget(mAttachmentTable);