some changes
This commit is contained in:
parent
11d0f5a06c
commit
5c4cc9aedb
4 changed files with 47 additions and 7 deletions
1
.gitignore
vendored
Normal file
1
.gitignore
vendored
Normal file
|
@ -0,0 +1 @@
|
|||
*.pro.user
|
|
@ -30,10 +30,10 @@ signals:
|
|||
void themeChanged();
|
||||
|
||||
public slots:
|
||||
Q_INVOKABLE QString read(const QString &key);
|
||||
Q_INVOKABLE QString read(QString key);
|
||||
// function to read values from the settings file
|
||||
|
||||
Q_INVOKABLE void write(const QString &key, const QVariant &value);
|
||||
Q_INVOKABLE void write(QString key, QVariant value);
|
||||
// function to write values to the settings file
|
||||
|
||||
Q_INVOKABLE void setDefault(const QString &key, const QVariant &defaultValue);
|
||||
|
|
|
@ -31,13 +31,52 @@ Popup {
|
|||
topMargin: -topImg.anchors.bottomMargin
|
||||
}
|
||||
|
||||
Column {
|
||||
ListView {
|
||||
anchors.fill: parent
|
||||
|
||||
ShopDelegate {
|
||||
|
||||
model: ListModel {
|
||||
ListElement {
|
||||
iconSource: "qrc:/icons/cookie.png"
|
||||
costIconSource: "qrc:/icons/cookie.png"
|
||||
title: "Titel"
|
||||
cost: "10"
|
||||
levelLabel: "Level:"
|
||||
level: "10"
|
||||
useLabel: "Cps:"
|
||||
use: "+10"
|
||||
}
|
||||
ListElement {
|
||||
iconSource: "qrc:/icons/cookie.png"
|
||||
costIconSource: "qrc:/icons/cookie.png"
|
||||
title: "Titel2"
|
||||
cost: "100"
|
||||
levelLabel: "Level:"
|
||||
level: "10"
|
||||
useLabel: "Cps:"
|
||||
use: "+10"
|
||||
}
|
||||
ListElement {
|
||||
iconSource: "qrc:/icons/cookie.png"
|
||||
costIconSource: "qrc:/icons/cookie.png"
|
||||
title: "Titel3"
|
||||
cost: "1000"
|
||||
levelLabel: "Level:"
|
||||
level: "10"
|
||||
useLabel: "Cps:"
|
||||
use: "+10"
|
||||
}
|
||||
}
|
||||
|
||||
delegate: ShopDelegate {
|
||||
iconSource: model.iconSource
|
||||
costIconSource: model.costIconSource
|
||||
title: model.title
|
||||
cost: model.cost
|
||||
levelLabel: model.levelLabel
|
||||
level: model.level
|
||||
useLabel: model.useLabel
|
||||
use: model.use
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -20,7 +20,7 @@ AppSettings::AppSettings(QObject* parent)
|
|||
this->themeSettingsManager = new QSettings(":/themes/" + this->read("theme") + ".ini", QSettings::IniFormat);
|
||||
}
|
||||
|
||||
QString AppSettings::read(const QString &key)
|
||||
QString AppSettings::read(QString key)
|
||||
{
|
||||
// function to read values from the settings file
|
||||
|
||||
|
@ -34,7 +34,7 @@ QString AppSettings::read(const QString &key)
|
|||
return(value);
|
||||
}
|
||||
|
||||
void AppSettings::write(const QString &key, const QVariant &value)
|
||||
void AppSettings::write(QString key, QVariant value)
|
||||
{
|
||||
// function to write values to the settings file
|
||||
|
||||
|
|
Reference in a new issue