libkpimidentities

identitycombo.h
1 /*
2  identitycombo.h
3 
4  This file is part of KMail, the KDE mail client.
5  Copyright (c) 2002 Marc Mutz <mutz@kde.org>
6 
7  KMail is free software; you can redistribute it and/or modify it
8  under the terms of the GNU General Public License, version 2, as
9  published by the Free Software Foundation.
10 
11  KMail is distributed in the hope that it will be useful, but
12  WITHOUT ANY WARRANTY; without even the implied warranty of
13  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14  General Public License for more details.
15 
16  You should have received a copy of the GNU General Public License
17  along with this program; if not, write to the Free Software
18  Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
19 
20  In addition, as a special exception, the copyright holders give
21  permission to link the code of this program with any edition of
22  the TQt library by Trolltech AS, Norway (or with modified versions
23  of TQt that use the same license as TQt), and distribute linked
24  combinations including the two. You must obey the GNU General
25  Public License in all respects for all of the code used other than
26  TQt. If you modify this file, you may extend this exception to
27  your version of the file, but you are not obligated to do so. If
28  you do not wish to do so, delete this exception statement from
29  your version.
30 */
31 
32 #ifndef _KPIM_IDENTITYCOMBO_H_
33 #define _KPIM_IDENTITYCOMBO_H_
34 
35 #include <tqcombobox.h>
36 #include <tqvaluelist.h>
37 #include <tdemacros.h>
38 
39 class TQString;
40 
41 namespace KPIM {
42 
43 class IdentityManager;
44 class Identity;
45 
51 class TDE_EXPORT IdentityCombo : public TQComboBox {
52  TQ_OBJECT
53 
54 public:
55  IdentityCombo( IdentityManager* manager, TQWidget * parent=0, const char * name=0 );
56 
57  TQString currentIdentityName() const;
58  uint currentIdentity() const;
59  void setCurrentIdentity( const TQString & identityName );
60  void setCurrentIdentity( const Identity & identity );
61  void setCurrentIdentity( uint uoid );
62 
63 signals:
69  void identityChanged( const TQString & identityName );
70 
78  void identityChanged( uint uoid );
79 
80 public slots:
84  void slotIdentityManagerChanged();
85 
86 protected slots:
87  void slotEmitChanged(int);
88 
89 protected:
90  void reloadCombo();
91  void reloadUoidList();
92 
93 protected:
94  TQValueList<uint> mUoidList;
95  IdentityManager* mIdentityManager;
96 };
97 
98 } // namespace
99 
100 #endif // _KPIM_IDENTITYCOMBO_H_
A combo box that always shows the up-to-date identity list.
Definition: identitycombo.h:51
void identityChanged(uint uoid)
Really emitted whenever the current identity changes.
void identityChanged(const TQString &identityName)
User identity information.
Definition: identity.h:96