lena_pi/LenaPi/controllers/NavigationController.h
Anika Raemer d251120275 don't show folders that do not contain subfolders or audio files
hopefuly this will fix crash on RasPi
2018-12-25 20:15:41 +01:00

41 lines
863 B
C++

#ifndef NAVIGATIONCONTROLLER_H
#define NAVIGATIONCONTROLLER_H
#include <QObject>
#include <QQmlContext>
class NavigationItemModel;
class NavigationListModel;
class UiStateModel;
class MusicController;
class NavigationController : public QObject
{
Q_OBJECT
public:
NavigationController(QObject *parent = Q_NULLPTR);
void init(const QString & rootPath);
void setContext(QQmlContext* context);
private:
void setContextProperties();
void add(const QString & path, NavigationItemModel* parentItem);
bool checkContent(const QString& path);
NavigationItemModel* mRootItem;
NavigationListModel* mNavList;
UiStateModel* mUiState;
MusicController* mMusicController;
QString mRootPath = ".";
QQmlContext* mContext = Q_NULLPTR;
private slots:
void onNavigationRequest();
};
#endif // NAVIGATIONCONTROLLER_H