kontact
profiledialog.h00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025 #ifndef KONTACT_PROFILEDIALOG_H
00026 #define KONTACT_PROFILEDIALOG_H
00027
00028 #include <kdialogbase.h>
00029
00030 #include <qmap.h>
00031 #include <qstring.h>
00032
00033 class QListViewItem;
00034
00035 class KListView;
00036 class QPushButton;
00037
00038 namespace Kontact {
00039
00040 class ProfileDialog : public KDialogBase
00041 {
00042 Q_OBJECT
00043
00044 public:
00045 explicit ProfileDialog( QWidget* parent = 0, WFlags f = 0 );
00046
00047 private:
00048 enum ListColumn {
00049 NameColumn=0,
00050 DescriptionColumn=1
00051 };
00052
00053 QString selectedProfile() const;
00054 void updateButtonState();
00055
00056 protected slots:
00057
00058
00059 void slotOk();
00060
00061 private slots:
00062
00063 void loadSelectedProfile();
00064 void saveToSelectedProfile();
00065 void deleteSelectedProfile();
00066 void importProfile();
00067 void exportSelectedProfile();
00068 void addNewProfile();
00069 void listSelectionChanged();
00070 void listItemRenamed( QListViewItem* item, const QString& text, int col );
00071
00072 void profileAdded( const QString& id );
00073 void profileRemoved( const QString& id );
00074 void profileUpdated( const QString& id );
00075 void profileLoaded( const QString& id );
00076
00077 private:
00078 KListView* m_list;
00079 QPushButton* m_newProfileButton;
00080 QPushButton* m_deleteProfileButton;
00081 QPushButton* m_saveProfileButton;
00082 QPushButton* m_importProfileButton;
00083 QPushButton* m_exportProfileButton;
00084 QMap<QListViewItem*, QString> m_itemToProfile;
00085 QMap<QString, QListViewItem*> m_profileToItem;
00086 };
00087
00088 }
00089
00090 #endif // KONTACT_PROFILEDIALOG_H
|