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

knode

  • sources
  • kde-4.12
  • kdepim
  • knode
  • configuration
identity_edition_dialog.h
Go to the documentation of this file.
1 /*
2  Copyright 2009 Olivier Trichet <nive@nivalis.org>
3 
4  Permission to use, copy, modify, and distribute this software
5  and its documentation for any purpose and without fee is hereby
6  granted, provided that the above copyright notice appear in all
7  copies and that both that the copyright notice and this
8  permission notice and warranty disclaimer appear in supporting
9  documentation, and that the name of the author not be used in
10  advertising or publicity pertaining to distribution of the
11  software without specific, written prior permission.
12 
13  The author disclaim all warranties with regard to this
14  software, including all implied warranties of merchantability
15  and fitness. In no event shall the author be liable for any
16  special, indirect or consequential damages or any damages
17  whatsoever resulting from loss of use, data or profits, whether
18  in an action of contract, negligence or other tortious action,
19  arising out of or in connection with the use or performance of
20  this software.
21 */
22 
23 #ifndef KNODE_IDENTITY_EDITION_DIALOG_H
24 #define KNODE_IDENTITY_EDITION_DIALOG_H
25 
26 #include "knode_export.h"
27 #include "ui_identity_edition_dialog.h"
28 
29 #include <QList>
30 #include <QPointer>
31 
32 
33 namespace KNode {
34 
35 class IdentityNameEditPrivate;
36 
40 class KNODE_EXPORT IdentityEditionDialog : public KDialog, private Ui::IdentityEditionDialog
41 {
42  Q_OBJECT
43 
44  public:
50  explicit IdentityEditionDialog( uint uoid, QWidget *parent = 0 );
54  ~IdentityEditionDialog();
55 
56  protected slots:
61  virtual void slotButtonClicked( int button );
62 
63  private:
67  void reload();
68 
73  void saveIntoIdentity( uint uoid ) const;
78  void loadFromIdentity( uint uoid );
79 
85  void setCurrentIdentity( uint uoid );
86 
87  private slots:
94  void identitySelected( int index );
95 
101  void createNewIdentity();
102 
107  void duplicateCurrentIdentity();
108 
112  void startIdentityRenaming();
116  void stopIdentityRenaming();
121  void changeIdentityName( const QString &newName );
122 
126  void deleteCurrentIdentity();
127 
128  private:
134  int mCurrentIdentityUoid;
135 
140  QList<uint> mUoids;
141 
145  QPointer<IdentityNameEditPrivate> mIdentityNameEdit;
146 };
147 
148 
149 
154 class IdentityNameEditPrivate : public KLineEdit
155 {
156  Q_OBJECT
157 
158  friend class IdentityEditionDialog;
159 
160  public:
161  virtual ~IdentityNameEditPrivate()
162  {
163  }
164 
165  signals:
171  void identityNameChanged( const QString &newName );
172 
173  protected:
178  virtual void focusOutEvent( QFocusEvent *event )
179  {
180  emit identityNameChanged( text() );
181  KLineEdit::focusOutEvent( event );
182  }
183 
184  private:
185  IdentityNameEditPrivate()
186  : KLineEdit( 0 ) // null parent because KComboBox::setLineEdit() will take ownership
187  {
188  connect( this, SIGNAL(returnPressed(QString)),
189  this, SIGNAL(identityNameChanged(QString)) );
190  }
191 
192 };
193 
194 
195 
196 
197 } // namespace KNode
198 
199 
200 #endif // KNODE_IDENTITY_EDITION_DIALOG_H
text
virtual QByteArray text(quint32 serialNumber) const =0
QWidget
KDialog
KNode::IdentityNameEditPrivate::identityNameChanged
void identityNameChanged(const QString &newName)
Emitted when edition end (this widget lose the focus or returned is pressed).
knode_export.h
KNode::IdentityNameEditPrivate::~IdentityNameEditPrivate
virtual ~IdentityNameEditPrivate()
Definition: identity_edition_dialog.h:161
KNode::IdentityNameEditPrivate::focusOutEvent
virtual void focusOutEvent(QFocusEvent *event)
Reimplement to emit the identityNameChanged() signal on focus lose.
Definition: identity_edition_dialog.h:178
KLineEdit
KNode::IdentityNameEditPrivate
Special line edit to catch reliably the change of an identity name.
Definition: identity_edition_dialog.h:154
KNODE_EXPORT
#define KNODE_EXPORT
Definition: knode_export.h:35
KNode::IdentityEditionDialog
Edition dialog for identities.
Definition: identity_edition_dialog.h:40
QList< uint >
This file is part of the KDE documentation.
Documentation copyright © 1996-2014 The KDE developers.
Generated on Tue Oct 14 2014 22:58:36 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.

knode

Skip menu "knode"
  • Main Page
  • Namespace List
  • Alphabetical List
  • Class List
  • Class Hierarchy
  • Class Members
  • File List
  • File Members
  • Related Pages

kdepim API Reference

Skip menu "kdepim API Reference"
  • akonadi_next
  • akregator
  • blogilo
  • calendarsupport
  • console
  •   kabcclient
  •   konsolekalendar
  • kaddressbook
  • kalarm
  •   lib
  • kdgantt2
  • kjots
  • kleopatra
  • kmail
  • knode
  • knotes
  • kontact
  • korgac
  • korganizer
  • ktimetracker
  • libkdepim
  • libkleo
  • libkpgp
  • mailcommon
  • messagelist
  • messageviewer

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