test config ui handling
svn path=/trunk/KDE/kdebase/runtime/; revision=973262
This commit is contained in:
parent
5856954871
commit
2617a0b82d
@ -1,7 +1,13 @@
|
||||
plasmoid.configChanged = function()
|
||||
{
|
||||
plasmoid.activeConfig = "main";
|
||||
print("Configuration changed: " + plasmoid.readConfig("Test"));
|
||||
}
|
||||
|
||||
print(plasmoid.readConfig("Test"));
|
||||
plasmoid.activeConfig = "secondary";
|
||||
print(plasmoid.activeConfig);
|
||||
print(plasmoid.readConfig("Test"));
|
||||
plasmoid.writeConfig("Test", "You should see this!");
|
||||
plasmoid.writeConfig("Test", "A different text!");
|
||||
print(plasmoid.readConfig("Test"));
|
||||
|
||||
|
@ -5,7 +5,7 @@
|
||||
http://www.kde.org/standards/kcfg/1.0/kcfg.xsd" >
|
||||
<kcfgfile name=""/>
|
||||
|
||||
<group name="General">
|
||||
<group name="Secondary">
|
||||
<entry name="Test" type="String">
|
||||
<label>A test label</label>
|
||||
<default>This is in the secondary config XML</default>
|
||||
|
@ -0,0 +1,57 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<ui version="4.0">
|
||||
<class>Form</class>
|
||||
<widget class="QWidget" name="Form">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>400</width>
|
||||
<height>38</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="windowTitle">
|
||||
<string>Form</string>
|
||||
</property>
|
||||
<layout class="QGridLayout" name="gridLayout">
|
||||
<item row="0" column="0">
|
||||
<widget class="QLabel" name="label">
|
||||
<property name="text">
|
||||
<string>&Text:</string>
|
||||
</property>
|
||||
<property name="alignment">
|
||||
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
|
||||
</property>
|
||||
<property name="buddy">
|
||||
<cstring>kcfg_Test</cstring>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="1">
|
||||
<widget class="KLineEdit" name="kcfg_Test"/>
|
||||
</item>
|
||||
<item row="1" column="1">
|
||||
<spacer name="verticalSpacer">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Vertical</enum>
|
||||
</property>
|
||||
<property name="sizeHint" stdset="0">
|
||||
<size>
|
||||
<width>20</width>
|
||||
<height>3</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
<customwidgets>
|
||||
<customwidget>
|
||||
<class>KLineEdit</class>
|
||||
<extends>QLineEdit</extends>
|
||||
<header>klineedit.h</header>
|
||||
</customwidget>
|
||||
</customwidgets>
|
||||
<resources/>
|
||||
<connections/>
|
||||
</ui>
|
Loading…
Reference in New Issue
Block a user