added basic models and controllers
This commit is contained in:
parent
269b48ed9d
commit
e401b71788
9 changed files with 222 additions and 2 deletions
27
LenaPi/controllers/NavigationController.cpp
Normal file
27
LenaPi/controllers/NavigationController.cpp
Normal file
|
|
@ -0,0 +1,27 @@
|
|||
#include "NavigationController.h"
|
||||
|
||||
#include "../models/NavigationItemModel.h"
|
||||
#include "../models/NavigationListModel.h"
|
||||
|
||||
NavigationController::NavigationController(QObject *parent) : QObject(parent),
|
||||
mRootItem(new NavigationItemModel(this)),
|
||||
mNavList(new NavigationListModel(this))
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
void NavigationController::init(const QString &rootPath)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
void NavigationController::setContext(QQmlContext *context)
|
||||
{
|
||||
mContext = context;
|
||||
setContextProperties();
|
||||
}
|
||||
|
||||
void NavigationController::setContextProperties()
|
||||
{
|
||||
mContext->setContextProperty("navigationList", mNavList);
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue