You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
35 lines
565 B
35 lines
565 B
#include "resultviewmodel.h"
|
|
|
|
ResultViewModel::ResultViewModel(QObject *parent) :
|
|
ViewModel(parent),
|
|
_result()
|
|
{}
|
|
|
|
ResultViewModel::~ResultViewModel()
|
|
{
|
|
qInfo(Q_FUNC_INFO);
|
|
}
|
|
|
|
QString ResultViewModel::result() const
|
|
{
|
|
return _result;
|
|
}
|
|
|
|
void ResultViewModel::done()
|
|
{
|
|
emit resultReady(_result);
|
|
}
|
|
|
|
void ResultViewModel::setResult(QString result)
|
|
{
|
|
if (_result == result)
|
|
return;
|
|
|
|
_result = result;
|
|
emit resultChanged(_result);
|
|
}
|
|
|
|
void ResultViewModel::onInit(const QVariantHash ¶ms)
|
|
{
|
|
setResult(params.value(QStringLiteral("default")).toString());
|
|
}
|
|
|