/*************************************************************************** profiledlg.h - description ------------------- begin : Sat Nov 20 2004 copyright : (C) 2004 by Dominik Seichter email : domseichter@web.de ***************************************************************************/ /*************************************************************************** * * * This program is free software; you can redistribute it and/or modify * * it under the terms of the GNU General Public License as published by * * the Free Software Foundation; either version 2 of the License, or * * (at your option) any later version. * * * ***************************************************************************/ #ifndef PROFILEDLG_H #define PROFILEDLG_H #include class TDEListBox; class KPushButton; class KRenameImpl; class TQCheckBox; class ProfileManager { public: ProfileManager( KRenameImpl* krename ); static void loadDefaultProfile( KRenameImpl* krename ); static void loadProfile( const TQString & name, KRenameImpl* krename ); static bool hasDefaultProfile(); protected: const TQString getProfilePath( const TQString & name ); const TQString readProfilePath( const TQString & name ); const TQString listToString( TQValueList & list ); const TQValueList stringToList( const TQString & ); void writeXML( const TQString & name ); bool loadXML( const TQString & path ); protected: KRenameImpl* m_krename; }; /** @author Dominik Seichter */ class ProfileDlg : public KDialogBase, public ProfileManager { Q_OBJECT public: ProfileDlg(KRenameImpl* krename, TQWidget *parent = 0, const char *name = 0); ~ProfileDlg(); private slots: void enableControls(); void slotLoadProfile(); void slotCreateProfile(); void slotDeleteProfile(); void slotSetDefault(); void slotHidden(); private: TDEListBox* profiles; TQCheckBox* checkDefault; KPushButton* createProfile; KPushButton* loadProfile; KPushButton* deleteProfile; }; #endif