13 Item::Item(
const QString&
id,
const QString& text,
int interval, QObject *parent) : QObject(parent) {
18 m_timer =
new QTimer(
this);
19 m_timer->setInterval(interval);
20 m_timer->setSingleShot(
false);
22 connect (m_timer, SIGNAL(timeout()),
this, SLOT(
updateStatus()));
45 data[
"text"] = m_text;
46 data[
"counter"] = m_counter;
void statusChanged(const Item *)
Signal is invoked when the status of the item changed.
Item(const QString &id, const QString &text, int interval, QObject *parent)
Constructor creates item from given parameters.
QVariantMap webStatus() const
Returns webStatus of the item.
const QString & text() const
Returns text of the item.
void updateStatus()
Slot is called periodicaly to increment inner value of the example item.
const QString & id() const
Returns id of the item.