Use KConfigXT in Cube/CubeSlide effect

REVIEW: 106403
icc-effect-5.14.5
Francesco Cecconi 2012-09-12 18:39:13 +02:00 committed by Martin Gräßlin
parent f21ef431c4
commit 062f5ff66b
13 changed files with 394 additions and 462 deletions

View File

@ -8,6 +8,11 @@ set( kwin4_effect_builtins_sources ${kwin4_effect_builtins_sources}
cube/cubeslide.cpp
)
kde4_add_kcfg_files(kwin4_effect_builtins_sources
cube/cubeslideconfig.kcfgc
cube/cubeconfig.kcfgc
)
# .desktop files
install( FILES
cube/cube.desktop
@ -35,6 +40,11 @@ set( kwin4_effect_builtins_config_sources ${kwin4_effect_builtins_config_sources
cube/cubeslide_config.ui
)
kde4_add_kcfg_files(kwin4_effect_builtins_config_sources
cube/cubeslideconfig.kcfgc
cube/cubeconfig.kcfgc
)
# .desktop files
install( FILES
cube/cube_config.desktop

View File

@ -18,16 +18,15 @@ You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
*********************************************************************/
#include "cube.h"
// KConfigSkeleton
#include "cubeconfig.h"
#include "cube_inside.h"
#include <kaction.h>
#include <kactioncollection.h>
#include <klocale.h>
#include <kwinconfig.h>
#include <kconfiggroup.h>
#include <kcolorscheme.h>
#include <kglobal.h>
#include <kstandarddirs.h>
#include <kdebug.h>
#include <QColor>
@ -126,7 +125,7 @@ void CubeEffect::reconfigure(ReconfigureFlags)
void CubeEffect::loadConfig(QString config)
{
KConfigGroup conf = effects->effectConfig(config);
CubeConfig::self()->readConfig();
foreach (ElectricBorder border, borderActivate) {
effects->unreserveElectricBorder(border);
}
@ -141,49 +140,47 @@ void CubeEffect::loadConfig(QString config)
borderActivateSphere.clear();
QList<int> borderList = QList<int>();
borderList.append(int(ElectricNone));
borderList = conf.readEntry("BorderActivate", borderList);
borderList = CubeConfig::borderActivate();
foreach (int i, borderList) {
borderActivate.append(ElectricBorder(i));
effects->reserveElectricBorder(ElectricBorder(i));
}
borderList.clear();
borderList.append(int(ElectricNone));
borderList = conf.readEntry("BorderActivateCylinder", borderList);
borderList = CubeConfig::borderActivateCylinder();
foreach (int i, borderList) {
borderActivateCylinder.append(ElectricBorder(i));
effects->reserveElectricBorder(ElectricBorder(i));
}
borderList.clear();
borderList.append(int(ElectricNone));
borderList = conf.readEntry("BorderActivateSphere", borderList);
borderList = CubeConfig::borderActivateSphere();
foreach (int i, borderList) {
borderActivateSphere.append(ElectricBorder(i));
effects->reserveElectricBorder(ElectricBorder(i));
}
cubeOpacity = (float)conf.readEntry("Opacity", 80) / 100.0f;
opacityDesktopOnly = conf.readEntry("OpacityDesktopOnly", false);
displayDesktopName = conf.readEntry("DisplayDesktopName", true);
reflection = conf.readEntry("Reflection", true);
rotationDuration = animationTime(conf, "RotationDuration", 500);
backgroundColor = conf.readEntry("BackgroundColor", QColor(Qt::black));
capColor = conf.readEntry("CapColor", KColorScheme(QPalette::Active, KColorScheme::Window).background().color());
paintCaps = conf.readEntry("Caps", true);
closeOnMouseRelease = conf.readEntry("CloseOnMouseRelease", false);
float defaultZPosition = 100.0f;
if (config == "Sphere")
defaultZPosition = 450.0f;
zPosition = conf.readEntry("ZPosition", defaultZPosition);
useForTabBox = conf.readEntry("TabBox", false);
invertKeys = conf.readEntry("InvertKeys", false);
invertMouse = conf.readEntry("InvertMouse", false);
capDeformationFactor = conf.readEntry("CapDeformation", 0) / 100.0f;
useZOrdering = conf.readEntry("ZOrdering", false);
cubeOpacity = (float)CubeConfig::opacity() / 100.0f;
opacityDesktopOnly = CubeConfig::opacityDesktopOnly();
displayDesktopName = CubeConfig::displayDesktopName();
reflection = CubeConfig::reflection();
rotationDuration = animationTime(CubeConfig::rotationDuration() != 0 ? CubeConfig::rotationDuration() : 500);
backgroundColor = CubeConfig::backgroundColor();
capColor = CubeConfig::capColor();
paintCaps = CubeConfig::caps();
closeOnMouseRelease = CubeConfig::closeOnMouseRelease();
zPosition = CubeConfig::zPosition();
useForTabBox = CubeConfig::tabBox();
invertKeys = CubeConfig::invertKeys();
invertMouse = CubeConfig::invertMouse();
capDeformationFactor = (float)CubeConfig::capDeformation() / 100.0f;
useZOrdering = CubeConfig::zOrdering();
delete wallpaper;
wallpaper = NULL;
delete capTexture;
capTexture = NULL;
texturedCaps = conf.readEntry("TexturedCaps", true);
texturedCaps = CubeConfig::texturedCaps();
timeLine.setCurveShape(QTimeLine::EaseInOutCurve);
timeLine.setDuration(rotationDuration);
@ -1902,14 +1899,13 @@ void CubeEffect::setActive(bool active)
inside->setActive(true);
}
if (active) {
KConfigGroup conf = effects->effectConfig("Cube");
QString capPath = conf.readEntry("CapPath", KGlobal::dirs()->findResource("appdata", "cubecap.png"));
QString capPath = CubeConfig::capPath();
if (texturedCaps && !capTexture && !capPath.isEmpty()) {
QFutureWatcher<QImage> *watcher = new QFutureWatcher<QImage>(this);
connect(watcher, SIGNAL(finished()), SLOT(slotCubeCapLoaded()));
watcher->setFuture(QtConcurrent::run(this, &CubeEffect::loadCubeCap, capPath));
}
QString wallpaperPath = conf.readEntry("Wallpaper", QString(""));
QString wallpaperPath = CubeConfig::wallpaper().toLocalFile();
if (!wallpaper && !wallpaperPath.isEmpty()) {
QFutureWatcher<QImage> *watcher = new QFutureWatcher<QImage>(this);
connect(watcher, SIGNAL(finished()), SLOT(slotWallPaperLoaded()));

65
effects/cube/cube.kcfg Normal file
View File

@ -0,0 +1,65 @@
<?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-Cube">
<entry name="BorderActivate" type="IntList" />
<entry name="BorderActivateCylinder" type="IntList" />
<entry name="BorderActivateSphere" type="IntList" />
<entry name="RotationDuration" type="Int">
<default>0</default>
</entry>
<entry name="Opacity" type="Int">
<default>80</default>
</entry>
<entry name="OpacityDesktopOnly" type="Bool">
<default>false</default>
</entry>
<entry name="DisplayDesktopName" type="Bool">
<default>true</default>
</entry>
<entry name="Reflection" type="Bool">
<default>true</default>
</entry>
<entry name="BackgroundColor" type="Color">
<default code="true">QColor(Qt::black)</default>
</entry>
<entry name="CapColor" type="Color">
<default code="true">QColor(KColorScheme(QPalette::Active, KColorScheme::Window).background().color())</default>
</entry>
<entry name="CapPath" type="String">
<default code="true">KGlobal::dirs()->findResource(&quot;appdata&quot;, &quot;cubecap.png&quot;)</default>
</entry>
<entry name="TexturedCaps" type="Bool">
<default>true</default>
</entry>
<entry name="Caps" type="Bool">
<default>true</default>
</entry>
<entry name="CloseOnMouseRelease" type="Bool">
<default>false</default>
</entry>
<entry name="TabBox" type="Bool">
<default>false</default>
</entry>
<entry name="ZPosition" type="Int">
<default>100</default>
</entry>
<entry name="Wallpaper" type="Url"/>
<entry name="CapDeformation" type="Int">
<default>0</default>
</entry>
<entry name="InvertKeys" type="Bool">
<default>false</default>
</entry>
<entry name="InvertMouse" type="Bool">
<default>false</default>
</entry>
<entry name="ZOrdering" type="Bool">
<default>false</default>
</entry>
</group>
</kcfg>

View File

@ -18,6 +18,9 @@ You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
*********************************************************************/
#include "cube_config.h"
// KConfigSkeleton
#include "cubeconfig.h"
#include <kwineffects.h>
#include <kconfiggroup.h>
@ -70,167 +73,31 @@ CubeEffectConfig::CubeEffectConfig(QWidget* parent, const QVariantList& args) :
sphereAction->setGlobalShortcut(KShortcut(), KAction::ActiveShortcut);
m_ui->editor->addCollection(m_actionCollection);
m_ui->wallpaperRequester->setFilter("*.png *.jpeg *.jpg ");
connect(m_ui->rotationDurationSpin, SIGNAL(valueChanged(int)), this, SLOT(changed()));
connect(m_ui->cubeOpacitySlider, SIGNAL(valueChanged(int)), this, SLOT(changed()));
connect(m_ui->cubeOpacitySpin, SIGNAL(valueChanged(int)), this, SLOT(changed()));
connect(m_ui->desktopOpacityOnlyBox, SIGNAL(stateChanged(int)), this, SLOT(changed()));
connect(m_ui->displayDesktopNameBox, SIGNAL(stateChanged(int)), this, SLOT(changed()));
connect(m_ui->reflectionBox, SIGNAL(stateChanged(int)), this, SLOT(changed()));
connect(m_ui->backgroundColorButton, SIGNAL(changed(QColor)), this, SLOT(changed()));
connect(m_ui->cubeCapsBox, SIGNAL(stateChanged(int)), this, SLOT(changed()));
connect(m_ui->cubeCapsBox, SIGNAL(stateChanged(int)), this, SLOT(capsSelectionChanged()));
connect(m_ui->capsImageBox, SIGNAL(stateChanged(int)), this, SLOT(changed()));
connect(m_ui->capColorButton, SIGNAL(changed(QColor)), this, SLOT(changed()));
connect(m_ui->wallpaperRequester, SIGNAL(textChanged(QString)), this, SLOT(changed()));
connect(m_ui->closeOnMouseReleaseBox, SIGNAL(stateChanged(int)), this, SLOT(changed()));
connect(m_ui->zPositionSlider, SIGNAL(valueChanged(int)), this, SLOT(changed()));
connect(m_ui->walkThroughDesktopBox, SIGNAL(stateChanged(int)), this, SLOT(changed()));
connect(m_ui->invertKeysBox, SIGNAL(stateChanged(int)), this, SLOT(changed()));
connect(m_ui->invertMouseBox, SIGNAL(stateChanged(int)), this, SLOT(changed()));
connect(m_ui->capDeformationSlider, SIGNAL(valueChanged(int)), this, SLOT(changed()));
connect(m_ui->zOrderingBox, SIGNAL(stateChanged(int)), this, SLOT(changed()));
connect(m_ui->kcfg_Caps, SIGNAL(stateChanged(int)), this, SLOT(capsSelectionChanged()));
m_ui->kcfg_Wallpaper->setFilter("*.png *.jpeg *.jpg ");
addConfig(CubeConfig::self(), m_ui);
load();
}
void CubeEffectConfig::load()
{
KCModule::load();
KConfigGroup conf = EffectsHandler::effectConfig("Cube");
int duration = conf.readEntry("RotationDuration", 0);
float opacity = conf.readEntry("Opacity", 80);
bool desktopOpacityOnly = conf.readEntry("OpacityDesktopOnly", false);
bool desktopName = conf.readEntry("DisplayDesktopName", true);
bool reflection = conf.readEntry("Reflection", true);
QColor background = conf.readEntry("BackgroundColor", QColor(Qt::black));
QColor capColor = conf.readEntry("CapColor", KColorScheme(QPalette::Active, KColorScheme::Window).background().color());
bool texturedCaps = conf.readEntry("TexturedCaps", true);
bool caps = conf.readEntry("Caps", true);
bool closeOnMouseRelease = conf.readEntry("CloseOnMouseRelease", false);
bool walkThroughDesktop = conf.readEntry("TabBox", false);
m_ui->zPositionSlider->setValue(conf.readEntry("ZPosition", 100));
m_ui->wallpaperRequester->setUrl(KUrl(conf.readEntry("Wallpaper", "")));
bool invertKeys = conf.readEntry("InvertKeys", false);
bool invertMouse = conf.readEntry("InvertMouse", false);
m_ui->capDeformationSlider->setValue(conf.readEntry("CapDeformation", 0));
bool zOrdering = conf.readEntry("ZOrdering", false);
m_ui->rotationDurationSpin->setValue(duration);
m_ui->rotationDurationSpin->setSuffix(ki18np(" millisecond", " milliseconds"));
m_ui->cubeOpacitySlider->setValue(opacity);
m_ui->cubeOpacitySpin->setValue(opacity);
m_ui->desktopOpacityOnlyBox->setChecked(desktopOpacityOnly);
if (desktopName) {
m_ui->displayDesktopNameBox->setCheckState(Qt::Checked);
} else {
m_ui->displayDesktopNameBox->setCheckState(Qt::Unchecked);
}
if (reflection) {
m_ui->reflectionBox->setCheckState(Qt::Checked);
} else {
m_ui->reflectionBox->setCheckState(Qt::Unchecked);
}
if (caps) {
m_ui->cubeCapsBox->setCheckState(Qt::Checked);
} else {
m_ui->cubeCapsBox->setCheckState(Qt::Unchecked);
}
if (texturedCaps) {
m_ui->capsImageBox->setCheckState(Qt::Checked);
} else {
m_ui->capsImageBox->setCheckState(Qt::Unchecked);
}
if (closeOnMouseRelease) {
m_ui->closeOnMouseReleaseBox->setCheckState(Qt::Checked);
} else {
m_ui->closeOnMouseReleaseBox->setCheckState(Qt::Unchecked);
}
if (walkThroughDesktop) {
m_ui->walkThroughDesktopBox->setCheckState(Qt::Checked);
} else {
m_ui->walkThroughDesktopBox->setCheckState(Qt::Unchecked);
}
m_ui->backgroundColorButton->setColor(background);
m_ui->capColorButton->setColor(capColor);
m_ui->invertKeysBox->setChecked(invertKeys);
m_ui->invertMouseBox->setChecked(invertMouse);
m_ui->zOrderingBox->setChecked(zOrdering);
capsSelectionChanged();
emit changed(false);
}
void CubeEffectConfig::save()
{
KConfigGroup conf = EffectsHandler::effectConfig("Cube");
conf.writeEntry("RotationDuration", m_ui->rotationDurationSpin->value());
conf.writeEntry("DisplayDesktopName", m_ui->displayDesktopNameBox->checkState() == Qt::Checked ? true : false);
conf.writeEntry("Reflection", m_ui->reflectionBox->checkState() == Qt::Checked ? true : false);
conf.writeEntry("Opacity", m_ui->cubeOpacitySpin->value());
conf.writeEntry("OpacityDesktopOnly", m_ui->desktopOpacityOnlyBox->isChecked());
conf.writeEntry("BackgroundColor", m_ui->backgroundColorButton->color());
conf.writeEntry("Caps", m_ui->cubeCapsBox->checkState() == Qt::Checked ? true : false);
conf.writeEntry("CapColor", m_ui->capColorButton->color());
conf.writeEntry("TexturedCaps", m_ui->capsImageBox->checkState() == Qt::Checked ? true : false);
conf.writeEntry("CloseOnMouseRelease", m_ui->closeOnMouseReleaseBox->checkState() == Qt::Checked ? true : false);
conf.writeEntry("Wallpaper", m_ui->wallpaperRequester->url().path());
conf.writeEntry("ZPosition", m_ui->zPositionSlider->value());
conf.writeEntry("TabBox", m_ui->walkThroughDesktopBox->checkState() == Qt::Checked ? true : false);
conf.writeEntry("InvertKeys", m_ui->invertKeysBox->isChecked());
conf.writeEntry("InvertMouse", m_ui->invertMouseBox->isChecked());
conf.writeEntry("CapDeformation", m_ui->capDeformationSlider->value());
conf.writeEntry("ZOrdering", m_ui->zOrderingBox->isChecked());
KCModule::save();
m_ui->editor->save();
conf.sync();
emit changed(false);
EffectsHandler::sendReloadMessage("cube");
}
void CubeEffectConfig::defaults()
{
m_ui->rotationDurationSpin->setValue(0);
m_ui->displayDesktopNameBox->setCheckState(Qt::Checked);
m_ui->reflectionBox->setCheckState(Qt::Checked);
m_ui->cubeOpacitySpin->setValue(80);
m_ui->cubeOpacitySlider->setValue(80);
m_ui->desktopOpacityOnlyBox->setChecked(false);
m_ui->backgroundColorButton->setColor(QColor(Qt::black));
m_ui->cubeCapsBox->setCheckState(Qt::Checked);
m_ui->capColorButton->setColor(KColorScheme(QPalette::Active, KColorScheme::Window).background().color());
m_ui->capsImageBox->setCheckState(Qt::Checked);
m_ui->closeOnMouseReleaseBox->setCheckState(Qt::Unchecked);
m_ui->wallpaperRequester->setUrl(KUrl(""));
m_ui->zPositionSlider->setValue(100);
m_ui->walkThroughDesktopBox->setCheckState(Qt::Unchecked);
m_ui->invertKeysBox->setChecked(false);
m_ui->invertMouseBox->setChecked(false);
m_ui->capDeformationSlider->setValue(0);
m_ui->zOrderingBox->setChecked(false);
m_ui->editor->allDefault();
emit changed(true);
}
void CubeEffectConfig::capsSelectionChanged()
{
if (m_ui->cubeCapsBox->checkState() == Qt::Checked) {
if (m_ui->kcfg_Caps->checkState() == Qt::Checked) {
// activate cap color
m_ui->capColorButton->setEnabled(true);
m_ui->kcfg_CapColor->setEnabled(true);
m_ui->capColorLabel->setEnabled(true);
m_ui->capsImageBox->setEnabled(true);
m_ui->kcfg_TexturedCaps->setEnabled(true);
} else {
// deactivate cap color
m_ui->capColorButton->setEnabled(false);
m_ui->kcfg_CapColor->setEnabled(false);
m_ui->capColorLabel->setEnabled(false);
m_ui->capsImageBox->setEnabled(false);
m_ui->kcfg_TexturedCaps->setEnabled(false);
}
}

View File

@ -44,8 +44,6 @@ public:
public slots:
virtual void save();
virtual void load();
virtual void defaults();
private slots:
void capsSelectionChanged();

View File

@ -1,7 +1,8 @@
<ui version="4.0" >
<?xml version="1.0" encoding="UTF-8"?>
<ui version="4.0">
<class>KWin::CubeEffectConfigForm</class>
<widget class="QWidget" name="KWin::CubeEffectConfigForm" >
<property name="geometry" >
<widget class="QWidget" name="KWin::CubeEffectConfigForm">
<property name="geometry">
<rect>
<x>0</x>
<y>0</y>
@ -9,63 +10,63 @@
<height>566</height>
</rect>
</property>
<layout class="QVBoxLayout" >
<layout class="QVBoxLayout">
<item>
<widget class="QTabWidget" name="tabWidget" >
<property name="currentIndex" >
<widget class="QTabWidget" name="tabWidget">
<property name="currentIndex">
<number>0</number>
</property>
<widget class="QWidget" name="tab" >
<attribute name="title" >
<widget class="QWidget" name="tab">
<attribute name="title">
<string>Tab 1</string>
</attribute>
<layout class="QGridLayout" name="gridLayout_5" >
<item row="1" column="1" >
<widget class="QGroupBox" name="groupBox_5" >
<property name="title" >
<layout class="QGridLayout" name="gridLayout_5">
<item row="1" column="1">
<widget class="QGroupBox" name="groupBox_5">
<property name="title">
<string>Background</string>
</property>
<layout class="QGridLayout" name="gridLayout" >
<item row="0" column="0" >
<widget class="QLabel" name="label_6" >
<property name="text" >
<layout class="QGridLayout" name="gridLayout">
<item row="0" column="0">
<widget class="QLabel" name="label_6">
<property name="text">
<string>Background color:</string>
</property>
<property name="alignment" >
<property name="alignment">
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
</property>
<property name="buddy" >
<cstring>backgroundColorButton</cstring>
<property name="buddy">
<cstring>kcfg_BackgroundColor</cstring>
</property>
</widget>
</item>
<item row="0" column="1" >
<widget class="KColorButton" name="backgroundColorButton" >
<property name="sizePolicy" >
<sizepolicy vsizetype="Fixed" hsizetype="Expanding" >
<item row="0" column="1">
<widget class="KColorButton" name="kcfg_BackgroundColor">
<property name="sizePolicy">
<sizepolicy hsizetype="Expanding" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
</widget>
</item>
<item row="1" column="0" >
<widget class="QLabel" name="label_3" >
<property name="text" >
<item row="1" column="0">
<widget class="QLabel" name="label_3">
<property name="text">
<string>Wallpaper:</string>
</property>
<property name="alignment" >
<property name="alignment">
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
</property>
<property name="buddy" >
<cstring>wallpaperRequester</cstring>
<property name="buddy">
<cstring>kcfg_Wallpaper</cstring>
</property>
</widget>
</item>
<item row="1" column="1" >
<widget class="KUrlRequester" name="wallpaperRequester" >
<property name="sizePolicy" >
<sizepolicy vsizetype="Preferred" hsizetype="Expanding" >
<item row="1" column="1">
<widget class="KUrlRequester" name="kcfg_Wallpaper">
<property name="sizePolicy">
<sizepolicy hsizetype="Expanding" vsizetype="Preferred">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
@ -75,15 +76,15 @@
</layout>
</widget>
</item>
<item row="3" column="0" colspan="2" >
<widget class="QGroupBox" name="groupBox_8" >
<property name="title" >
<item row="3" column="0" colspan="2">
<widget class="QGroupBox" name="groupBox_8">
<property name="title">
<string>Activation</string>
</property>
<layout class="QGridLayout" name="gridLayout_3" >
<item row="0" column="0" colspan="2" >
<widget class="KWin::GlobalShortcutsEditor" native="1" name="editor" >
<property name="minimumSize" >
<layout class="QGridLayout" name="gridLayout_3">
<item row="0" column="0" colspan="2">
<widget class="KWin::GlobalShortcutsEditor" name="editor" native="true">
<property name="minimumSize">
<size>
<width>0</width>
<height>200</height>
@ -94,70 +95,70 @@
</layout>
</widget>
</item>
<item rowspan="2" row="0" column="0" >
<widget class="QGroupBox" name="groupBox_7" >
<property name="title" >
<item row="0" column="0" rowspan="2">
<widget class="QGroupBox" name="groupBox_7">
<property name="title">
<string>Appearance</string>
</property>
<layout class="QGridLayout" name="gridLayout_2" >
<item row="0" column="0" colspan="2" >
<widget class="QCheckBox" name="displayDesktopNameBox" >
<property name="text" >
<layout class="QGridLayout" name="gridLayout_2">
<item row="0" column="0" colspan="2">
<widget class="QCheckBox" name="kcfg_DisplayDesktopName">
<property name="text">
<string>Display desktop name</string>
</property>
</widget>
</item>
<item row="1" column="0" colspan="2" >
<widget class="QCheckBox" name="reflectionBox" >
<property name="text" >
<item row="1" column="0" colspan="2">
<widget class="QCheckBox" name="kcfg_Reflection">
<property name="text">
<string>Reflection</string>
</property>
</widget>
</item>
<item row="3" column="0" >
<widget class="QLabel" name="label" >
<property name="text" >
<item row="3" column="0">
<widget class="QLabel" name="label">
<property name="text">
<string>Rotation duration:</string>
</property>
<property name="alignment" >
<property name="alignment">
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
</property>
<property name="buddy" >
<cstring>rotationDurationSpin</cstring>
<property name="buddy">
<cstring>kcfg_RotationDuration</cstring>
</property>
</widget>
</item>
<item row="3" column="1" >
<widget class="KIntSpinBox" name="rotationDurationSpin" >
<property name="sizePolicy" >
<sizepolicy vsizetype="Fixed" hsizetype="Expanding" >
<item row="3" column="1">
<widget class="KIntSpinBox" name="kcfg_RotationDuration">
<property name="sizePolicy">
<sizepolicy hsizetype="Expanding" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="minimumSize" >
<property name="minimumSize">
<size>
<width>100</width>
<height>0</height>
</size>
</property>
<property name="specialValueText" >
<string comment="Duration of rotation" >Default</string>
<property name="specialValueText">
<string comment="Duration of rotation">Default</string>
</property>
<property name="maximum" >
<property name="maximum">
<number>5000</number>
</property>
<property name="singleStep" >
<property name="singleStep">
<number>10</number>
</property>
</widget>
</item>
<item row="4" column="0" colspan="2" >
<spacer name="verticalSpacer_2" >
<property name="orientation" >
<item row="4" column="0" colspan="2">
<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>
@ -165,9 +166,9 @@
</property>
</spacer>
</item>
<item row="2" column="0" colspan="2" >
<widget class="QCheckBox" name="zOrderingBox" >
<property name="text" >
<item row="2" column="0" colspan="2">
<widget class="QCheckBox" name="kcfg_ZOrdering">
<property name="text">
<string>Windows hover above cube</string>
</property>
</widget>
@ -175,79 +176,79 @@
</layout>
</widget>
</item>
<item row="0" column="1" >
<widget class="QGroupBox" name="groupBox_4" >
<property name="title" >
<item row="0" column="1">
<widget class="QGroupBox" name="groupBox_4">
<property name="title">
<string>Opacity</string>
</property>
<layout class="QGridLayout" name="gridLayout_6" >
<item row="1" column="0" colspan="2" >
<widget class="QSlider" name="cubeOpacitySlider" >
<property name="minimumSize" >
<layout class="QGridLayout" name="gridLayout_6">
<item row="1" column="0" colspan="2">
<widget class="QSlider" name="kcfg_Opacity">
<property name="minimumSize">
<size>
<width>200</width>
<height>0</height>
</size>
</property>
<property name="maximum" >
<property name="maximum">
<number>100</number>
</property>
<property name="singleStep" >
<property name="singleStep">
<number>1</number>
</property>
<property name="value" >
<property name="value">
<number>100</number>
</property>
<property name="orientation" >
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
<property name="tickPosition" >
<property name="tickPosition">
<enum>QSlider::TicksBelow</enum>
</property>
<property name="tickInterval" >
<property name="tickInterval">
<number>10</number>
</property>
</widget>
</item>
<item row="1" column="2" >
<widget class="KIntSpinBox" name="cubeOpacitySpin" >
<property name="minimumSize" >
<item row="1" column="2">
<widget class="KIntSpinBox" name="kcfg_OpacitySpin">
<property name="minimumSize">
<size>
<width>75</width>
<height>0</height>
</size>
</property>
<property name="suffix" >
<property name="suffix">
<string> %</string>
</property>
<property name="maximum" >
<property name="maximum">
<number>100</number>
</property>
<property name="value" >
<property name="value">
<number>100</number>
</property>
</widget>
</item>
<item row="2" column="0" >
<widget class="QLabel" name="label_4" >
<property name="text" >
<item row="2" column="0">
<widget class="QLabel" name="label_4">
<property name="text">
<string>Transparent</string>
</property>
</widget>
</item>
<item row="2" column="1" >
<widget class="QLabel" name="label_5" >
<property name="text" >
<item row="2" column="1">
<widget class="QLabel" name="label_5">
<property name="text">
<string>Opaque</string>
</property>
<property name="alignment" >
<property name="alignment">
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
</property>
</widget>
</item>
<item row="3" column="0" colspan="3" >
<widget class="QCheckBox" name="desktopOpacityOnlyBox" >
<property name="text" >
<item row="3" column="0" colspan="3">
<widget class="QCheckBox" name="kcfg_OpacityDesktopOnly">
<property name="text">
<string>Do not change opacity of windows</string>
</property>
</widget>
@ -255,12 +256,12 @@
</layout>
</widget>
</item>
<item row="4" column="0" colspan="2" >
<spacer name="verticalSpacer_3" >
<property name="orientation" >
<item row="4" column="0" colspan="2">
<spacer name="verticalSpacer_3">
<property name="orientation">
<enum>Qt::Vertical</enum>
</property>
<property name="sizeHint" stdset="0" >
<property name="sizeHint" stdset="0">
<size>
<width>20</width>
<height>40</height>
@ -270,60 +271,60 @@
</item>
</layout>
</widget>
<widget class="QWidget" name="tab_2" >
<attribute name="title" >
<widget class="QWidget" name="tab_2">
<attribute name="title">
<string>Tab 2</string>
</attribute>
<layout class="QGridLayout" name="gridLayout_7" >
<item rowspan="2" row="0" column="0" >
<widget class="QGroupBox" name="groupBox_3" >
<property name="title" >
<layout class="QGridLayout" name="gridLayout_7">
<item row="0" column="0" rowspan="2">
<widget class="QGroupBox" name="groupBox_3">
<property name="title">
<string>Caps</string>
</property>
<layout class="QGridLayout" name="gridLayout_4" >
<item row="0" column="0" colspan="2" >
<widget class="QCheckBox" name="cubeCapsBox" >
<property name="text" >
<layout class="QGridLayout" name="gridLayout_4">
<item row="0" column="0" colspan="2">
<widget class="QCheckBox" name="kcfg_Caps">
<property name="text">
<string>Show caps</string>
</property>
</widget>
</item>
<item row="1" column="0" >
<widget class="QLabel" name="capColorLabel" >
<property name="text" >
<item row="1" column="0">
<widget class="QLabel" name="capColorLabel">
<property name="text">
<string>Cap color:</string>
</property>
<property name="alignment" >
<property name="alignment">
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
</property>
<property name="buddy" >
<cstring>capColorButton</cstring>
<property name="buddy">
<cstring>kcfg_CapColor</cstring>
</property>
</widget>
</item>
<item row="1" column="1" >
<widget class="KColorButton" name="capColorButton" >
<property name="sizePolicy" >
<sizepolicy vsizetype="Fixed" hsizetype="Expanding" >
<item row="1" column="1">
<widget class="KColorButton" name="kcfg_CapColor">
<property name="sizePolicy">
<sizepolicy hsizetype="Expanding" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
</widget>
</item>
<item row="2" column="0" colspan="2" >
<widget class="QCheckBox" name="capsImageBox" >
<property name="text" >
<item row="2" column="0" colspan="2">
<widget class="QCheckBox" name="kcfg_TexturedCaps">
<property name="text">
<string>Display image on caps</string>
</property>
</widget>
</item>
<item row="3" column="0" >
<spacer name="verticalSpacer_4" >
<property name="orientation" >
<item row="3" column="0">
<spacer name="verticalSpacer_4">
<property name="orientation">
<enum>Qt::Vertical</enum>
</property>
<property name="sizeHint" stdset="0" >
<property name="sizeHint" stdset="0">
<size>
<width>20</width>
<height>40</height>
@ -334,50 +335,50 @@
</layout>
</widget>
</item>
<item row="2" column="0" colspan="2" >
<widget class="QGroupBox" name="groupBox_2" >
<property name="title" >
<item row="2" column="0" colspan="2">
<widget class="QGroupBox" name="groupBox_2">
<property name="title">
<string>Zoom</string>
</property>
<layout class="QGridLayout" name="gridLayout_8" >
<item row="1" column="0" >
<widget class="QLabel" name="label_8" >
<property name="text" >
<layout class="QGridLayout" name="gridLayout_8">
<item row="1" column="0">
<widget class="QLabel" name="label_8">
<property name="text">
<string>Near</string>
</property>
</widget>
</item>
<item row="1" column="1" >
<widget class="QLabel" name="label_9" >
<property name="text" >
<item row="1" column="1">
<widget class="QLabel" name="label_9">
<property name="text">
<string>Far</string>
</property>
<property name="alignment" >
<property name="alignment">
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
</property>
</widget>
</item>
<item row="0" column="0" colspan="2" >
<widget class="QSlider" name="zPositionSlider" >
<property name="toolTip" >
<item row="0" column="0" colspan="2">
<widget class="QSlider" name="kcfg_ZPosition">
<property name="toolTip">
<string>Define how far away the object should appear</string>
</property>
<property name="maximum" >
<property name="maximum">
<number>3000</number>
</property>
<property name="singleStep" >
<property name="singleStep">
<number>10</number>
</property>
<property name="pageStep" >
<property name="pageStep">
<number>100</number>
</property>
<property name="orientation" >
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
<property name="tickPosition" >
<property name="tickPosition">
<enum>QSlider::TicksBelow</enum>
</property>
<property name="tickInterval" >
<property name="tickInterval">
<number>100</number>
</property>
</widget>
@ -385,12 +386,12 @@
</layout>
</widget>
</item>
<item row="4" column="0" colspan="2" >
<spacer name="verticalSpacer" >
<property name="orientation" >
<item row="4" column="0" colspan="2">
<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>
@ -398,40 +399,40 @@
</property>
</spacer>
</item>
<item rowspan="2" row="0" column="1" >
<widget class="QGroupBox" name="groupBox_9" >
<property name="title" >
<item row="0" column="1" rowspan="2">
<widget class="QGroupBox" name="groupBox_9">
<property name="title">
<string>Additional Options</string>
</property>
<layout class="QVBoxLayout" name="verticalLayout" >
<layout class="QVBoxLayout" name="verticalLayout">
<item>
<widget class="QCheckBox" name="closeOnMouseReleaseBox" >
<property name="toolTip" >
<widget class="QCheckBox" name="kcfg_CloseOnMouseRelease">
<property name="toolTip">
<string>If enabled the effect will be deactivated after rotating the cube with the mouse,
otherwise it will remain active</string>
</property>
<property name="text" >
<property name="text">
<string>Close after mouse dragging</string>
</property>
</widget>
</item>
<item>
<widget class="QCheckBox" name="walkThroughDesktopBox" >
<property name="text" >
<widget class="QCheckBox" name="kcfg_TabBox">
<property name="text">
<string>Use this effect for walking through the desktops</string>
</property>
</widget>
</item>
<item>
<widget class="QCheckBox" name="invertKeysBox" >
<property name="text" >
<widget class="QCheckBox" name="kcfg_InvertKeys">
<property name="text">
<string>Invert cursor keys</string>
</property>
</widget>
</item>
<item>
<widget class="QCheckBox" name="invertMouseBox" >
<property name="text" >
<widget class="QCheckBox" name="kcfg_InvertMouse">
<property name="text">
<string>Invert mouse</string>
</property>
</widget>
@ -439,41 +440,41 @@ otherwise it will remain active</string>
</layout>
</widget>
</item>
<item row="3" column="0" colspan="2" >
<widget class="QGroupBox" name="capDeformationGroupBox" >
<property name="title" >
<item row="3" column="0" colspan="2">
<widget class="QGroupBox" name="capDeformationGroupBox">
<property name="title">
<string>Sphere Cap Deformation</string>
</property>
<layout class="QGridLayout" name="gridLayout_9" >
<item row="0" column="0" colspan="2" >
<widget class="QSlider" name="capDeformationSlider" >
<property name="maximum" >
<layout class="QGridLayout" name="gridLayout_9">
<item row="0" column="0" colspan="2">
<widget class="QSlider" name="kcfg_CapDeformation">
<property name="maximum">
<number>100</number>
</property>
<property name="orientation" >
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
<property name="tickPosition" >
<property name="tickPosition">
<enum>QSlider::TicksBelow</enum>
</property>
<property name="tickInterval" >
<property name="tickInterval">
<number>25</number>
</property>
</widget>
</item>
<item row="1" column="0" >
<widget class="QLabel" name="capDeformationSphereLabel" >
<property name="text" >
<item row="1" column="0">
<widget class="QLabel" name="capDeformationSphereLabel">
<property name="text">
<string>Sphere</string>
</property>
</widget>
</item>
<item row="1" column="1" >
<widget class="QLabel" name="capDeformationPlaneLabel" >
<property name="text" >
<item row="1" column="1">
<widget class="QLabel" name="capDeformationPlaneLabel">
<property name="text">
<string>Plane</string>
</property>
<property name="alignment" >
<property name="alignment">
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
</property>
</widget>
@ -507,62 +508,62 @@ otherwise it will remain active</string>
<customwidget>
<class>KWin::GlobalShortcutsEditor</class>
<extends>QWidget</extends>
<header location="global" >kwineffects.h</header>
<header location="global">kwineffects.h</header>
<container>1</container>
</customwidget>
</customwidgets>
<tabstops>
<tabstop>tabWidget</tabstop>
<tabstop>displayDesktopNameBox</tabstop>
<tabstop>reflectionBox</tabstop>
<tabstop>zOrderingBox</tabstop>
<tabstop>rotationDurationSpin</tabstop>
<tabstop>cubeOpacitySlider</tabstop>
<tabstop>cubeOpacitySpin</tabstop>
<tabstop>desktopOpacityOnlyBox</tabstop>
<tabstop>backgroundColorButton</tabstop>
<tabstop>wallpaperRequester</tabstop>
<tabstop>cubeCapsBox</tabstop>
<tabstop>capColorButton</tabstop>
<tabstop>capsImageBox</tabstop>
<tabstop>closeOnMouseReleaseBox</tabstop>
<tabstop>walkThroughDesktopBox</tabstop>
<tabstop>invertKeysBox</tabstop>
<tabstop>invertMouseBox</tabstop>
<tabstop>zPositionSlider</tabstop>
<tabstop>capDeformationSlider</tabstop>
<tabstop>kcfg_DisplayDesktopName</tabstop>
<tabstop>kcfg_Reflection</tabstop>
<tabstop>kcfg_ZOrdering</tabstop>
<tabstop>kcfg_RotationDuration</tabstop>
<tabstop>kcfg_Opacity</tabstop>
<tabstop>kcfg_OpacitySpin</tabstop>
<tabstop>kcfg_OpacityDesktopOnly</tabstop>
<tabstop>kcfg_BackgroundColor</tabstop>
<tabstop>kcfg_Wallpaper</tabstop>
<tabstop>kcfg_Caps</tabstop>
<tabstop>kcfg_CapColor</tabstop>
<tabstop>kcfg_TexturedCaps</tabstop>
<tabstop>kcfg_CloseOnMouseRelease</tabstop>
<tabstop>kcfg_TabBox</tabstop>
<tabstop>kcfg_InvertKeys</tabstop>
<tabstop>kcfg_InvertMouse</tabstop>
<tabstop>kcfg_ZPosition</tabstop>
<tabstop>kcfg_CapDeformation</tabstop>
</tabstops>
<resources/>
<connections>
<connection>
<sender>cubeOpacitySpin</sender>
<sender>kcfg_OpacitySpin</sender>
<signal>valueChanged(int)</signal>
<receiver>cubeOpacitySlider</receiver>
<receiver>kcfg_Opacity</receiver>
<slot>setValue(int)</slot>
<hints>
<hint type="sourcelabel" >
<x>725</x>
<y>102</y>
<hint type="sourcelabel">
<x>727</x>
<y>85</y>
</hint>
<hint type="destinationlabel" >
<x>568</x>
<y>101</y>
<hint type="destinationlabel">
<x>611</x>
<y>88</y>
</hint>
</hints>
</connection>
<connection>
<sender>cubeOpacitySlider</sender>
<sender>kcfg_Opacity</sender>
<signal>valueChanged(int)</signal>
<receiver>cubeOpacitySpin</receiver>
<receiver>kcfg_OpacitySpin</receiver>
<slot>setValue(int)</slot>
<hints>
<hint type="sourcelabel" >
<x>466</x>
<y>101</y>
<hint type="sourcelabel">
<x>611</x>
<y>88</y>
</hint>
<hint type="destinationlabel" >
<x>725</x>
<y>102</y>
<hint type="destinationlabel">
<x>727</x>
<y>85</y>
</hint>
</hints>
</connection>

View File

@ -0,0 +1,6 @@
File=cube.kcfg
ClassName=CubeConfig
NameSpace=KWin
Singleton=true
Mutators=true
IncludeFiles=kcolorscheme.h,KDE/KStandardDirs

View File

@ -19,9 +19,10 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
*********************************************************************/
#include "cubeslide.h"
// KConfigSkeleton
#include "cubeslideconfig.h"
#include <kwinconfig.h>
#include <kconfiggroup.h>
#include <math.h>
@ -55,14 +56,14 @@ bool CubeSlideEffect::supported()
void CubeSlideEffect::reconfigure(ReconfigureFlags)
{
KConfigGroup conf = effects->effectConfig("CubeSlide");
rotationDuration = animationTime(conf, "RotationDuration", 500);
CubeSlideConfig::self()->readConfig();
rotationDuration = animationTime(CubeSlideConfig::rotationDuration() != 0 ? CubeSlideConfig::rotationDuration() : 500);
timeLine.setCurveShape(QTimeLine::EaseInOutCurve);
timeLine.setDuration(rotationDuration);
dontSlidePanels = conf.readEntry("DontSlidePanels", true);
dontSlideStickyWindows = conf.readEntry("DontSlideStickyWindows", false);
usePagerLayout = conf.readEntry("UsePagerLayout", true);
useWindowMoving = conf.readEntry("UseWindowMoving", false);
dontSlidePanels = CubeSlideConfig::dontSlidePanels();
dontSlideStickyWindows = CubeSlideConfig::dontSlideStickyWindows();
usePagerLayout = CubeSlideConfig::usePagerLayout();
useWindowMoving = CubeSlideConfig::useWindowMoving();
}
void CubeSlideEffect::prePaintScreen(ScreenPrePaintData& data, int time)

View File

@ -0,0 +1,25 @@
<?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-CubeSlide">
<entry name="RotationDuration" type="Int">
<default>0</default>
</entry>
<entry name="DontSlidePanels" type="Bool">
<default>true</default>
</entry>
<entry name="DontSlideStickyWindows" type="Bool">
<default>false</default>
</entry>
<entry name="UsePagerLayout" type="Bool">
<default>true</default>
</entry>
<entry name="UseWindowMoving" type="Bool">
<default>false</default>
</entry>
</group>
</kcfg>

View File

@ -18,6 +18,9 @@ You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
*********************************************************************/
#include "cubeslide_config.h"
// KConfigSkeleton
#include "cubeslideconfig.h"
#include <kwineffects.h>
#include <kconfiggroup.h>
@ -42,61 +45,17 @@ CubeSlideEffectConfig::CubeSlideEffectConfig(QWidget* parent, const QVariantList
layout->addWidget(m_ui);
connect(m_ui->rotationDurationSpin, SIGNAL(valueChanged(int)), this, SLOT(changed()));
connect(m_ui->dontSlidePanelsBox, SIGNAL(stateChanged(int)), this, SLOT(changed()));
connect(m_ui->dontSlideStickyWindowsBox, SIGNAL(stateChanged(int)), this, SLOT(changed()));
connect(m_ui->usePagerBox, SIGNAL(stateChanged(int)), this, SLOT(changed()));
connect(m_ui->windowsMovingBox, SIGNAL(stateChanged(int)), SLOT(changed()));
addConfig(CubeSlideConfig::self(), m_ui);
load();
}
void CubeSlideEffectConfig::load()
{
KCModule::load();
KConfigGroup conf = EffectsHandler::effectConfig("CubeSlide");
int duration = conf.readEntry("RotationDuration", 0);
bool dontSlidePanels = conf.readEntry("DontSlidePanels", true);
bool dontSlideStickyWindows = conf.readEntry("DontSlideStickyWindows", false);
bool usePager = conf.readEntry("UsePagerLayout", true);
m_ui->rotationDurationSpin->setValue(duration);
m_ui->dontSlidePanelsBox->setChecked(dontSlidePanels);
m_ui->dontSlideStickyWindowsBox->setChecked(dontSlideStickyWindows);
m_ui->usePagerBox->setChecked(usePager);
m_ui->windowsMovingBox->setChecked(conf.readEntry("UseWindowMoving", false));
emit changed(false);
}
void CubeSlideEffectConfig::save()
{
KConfigGroup conf = EffectsHandler::effectConfig("CubeSlide");
conf.writeEntry("RotationDuration", m_ui->rotationDurationSpin->value());
conf.writeEntry("DontSlidePanels", m_ui->dontSlidePanelsBox->isChecked());
conf.writeEntry("DontSlideStickyWindows", m_ui->dontSlideStickyWindowsBox->isChecked());
conf.writeEntry("UsePagerLayout", m_ui->usePagerBox->isChecked());
conf.writeEntry("UseWindowMoving", m_ui->windowsMovingBox->isChecked());
conf.sync();
emit changed(false);
KCModule::save();
EffectsHandler::sendReloadMessage("cubeslide");
}
void CubeSlideEffectConfig::defaults()
{
m_ui->rotationDurationSpin->setValue(0);
m_ui->dontSlidePanelsBox->setChecked(true);
m_ui->dontSlideStickyWindowsBox->setChecked(false);
m_ui->usePagerBox->setChecked(true);
m_ui->windowsMovingBox->setChecked(false);
emit changed(true);
}
} // namespace
#include "cubeslide_config.moc"

View File

@ -44,8 +44,7 @@ public:
public slots:
virtual void save();
virtual void load();
virtual void defaults();
private:
CubeSlideEffectConfigForm* m_ui;
};

View File

@ -12,7 +12,7 @@
</property>
<layout class="QGridLayout" name="gridLayout">
<item row="2" column="0" colspan="2">
<widget class="QCheckBox" name="dontSlideStickyWindowsBox">
<widget class="QCheckBox" name="kcfg_DontSlideStickyWindows">
<property name="text">
<string>Do not animate windows on all desktops</string>
</property>
@ -32,7 +32,7 @@
</spacer>
</item>
<item row="0" column="1">
<widget class="KIntSpinBox" name="rotationDurationSpin">
<widget class="KIntSpinBox" name="kcfg_RotationDuration">
<property name="sizePolicy">
<sizepolicy hsizetype="Expanding" vsizetype="Fixed">
<horstretch>0</horstretch>
@ -60,7 +60,7 @@
</widget>
</item>
<item row="1" column="0" colspan="2">
<widget class="QCheckBox" name="dontSlidePanelsBox">
<widget class="QCheckBox" name="kcfg_DontSlidePanels">
<property name="text">
<string>Do not animate panels</string>
</property>
@ -75,19 +75,19 @@
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
</property>
<property name="buddy">
<cstring>rotationDurationSpin</cstring>
<cstring>kcfg_RotationDuration</cstring>
</property>
</widget>
</item>
<item row="3" column="0" colspan="2">
<widget class="QCheckBox" name="usePagerBox">
<widget class="QCheckBox" name="kcfg_UsePagerLayout">
<property name="text">
<string>Use pager layout for animation</string>
</property>
</widget>
</item>
<item row="4" column="0" colspan="2">
<widget class="QCheckBox" name="windowsMovingBox">
<widget class="QCheckBox" name="kcfg_UseWindowMoving">
<property name="text">
<string>Start animation when moving windows towards screen edges</string>
</property>
@ -103,9 +103,9 @@
</customwidget>
</customwidgets>
<tabstops>
<tabstop>rotationDurationSpin</tabstop>
<tabstop>dontSlidePanelsBox</tabstop>
<tabstop>dontSlideStickyWindowsBox</tabstop>
<tabstop>kcfg_RotationDuration</tabstop>
<tabstop>kcfg_DontSlidePanels</tabstop>
<tabstop>kcfg_DontSlideStickyWindows</tabstop>
</tabstops>
<resources/>
<connections/>

View File

@ -0,0 +1,5 @@
File=cubeslide.kcfg
ClassName=CubeSlideConfig
NameSpace=KWin
Singleton=true
Mutators=true