Use KConfigXT in Wobblywindows effect
REVIEW: 106389
This commit is contained in:
parent
581f9b9394
commit
968d10c14a
7 changed files with 267 additions and 267 deletions
|
@ -6,6 +6,8 @@ set( kwin4_effect_builtins_sources ${kwin4_effect_builtins_sources}
|
|||
wobblywindows/wobblywindows.cpp
|
||||
)
|
||||
|
||||
kde4_add_kcfg_files(kwin4_effect_builtins_sources wobblywindows/wobblywindowsconfig.kcfgc)
|
||||
|
||||
# .desktop files
|
||||
install( FILES
|
||||
wobblywindows/wobblywindows.desktop
|
||||
|
@ -20,6 +22,8 @@ set( kwin4_effect_builtins_config_sources ${kwin4_effect_builtins_config_sources
|
|||
wobblywindows/wobblywindows_config.ui
|
||||
)
|
||||
|
||||
kde4_add_kcfg_files(kwin4_effect_builtins_config_sources wobblywindows/wobblywindowsconfig.kcfgc)
|
||||
|
||||
# .desktop files
|
||||
install( FILES
|
||||
wobblywindows/wobblywindows_config.desktop
|
||||
|
|
|
@ -10,9 +10,9 @@ License. See the file "COPYING" for the exact licensing terms.
|
|||
|
||||
|
||||
#include "wobblywindows.h"
|
||||
#include "wobblywindowsconfig.h"
|
||||
|
||||
#include <kdebug.h>
|
||||
#include <kconfiggroup.h>
|
||||
#include <math.h>
|
||||
|
||||
#define USE_ASSERT
|
||||
|
@ -38,20 +38,6 @@ License. See the file "COPYING" for the exact licensing terms.
|
|||
namespace KWin
|
||||
{
|
||||
|
||||
static const qreal STIFFNESS = 0.15;
|
||||
static const qreal DRAG = 0.80;
|
||||
static const qreal MOVEFACTOR = 0.10;
|
||||
|
||||
static const int XTESSELATION = 20;
|
||||
static const int YTESSELATION = 20;
|
||||
|
||||
static const qreal MINVELOCITY = 0.0;
|
||||
static const qreal MAXVELOCITY = 1000.0;
|
||||
static const qreal STOPVELOCITY = 0.5;
|
||||
static const qreal MINACCELERATION = 0.0;
|
||||
static const qreal MAXACCELERATION = 1000.0;
|
||||
static const qreal STOPACCELERATION = 5.0;
|
||||
|
||||
struct ParameterSet {
|
||||
qreal stiffness;
|
||||
qreal drag;
|
||||
|
@ -188,46 +174,45 @@ WobblyWindowsEffect::~WobblyWindowsEffect()
|
|||
|
||||
void WobblyWindowsEffect::reconfigure(ReconfigureFlags)
|
||||
{
|
||||
KConfigGroup conf = effects->effectConfig("Wobbly");
|
||||
WobblyWindowsConfig::self()->readConfig();
|
||||
|
||||
|
||||
QString settingsMode = conf.readEntry("Settings", "Auto");
|
||||
QString settingsMode = WobblyWindowsConfig::settings();
|
||||
if (settingsMode != "Custom") {
|
||||
unsigned int wobblynessLevel = conf.readEntry("WobblynessLevel", 0);
|
||||
unsigned int wobblynessLevel = WobblyWindowsConfig::wobblynessLevel();
|
||||
if (wobblynessLevel > 4) {
|
||||
kDebug(1212) << "Wrong value for \"WobblynessLevel\" : " << wobblynessLevel;
|
||||
wobblynessLevel = 4;
|
||||
}
|
||||
setParameterSet(pset[wobblynessLevel]);
|
||||
|
||||
if (conf.readEntry("AdvancedMode", false)) {
|
||||
m_stiffness = conf.readEntry("Stiffness", STIFFNESS * 100.0) / 100.0;
|
||||
m_drag = conf.readEntry("Drag", DRAG * 100.0) / 100.0;
|
||||
m_move_factor = conf.readEntry("MoveFactor", MOVEFACTOR * 100.0) / 100.0;
|
||||
if (WobblyWindowsConfig::advancedMode()) {
|
||||
m_stiffness = WobblyWindowsConfig::stiffness() / 100.0;
|
||||
m_drag = WobblyWindowsConfig::drag() / 100.0;
|
||||
m_move_factor = WobblyWindowsConfig::moveFactor() / 100.0;
|
||||
}
|
||||
} else { // Custom method, read all values from config file.
|
||||
m_stiffness = conf.readEntry("Stiffness", STIFFNESS);
|
||||
m_drag = conf.readEntry("Drag", DRAG);
|
||||
m_move_factor = conf.readEntry("MoveFactor", MOVEFACTOR);
|
||||
m_stiffness = WobblyWindowsConfig::stiffness() / 100.0;
|
||||
m_drag = WobblyWindowsConfig::drag() / 100.0;
|
||||
m_move_factor = WobblyWindowsConfig::moveFactor() / 100.0;
|
||||
|
||||
m_xTesselation = conf.readEntry("XTesselation", XTESSELATION);
|
||||
m_yTesselation = conf.readEntry("YTesselation", YTESSELATION);
|
||||
m_xTesselation = WobblyWindowsConfig::xTesselation();
|
||||
m_yTesselation = WobblyWindowsConfig::yTesselation();
|
||||
|
||||
m_minVelocity = conf.readEntry("MinVelocity", MINVELOCITY);
|
||||
m_maxVelocity = conf.readEntry("MaxVelocity", MAXVELOCITY);
|
||||
m_stopVelocity = conf.readEntry("StopVelocity", STOPVELOCITY);
|
||||
m_minAcceleration = conf.readEntry("MinAcceleration", MINACCELERATION);
|
||||
m_maxAcceleration = conf.readEntry("MaxAcceleration", MAXACCELERATION);
|
||||
m_stopAcceleration = conf.readEntry("StopAcceleration", STOPACCELERATION);
|
||||
m_minVelocity = WobblyWindowsConfig::minVelocity();
|
||||
m_maxVelocity = WobblyWindowsConfig::maxVelocity();
|
||||
m_stopVelocity = WobblyWindowsConfig::stopVelocity();
|
||||
m_minAcceleration = WobblyWindowsConfig::minAcceleration();
|
||||
m_maxAcceleration = WobblyWindowsConfig::maxAcceleration();
|
||||
m_stopAcceleration = WobblyWindowsConfig::stopAcceleration();
|
||||
|
||||
m_moveEffectEnabled = conf.readEntry("MoveEffect", true);
|
||||
m_openEffectEnabled = conf.readEntry("OpenEffect", false);
|
||||
m_moveEffectEnabled = WobblyWindowsConfig::moveEffect();
|
||||
m_openEffectEnabled = WobblyWindowsConfig::openEffect();
|
||||
// disable close effect by default for now as it doesn't do what I want.
|
||||
m_closeEffectEnabled = conf.readEntry("CloseEffect", false);
|
||||
m_closeEffectEnabled = WobblyWindowsConfig::closeEffect();
|
||||
}
|
||||
|
||||
m_moveWobble = conf.readEntry("MoveWobble", true);
|
||||
m_resizeWobble = conf.readEntry("ResizeWobble", true);
|
||||
m_moveWobble = WobblyWindowsConfig::moveWobble();
|
||||
m_resizeWobble = WobblyWindowsConfig::resizeWobble();
|
||||
|
||||
#if defined VERBOSE_MODE
|
||||
kDebug(1212) << "Parameters :\n" <<
|
||||
|
|
66
effects/wobblywindows/wobblywindows.kcfg
Normal file
66
effects/wobblywindows/wobblywindows.kcfg
Normal file
|
@ -0,0 +1,66 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<kcfg xmlns="http://www.kde.org/standards/kcfg/1.0"
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:schemaLocation="http://www.kde.org/standards/kcfg/1.0
|
||||
http://www.kde.org/standards/kcfg/1.0/kcfg.xsd" >
|
||||
<kcfgfile name="kwinrc"/>
|
||||
<group name="Effect-WobblyWindows">
|
||||
<entry name="WobblynessLevel" type="UInt">
|
||||
<default>0</default>
|
||||
</entry>
|
||||
<entry name="Settings" type="String">
|
||||
<default>Auto</default>
|
||||
</entry>
|
||||
<entry name="MoveWobble" type="Bool">
|
||||
<default>true</default>
|
||||
</entry>
|
||||
<entry name="ResizeWobble" type="Bool">
|
||||
<default>true</default>
|
||||
</entry>
|
||||
<entry name="AdvancedMode" type="Bool">
|
||||
<default>false</default>
|
||||
</entry>
|
||||
<entry name="Stiffness" type="Double">
|
||||
<default>15</default>
|
||||
</entry>
|
||||
<entry name="Drag" type="Double">
|
||||
<default>80</default>
|
||||
</entry>
|
||||
<entry name="MoveFactor" type="Double">
|
||||
<default code="true">10</default>
|
||||
</entry>
|
||||
<entry name="XTesselation" type="Double">
|
||||
<default>20</default>
|
||||
</entry>
|
||||
<entry name="YTesselation" type="Double">
|
||||
<default>20</default>
|
||||
</entry>
|
||||
<entry name="MinVelocity" type="Double">
|
||||
<default>0.0</default>
|
||||
</entry>
|
||||
<entry name="MaxVelocity" type="Double">
|
||||
<default>1000.0</default>
|
||||
</entry>
|
||||
<entry name="StopVelocity" type="Double">
|
||||
<default>0.5</default>
|
||||
</entry>
|
||||
<entry name="MinAcceleration" type="Double">
|
||||
<default>0.0</default>
|
||||
</entry>
|
||||
<entry name="MaxAcceleration" type="Double">
|
||||
<default>1000.0</default>
|
||||
</entry>
|
||||
<entry name="StopAcceleration" type="Double">
|
||||
<default>5.0</default>
|
||||
</entry>
|
||||
<entry name="MoveEffect" type="Bool">
|
||||
<default>true</default>
|
||||
</entry>
|
||||
<entry name="OpenEffect" type="Bool">
|
||||
<default>false</default>
|
||||
</entry>
|
||||
<entry name="CloseEffect" type="Bool">
|
||||
<default>false</default>
|
||||
</entry>
|
||||
</group>
|
||||
</kcfg>
|
|
@ -20,6 +20,8 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||
*********************************************************************/
|
||||
|
||||
#include "wobblywindows_config.h"
|
||||
// KConfigSkeleton
|
||||
#include "wobblywindowsconfig.h"
|
||||
|
||||
#include <kwineffects.h>
|
||||
|
||||
|
@ -81,15 +83,8 @@ WobblyWindowsEffectConfig::WobblyWindowsEffectConfig(QWidget* parent, const QVar
|
|||
{
|
||||
m_ui.setupUi(this);
|
||||
|
||||
connect(m_ui.wobblinessSlider, SIGNAL(valueChanged(int)), this, SLOT(changed()));
|
||||
connect(m_ui.wobblinessSlider, SIGNAL(valueChanged(int)), this, SLOT(wobblinessChanged()));
|
||||
connect(m_ui.moveBox, SIGNAL(stateChanged(int)), this, SLOT(changed()));
|
||||
connect(m_ui.resizeBox, SIGNAL(stateChanged(int)), this, SLOT(changed()));
|
||||
connect(m_ui.advancedBox, SIGNAL(stateChanged(int)), this, SLOT(changed()));
|
||||
connect(m_ui.advancedBox, SIGNAL(stateChanged(int)), this, SLOT(advancedChanged()));
|
||||
connect(m_ui.stiffnessSpin, SIGNAL(valueChanged(int)), this, SLOT(changed()));
|
||||
connect(m_ui.dragSpin, SIGNAL(valueChanged(int)), this, SLOT(changed()));
|
||||
connect(m_ui.moveFactorSpin, SIGNAL(valueChanged(int)), this, SLOT(changed()));
|
||||
addConfig(WobblyWindowsConfig::self(), this);
|
||||
connect(m_ui.kcfg_WobblynessLevel, SIGNAL(valueChanged(int)), this, SLOT(wobblinessChanged()));
|
||||
|
||||
load();
|
||||
}
|
||||
|
@ -98,87 +93,20 @@ WobblyWindowsEffectConfig::~WobblyWindowsEffectConfig()
|
|||
{
|
||||
}
|
||||
|
||||
void WobblyWindowsEffectConfig::load()
|
||||
{
|
||||
KCModule::load();
|
||||
|
||||
KConfigGroup conf = EffectsHandler::effectConfig("Wobbly");
|
||||
bool change = true;
|
||||
|
||||
unsigned int wobblynessLevel = 0;
|
||||
QString settingsMode = conf.readEntry("Settings", "Auto");
|
||||
if (settingsMode != "Custom") {
|
||||
wobblynessLevel = conf.readEntry("WobblynessLevel", 0);
|
||||
change = false;
|
||||
}
|
||||
if (wobblynessLevel > 4) {
|
||||
wobblynessLevel = 4;
|
||||
change = true;
|
||||
}
|
||||
m_ui.wobblinessSlider->setSliderPosition(wobblynessLevel);
|
||||
|
||||
m_ui.moveBox->setChecked(conf.readEntry("MoveWobble", true));
|
||||
m_ui.resizeBox->setChecked(conf.readEntry("ResizeWobble", true));
|
||||
m_ui.advancedBox->setChecked(conf.readEntry("AdvancedMode", false));
|
||||
|
||||
m_ui.stiffnessSlider->setValue(conf.readEntry("Stiffness", pset[0].stiffness));
|
||||
m_ui.dragSlider->setValue(conf.readEntry("Drag", pset[0].drag));
|
||||
m_ui.moveFactorSlider->setValue(conf.readEntry("MoveFactor", pset[0].move_factor));
|
||||
|
||||
advancedChanged();
|
||||
|
||||
emit changed(change);
|
||||
}
|
||||
|
||||
void WobblyWindowsEffectConfig::save()
|
||||
{
|
||||
KConfigGroup conf = EffectsHandler::effectConfig("Wobbly");
|
||||
conf.writeEntry("Settings", "Auto");
|
||||
KCModule::save();
|
||||
|
||||
conf.writeEntry("WobblynessLevel", m_ui.wobblinessSlider->value());
|
||||
|
||||
conf.writeEntry("MoveWobble", m_ui.moveBox->isChecked());
|
||||
conf.writeEntry("ResizeWobble", m_ui.resizeBox->isChecked());
|
||||
conf.writeEntry("AdvancedMode", m_ui.advancedBox->isChecked());
|
||||
|
||||
conf.writeEntry("Stiffness", m_ui.stiffnessSpin->value());
|
||||
conf.writeEntry("Drag", m_ui.dragSpin->value());
|
||||
conf.writeEntry("MoveFactor", m_ui.moveFactorSpin->value());
|
||||
|
||||
emit changed(false);
|
||||
EffectsHandler::sendReloadMessage("wobblywindows");
|
||||
}
|
||||
|
||||
void WobblyWindowsEffectConfig::defaults()
|
||||
{
|
||||
m_ui.wobblinessSlider->setSliderPosition(0);
|
||||
|
||||
m_ui.moveBox->setChecked(true);
|
||||
m_ui.resizeBox->setChecked(true);
|
||||
m_ui.advancedBox->setChecked(false);
|
||||
|
||||
m_ui.stiffnessSlider->setValue(pset[0].stiffness);
|
||||
m_ui.dragSlider->setValue(pset[0].drag);
|
||||
m_ui.moveFactorSlider->setValue(pset[0].move_factor);
|
||||
|
||||
emit changed(true);
|
||||
}
|
||||
|
||||
void WobblyWindowsEffectConfig::advancedChanged()
|
||||
{
|
||||
if (m_ui.advancedBox->isChecked())
|
||||
m_ui.advancedGroup->setEnabled(true);
|
||||
else
|
||||
m_ui.advancedGroup->setEnabled(false);
|
||||
}
|
||||
|
||||
void WobblyWindowsEffectConfig::wobblinessChanged()
|
||||
{
|
||||
ParameterSet preset = pset[m_ui.wobblinessSlider->value()];
|
||||
ParameterSet preset = pset[m_ui.kcfg_WobblynessLevel->value()];
|
||||
|
||||
m_ui.stiffnessSlider->setValue(preset.stiffness);
|
||||
m_ui.dragSlider->setValue(preset.drag);
|
||||
m_ui.moveFactorSlider->setValue(preset.move_factor);
|
||||
m_ui.kcfg_Stiffness->setValue(preset.stiffness);
|
||||
m_ui.kcfg_Drag->setValue(preset.drag);
|
||||
m_ui.kcfg_MoveFactor->setValue(preset.move_factor);
|
||||
}
|
||||
|
||||
} // namespace
|
||||
|
|
|
@ -40,11 +40,8 @@ public:
|
|||
|
||||
public slots:
|
||||
virtual void save();
|
||||
virtual void load();
|
||||
virtual void defaults();
|
||||
|
||||
private slots:
|
||||
void advancedChanged();
|
||||
void wobblinessChanged();
|
||||
|
||||
private:
|
||||
|
|
|
@ -1,143 +1,147 @@
|
|||
<ui version="4.0" >
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<ui version="4.0">
|
||||
<class>WobblyWindowsEffectConfigForm</class>
|
||||
<widget class="QWidget" name="WobblyWindowsEffectConfigForm" >
|
||||
<property name="geometry" >
|
||||
<widget class="QWidget" name="WobblyWindowsEffectConfigForm">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>375</width>
|
||||
<width>399</width>
|
||||
<height>229</height>
|
||||
</rect>
|
||||
</property>
|
||||
<layout class="QGridLayout" name="gridLayout" >
|
||||
<item row="6" column="0" colspan="2" >
|
||||
<widget class="QGroupBox" name="advancedGroup" >
|
||||
<property name="title" >
|
||||
<layout class="QGridLayout" name="gridLayout">
|
||||
<item row="6" column="0" colspan="2">
|
||||
<widget class="QGroupBox" name="advancedGroup">
|
||||
<property name="enabled">
|
||||
<bool>false</bool>
|
||||
</property>
|
||||
<property name="title">
|
||||
<string>Advanced</string>
|
||||
</property>
|
||||
<layout class="QGridLayout" name="gridLayout_3" >
|
||||
<item row="0" column="0" >
|
||||
<widget class="QLabel" name="label_4" >
|
||||
<property name="text" >
|
||||
<layout class="QGridLayout" name="gridLayout_3">
|
||||
<item row="0" column="0">
|
||||
<widget class="QLabel" name="label_4">
|
||||
<property name="text">
|
||||
<string>&Stiffness:</string>
|
||||
</property>
|
||||
<property name="alignment" >
|
||||
<property name="alignment">
|
||||
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
|
||||
</property>
|
||||
<property name="buddy" >
|
||||
<cstring>stiffnessSlider</cstring>
|
||||
<property name="buddy">
|
||||
<cstring>kcfg_Stiffness</cstring>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="1" >
|
||||
<widget class="QSlider" name="stiffnessSlider" >
|
||||
<property name="minimum" >
|
||||
<item row="0" column="1">
|
||||
<widget class="QSlider" name="kcfg_Stiffness">
|
||||
<property name="minimum">
|
||||
<number>1</number>
|
||||
</property>
|
||||
<property name="maximum" >
|
||||
<property name="maximum">
|
||||
<number>50</number>
|
||||
</property>
|
||||
<property name="value" >
|
||||
<property name="value">
|
||||
<number>15</number>
|
||||
</property>
|
||||
<property name="orientation" >
|
||||
<property name="orientation">
|
||||
<enum>Qt::Horizontal</enum>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="2" >
|
||||
<widget class="KIntSpinBox" name="stiffnessSpin" >
|
||||
<property name="minimum" >
|
||||
<item row="0" column="2">
|
||||
<widget class="KIntSpinBox" name="stiffnessSpin">
|
||||
<property name="minimum">
|
||||
<number>1</number>
|
||||
</property>
|
||||
<property name="maximum" >
|
||||
<property name="maximum">
|
||||
<number>50</number>
|
||||
</property>
|
||||
<property name="value" >
|
||||
<property name="value">
|
||||
<number>15</number>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="0" >
|
||||
<widget class="QLabel" name="label_5" >
|
||||
<property name="text" >
|
||||
<item row="1" column="0">
|
||||
<widget class="QLabel" name="label_5">
|
||||
<property name="text">
|
||||
<string>Dra&g:</string>
|
||||
</property>
|
||||
<property name="alignment" >
|
||||
<property name="alignment">
|
||||
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
|
||||
</property>
|
||||
<property name="buddy" >
|
||||
<cstring>dragSlider</cstring>
|
||||
<property name="buddy">
|
||||
<cstring>kcfg_Drag</cstring>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="2" column="0" >
|
||||
<widget class="QLabel" name="label_6" >
|
||||
<property name="text" >
|
||||
<item row="2" column="0">
|
||||
<widget class="QLabel" name="label_6">
|
||||
<property name="text">
|
||||
<string>&Move factor:</string>
|
||||
</property>
|
||||
<property name="alignment" >
|
||||
<property name="alignment">
|
||||
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
|
||||
</property>
|
||||
<property name="buddy" >
|
||||
<cstring>moveFactorSlider</cstring>
|
||||
<property name="buddy">
|
||||
<cstring>kcfg_MoveFactor</cstring>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="1" >
|
||||
<widget class="QSlider" name="dragSlider" >
|
||||
<property name="minimum" >
|
||||
<item row="1" column="1">
|
||||
<widget class="QSlider" name="kcfg_Drag">
|
||||
<property name="minimum">
|
||||
<number>50</number>
|
||||
</property>
|
||||
<property name="maximum" >
|
||||
<property name="maximum">
|
||||
<number>100</number>
|
||||
</property>
|
||||
<property name="value" >
|
||||
<property name="value">
|
||||
<number>85</number>
|
||||
</property>
|
||||
<property name="orientation" >
|
||||
<property name="orientation">
|
||||
<enum>Qt::Horizontal</enum>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="2" >
|
||||
<widget class="KIntSpinBox" name="dragSpin" >
|
||||
<property name="minimum" >
|
||||
<item row="1" column="2">
|
||||
<widget class="KIntSpinBox" name="dragSpin">
|
||||
<property name="minimum">
|
||||
<number>50</number>
|
||||
</property>
|
||||
<property name="maximum" >
|
||||
<property name="maximum">
|
||||
<number>100</number>
|
||||
</property>
|
||||
<property name="value" >
|
||||
<property name="value">
|
||||
<number>85</number>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="2" column="1" >
|
||||
<widget class="QSlider" name="moveFactorSlider" >
|
||||
<property name="minimum" >
|
||||
<item row="2" column="1">
|
||||
<widget class="QSlider" name="kcfg_MoveFactor">
|
||||
<property name="minimum">
|
||||
<number>1</number>
|
||||
</property>
|
||||
<property name="maximum" >
|
||||
<property name="maximum">
|
||||
<number>25</number>
|
||||
</property>
|
||||
<property name="value" >
|
||||
<property name="value">
|
||||
<number>10</number>
|
||||
</property>
|
||||
<property name="orientation" >
|
||||
<property name="orientation">
|
||||
<enum>Qt::Horizontal</enum>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="2" column="2" >
|
||||
<widget class="KIntSpinBox" name="moveFactorSpin" >
|
||||
<property name="minimum" >
|
||||
<item row="2" column="2">
|
||||
<widget class="KIntSpinBox" name="moveFactorSpin">
|
||||
<property name="minimum">
|
||||
<number>1</number>
|
||||
</property>
|
||||
<property name="maximum" >
|
||||
<property name="maximum">
|
||||
<number>25</number>
|
||||
</property>
|
||||
<property name="value" >
|
||||
<property name="value">
|
||||
<number>10</number>
|
||||
</property>
|
||||
</widget>
|
||||
|
@ -145,26 +149,26 @@
|
|||
</layout>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="2" column="1" >
|
||||
<widget class="QCheckBox" name="moveBox" >
|
||||
<property name="text" >
|
||||
<item row="2" column="1">
|
||||
<widget class="QCheckBox" name="kcfg_MoveWobble">
|
||||
<property name="text">
|
||||
<string>Wo&bble when moving</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="3" column="1" >
|
||||
<widget class="QCheckBox" name="resizeBox" >
|
||||
<property name="text" >
|
||||
<item row="3" column="1">
|
||||
<widget class="QCheckBox" name="kcfg_ResizeWobble">
|
||||
<property name="text">
|
||||
<string>Wobble when &resizing</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="4" column="1" >
|
||||
<spacer name="verticalSpacer" >
|
||||
<property name="orientation" >
|
||||
<item row="4" column="1">
|
||||
<spacer name="verticalSpacer">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Vertical</enum>
|
||||
</property>
|
||||
<property name="sizeHint" stdset="0" >
|
||||
<property name="sizeHint" stdset="0">
|
||||
<size>
|
||||
<width>20</width>
|
||||
<height>0</height>
|
||||
|
@ -172,61 +176,61 @@
|
|||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
<item row="5" column="1" >
|
||||
<widget class="QCheckBox" name="advancedBox" >
|
||||
<property name="text" >
|
||||
<item row="5" column="1">
|
||||
<widget class="QCheckBox" name="kcfg_AdvancedMode">
|
||||
<property name="text">
|
||||
<string>Enable &advanced mode</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item rowspan="5" row="1" column="0" >
|
||||
<widget class="QGroupBox" name="basicGroup" >
|
||||
<property name="enabled" >
|
||||
<item row="1" column="0" rowspan="5">
|
||||
<widget class="QGroupBox" name="basicGroup">
|
||||
<property name="enabled">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
<property name="title" >
|
||||
<property name="title">
|
||||
<string>&Wobbliness</string>
|
||||
</property>
|
||||
<property name="checkable" >
|
||||
<property name="checkable">
|
||||
<bool>false</bool>
|
||||
</property>
|
||||
<layout class="QGridLayout" name="gridLayout_2" >
|
||||
<item row="0" column="0" >
|
||||
<widget class="QLabel" name="label" >
|
||||
<property name="text" >
|
||||
<layout class="QGridLayout" name="gridLayout_2">
|
||||
<item row="0" column="0">
|
||||
<widget class="QLabel" name="label">
|
||||
<property name="text">
|
||||
<string>Less</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="1" >
|
||||
<widget class="QSlider" name="wobblinessSlider" >
|
||||
<property name="minimumSize" >
|
||||
<item row="0" column="1">
|
||||
<widget class="QSlider" name="kcfg_WobblynessLevel">
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>120</width>
|
||||
<height>0</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="maximum" >
|
||||
<property name="maximum">
|
||||
<number>4</number>
|
||||
</property>
|
||||
<property name="orientation" >
|
||||
<property name="orientation">
|
||||
<enum>Qt::Horizontal</enum>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="2" >
|
||||
<widget class="QLabel" name="label_2" >
|
||||
<property name="text" >
|
||||
<item row="0" column="2">
|
||||
<widget class="QLabel" name="label_2">
|
||||
<property name="text">
|
||||
<string>More</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="1" >
|
||||
<spacer name="verticalSpacer_2" >
|
||||
<property name="orientation" >
|
||||
<item row="1" column="1">
|
||||
<spacer name="verticalSpacer_2">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Vertical</enum>
|
||||
</property>
|
||||
<property name="sizeHint" stdset="0" >
|
||||
<property name="sizeHint" stdset="0">
|
||||
<size>
|
||||
<width>20</width>
|
||||
<height>0</height>
|
||||
|
@ -238,11 +242,6 @@
|
|||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
<zorder>advancedGroup</zorder>
|
||||
<zorder>moveBox</zorder>
|
||||
<zorder>resizeBox</zorder>
|
||||
<zorder>advancedBox</zorder>
|
||||
<zorder>basicGroup</zorder>
|
||||
</widget>
|
||||
<customwidgets>
|
||||
<customwidget>
|
||||
|
@ -252,30 +251,30 @@
|
|||
</customwidget>
|
||||
</customwidgets>
|
||||
<tabstops>
|
||||
<tabstop>wobblinessSlider</tabstop>
|
||||
<tabstop>moveBox</tabstop>
|
||||
<tabstop>resizeBox</tabstop>
|
||||
<tabstop>advancedBox</tabstop>
|
||||
<tabstop>stiffnessSlider</tabstop>
|
||||
<tabstop>kcfg_WobblynessLevel</tabstop>
|
||||
<tabstop>kcfg_MoveWobble</tabstop>
|
||||
<tabstop>kcfg_ResizeWobble</tabstop>
|
||||
<tabstop>kcfg_AdvancedMode</tabstop>
|
||||
<tabstop>kcfg_Stiffness</tabstop>
|
||||
<tabstop>stiffnessSpin</tabstop>
|
||||
<tabstop>dragSlider</tabstop>
|
||||
<tabstop>kcfg_Drag</tabstop>
|
||||
<tabstop>dragSpin</tabstop>
|
||||
<tabstop>moveFactorSlider</tabstop>
|
||||
<tabstop>kcfg_MoveFactor</tabstop>
|
||||
<tabstop>moveFactorSpin</tabstop>
|
||||
</tabstops>
|
||||
<resources/>
|
||||
<connections>
|
||||
<connection>
|
||||
<sender>stiffnessSlider</sender>
|
||||
<sender>kcfg_Stiffness</sender>
|
||||
<signal>valueChanged(int)</signal>
|
||||
<receiver>stiffnessSpin</receiver>
|
||||
<slot>setValue(int)</slot>
|
||||
<hints>
|
||||
<hint type="sourcelabel" >
|
||||
<x>209</x>
|
||||
<y>150</y>
|
||||
<hint type="sourcelabel">
|
||||
<x>304</x>
|
||||
<y>149</y>
|
||||
</hint>
|
||||
<hint type="destinationlabel" >
|
||||
<hint type="destinationlabel">
|
||||
<x>364</x>
|
||||
<y>150</y>
|
||||
</hint>
|
||||
|
@ -284,80 +283,96 @@
|
|||
<connection>
|
||||
<sender>stiffnessSpin</sender>
|
||||
<signal>valueChanged(int)</signal>
|
||||
<receiver>stiffnessSlider</receiver>
|
||||
<receiver>kcfg_Stiffness</receiver>
|
||||
<slot>setValue(int)</slot>
|
||||
<hints>
|
||||
<hint type="sourcelabel" >
|
||||
<hint type="sourcelabel">
|
||||
<x>364</x>
|
||||
<y>150</y>
|
||||
</hint>
|
||||
<hint type="destinationlabel" >
|
||||
<x>209</x>
|
||||
<y>150</y>
|
||||
<hint type="destinationlabel">
|
||||
<x>304</x>
|
||||
<y>149</y>
|
||||
</hint>
|
||||
</hints>
|
||||
</connection>
|
||||
<connection>
|
||||
<sender>dragSlider</sender>
|
||||
<sender>kcfg_Drag</sender>
|
||||
<signal>valueChanged(int)</signal>
|
||||
<receiver>dragSpin</receiver>
|
||||
<slot>setValue(int)</slot>
|
||||
<hints>
|
||||
<hint type="sourcelabel" >
|
||||
<x>209</x>
|
||||
<y>181</y>
|
||||
<hint type="sourcelabel">
|
||||
<x>304</x>
|
||||
<y>177</y>
|
||||
</hint>
|
||||
<hint type="destinationlabel" >
|
||||
<x>364</x>
|
||||
<y>181</y>
|
||||
<hint type="destinationlabel">
|
||||
<x>378</x>
|
||||
<y>180</y>
|
||||
</hint>
|
||||
</hints>
|
||||
</connection>
|
||||
<connection>
|
||||
<sender>dragSpin</sender>
|
||||
<signal>valueChanged(int)</signal>
|
||||
<receiver>dragSlider</receiver>
|
||||
<receiver>kcfg_Drag</receiver>
|
||||
<slot>setValue(int)</slot>
|
||||
<hints>
|
||||
<hint type="sourcelabel" >
|
||||
<x>364</x>
|
||||
<y>181</y>
|
||||
<hint type="sourcelabel">
|
||||
<x>378</x>
|
||||
<y>180</y>
|
||||
</hint>
|
||||
<hint type="destinationlabel" >
|
||||
<x>209</x>
|
||||
<y>181</y>
|
||||
<hint type="destinationlabel">
|
||||
<x>304</x>
|
||||
<y>177</y>
|
||||
</hint>
|
||||
</hints>
|
||||
</connection>
|
||||
<connection>
|
||||
<sender>moveFactorSlider</sender>
|
||||
<sender>kcfg_MoveFactor</sender>
|
||||
<signal>valueChanged(int)</signal>
|
||||
<receiver>moveFactorSpin</receiver>
|
||||
<slot>setValue(int)</slot>
|
||||
<hints>
|
||||
<hint type="sourcelabel" >
|
||||
<x>209</x>
|
||||
<y>212</y>
|
||||
<hint type="sourcelabel">
|
||||
<x>304</x>
|
||||
<y>205</y>
|
||||
</hint>
|
||||
<hint type="destinationlabel" >
|
||||
<x>364</x>
|
||||
<y>212</y>
|
||||
<hint type="destinationlabel">
|
||||
<x>378</x>
|
||||
<y>208</y>
|
||||
</hint>
|
||||
</hints>
|
||||
</connection>
|
||||
<connection>
|
||||
<sender>moveFactorSpin</sender>
|
||||
<signal>valueChanged(int)</signal>
|
||||
<receiver>moveFactorSlider</receiver>
|
||||
<receiver>kcfg_MoveFactor</receiver>
|
||||
<slot>setValue(int)</slot>
|
||||
<hints>
|
||||
<hint type="sourcelabel" >
|
||||
<x>364</x>
|
||||
<y>212</y>
|
||||
<hint type="sourcelabel">
|
||||
<x>378</x>
|
||||
<y>208</y>
|
||||
</hint>
|
||||
<hint type="destinationlabel" >
|
||||
<x>209</x>
|
||||
<y>212</y>
|
||||
<hint type="destinationlabel">
|
||||
<x>304</x>
|
||||
<y>205</y>
|
||||
</hint>
|
||||
</hints>
|
||||
</connection>
|
||||
<connection>
|
||||
<sender>kcfg_AdvancedMode</sender>
|
||||
<signal>toggled(bool)</signal>
|
||||
<receiver>advancedGroup</receiver>
|
||||
<slot>setEnabled(bool)</slot>
|
||||
<hints>
|
||||
<hint type="sourcelabel">
|
||||
<x>249</x>
|
||||
<y>80</y>
|
||||
</hint>
|
||||
<hint type="destinationlabel">
|
||||
<x>220</x>
|
||||
<y>131</y>
|
||||
</hint>
|
||||
</hints>
|
||||
</connection>
|
||||
|
|
5
effects/wobblywindows/wobblywindowsconfig.kcfgc
Normal file
5
effects/wobblywindows/wobblywindowsconfig.kcfgc
Normal file
|
@ -0,0 +1,5 @@
|
|||
File=wobblywindows.kcfg
|
||||
ClassName=WobblyWindowsConfig
|
||||
NameSpace=KWin
|
||||
Singleton=true
|
||||
Mutators=true
|
Loading…
Reference in a new issue