--- a/stifui/qt/src/uisetting.cpp Fri May 14 15:53:02 2010 +0300
+++ b/stifui/qt/src/uisetting.cpp Thu May 27 12:52:19 2010 +0300
@@ -40,6 +40,11 @@
{
value = settingList.value(item);
}
+ else
+ {
+ value = getDefaultValue(item);
+ settingList.insert(item, value);
+ }
return value;
}
@@ -58,10 +63,24 @@
void UiSetting::loadDefault()
{
settingList.clear();
- settingList.insert("showoutput", "true");
+ settingList.insert(KShowOutput, getDefaultValue(KShowOutput));
+ settingList.insert(KStyleSheet, getDefaultValue(KStyleSheet));
//add mor default setting here.
}
+QString UiSetting::getDefaultValue(const QString& item)
+ {
+ QString result = "";
+ if(item == KShowOutput)
+ {
+ result = "true";
+ }
+ else if(item == KStyleSheet)
+ {
+ result = ":/qss/coffee.qss";
+ }
+ return result;
+ }
bool UiSetting::load()
{
@@ -75,7 +94,7 @@
int index;
while(!in.atEnd())
{
- line = in.readLine().trimmed().toLower();
+ line = in.readLine().trimmed();
if(!line.startsWith("//"))
{
index = line.indexOf("=");