[kde-doc-english] [kxstitch] /: Added config dialog options for default stitch and backstitch strands
Steve Allewell
steve.allewell at gmail.com
Sat Jun 7 10:21:53 UTC 2014
Git commit ee922170363c9809a4be2b890290e683b699fb58 by Steve Allewell.
Committed on 07/06/2014 at 10:06.
Pushed by sallewell into branch 'master'.
Added config dialog options for default stitch and backstitch strands
The configuration file has options for the default number of strands for
stitches and backstitches, but the configuration dialog had no options
for changing the values used. Two combo boxes have been added to the
palette configuration to allow setting this value in the configuration
file.
GUI: Two new strings have been added in PaletteConfigPage.ui
M +6 -0 src/ConfigurationDialogs.cpp
M +89 -3 ui/PaletteConfigPage.ui
http://commits.kde.org/kxstitch/ee922170363c9809a4be2b890290e683b699fb58
diff --git a/src/ConfigurationDialogs.cpp b/src/ConfigurationDialogs.cpp
index 133af38..ff4a19d 100644
--- a/src/ConfigurationDialogs.cpp
+++ b/src/ConfigurationDialogs.cpp
@@ -221,11 +221,15 @@ PaletteConfigPage::PaletteConfigPage(QWidget *parent, const char *name)
// KConfigXT will read the currentText through the kcfg_property
kcfg_Palette_DefaultScheme->setProperty("kcfg_property", QByteArray("currentText"));
kcfg_Palette_DefaultSymbolLibrary->setProperty("kcfg_property", QByteArray("currentText"));
+ kcfg_Palette_StitchStrands->setProperty("kcfg_property", QByteArray("currentText"));
+ kcfg_Palette_BackstitchStrands->setProperty("kcfg_property", QByteArray("currentText"));
kcfg_Palette_DefaultScheme->insertItems(0, SchemeManager::schemes());
kcfg_Palette_DefaultSymbolLibrary->insertItems(0, SymbolManager::libraries());
// KConfigXT can't write the currentText, so this needs to be set manually
kcfg_Palette_DefaultScheme->setCurrentItem(Configuration::palette_DefaultScheme());
kcfg_Palette_DefaultSymbolLibrary->setCurrentItem(Configuration::palette_DefaultSymbolLibrary());
+ kcfg_Palette_StitchStrands->setCurrentIndex(Configuration::palette_StitchStrands() - 1);
+ kcfg_Palette_BackstitchStrands->setCurrentIndex(Configuration::palette_BackstitchStrands() - 1);
}
@@ -234,6 +238,8 @@ void PaletteConfigPage::defaultClicked()
// Clicking Default button doesn't work with the KComboBoxes with text defaults, set them manually
kcfg_Palette_DefaultScheme->setCurrentItem(Configuration::defaultPalette_DefaultSchemeValue());
kcfg_Palette_DefaultSymbolLibrary->setCurrentItem(Configuration::defaultPalette_DefaultSymbolLibraryValue());
+ kcfg_Palette_StitchStrands->setCurrentIndex(Configuration::defaultPalette_StitchStrandsValue() - 1);
+ kcfg_Palette_BackstitchStrands->setCurrentIndex(Configuration::defaultPalette_BackstitchStrandsValue() - 1);
}
diff --git a/ui/PaletteConfigPage.ui b/ui/PaletteConfigPage.ui
index 528fc7a..e0d0928 100644
--- a/ui/PaletteConfigPage.ui
+++ b/ui/PaletteConfigPage.ui
@@ -6,8 +6,8 @@
<rect>
<x>0</x>
<y>0</y>
- <width>288</width>
- <height>119</height>
+ <width>342</width>
+ <height>173</height>
</rect>
</property>
<property name="windowTitle">
@@ -37,7 +37,7 @@
</property>
</widget>
</item>
- <item row="2" column="0">
+ <item row="4" column="0">
<widget class="QCheckBox" name="kcfg_Palette_ShowSymbols">
<property name="text">
<string>Show symbols</string>
@@ -54,6 +54,88 @@
<item row="1" column="1">
<widget class="KComboBox" name="kcfg_Palette_DefaultSymbolLibrary"/>
</item>
+ <item row="2" column="0">
+ <widget class="QLabel" name="label_2">
+ <property name="text">
+ <string>Default stitch strands</string>
+ </property>
+ </widget>
+ </item>
+ <item row="3" column="0">
+ <widget class="QLabel" name="label_3">
+ <property name="text">
+ <string>Default backstitch strands</string>
+ </property>
+ </widget>
+ </item>
+ <item row="2" column="1">
+ <widget class="KComboBox" name="kcfg_Palette_StitchStrands">
+ <item>
+ <property name="text">
+ <string notr="true">1</string>
+ </property>
+ </item>
+ <item>
+ <property name="text">
+ <string notr="true">2</string>
+ </property>
+ </item>
+ <item>
+ <property name="text">
+ <string notr="true">3</string>
+ </property>
+ </item>
+ <item>
+ <property name="text">
+ <string notr="true">4</string>
+ </property>
+ </item>
+ <item>
+ <property name="text">
+ <string notr="true">5</string>
+ </property>
+ </item>
+ <item>
+ <property name="text">
+ <string notr="true">6</string>
+ </property>
+ </item>
+ </widget>
+ </item>
+ <item row="3" column="1">
+ <widget class="KComboBox" name="kcfg_Palette_BackstitchStrands">
+ <item>
+ <property name="text">
+ <string notr="true">1</string>
+ </property>
+ </item>
+ <item>
+ <property name="text">
+ <string notr="true">2</string>
+ </property>
+ </item>
+ <item>
+ <property name="text">
+ <string notr="true">3</string>
+ </property>
+ </item>
+ <item>
+ <property name="text">
+ <string notr="true">4</string>
+ </property>
+ </item>
+ <item>
+ <property name="text">
+ <string notr="true">5</string>
+ </property>
+ </item>
+ <item>
+ <property name="text">
+ <string notr="true">6</string>
+ </property>
+ </item>
+ </widget>
+ </item>
</layout>
</widget>
</item>
@@ -68,6 +150,10 @@
</customwidgets>
<tabstops>
<tabstop>kcfg_Palette_DefaultScheme</tabstop>
+ <tabstop>kcfg_Palette_DefaultSymbolLibrary</tabstop>
+ <tabstop>kcfg_Palette_StitchStrands</tabstop>
+ <tabstop>kcfg_Palette_BackstitchStrands</tabstop>
+ <tabstop>kcfg_Palette_ShowSymbols</tabstop>
</tabstops>
<resources/>
<connections/>
More information about the kde-doc-english
mailing list