/*************************************************************************** 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 KListBox; class KPushButton; class KRenameImpl; class QCheckBox; class ProfileManager { public: ProfileManager( KRenameImpl* krename ); static void loadDefaultProfile( KRenameImpl* krename ); static void loadProfile( const QString & name, KRenameImpl* krename ); static bool hasDefaultProfile(); protected: const QString getProfilePath( const QString & name ); const QString readProfilePath( const QString & name ); const QString listToString( QValueList & list ); const QValueList stringToList( const QString & ); void writeXML( const QString & name ); bool loadXML( const QString & path ); protected: KRenameImpl* m_krename; }; /** @author Dominik Seichter */ class ProfileDlg : public KDialogBase, public ProfileManager { Q_OBJECT public: ProfileDlg(KRenameImpl* krename, QWidget *parent = 0, const char *name = 0); ~ProfileDlg(); private slots: void enableControls(); void slotLoadProfile(); void slotCreateProfile(); void slotDeleteProfile(); void slotSetDefault(); void slotHidden(); private: KListBox* profiles; QCheckBox* checkDefault; KPushButton* createProfile; KPushButton* loadProfile; KPushButton* deleteProfile; }; #endif