From db1e9b6d984203eec671c2e1b21f8dc863976866 Mon Sep 17 00:00:00 2001 From: ubbo Date: Wed, 12 May 2010 18:14:37 +0000 Subject: 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 --- attachments.cpp | 15 +++++++++++++++ 1 file changed, 15 insertions(+) (limited to 'attachments.cpp') 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(); QStringList labels; labels << "filename" << "content-type"; mAttachmentTable->setHorizontalHeaderLabels(labels); + mAttachmentTable->horizontalHeader()->setStretchLastSection(true); QVBoxLayout *layout = new QVBoxLayout; layout->addWidget(mAttachmentTable); -- cgit v1.2.3