summaryrefslogtreecommitdiffstats
path: root/kcontrol/konq/browser.cpp
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/konq/browser.cpp
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/konq/browser.cpp')
-rw-r--r--kcontrol/konq/browser.cpp109
1 files changed, 109 insertions, 0 deletions
diff --git a/kcontrol/konq/browser.cpp b/kcontrol/konq/browser.cpp
new file mode 100644
index 000000000..5ab82579d
--- /dev/null
+++ b/kcontrol/konq/browser.cpp
@@ -0,0 +1,109 @@
+/* This file is part of the KDE project
+ Copyright (C) 2002 Waldo Bastian <[email protected]>
+
+ This library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public
+ License version 2 as published by the Free Software Foundation.
+
+ This library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public License
+ along with this library; see the file COPYING.LIB. If not, write to
+ the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ Boston, MA 02110-1301, USA.
+*/
+
+#include <qlayout.h>
+#include <qtabwidget.h>
+#include <qfile.h>
+
+#include <klocale.h>
+#include <kdialog.h>
+#include <fixx11h.h>
+#include <kcmoduleloader.h>
+
+#include "behaviour.h"
+#include "fontopts.h"
+#include "previews.h"
+#include "browser.h"
+
+KBrowserOptions::KBrowserOptions(KConfig *config, QString group, QWidget *parent, const char *name)
+ : KCModule( parent, "kcmkonq" )
+{
+ QVBoxLayout *layout = new QVBoxLayout(this);
+ QTabWidget *tab = new QTabWidget(this);
+ layout->addWidget(tab);
+
+ appearance = new KonqFontOptions(config, group, false, tab, name);
+ appearance->layout()->setMargin( KDialog::marginHint() );
+
+ behavior = new KBehaviourOptions(config, group, tab, name);
+ behavior->layout()->setMargin( KDialog::marginHint() );
+
+ previews = new KPreviewOptions(tab, name);
+ previews->layout()->setMargin( KDialog::marginHint() );
+
+ kuick = KCModuleLoader::loadModule("kcmkuick", tab);
+
+ tab->addTab(appearance, i18n("&Appearance"));
+ tab->addTab(behavior, i18n("&Behavior"));
+ tab->addTab(previews, i18n("&Previews && Meta-Data"));
+ if (kuick)
+ {
+ kuick->layout()->setMargin( KDialog::marginHint() );
+ tab->addTab(kuick, i18n("&Quick Copy && Move"));
+ }
+
+ connect(appearance, SIGNAL(changed(bool)), this, SIGNAL(changed(bool)));
+ connect(behavior, SIGNAL(changed(bool)), this, SIGNAL(changed(bool)));
+ connect(previews, SIGNAL(changed(bool)), this, SIGNAL(changed(bool)));
+ if (kuick)
+ connect(kuick, SIGNAL(changed(bool)), this, SIGNAL(changed(bool)));
+
+ connect(tab, SIGNAL(currentChanged(QWidget *)),
+ this, SIGNAL(quickHelpChanged()));
+ m_tab = tab;
+}
+
+void KBrowserOptions::load()
+{
+ appearance->load();
+ behavior->load();
+ previews->load();
+ if (kuick)
+ kuick->load();
+}
+
+void KBrowserOptions::defaults()
+{
+ appearance->defaults();
+ behavior->defaults();
+ previews->defaults();
+ if (kuick)
+ kuick->defaults();
+}
+
+void KBrowserOptions::save()
+{
+ appearance->save();
+ behavior->save();
+ previews->save();
+ if (kuick)
+ kuick->save();
+}
+
+QString KBrowserOptions::quickHelp() const
+{
+ QWidget *w = m_tab->currentPage();
+ if (w->inherits("KCModule"))
+ {
+ KCModule *m = static_cast<KCModule *>(w);
+ return m->quickHelp();
+ }
+ return QString::null;
+}
+
+#include "browser.moc"