Port Sheet effect to KConfigXT
REVIEW: 109220
This commit is contained in:
parent
7588890bca
commit
b4c8311ace
4 changed files with 21 additions and 3 deletions
|
@ -5,6 +5,7 @@
|
||||||
set( kwin4_effect_builtins_sources ${kwin4_effect_builtins_sources}
|
set( kwin4_effect_builtins_sources ${kwin4_effect_builtins_sources}
|
||||||
sheet/sheet.cpp
|
sheet/sheet.cpp
|
||||||
)
|
)
|
||||||
|
kde4_add_kcfg_files(kwin4_effect_builtins_sources sheet/sheetconfig.kcfgc)
|
||||||
|
|
||||||
# .desktop files
|
# .desktop files
|
||||||
install( FILES
|
install( FILES
|
||||||
|
|
|
@ -20,8 +20,8 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
*********************************************************************/
|
*********************************************************************/
|
||||||
|
|
||||||
#include "sheet.h"
|
#include "sheet.h"
|
||||||
|
#include "sheetconfig.h"
|
||||||
|
|
||||||
#include <kconfiggroup.h>
|
|
||||||
#include <QTimeLine>
|
#include <QTimeLine>
|
||||||
#include <QGraphicsRotation>
|
#include <QGraphicsRotation>
|
||||||
#include <QVector3D>
|
#include <QVector3D>
|
||||||
|
@ -51,8 +51,8 @@ bool SheetEffect::supported()
|
||||||
|
|
||||||
void SheetEffect::reconfigure(ReconfigureFlags)
|
void SheetEffect::reconfigure(ReconfigureFlags)
|
||||||
{
|
{
|
||||||
KConfigGroup conf = effects->effectConfig("Sheet");
|
SheetConfig::self()->readConfig();
|
||||||
duration = animationTime(conf, "AnimationTime", 500);
|
duration = animationTime(SheetConfig::animationTime() != 0 ? SheetConfig::animationTime() : 500);
|
||||||
}
|
}
|
||||||
|
|
||||||
void SheetEffect::prePaintScreen(ScreenPrePaintData& data, int time)
|
void SheetEffect::prePaintScreen(ScreenPrePaintData& data, int time)
|
||||||
|
|
12
effects/sheet/sheet.kcfg
Normal file
12
effects/sheet/sheet.kcfg
Normal file
|
@ -0,0 +1,12 @@
|
||||||
|
<?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-Sheet">
|
||||||
|
<entry name="AnimationTime" type="Int">
|
||||||
|
<default>0</default>
|
||||||
|
</entry>
|
||||||
|
</group>
|
||||||
|
</kcfg>
|
5
effects/sheet/sheetconfig.kcfgc
Normal file
5
effects/sheet/sheetconfig.kcfgc
Normal file
|
@ -0,0 +1,5 @@
|
||||||
|
File=sheet.kcfg
|
||||||
|
ClassName=SheetConfig
|
||||||
|
NameSpace=KWin
|
||||||
|
Singleton=true
|
||||||
|
Mutators=true
|
Loading…
Reference in a new issue