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

kopete/libkopete

  • sources
  • kde-4.14
  • kdenetwork
  • kopete
  • libkopete
kopetepassword.h
Go to the documentation of this file.
1 /*
2  kopetepassword.h - Kopete Password
3 
4  Copyright (c) 2004 by Richard Smith <kde@metafoo.co.uk>
5  Kopete (c) 2002-2004 by the Kopete developers <kopete-devel@kde.org>
6 
7  *************************************************************************
8  * *
9  * This library is free software; you can redistribute it and/or *
10  * modify it under the terms of the GNU Lesser General Public *
11  * License as published by the Free Software Foundation; either *
12  * version 2 of the License, or (at your option) any later version. *
13  * *
14  *************************************************************************
15 */
16 
17 #ifndef KOPETEPASSWORD_H
18 #define KOPETEPASSWORD_H
19 
20 #include <QtCore/QObject>
21 #include <QtGui/QPixmap>
22 
23 #include "kopete_export.h"
24 
25 namespace KWallet { class Wallet; }
26 
27 class QPixmap;
28 
30 class KopetePasswordGetRequest;
32 class KopetePasswordSetRequest;
34 class KopetePasswordClearRequest;
35 
36 namespace Kopete
37 {
38 
48 class KOPETE_EXPORT Password : public QObject
49 {
50  Q_OBJECT
51 
52 public:
60  explicit Password( const QString &configGroup, bool allowBlankPassword = false );
61 
65  Password( const Password &other );
66  ~Password();
67 
71  Password &operator=( Password &other );
72 
76  static int preferredImageSize();
77 
84  bool isWrong();
89  void setWrong( bool bWrong = true );
90 
98  enum PasswordSource { FromConfigOrUser, FromUser };
99 
116  void request( QObject *receiver, const char *slot, const QPixmap &image,
117  const QString &prompt, PasswordSource source = FromConfigOrUser );
118 
128  void requestWithoutPrompt( QObject *receiver, const char *slot );
129 
136  bool remembered();
137 
141  bool allowBlankPassword();
142 
148  QString cachedValue();
149 
150 public slots:
159  void set( const QString &pass = QString() );
160 
164  void clear();
165 
166 private:
167  void readConfig();
168  void writeConfig();
169 
170  class Private;
171  Private *d;
172 
173  //TODO: can we rearrange things so these aren't friends?
174  friend class ::KopetePasswordGetRequest;
175  friend class ::KopetePasswordSetRequest;
176  friend class ::KopetePasswordClearRequest;
177 };
178 
179 }
180 
186 class KopetePasswordRequestBase : public QObject
187 {
188  Q_OBJECT
189 public:
190  KopetePasswordRequestBase(QObject *parent)
191  :QObject(parent) {};
192 signals:
193  void requestFinished( const QString &password );
194 public slots:
195  virtual void walletReceived( KWallet::Wallet *wallet ) = 0;
196  virtual void gotPassword(const QString&, bool) =0;
197  virtual void slotCancelPressed() =0;
198 
199 };
200 
201 #endif
202 
203 // vim: set noet ts=4 sts=4 sw=4:
KOPETE_EXPORT
#define KOPETE_EXPORT
Definition: kopete_export.h:27
KopetePasswordRequestBase::gotPassword
virtual void gotPassword(const QString &, bool)=0
Kopete::Password::PasswordSource
PasswordSource
Type of password request to perform: FromConfigOrUser : get the password from the config file...
Definition: kopetepassword.h:98
QObject
kopete_export.h
QString
KopetePasswordRequestBase::slotCancelPressed
virtual void slotCancelPressed()=0
QPixmap
KopetePasswordRequestBase::requestFinished
void requestFinished(const QString &password)
KopetePasswordRequestBase
This class is an implementation detail of KopetePassword.
Definition: kopetepassword.h:186
KopetePasswordRequestBase::walletReceived
virtual void walletReceived(KWallet::Wallet *wallet)=0
Kopete::Password
Definition: kopetepassword.h:48
KopetePasswordRequestBase::KopetePasswordRequestBase
KopetePasswordRequestBase(QObject *parent)
Definition: kopetepassword.h:190
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:29:19 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.

kopete/libkopete

Skip menu "kopete/libkopete"
  • Main Page
  • Namespace List
  • Namespace Members
  • Alphabetical List
  • Class List
  • Class Hierarchy
  • Class Members
  • File List
  • File Members
  • Related Pages

kdenetwork API Reference

Skip menu "kdenetwork API Reference"
  • kget
  • kopete
  •   kopete
  •   libkopete
  • krdc
  • krfb

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