diff options
author | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2010-02-24 18:42:24 +0000 |
---|---|---|
committer | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2010-02-24 18:42:24 +0000 |
commit | f508189682b6fba62e08feeb1596f682bad5fff9 (patch) | |
tree | 28aeb0e6c19386c385c1ce5edf8a92c1bca15281 /src/libgui/config_center.h | |
download | piklab-f508189682b6fba62e08feeb1596f682bad5fff9.tar.gz piklab-f508189682b6fba62e08feeb1596f682bad5fff9.zip |
Added KDE3 version of PikLab
git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/applications/piklab@1095639 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'src/libgui/config_center.h')
-rw-r--r-- | src/libgui/config_center.h | 85 |
1 files changed, 85 insertions, 0 deletions
diff --git a/src/libgui/config_center.h b/src/libgui/config_center.h new file mode 100644 index 0000000..1e543b7 --- /dev/null +++ b/src/libgui/config_center.h @@ -0,0 +1,85 @@ +/*************************************************************************** + * Copyright (C) 2005 Nicolas Hadacek <hadacek@kde.org> * + * Copyright (C) 2004 Alain Gibaud <alain.gibaud@free.fr> * + * * + * 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 CONFIG_CENTER_H +#define CONFIG_CENTER_H + +#include <qcheckbox.h> +#include <qlineedit.h> +#include <qwidgetstack.h> + +#include "common/gui/key_gui.h" +#include "common/gui/dialog.h" +#include "progs/gui/prog_config_widget.h" +#include "global_config.h" +namespace DeviceChooser { class Button; } +class SelectDirectoryWidget; +class ToolsConfigWidget; + +//---------------------------------------------------------------------------- +BEGIN_DECLARE_CONFIG_WIDGET(BaseGlobalConfig, BaseGlobalConfigWidget) +END_DECLARE_CONFIG_WIDGET + +class GlobalConfigWidget : public BaseGlobalConfigWidget +{ +Q_OBJECT +public: + GlobalConfigWidget(); + virtual QString title() const { return i18n("General"); } + virtual QString header() const { return i18n("General Configuration"); } + virtual QPixmap pixmap() const; + virtual void loadConfig(); + +public slots: + virtual void saveConfig(); + +private: + KeyComboBox<Log::DebugLevel> *_showDebug; +}; + +//---------------------------------------------------------------------------- +class StandaloneConfigWidget : public ConfigWidget +{ + Q_OBJECT +public: + StandaloneConfigWidget(); + virtual void loadConfig(); + virtual QString title() const { return i18n("Standalone File"); } + virtual QString header() const { return i18n("Standalone File Compilation"); } + virtual QPixmap pixmap() const; + +public slots: + virtual void saveConfig(); + +private: + DeviceChooser::Button *_device; + ToolsConfigWidget *_tools; +}; + +//---------------------------------------------------------------------------- +class ConfigCenter : public Dialog +{ +Q_OBJECT +public: + enum Type { General = 0, ProgSelect, ProgOptions, DebugOptions, + Standalone, Nb_Types }; + ConfigCenter(Type showType, QWidget *parent); + +public slots: + virtual void slotOk(); + virtual void slotApply(); + +private: + QWidget *_pages[Nb_Types]; + ConfigWidget *_configWidgets[Nb_Types]; + + static ConfigWidget *factory(Type type); +}; + +#endif |