-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathqmlproperty.cpp
47 lines (39 loc) · 1.03 KB
/
qmlproperty.cpp
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
#include "qmlproperty.h"
#include "httprequest.h"
#include "settings.h"
#include <QDebug>
QmlProperty::QmlProperty(QObject *parent) : QObject(parent)
{
this->m_name = "QML Property";
}
void QmlProperty::setName(const QString &name) {
qDebug() << "Changing title to: " << name;
this->m_name = name;
}
void QmlProperty::setText(const QString &text) {
qDebug() << "Changing text to: " << text;
this->m_text = text;
}
void QmlProperty::changeText(const QString &text) {
setText(text);
qDebug() << "Text changed via slot: " << text;
emit textChanged();
}
void QmlProperty::getRequest(QString url)
{
//not sending request
HttpRequest httpRequest;
httpRequest.buttonRequest(url);
qDebug() << "slot for http button request";
}
void QmlProperty::newSetting(QString keyname, QVariant value)
{
Settings settings;
settings.newSetting(keyname, value);
qDebug() << "added and rewrote setting";
}
void QmlProperty::getSetting(QString keyname)
{
Settings settings;
settings.getSetting(keyname);
}