lena_pi/LenaPi/models/UiStateModel.h
2021-08-28 14:08:02 +02:00

34 lines
616 B
C++

#ifndef UISTATEMODEL_H
#define UISTATEMODEL_H
#include <QObject>
#include <QUrl>
/**
* @brief Handles state of UI by providing the qml source.
*
* Provides the possibility to switch between different
* ui states such as music player or navigation.
*/
class UiStateModel : public QObject
{
Q_OBJECT
Q_PROPERTY(QUrl pSource READ getSource NOTIFY sourceChanged)
signals:
void sourceChanged();
public:
explicit UiStateModel(QObject *parent = nullptr);
QUrl getSource() const;
void showMusicPlayer();
void showNavigation();
private:
QUrl mSource;
};
#endif // UISTATEMODEL_H