• Skip to content
  • Skip to link menu
KDE API Reference
  • KDE API Reference
  • kdeutils API Reference
  • KDE Home
  • Contact Us
 

kwallet

  • sources
  • kde-4.14
  • kdeutils
  • kwalletmanager
  • src
  • manager
kwalleteditor.h
Go to the documentation of this file.
1 /*
2  Copyright (C) 2003-2005 George Staikos <staikos@kde.org>
3  Copyright (C) 2005 Isaac Clerencia <isaac@warp.es>
4 
5  This program is free software; you can redistribute it and/or
6  modify it under the terms of the GNU General Public
7  License as published by the Free Software Foundation; either
8  version 2 of the License, or (at your option) any later version.
9 
10  This program is distributed in the hope that it will be useful,
11  but WITHOUT ANY WARRANTY; without even the implied warranty of
12  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13  General Public License for more details.
14 
15  You should have received a copy of the GNU General Public License
16  along with this program; see the file COPYING. If not, write to
17  the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
18  Boston, MA 02110-1301, USA.
19 */
20 
21 #ifndef KWALLETEDITOR_H
22 #define KWALLETEDITOR_H
23 
24 #include "ui_walletwidget.h"
25 
26 #include <kwallet.h>
27 #include <kxmlguiwindow.h>
28 #include "registercreateactionmethod.h"
29 #include <QStringList>
30 #include <QLabel>
31 
32 class KActionCollection;
33 class KMenu;
34 class QTreeWidgetItem;
35 class QCheckBox;
36 class KWalletEntryList;
37 class KWMapEditor;
38 class KAction;
39 class KTreeWidgetSearchLine;
40 
41 
42 class KWalletEditor : public QWidget, public Ui::WalletWidget {
43  Q_OBJECT
44 
45  public:
46  KWalletEditor(QWidget* parent, const char* name = 0);
47  virtual ~KWalletEditor();
48 
49  void setWallet(KWallet::Wallet* wallet, bool isPath =false);
50  bool isOpen() const { return _w != 0L; }
51 
52  void setNewWallet(bool newWallet);
53 
54 protected:
55  virtual void hideEvent(QHideEvent*);
56  virtual void showEvent(QShowEvent*);
57 
58  public slots:
59  void walletClosed();
60  void createFolder();
61  void deleteFolder();
62 
63  private slots:
64  void updateFolderList(bool checkEntries = false);
65  void entrySelectionChanged(QTreeWidgetItem *item);
66  void listItemChanged(QTreeWidgetItem *, int column);
67  void listContextMenuRequested(const QPoint& pos);
68  void updateEntries(const QString& folder);
69 
70  void newEntry();
71  void renameEntry();
72  void deleteEntry();
73  void entryEditted();
74  void restoreEntry();
75  void saveEntry();
76 
77  void changePassword();
78 
79  void walletOpened(bool success);
80  void hidePasswordContents();
81  void showPasswordContents();
82  void showHideMapEditorValue(bool show);
83 
84  void saveAs();
85  void exportXML();
86  void importXML();
87  void importWallet();
88 
89  void copyPassword();
90 
91  void onSearchTextChanged(const QString&);
92  void onAlwaysShowContents(bool);
93  void onAlwaysHideContents(bool);
94 
95  signals:
96  void enableWalletActions(bool enable);
97  void enableFolderActions(bool enable);
98  void enableContextFolderActions(bool enable);
99 
100  public:
101  QString _walletName;
102 
103  private:
104  static void createActions(KActionCollection*);
105  void connectActions();
106  void disconnectActions();
107  KActionCollection *actionCollection();
108 
109  bool _nonLocal;
110  KWallet::Wallet *_w;
111  KWalletEntryList *_entryList;
112  static RegisterCreateActionsMethod _registerCreateActionMethod;
113  static QAction *_newFolderAction, *_deleteFolderAction;
114  static QAction *_exportAction, *_saveAsAction, *_mergeAction, *_importAction;
115  static KAction *_newEntryAction, *_renameEntryAction, *_deleteEntryAction;
116  static KAction *_copyPassAction;
117  QLabel*_details;
118  QString _currentFolder;
119  QMap<QString,QString> _currentMap; // save memory by storing
120  // only the most recent map.
121  KWMapEditor *_mapEditor;
122  QCheckBox *_mapEditorShowHide;
123  bool _newWallet;
124  KMenu *_contextMenu;
125  QTreeWidgetItem *_displayedItem; // used to find old item when selection just changed
126  KActionCollection *_actionCollection;
127  KMenu *_controlMenu;
128  KMenu *_walletSubmenu;
129  KTreeWidgetSearchLine *_searchLine;
130  static QAction *_alwaysShowContentsAction, *_alwaysHideContentsAction;
131  bool _alwaysShowContents;
132 };
133 
134 #endif
QHideEvent
QWidget
RegisterCreateActionsMethod
This class is intended to avoid coupling between the main window and it's contained widgets that hand...
Definition: registercreateactionmethod.h:40
KWalletEditor::enableContextFolderActions
void enableContextFolderActions(bool enable)
KWalletEditor::KWalletEditor
KWalletEditor(QWidget *parent, const char *name=0)
Definition: kwalleteditor.cpp:81
KWalletEditor::hideEvent
virtual void hideEvent(QHideEvent *)
Definition: kwalleteditor.cpp:1281
KMenu
QMap< QString, QString >
KWalletEditor::deleteFolder
void deleteFolder()
Definition: kwalleteditor.cpp:399
KWalletEditor::enableFolderActions
void enableFolderActions(bool enable)
KWalletEditor::setWallet
void setWallet(KWallet::Wallet *wallet, bool isPath=false)
Definition: kwalleteditor.cpp:175
KWalletEntryList
Definition: allyourbase.h:100
QPoint
KWalletEditor::createFolder
void createFolder()
Definition: kwalleteditor.cpp:425
KWalletEditor::~KWalletEditor
virtual ~KWalletEditor()
Definition: kwalleteditor.cpp:156
KWalletEditor::enableWalletActions
void enableWalletActions(bool enable)
QObject::name
const char * name() const
QShowEvent
QCheckBox
KWMapEditor
Definition: kwmapeditor.h:30
QWidget::pos
QPoint pos() const
KWalletEditor::showEvent
virtual void showEvent(QShowEvent *)
Definition: kwalleteditor.cpp:1290
QString
KWalletEditor::_walletName
QString _walletName
Definition: kwalleteditor.h:101
KWalletEditor::walletClosed
void walletClosed()
Definition: kwalleteditor.cpp:329
KWalletEditor::isOpen
bool isOpen() const
Definition: kwalleteditor.h:50
KWalletEditor::setNewWallet
void setNewWallet(bool newWallet)
Definition: kwalleteditor.cpp:1263
registercreateactionmethod.h
QTreeWidgetItem
KWalletEditor
Definition: kwalleteditor.h:42
QAction
QWidget::show
void show()
QLabel
QObject::parent
QObject * parent() const
This file is part of the KDE documentation.
Documentation copyright © 1996-2020 The KDE developers.
Generated on Mon Jun 22 2020 13:42:01 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.

kwallet

Skip menu "kwallet"
  • Main Page
  • Namespace List
  • Alphabetical List
  • Class List
  • Class Hierarchy
  • Class Members
  • File List
  • File Members

kdeutils API Reference

Skip menu "kdeutils API Reference"
  • ark
  • filelight
  • kcalc
  • kcharselect
  • kdf
  • kfloppy
  • kgpg
  • ktimer
  • kwallet
  • sweeper

Search



Report problems with this website to our bug tracking system.
Contact the specific authors with questions and comments about the page contents.

KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. | Legal