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.
33 lines
584 B
33 lines
584 B
#ifndef RESULTVIEWMODEL_H
|
|
#define RESULTVIEWMODEL_H
|
|
|
|
#include <QtMvvmCore/ViewModel>
|
|
|
|
class ResultViewModel : public QtMvvm::ViewModel
|
|
{
|
|
Q_OBJECT
|
|
|
|
Q_PROPERTY(QString result READ result WRITE setResult NOTIFY resultChanged)
|
|
|
|
public:
|
|
Q_INVOKABLE explicit ResultViewModel(QObject *parent = nullptr);
|
|
~ResultViewModel();
|
|
|
|
QString result() const;
|
|
|
|
public Q_SLOTS:
|
|
void done();
|
|
|
|
void setResult(QString result);
|
|
|
|
Q_SIGNALS:
|
|
void resultChanged(QString result);
|
|
|
|
protected:
|
|
void onInit(const QVariantHash ¶ms) override;
|
|
|
|
private:
|
|
QString _result;
|
|
};
|
|
|
|
#endif // RESULTVIEWMODEL_H
|
|
|