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