diff options
author | ubbo <ubbo@34ebc366-c3a9-4b3c-9f84-69acf7962910> | 2010-05-15 14:08:35 +0000 |
---|---|---|
committer | ubbo <ubbo@34ebc366-c3a9-4b3c-9f84-69acf7962910> | 2010-05-15 14:08:35 +0000 |
commit | 031b02fef26110c700baf0b4a81c5e7bec7a59f0 (patch) | |
tree | 075aaa2db01e4ec77767b3449d6cb0eb55875b21 | |
parent | remove unused header-import (diff) | |
download | gpg4usb-031b02fef26110c700baf0b4a81c5e7bec7a59f0.tar.gz gpg4usb-031b02fef26110c700baf0b4a81c5e7bec7a59f0.zip |
more booleans in settings, updated attachment-todo
git-svn-id: http://cpunk.de/svn/src/gpg4usb/trunk@334 34ebc366-c3a9-4b3c-9f84-69acf7962910
-rw-r--r-- | attachments.cpp | 7 | ||||
-rw-r--r-- | attachments.h | 23 | ||||
-rw-r--r-- | gpgwin.cpp | 9 | ||||
-rw-r--r-- | keylist.h | 2 | ||||
-rwxr-xr-x | settingsdialog.cpp | 11 |
5 files changed, 22 insertions, 30 deletions
diff --git a/attachments.cpp b/attachments.cpp index 6cc03bd..ad56540 100644 --- a/attachments.cpp +++ b/attachments.cpp @@ -23,10 +23,15 @@ * - check content encoding (base64 / quoted-printable) and apply appropriate opperation (maybe already in mime.cpp) * - check memory usage, use less copy operations / more references * - possibility to clear attachment-view , e.g. with decryption or encrypting a new message - * - clean header-file (remove dep. on keylist.h) * - save all: like in thunderbird, one folder, all files go there */ +/* + * - save, delete (clear) all + * - each line save & clear button + * - attached files to view-menu + */ + #include "attachments.h" diff --git a/attachments.h b/attachments.h index 189b3cc..4a10a02 100644 --- a/attachments.h +++ b/attachments.h @@ -22,24 +22,17 @@ #ifndef __ATTACHMENTS_H__ #define __ATTACHMENTS_H__ -#include "keylist.h" #include "mime.h" #include "attachmenttablemodel.h" -class QWidget; -class QVBoxLayout; -class QDebug; -class QFileDialog; -class QListWidget; -class QWidget; -class QAction; -class QMenu; -class QContextMenuEvent; -class QMenu; -class QTableWidget; -class QTableWidgetItem; -class QtGui; - +#include "QWidget" +#include "QTableView" +#include "QHeaderView" +#include "QVBoxLayout" +#include "QMenu" +#include "QMessageBox" +#include "QContextMenuEvent" +#include "QFileDialog" class Attachments : public QWidget { @@ -73,8 +73,7 @@ void GpgWin::restoreSettings() this->restoreState(settings.value("window/windowState").toByteArray()); // Restore window size & location - Qt::CheckState windowSave = static_cast<Qt::CheckState>(settings.value("window/windowSave", Qt::Unchecked).toUInt()); - if (windowSave == Qt::Checked) { + if (settings.value("window/windowSave").toBool()) { QPoint pos = settings.value("window/pos", QPoint(100, 100)).toPoint(); QSize size = settings.value("window/size", QSize(800, 450)).toSize(); this->resize(size); @@ -93,8 +92,7 @@ void GpgWin::restoreSettings() this->setToolButtonStyle(buttonStyle); // Checked Keys - Qt::CheckState keySave = static_cast<Qt::CheckState>(settings.value("keys/keySave", Qt::Unchecked).toUInt()); - if (keySave == Qt::Checked) { + if (settings.value("keys/keySave").toBool()) { QStringList keyIds = settings.value("keys/keyList").toStringList(); mKeyList->setChecked(&keyIds); } @@ -327,8 +325,7 @@ void GpgWin::closeEvent(QCloseEvent *event) settings.setValue("window/size", size()); // keyid-list of private checked keys - Qt::CheckState keySave = static_cast<Qt::CheckState>(settings.value("keys/keySave", Qt::Unchecked).toUInt()); - if ( keySave == Qt::Checked ) { + if ( settings.value("keys/keySave").toBool() ) { QStringList *keyIds = mKeyList->getPrivateChecked(); if (!keyIds->isEmpty()){ settings.setValue("keys/keyList", *keyIds); @@ -44,7 +44,7 @@ public: KeyList(GpgME::Context *ctx, QString iconpath, QWidget *parent = 0); QStringList *getChecked(); - QStringList *getPrivateChecked(); + QStringList *getPrivateChecked(); void setChecked(QStringList *keyIds); //QStringList *getPrivateChecked(); QStringList *getSelected(); diff --git a/settingsdialog.cpp b/settingsdialog.cpp index 976907e..8a35dbf 100755 --- a/settingsdialog.cpp +++ b/settingsdialog.cpp @@ -185,12 +185,10 @@ void SettingsDialog::setSettings() } // Window Save and Position - Qt::CheckState windowSave = static_cast<Qt::CheckState>(settings.value("window/windowSave", Qt::Unchecked).toUInt()); - windowSizeCheckBox->setCheckState(windowSave); + if(settings.value("window/windowSave").toBool()) windowSizeCheckBox->setCheckState(Qt::Checked); // Keysaving - Qt::CheckState keySave = static_cast<Qt::CheckState>(settings.value("keys/keySave", Qt::Unchecked).toUInt()); - saveCheckedKeysCheckBox->setCheckState(keySave); + if(settings.value("keys/keySave").toBool()) saveCheckedKeysCheckBox->setCheckState(Qt::Checked); // MIME-Parsing if(settings.value("mime/parsemime").toBool()) mimeParseCheckBox->setCheckState(Qt::Checked); @@ -228,12 +226,11 @@ void SettingsDialog::applySettings() break; } - settings.setValue("window/windowSave", windowSizeCheckBox->checkState()); - settings.setValue("keys/keySave", saveCheckedKeysCheckBox->checkState()); + settings.setValue("window/windowSave", windowSizeCheckBox->isChecked()); + settings.setValue("keys/keySave", saveCheckedKeysCheckBox->isChecked()); settings.setValue("mime/parsemime" , mimeParseCheckBox->isChecked()); - //qDebug() << "lang:" << langSelectBox->currentText() << " : " << lang.key(langSelectBox->currentText()); settings.setValue("int/lang", lang.key(langSelectBox->currentText())); accept(); |