some refactoring issues in the qml gui
This commit is contained in:
@@ -1,9 +1,12 @@
|
|||||||
#include <QtCore>
|
#include <QtCore>
|
||||||
|
#include "startview/startview.h"
|
||||||
|
|
||||||
#include "qmlwrapper.h"
|
#include "qmlwrapper.h"
|
||||||
|
|
||||||
qmlWrapper::qmlWrapper()
|
qmlWrapper::qmlWrapper()
|
||||||
{
|
{
|
||||||
qDebug("qmlWrapperKonstruktor");
|
qDebug("qmlWrapperKonstruktor");
|
||||||
|
myStartView.reset(new startView);
|
||||||
}
|
}
|
||||||
|
|
||||||
qmlWrapper::~qmlWrapper()
|
qmlWrapper::~qmlWrapper()
|
||||||
@@ -16,5 +19,6 @@ qmlWrapper::qmlWrapper(const qmlWrapper&)
|
|||||||
|
|
||||||
void qmlWrapper::showStartView()
|
void qmlWrapper::showStartView()
|
||||||
{
|
{
|
||||||
myStartView.show();
|
qDebug("showStartView() in qmlWrapper");
|
||||||
|
myStartView->show();
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,7 +1,9 @@
|
|||||||
#ifndef QMLWRAPPER_H
|
#ifndef QMLWRAPPER_H
|
||||||
#define QMLWRAPPER_H
|
#define QMLWRAPPER_H
|
||||||
|
|
||||||
#include "startview/startview.h"
|
#include <boost/shared_ptr.hpp>
|
||||||
|
|
||||||
|
class startView;
|
||||||
|
|
||||||
class qmlWrapper
|
class qmlWrapper
|
||||||
{
|
{
|
||||||
@@ -13,7 +15,7 @@ public:
|
|||||||
void showStartView();
|
void showStartView();
|
||||||
|
|
||||||
private:
|
private:
|
||||||
startView myStartView;
|
boost::shared_ptr<startView> myStartView;
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif // QMLWRAPPER_H
|
#endif // QMLWRAPPER_H
|
||||||
|
|||||||
@@ -1,8 +1,11 @@
|
|||||||
|
#include <QQmlApplicationEngine>
|
||||||
|
|
||||||
#include "startview.h"
|
#include "startview.h"
|
||||||
|
|
||||||
startView::startView()
|
startView::startView()
|
||||||
{
|
{
|
||||||
qDebug("startViewKonstruktor");
|
qDebug("startViewKonstruktor");
|
||||||
|
myEngine.reset(new QQmlApplicationEngine);
|
||||||
}
|
}
|
||||||
|
|
||||||
startView::~startView()
|
startView::~startView()
|
||||||
@@ -17,6 +20,6 @@ startView::startView(const startView&)
|
|||||||
|
|
||||||
void startView::show()
|
void startView::show()
|
||||||
{
|
{
|
||||||
qDebug("show mal bitte");
|
qDebug("show() in startView");
|
||||||
myEngine.load(QUrl(QStringLiteral("qrc:/main.qml")));
|
myEngine->load(QUrl(QStringLiteral("qrc:/main.qml")));
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,7 +1,9 @@
|
|||||||
#ifndef STARTVIEW_H
|
#ifndef STARTVIEW_H
|
||||||
#define STARTVIEW_H
|
#define STARTVIEW_H
|
||||||
|
|
||||||
#include <QQmlApplicationEngine>
|
#include <boost/shared_ptr.hpp>
|
||||||
|
|
||||||
|
class QQmlApplicationEngine;
|
||||||
|
|
||||||
class startView
|
class startView
|
||||||
{
|
{
|
||||||
@@ -13,7 +15,7 @@ public:
|
|||||||
void show();
|
void show();
|
||||||
|
|
||||||
private:
|
private:
|
||||||
QQmlApplicationEngine myEngine;
|
boost::shared_ptr<QQmlApplicationEngine> myEngine;
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif // STARTVIEW_H
|
#endif // STARTVIEW_H
|
||||||
|
|||||||
Reference in New Issue
Block a user