KRename – powerful batch renamer
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

81 lines
2.4KB

  1. /***************************************************************************
  2. profiledlg.h - description
  3. -------------------
  4. begin : Sat Nov 20 2004
  5. copyright : (C) 2004 by Dominik Seichter
  6. email : domseichter@web.de
  7. ***************************************************************************/
  8. /***************************************************************************
  9. * *
  10. * This program is free software; you can redistribute it and/or modify *
  11. * it under the terms of the GNU General Public License as published by *
  12. * the Free Software Foundation; either version 2 of the License, or *
  13. * (at your option) any later version. *
  14. * *
  15. ***************************************************************************/
  16. #ifndef PROFILEDLG_H
  17. #define PROFILEDLG_H
  18. #include <kdialogbase.h>
  19. class KListBox;
  20. class KPushButton;
  21. class KRenameImpl;
  22. class TQCheckBox;
  23. class ProfileManager {
  24. public:
  25. ProfileManager( KRenameImpl* krename );
  26. static void loadDefaultProfile( KRenameImpl* krename );
  27. static void loadProfile( const TQString & name, KRenameImpl* krename );
  28. static bool hasDefaultProfile();
  29. protected:
  30. const TQString getProfilePath( const TQString & name );
  31. const TQString readProfilePath( const TQString & name );
  32. const TQString listToString( TQValueList<int> & list );
  33. const TQValueList<int> stringToList( const TQString & );
  34. void writeXML( const TQString & name );
  35. bool loadXML( const TQString & path );
  36. protected:
  37. KRenameImpl* m_krename;
  38. };
  39. /**
  40. @author Dominik Seichter
  41. */
  42. class ProfileDlg : public KDialogBase, public ProfileManager
  43. {
  44. Q_OBJECT
  45. TQ_OBJECT
  46. public:
  47. ProfileDlg(KRenameImpl* krename, TQWidget *parent = 0, const char *name = 0);
  48. ~ProfileDlg();
  49. private slots:
  50. void enableControls();
  51. void slotLoadProfile();
  52. void slotCreateProfile();
  53. void slotDeleteProfile();
  54. void slotSetDefault();
  55. void slotHidden();
  56. private:
  57. KListBox* profiles;
  58. TQCheckBox* checkDefault;
  59. KPushButton* createProfile;
  60. KPushButton* loadProfile;
  61. KPushButton* deleteProfile;
  62. };
  63. #endif