🔧 Use consistent class names

This commit is contained in:
Simon Schneegans
2022-06-09 10:46:45 +02:00
parent 03a6d9263a
commit bbd7d6ea64
3 changed files with 94 additions and 96 deletions
+12 -14
View File
@@ -1,15 +1,13 @@
<?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=""/>
<group name="">
<entry name="Duration" type="UInt">
<default>0</default>
</entry>
<entry name="Color" type="Color">
<default>128,128,128</default>
</entry>
</group>
</kcfg>
<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="" />
<group name="">
<entry name="Duration" type="UInt">
<default>0</default>
</entry>
<entry name="Color" type="Color">
<default>128,128,128</default>
</entry>
</group>
</kcfg>
+78 -78
View File
@@ -1,80 +1,80 @@
<?xml version="1.0" encoding="UTF-8"?>
<ui version="4.0">
<class>TvEffectConfigForm</class>
<widget class="QWidget" name="TvEffectConfigForm">
<property name="geometry">
<rect>
<x>0</x>
<y>0</y>
<width>498</width>
<height>451</height>
</rect>
</property>
<layout class="QFormLayout" name="formLayout">
<item row="0" column="0">
<widget class="QLabel" name="label">
<property name="text">
<string>Duration:</string>
</property>
<property name="alignment">
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
</property>
</widget>
</item>
<item row="1" column="0">
<widget class="QLabel" name="label_2">
<property name="text">
<string>&amp;Color:</string>
</property>
<property name="alignment">
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
</property>
<property name="buddy">
<cstring>kcfg_Color</cstring>
</property>
</widget>
</item>
<item row="1" column="1">
<widget class="KColorCombo" name="kcfg_Color">
<property name="sizePolicy">
<sizepolicy hsizetype="Expanding" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
</widget>
</item>
<item row="0" column="1">
<widget class="QSpinBox" name="kcfg_Duration">
<property name="sizePolicy">
<sizepolicy hsizetype="Expanding" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="specialValueText">
<string>Default</string>
</property>
<property name="suffix">
<string> milliseconds</string>
</property>
<property name="maximum">
<number>9999</number>
</property>
<property name="singleStep">
<number>5</number>
</property>
</widget>
</item>
</layout>
</widget>
<customwidgets>
<customwidget>
<class>KColorCombo</class>
<extends>QComboBox</extends>
<header>kcolorcombo.h</header>
</customwidget>
</customwidgets>
<resources/>
<connections/>
</ui>
<class>BMWtvEffectConfigForm</class>
<widget class="QWidget" name="BMWtvEffectConfigForm">
<property name="geometry">
<rect>
<x>0</x>
<y>0</y>
<width>498</width>
<height>451</height>
</rect>
</property>
<layout class="QFormLayout" name="formLayout">
<item row="0" column="0">
<widget class="QLabel" name="label">
<property name="text">
<string>Duration:</string>
</property>
<property name="alignment">
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
</property>
</widget>
</item>
<item row="1" column="0">
<widget class="QLabel" name="label_2">
<property name="text">
<string>&amp;Color:</string>
</property>
<property name="alignment">
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
</property>
<property name="buddy">
<cstring>kcfg_Color</cstring>
</property>
</widget>
</item>
<item row="1" column="1">
<widget class="KColorCombo" name="kcfg_Color">
<property name="sizePolicy">
<sizepolicy hsizetype="Expanding" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
</widget>
</item>
<item row="0" column="1">
<widget class="QSpinBox" name="kcfg_Duration">
<property name="sizePolicy">
<sizepolicy hsizetype="Expanding" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="specialValueText">
<string>Default</string>
</property>
<property name="suffix">
<string> milliseconds</string>
</property>
<property name="maximum">
<number>9999</number>
</property>
<property name="singleStep">
<number>5</number>
</property>
</widget>
</item>
</layout>
</widget>
<customwidgets>
<customwidget>
<class>KColorCombo</class>
<extends>QComboBox</extends>
<header>kcolorcombo.h</header>
</customwidget>
</customwidgets>
<resources />
<connections />
</ui>
+4 -4
View File
@@ -17,7 +17,7 @@ const blacklist = [
"ksplashqml ksplashqml"
];
class %NICK%Effect {
class BMW%NICK%Effect {
constructor() {
effect.configChanged.connect(this.loadConfig.bind(this));
effect.animationEnded.connect(this.cleanupForcedRoles.bind(this));
@@ -35,7 +35,7 @@ class %NICK%Effect {
const duration = effect.readConfig("Duration", defaultDuration) || defaultDuration;
this.duration = animationTime(duration);
effect.setUniform(this.shader, "uEffectColor", effect.readConfig("Color", "white"));
effect.setUniform(this.shader, "uColor", effect.readConfig("Color", "white"));
}
static isScaleWindow(window) {
@@ -121,7 +121,7 @@ class %NICK%Effect {
if (effects.hasActiveFullScreenEffect) {
return;
}
if (!%NICK%Effect.isScaleWindow(window)) {
if (!BMW%NICK%Effect.isScaleWindow(window)) {
return;
}
if (!window.visible || window.skipsCloseAnimation) {
@@ -168,4 +168,4 @@ class %NICK%Effect {
}
}
new %NICK%Effect();
new BMW%NICK%Effect();