summaryrefslogtreecommitdiffstats
path: root/krename/profiledlg.h
diff options
context:
space:
mode:
authortpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2010-02-22 18:35:24 +0000
committertpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2010-02-22 18:35:24 +0000
commitaec5a842670a66ff24572847d35375a31c0b379e (patch)
tree465d7790602658d86ab031788852bf3dbdc96691 /krename/profiledlg.h
downloadkrename-aec5a842670a66ff24572847d35375a31c0b379e.tar.gz
krename-aec5a842670a66ff24572847d35375a31c0b379e.zip
Added KDE3 version of krename
git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/applications/krename@1094420 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'krename/profiledlg.h')
-rw-r--r--krename/profiledlg.h79
1 files changed, 79 insertions, 0 deletions
diff --git a/krename/profiledlg.h b/krename/profiledlg.h
new file mode 100644
index 0000000..a9a29c3
--- /dev/null
+++ b/krename/profiledlg.h
@@ -0,0 +1,79 @@
+/***************************************************************************
+ 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 <kdialogbase.h>
+
+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<int> & list );
+ const QValueList<int> 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