summaryrefslogtreecommitdiffstats
path: root/kcontrol/componentchooser/componentchooser.h
diff options
context:
space:
mode:
authortoma <toma@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2009-11-25 17:56:58 +0000
committertoma <toma@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2009-11-25 17:56:58 +0000
commit4aed2c8219774f5d797760606b8489a92ddc5163 (patch)
tree3f8c130f7d269626bf6a9447407ef6c35954426a /kcontrol/componentchooser/componentchooser.h
downloadtdebase-4aed2c8219774f5d797760606b8489a92ddc5163.tar.gz
tdebase-4aed2c8219774f5d797760606b8489a92ddc5163.zip
Copy the KDE 3.5 branch to branches/trinity for new KDE 3.5 features.
BUG:215923 git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdebase@1054174 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'kcontrol/componentchooser/componentchooser.h')
-rw-r--r--kcontrol/componentchooser/componentchooser.h154
1 files changed, 154 insertions, 0 deletions
diff --git a/kcontrol/componentchooser/componentchooser.h b/kcontrol/componentchooser/componentchooser.h
new file mode 100644
index 000000000..fdb863344
--- /dev/null
+++ b/kcontrol/componentchooser/componentchooser.h
@@ -0,0 +1,154 @@
+/***************************************************************************
+ componentchooser.h - description
+ -------------------
+ copyright : (C) 2002 by Joseph Wenninger
+ email : jowenn@kde.org
+ ***************************************************************************/
+
+/***************************************************************************
+ * *
+ * This program is free software; you can redistribute it and/or modify *
+ * it under the terms of the GNU General Public License version 2 as *
+ * published by the Free Software Foundationi *
+ * *
+ ***************************************************************************/
+
+#ifndef _COMPONENTCHOOSER_H_
+#define _COMPONENTCHOOSER_H_
+
+#include "componentchooser_ui.h"
+#include "componentconfig_ui.h"
+#include "emailclientconfig_ui.h"
+#include "terminalemulatorconfig_ui.h"
+#include "browserconfig_ui.h"
+#include <qdict.h>
+#include <qstring.h>
+
+#include <kservice.h>
+
+class QListBoxItem;
+class KEMailSettings;
+class KConfig;
+
+/* The CfgPlugin class is an exception. It is LGPL. It will be parted of the plugin interface
+ which I plan for KDE 3.2.
+*/
+class CfgPlugin
+{
+public:
+ CfgPlugin(){};
+ virtual ~CfgPlugin(){};
+ virtual void load(KConfig *cfg)=0;
+ virtual void save(KConfig *cfg)=0;
+ virtual void defaults()=0;
+};
+
+
+class CfgComponent: public ComponentConfig_UI,public CfgPlugin
+{
+Q_OBJECT
+public:
+ CfgComponent(QWidget *parent);
+ virtual ~CfgComponent();
+ virtual void load(KConfig *cfg);
+ virtual void save(KConfig *cfg);
+ virtual void defaults();
+
+protected:
+ QDict<QString> m_lookupDict,m_revLookupDict;
+
+protected slots:
+ void slotComponentChanged(const QString&);
+signals:
+ void changed(bool);
+};
+
+
+class CfgEmailClient: public EmailClientConfig_UI,public CfgPlugin
+{
+Q_OBJECT
+public:
+ CfgEmailClient(QWidget *parent);
+ virtual ~CfgEmailClient();
+ virtual void load(KConfig *cfg);
+ virtual void save(KConfig *cfg);
+ virtual void defaults();
+
+private:
+ KEMailSettings *pSettings;
+
+protected slots:
+ void selectEmailClient();
+ void configChanged();
+signals:
+ void changed(bool);
+};
+
+class CfgTerminalEmulator: public TerminalEmulatorConfig_UI,public CfgPlugin
+{
+Q_OBJECT
+public:
+ CfgTerminalEmulator(QWidget *parent);
+ virtual ~CfgTerminalEmulator();
+ virtual void load(KConfig *cfg);
+ virtual void save(KConfig *cfg);
+ virtual void defaults();
+
+protected slots:
+ void selectTerminalApp();
+ void configChanged();
+
+signals:
+ void changed(bool);
+};
+
+class CfgBrowser: public BrowserConfig_UI,public CfgPlugin
+{
+Q_OBJECT
+public:
+ CfgBrowser(QWidget *parent);
+ virtual ~CfgBrowser();
+ virtual void load(KConfig *cfg);
+ virtual void save(KConfig *cfg);
+ virtual void defaults();
+
+protected slots:
+ void selectBrowser();
+ void configChanged();
+
+signals:
+ void changed(bool);
+private:
+ QString m_browserExec;
+ KService::Ptr m_browserService;
+};
+
+
+class ComponentChooser : public ComponentChooser_UI
+{
+
+Q_OBJECT
+
+public:
+ ComponentChooser(QWidget *parent=0, const char *name=0);
+ virtual ~ComponentChooser();
+ void load();
+ void save();
+ void restoreDefault();
+
+private:
+ QString latestEditedService;
+ bool somethingChanged;
+ QWidget *configWidget;
+ QVBoxLayout *myLayout;
+protected slots:
+ void emitChanged(bool);
+ void slotServiceSelected(QListBoxItem *);
+
+signals:
+ void changed(bool);
+
+};
+
+
+#endif