00001
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 <tqmap.h>
00031 #include <tqstring.h>
00032
00033 class TQListViewItem;
00034
00035 class TDEListView;
00036 class TQPushButton;
00037
00038 namespace Kontact {
00039
00040 class ProfileDialog : public KDialogBase
00041 {
00042 Q_OBJECT
00043
00044
00045 public:
00046 explicit ProfileDialog( TQWidget* parent = 0, WFlags f = 0 );
00047
00048 private:
00049 enum ListColumn {
00050 NameColumn=0,
00051 DescriptionColumn=1
00052 };
00053
00054 TQString selectedProfile() const;
00055 void updateButtonState();
00056
00057 protected slots:
00058
00059
00060 void slotOk();
00061
00062 private slots:
00063
00064 void loadSelectedProfile();
00065 void saveToSelectedProfile();
00066 void deleteSelectedProfile();
00067 void importProfile();
00068 void exportSelectedProfile();
00069 void addNewProfile();
00070 void listSelectionChanged();
00071 void listItemRenamed( TQListViewItem* item, const TQString& text, int col );
00072
00073 void profileAdded( const TQString& id );
00074 void profileRemoved( const TQString& id );
00075 void profileUpdated( const TQString& id );
00076 void profileLoaded( const TQString& id );
00077
00078 private:
00079 TDEListView* m_list;
00080 TQPushButton* m_newProfileButton;
00081 TQPushButton* m_deleteProfileButton;
00082 TQPushButton* m_saveProfileButton;
00083 TQPushButton* m_importProfileButton;
00084 TQPushButton* m_exportProfileButton;
00085 TQMap<TQListViewItem*, TQString> m_itemToProfile;
00086 TQMap<TQString, TQListViewItem*> m_profileToItem;
00087 };
00088
00089 }
00090
00091 #endif // KONTACT_PROFILEDIALOG_H