: masterController(_masterController)
{
navigationController = new NavigationController(_masterController);
+ commandController = new CommandController(_masterController);
}
MasterController* masterController{nullptr};
NavigationController* navigationController{nullptr};
+ CommandController* commandController{nullptr};
QString welcomeMessage = "This is MasterController to Major Tom";
};
return implementation->navigationController;
}
+ CommandController* MasterController::commandController()
+ {
+ return implementation->commandController;
+ }
+
const QString& MasterController::welcomeMessage() const
{
return implementation->welcomeMessage;
#include "cm-lib_global.h"
#include "controllers/navigation-controller.h"
+#include "controllers/commandcontroller.h"
namespace cm::controllers {
Q_OBJECT
Q_PROPERTY( QString ui_welcomeMessage READ welcomeMessage CONSTANT )
Q_PROPERTY( cm::controllers::NavigationController* ui_navigationController READ navigationController CONSTANT )
+ Q_PROPERTY( cm::controllers::CommandController* ui_commandController READ commandController CONSTANT )
public:
explicit MasterController(QObject *parent = nullptr);
~MasterController();
+
NavigationController* navigationController();
+ CommandController* commandController();
const QString& welcomeMessage() const;
private:
#include <QGuiApplication>
#include <QQmlApplicationEngine>
#include <QQmlContext>
-#include <controllers/master-controller.h>
+#include "controllers/master-controller.h"
+#include "controllers/commandcontroller.h"
+#include "framework/command.h"
int main(int argc, char *argv[])
{
QGuiApplication app(argc, argv);
qmlRegisterType<cm::controllers::MasterController>("CM", 1, 0, "MasterController");
qmlRegisterType<cm::controllers::NavigationController>("CM", 1, 0, "NavigationController");
+ qmlRegisterType<cm::controllers::CommandController>("CM", 1, 0, "CommandController");
+ qmlRegisterType<cm::framework::Command>("CM", 1, 0, "Command");
+
cm::controllers::MasterController masterController;
QQmlApplicationEngine engine;