lena_pi/LenaPi/controllers/NavigationController.h
2018-10-19 20:22:25 +02:00

31 lines
670 B
C++

#ifndef NAVIGATIONCONTROLLER_H
#define NAVIGATIONCONTROLLER_H
#include <QObject>
#include <QQmlContext>
class NavigationItemModel;
class NavigationListModel;
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 isCircleDelegate);
NavigationItemModel* mRootItem;
NavigationListModel* mNavList;
QString mRootPath = ".";
QQmlContext* mContext;
};
#endif // NAVIGATIONCONTROLLER_H