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.

30 lines
516 B

2 years ago
#ifndef MAINVIEWMODEL_H
#define MAINVIEWMODEL_H
#include <QtMvvmCore/ViewModel>
class MainViewModel : public QtMvvm::ViewModel
{
Q_OBJECT
Q_PROPERTY(QString text READ text WRITE setText NOTIFY textChanged)
public:
Q_INVOKABLE explicit MainViewModel(QObject *parent = nullptr);
QString text() const;
public Q_SLOTS:
void showSettings();
void setText(const QString &text);
Q_SIGNALS:
void textChanged(const QString &text);
private:
QString _text;
};
#endif // MAINVIEWMODEL_H