summaryrefslogtreecommitdiffstats
path: root/kwin/clients/quartz/config/config.cpp
diff options
context:
space:
mode:
authorTimothy Pearson <kb9vqf@pearsoncomputing.net>2011-11-07 21:50:33 -0600
committerTimothy Pearson <kb9vqf@pearsoncomputing.net>2011-11-07 21:50:33 -0600
commit0b6057404f65218182ab27a9483a21065ef61fca (patch)
treeb8b06dfa2deb965bebfbe131a772124e3e693a96 /kwin/clients/quartz/config/config.cpp
parent43d99cc2477266cb9072e179137f0e8485370b3d (diff)
downloadtdebase-0b6057404f65218182ab27a9483a21065ef61fca.tar.gz
tdebase-0b6057404f65218182ab27a9483a21065ef61fca.zip
Rename kwin to twin (Part 2 of 2)
Diffstat (limited to 'kwin/clients/quartz/config/config.cpp')
-rw-r--r--kwin/clients/quartz/config/config.cpp104
1 files changed, 0 insertions, 104 deletions
diff --git a/kwin/clients/quartz/config/config.cpp b/kwin/clients/quartz/config/config.cpp
deleted file mode 100644
index c4c8e5cba..000000000
--- a/kwin/clients/quartz/config/config.cpp
+++ /dev/null
@@ -1,104 +0,0 @@
-/*
- *
- * This file contains the quartz configuration widget
- *
- * Copyright (c) 2001
- * Karol Szwed <gallium@kde.org>
- * http://gallium.n3.net/
- */
-
-#include "config.h"
-#include <kglobal.h>
-#include <tqwhatsthis.h>
-#include <klocale.h>
-
-
-extern "C"
-{
- KDE_EXPORT TQObject* allocate_config( KConfig* conf, TQWidget* parent )
- {
- return(new QuartzConfig(conf, parent));
- }
-}
-
-
-/* NOTE:
- * 'conf' is a pointer to the twindecoration modules open twin config,
- * and is by default set to the "Style" group.
- *
- * 'parent' is the parent of the TQObject, which is a VBox inside the
- * Configure tab in twindecoration
- */
-
-QuartzConfig::QuartzConfig( KConfig* conf, TQWidget* parent )
- : TQObject( parent )
-{
- quartzConfig = new KConfig("twinquartzrc");
- KGlobal::locale()->insertCatalogue("twin_clients");
- gb = new TQVBox( parent );
- cbColorBorder = new TQCheckBox(
- i18n("Draw window frames using &titlebar colors"), gb );
- TQWhatsThis::add( cbColorBorder,
- i18n("When selected, the window decoration borders "
- "are drawn using the titlebar colors; otherwise, they are "
- "drawn using normal border colors instead.") );
- cbExtraSmall = new TQCheckBox( i18n("Quartz &extra slim"), gb );
- TQWhatsThis::add( cbExtraSmall,
- i18n("Quartz window decorations with extra-small title bar.") );
- // Load configuration options
- load( conf );
-
- // Ensure we track user changes properly
- connect( cbColorBorder, TQT_SIGNAL(clicked()), this, TQT_SLOT(slotSelectionChanged()) );
- connect( cbExtraSmall, TQT_SIGNAL(clicked()), this, TQT_SLOT(slotSelectionChanged()) );
-
- // Make the widgets visible in twindecoration
- gb->show();
-}
-
-
-QuartzConfig::~QuartzConfig()
-{
- delete gb;
- delete quartzConfig;
-}
-
-
-void QuartzConfig::slotSelectionChanged()
-{
- emit changed();
-}
-
-
-// Loads the configurable options from the twinrc config file
-// It is passed the open config from twindecoration to improve efficiency
-void QuartzConfig::load( KConfig* /*conf*/ )
-{
- quartzConfig->setGroup("General");
- bool override = quartzConfig->readBoolEntry( "UseTitleBarBorderColors", true );
- cbColorBorder->setChecked( override );
- override = quartzConfig->readBoolEntry( "UseQuartzExtraSlim", false );
- cbExtraSmall->setChecked( override );
-}
-
-
-// Saves the configurable options to the twinrc config file
-void QuartzConfig::save( KConfig* /*conf*/ )
-{
- quartzConfig->setGroup("General");
- quartzConfig->writeEntry( "UseTitleBarBorderColors", cbColorBorder->isChecked() );
- quartzConfig->writeEntry( "UseQuartzExtraSlim", cbExtraSmall->isChecked() );
- // Ensure others trying to read this config get updated
- quartzConfig->sync();
-}
-
-
-// Sets UI widget defaults which must correspond to style defaults
-void QuartzConfig::defaults()
-{
- cbColorBorder->setChecked( true );
- cbExtraSmall->setChecked( false );
-}
-
-#include "config.moc"
-// vim: ts=4