kpimidentities
identitycombo.h
Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00030 #ifndef KPIMIDENTITIES_IDENTITYCOMBO_H
00031 #define KPIMIDENTITIES_IDENTITYCOMBO_H
00032
00033 #include "kpimidentities_export.h"
00034 #include <QtGui/QComboBox>
00035
00036 class QString;
00037
00038 namespace KPIMIdentities
00039 {
00040
00041 class IdentityManager;
00042 class Identity;
00043
00044
00045 class KPIMIDENTITIES_EXPORT IdentityCombo : public QComboBox
00046 {
00047 Q_OBJECT
00048 public:
00049 explicit IdentityCombo( IdentityManager *manager, QWidget *parent=0 );
00050
00051 ~IdentityCombo();
00052 QString currentIdentityName() const;
00053 uint currentIdentity() const;
00054 void setCurrentIdentity( const QString &identityName );
00055 void setCurrentIdentity( const Identity &identity );
00056 void setCurrentIdentity( uint uoid );
00061 IdentityManager* identityManager() const;
00062
00063 Q_SIGNALS:
00064
00073 void identityChanged( uint uoid );
00074
00075 public Q_SLOTS:
00079 void slotIdentityManagerChanged();
00080
00081 protected Q_SLOTS:
00082 void slotEmitChanged( int );
00083 void slotUpdateTooltip( uint uoid );
00084
00085 protected:
00086 void reloadCombo();
00087 void reloadUoidList();
00088 QList<uint> mUoidList;
00089 IdentityManager *mIdentityManager;
00090
00091 private:
00092
00093 class Private;
00094 Private *const d;
00095
00096 };
00097
00098 }
00099
00100 #endif