diff --git a/effects/coverswitch.cpp b/effects/coverswitch.cpp
index 562445107b..117840562e 100644
--- a/effects/coverswitch.cpp
+++ b/effects/coverswitch.cpp
@@ -24,8 +24,6 @@ along with this program. If not, see .
#include
#include
#include
-#include
-#include
#include
#include
#include
@@ -52,7 +50,6 @@ CoverSwitchEffect::CoverSwitchEffect()
, stop( false )
, forward( true )
, rearrangeWindows( 0 )
- , slowMotionMode( false )
, stopRequested( false )
, startRequested( false )
{
@@ -62,13 +59,6 @@ CoverSwitchEffect::CoverSwitchEffect()
animateStart = conf.readEntry( "AnimateStart", true );
animateStop = conf.readEntry( "AnimateStop", true );
reflection = conf.readEntry( "Reflection", true );
- slowMotionFactor = conf.readEntry( "SlowMotionFactor", 4 );
-
- KActionCollection* actionCollection = new KActionCollection( this );
- KAction* a = static_cast< KAction* >( actionCollection->addAction( "SlowMotion" ));
- a->setText( i18n( "Slow Motion" ));
- a->setGlobalShortcut( KShortcut( Qt::META + Qt::Key_S ));
- connect( a, SIGNAL( triggered( bool )), this, SLOT( slowMotion()));
}
CoverSwitchEffect::~CoverSwitchEffect()
@@ -802,17 +792,4 @@ void CoverSwitchEffect::paintWindows( QList< EffectWindow* >* windows, float tim
glPopMatrix();
}
-void CoverSwitchEffect::slowMotion()
- {
- slowMotionMode = !slowMotionMode;
- if( slowMotionMode )
- {
- animationDuration *= slowMotionFactor;
- }
- else
- {
- animationDuration /= slowMotionFactor;
- }
- }
-
} // namespace
diff --git a/effects/coverswitch.h b/effects/coverswitch.h
index 027955e8de..bcb76cfc51 100644
--- a/effects/coverswitch.h
+++ b/effects/coverswitch.h
@@ -28,9 +28,8 @@ namespace KWin
{
class CoverSwitchEffect
- : public QObject, public Effect
+ : public Effect
{
- Q_OBJECT
public:
CoverSwitchEffect();
~CoverSwitchEffect();
@@ -43,8 +42,6 @@ class CoverSwitchEffect
virtual void tabBoxClosed();
virtual void tabBoxUpdated();
- private slots:
- void slowMotion();
private:
void paintScene( EffectWindow* frontWindow, QList< EffectWindow* >* leftWindows, QList< EffectWindow* >* rightWindows,
float timeFactor, bool reflectedWindows = false );
@@ -65,8 +62,6 @@ class CoverSwitchEffect
int animationDuration;
int selectedWindow;
int rearrangeWindows;
- bool slowMotionMode;
- int slowMotionFactor;
bool stopRequested;
bool startRequested;
};
diff --git a/effects/coverswitch_config.cpp b/effects/coverswitch_config.cpp
index 5d7283d9ba..b06e0281a7 100644
--- a/effects/coverswitch_config.cpp
+++ b/effects/coverswitch_config.cpp
@@ -20,9 +20,6 @@ along with this program. If not, see .
#include "coverswitch_config.h"
#include
-#include
-#include
-#include
#include
#include
@@ -47,22 +44,11 @@ CoverSwitchEffectConfig::CoverSwitchEffectConfig(QWidget* parent, const QVariant
layout->addWidget(m_ui, 0, 0);
- connect(m_ui->editor, SIGNAL(keyChange()), this, SLOT(changed()));
connect(m_ui->checkAnimateSwitch, SIGNAL(stateChanged(int)), this, SLOT(changed()));
connect(m_ui->checkAnimateStart, SIGNAL(stateChanged(int)), this, SLOT(changed()));
connect(m_ui->checkAnimateStop, SIGNAL(stateChanged(int)), this, SLOT(changed()));
connect(m_ui->checkReflection, SIGNAL(stateChanged(int)), this, SLOT(changed()));
connect(m_ui->spinDuration, SIGNAL(valueChanged(int)), this, SLOT(changed()));
- connect(m_ui->spinSlowMotionFactor, SIGNAL(valueChanged(int)), this, SLOT(changed()));
-
- KGlobalAccel::self()->overrideMainComponentData( componentData() );
- m_actionCollection = new KActionCollection( this, componentData() );
- m_actionCollection->setConfigGroup( "CoverSwitch" );
- m_actionCollection->setConfigGlobal( true );
-
- KAction* a = (KAction*)m_actionCollection->addAction( "SlowMotion" );
- a->setText( i18n("Slow Motion" ) );
- a->setGlobalShortcut( KShortcut( Qt::META + Qt::Key_S ) );
load();
}
@@ -78,13 +64,11 @@ void CoverSwitchEffectConfig::load()
KConfigGroup conf = EffectsHandler::effectConfig( "CoverSwitch" );
int duration = conf.readEntry( "Duration", 300 );
- int slowMotionFactor = conf.readEntry( "SlowMotionFactor", 4 );
bool animateSwitch = conf.readEntry( "AnimateSwitch", true );
bool animateStart = conf.readEntry( "AnimateStart", true );
bool animateStop = conf.readEntry( "AnimateStop", true );
bool reflection = conf.readEntry( "Reflection", true );
m_ui->spinDuration->setValue( duration );
- m_ui->spinSlowMotionFactor->setValue( slowMotionFactor );
if( animateSwitch )
{
m_ui->checkAnimateSwitch->setCheckState( Qt::Checked );
@@ -118,9 +102,6 @@ void CoverSwitchEffectConfig::load()
m_ui->checkReflection->setCheckState( Qt::Unchecked );
}
- m_actionCollection->readSettings();
- m_ui->editor->addCollection(m_actionCollection);
-
emit changed(false);
}
@@ -129,14 +110,11 @@ void CoverSwitchEffectConfig::save()
KConfigGroup conf = EffectsHandler::effectConfig( "CoverSwitch" );
conf.writeEntry( "Duration", m_ui->spinDuration->value() );
- conf.writeEntry( "SlowMotionFactor", m_ui->spinSlowMotionFactor->value() );
conf.writeEntry( "AnimateSwitch", m_ui->checkAnimateSwitch->checkState() == Qt::Checked ? true : false );
conf.writeEntry( "AnimateStart", m_ui->checkAnimateStart->checkState() == Qt::Checked ? true : false );
conf.writeEntry( "AnimateStop", m_ui->checkAnimateStop->checkState() == Qt::Checked ? true : false );
conf.writeEntry( "Reflection", m_ui->checkReflection->checkState() == Qt::Checked ? true : false );
- m_actionCollection->writeSettings();
-
conf.sync();
emit changed(false);
@@ -146,7 +124,6 @@ void CoverSwitchEffectConfig::save()
void CoverSwitchEffectConfig::defaults()
{
m_ui->spinDuration->setValue( 300 );
- m_ui->spinSlowMotionFactor->setValue( 4 );
m_ui->checkAnimateSwitch->setCheckState( Qt::Checked );
m_ui->checkAnimateStart->setCheckState( Qt::Checked );
m_ui->checkAnimateStop->setCheckState( Qt::Checked );
diff --git a/effects/coverswitch_config.h b/effects/coverswitch_config.h
index 86d9591716..a416b4f500 100644
--- a/effects/coverswitch_config.h
+++ b/effects/coverswitch_config.h
@@ -53,7 +53,6 @@ class CoverSwitchEffectConfig : public KCModule
private:
CoverSwitchEffectConfigForm* m_ui;
- KActionCollection* m_actionCollection;
};
} // namespace
diff --git a/effects/coverswitch_config.ui b/effects/coverswitch_config.ui
index db7ae25668..5f2c252e63 100644
--- a/effects/coverswitch_config.ui
+++ b/effects/coverswitch_config.ui
@@ -5,8 +5,8 @@
0
0
- 359
- 431
+ 289
+ 237
@@ -67,45 +67,11 @@
- -
-
-
- Slow &Motion Factor:
-
-
- spinDuration
-
-
-
- -
-
-
- 1
-
-
- 10
-
-
- 4
-
-
-
- -
-
-
-
-
- KWin::GlobalShortcutsEditor
- QWidget
-
- 1
-
-
checkAnimateSwitch
checkAnimateStart