diff options
Diffstat (limited to 'src/gui/entry/EditEntryWidget.h')
-rw-r--r-- | src/gui/entry/EditEntryWidget.h | 44 |
1 files changed, 33 insertions, 11 deletions
diff --git a/src/gui/entry/EditEntryWidget.h b/src/gui/entry/EditEntryWidget.h index 628f8f8ed..66d89dbfb 100644 --- a/src/gui/entry/EditEntryWidget.h +++ b/src/gui/entry/EditEntryWidget.h @@ -23,6 +23,7 @@ #include <QScopedPointer> #include "gui/EditWidget.h" +#include "config-keepassx.h" class AutoTypeAssociations; class AutoTypeAssociationsModel; @@ -30,8 +31,6 @@ class Database; class EditWidgetIcons; class EditWidgetProperties; class Entry; -class EntryAttachments; -class EntryAttachmentsModel; class EntryAttributes; class EntryAttributesModel; class EntryHistoryModel; @@ -39,10 +38,15 @@ class QButtonGroup; class QMenu; class QSortFilterProxyModel; class QStackedLayout; +#ifdef WITH_XC_SSHAGENT +#include "sshagent/KeeAgentSettings.h" +class OpenSSHKey; +#endif namespace Ui { class EditEntryWidgetAdvanced; class EditEntryWidgetAutoType; + class EditEntryWidgetSSHAgent; class EditEntryWidgetMain; class EditEntryWidgetHistory; class EditWidget; @@ -70,7 +74,7 @@ signals: private slots: void acceptEntry(); - void saveEntry(); + bool commitEntry(); void cancel(); void togglePasswordGeneratorButton(bool checked); void setGeneratedPassword(const QString& password); @@ -80,11 +84,6 @@ private slots: void updateCurrentAttribute(); void protectCurrentAttribute(bool state); void revealCurrentAttribute(); - void insertAttachment(); - void saveCurrentAttachment(); - void openAttachment(const QModelIndex& index); - void openCurrentAttachment(); - void removeCurrentAttachment(); void updateAutoTypeEnabled(); void insertAutoTypeAssoc(); void removeAutoTypeAssoc(); @@ -99,20 +98,39 @@ private slots: void histEntryActivated(const QModelIndex& index); void updateHistoryButtons(const QModelIndex& current, const QModelIndex& previous); void useExpiryPreset(QAction* action); - void updateAttachmentButtonsEnabled(const QModelIndex& current); + void toggleHideNotes(bool visible); + void pickColor(); +#ifdef WITH_XC_SSHAGENT + void updateSSHAgent(); + void updateSSHAgentAttachment(); + void updateSSHAgentKeyInfo(); + void browsePrivateKey(); + void addKeyToAgent(); + void removeKeyFromAgent(); + void decryptPrivateKey(); + void copyPublicKey(); +#endif private: void setupMain(); void setupAdvanced(); void setupIcon(); void setupAutoType(); +#ifdef WITH_XC_SSHAGENT + void setupSSHAgent(); +#endif void setupProperties(); void setupHistory(); + void setupColorButton(bool foreground, const QColor& color); bool passwordsEqual(); void setForms(const Entry* entry, bool restore = false); QMenu* createPresetsMenu(); void updateEntryData(Entry* entry) const; +#ifdef WITH_XC_SSHAGENT + bool getOpenSSHKey(OpenSSHKey& key); + void saveSSHAgentConfig(); +#endif void displayAttribute(QModelIndex index, bool showProtected); @@ -122,18 +140,22 @@ private: bool m_create; bool m_history; bool m_saved; +#ifdef WITH_XC_SSHAGENT + bool m_sshAgentEnabled; + KeeAgentSettings m_sshAgentSettings; +#endif const QScopedPointer<Ui::EditEntryWidgetMain> m_mainUi; const QScopedPointer<Ui::EditEntryWidgetAdvanced> m_advancedUi; const QScopedPointer<Ui::EditEntryWidgetAutoType> m_autoTypeUi; + const QScopedPointer<Ui::EditEntryWidgetSSHAgent> m_sshAgentUi; const QScopedPointer<Ui::EditEntryWidgetHistory> m_historyUi; QWidget* const m_mainWidget; QWidget* const m_advancedWidget; EditWidgetIcons* const m_iconsWidget; QWidget* const m_autoTypeWidget; + QWidget* const m_sshAgentWidget; EditWidgetProperties* const m_editWidgetProperties; QWidget* const m_historyWidget; - EntryAttachments* const m_entryAttachments; - EntryAttachmentsModel* const m_attachmentsModel; EntryAttributes* const m_entryAttributes; EntryAttributesModel* const m_attributesModel; EntryHistoryModel* const m_historyModel; |