X-Git-Url: https://gerrit.automotivelinux.org/gerrit/gitweb?a=blobdiff_plain;f=app%2Fonscreenmodel.h;fp=app%2Fonscreenmodel.h;h=45249048b01c27c28ddf4c60e548802507f9573f;hb=fe42b81570d9730042a52d02ba8715bf75686ca0;hp=0000000000000000000000000000000000000000;hpb=fe3d069d19d4c11c9d905da1d4412a77295a438d;p=apps%2Fonscreenapp.git diff --git a/app/onscreenmodel.h b/app/onscreenmodel.h new file mode 100644 index 0000000..4524904 --- /dev/null +++ b/app/onscreenmodel.h @@ -0,0 +1,32 @@ +#ifndef ONSCREENMODEL_H +#define ONSCREENMODEL_H + +#include +#include +#include + + +class OnScreenModel : public QObject +{ + Q_OBJECT +public: + explicit OnScreenModel(QObject *parent = nullptr){} + ~OnScreenModel() = default; + + Q_INVOKABLE QString getTitle(void) const {return m_title;} + Q_INVOKABLE QString getType(void) const {return m_type;} + Q_INVOKABLE QString getContents(void) const {return m_contents;} + Q_INVOKABLE int buttonNum(void) const {return m_buttons.size();} + Q_INVOKABLE QString buttonName(int index) const; + Q_INVOKABLE void setModel(QVariant data); + +private: + void clearModel(void); + + QString m_title; + QString m_type; + QString m_contents; + QStringList m_buttons; +}; + +#endif // ONSCREENMODEL_H