New Blinds Raise Interval Selector Component for ListViews
Outsourced Styles for RadioButton and TextField
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
#include "createlocalgameimpl.h"
|
||||
#include "createlocalgameviewimpl.h"
|
||||
|
||||
CreateLocalGameImpl::CreateLocalGameImpl(QObject *parent) : QObject(parent)
|
||||
CreateLocalGameViewImpl::CreateLocalGameViewImpl(QObject *parent) : QObject(parent)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
@@ -1,16 +1,16 @@
|
||||
#ifndef CREATELOCALGAMEIMPL_H
|
||||
#define CREATELOCALGAMEIMPL_H
|
||||
#ifndef CREATELOCALGAMEVIEWIMPL_H
|
||||
#define CREATELOCALGAMEVIEWIMPL_H
|
||||
#include <QtCore>
|
||||
|
||||
|
||||
class CreateLocalGameImpl : public QObject
|
||||
class CreateLocalGameViewImpl : public QObject
|
||||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
explicit CreateLocalGameImpl(QObject *parent = 0);
|
||||
explicit CreateLocalGameViewImpl(QObject *parent = 0);
|
||||
|
||||
signals:
|
||||
|
||||
public slots:
|
||||
};
|
||||
|
||||
#endif // CREATELOCALGAMEIMPL_H
|
||||
#endif // CREATELOCALGAMEVIEWIMPL_H
|
||||
|
||||
@@ -6,6 +6,8 @@
|
||||
|
||||
#include "qmlconfig.h"
|
||||
#include "qmlwrapper.h"
|
||||
#include "startviewimpl.h"
|
||||
#include "createlocalgameviewimpl.h"
|
||||
|
||||
QmlWrapper::QmlWrapper(boost::shared_ptr<ConfigFile> c)
|
||||
:QObject(), myConfig(c)
|
||||
@@ -13,8 +15,14 @@ QmlWrapper::QmlWrapper(boost::shared_ptr<ConfigFile> c)
|
||||
myEngine.reset(new QQmlApplicationEngine);
|
||||
myQmlConfig = new QmlConfig(myConfig); //need to be a default pointer because QML doesnt support shared_ptr()
|
||||
|
||||
// Add c++ content here
|
||||
//TODO create Session and Log here
|
||||
|
||||
myStartViewImpl = new StartViewImpl(this);
|
||||
myCreateLocalGameViewImpl = new CreateLocalGameViewImpl(this);
|
||||
|
||||
//Add c++ content to QML here
|
||||
myEngine->rootContext()->setContextProperty("Config", myQmlConfig);
|
||||
myEngine->rootContext()->setContextProperty("StartViewImpl", myStartViewImpl);
|
||||
|
||||
myEngine->load(QUrl(QStringLiteral("qrc:/main.qml")));
|
||||
}
|
||||
@@ -29,3 +37,5 @@ QmlWrapper::QmlWrapper(const QmlWrapper&)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -3,9 +3,11 @@
|
||||
#include <QtCore>
|
||||
#include <boost/shared_ptr.hpp>
|
||||
|
||||
class QQmlApplicationEngine;
|
||||
class ConfigFile;
|
||||
class QmlConfig;
|
||||
class QQmlApplicationEngine;
|
||||
class CreateLocalGameViewImpl;
|
||||
class StartViewImpl;
|
||||
|
||||
class QmlWrapper: public QObject
|
||||
{
|
||||
@@ -21,6 +23,8 @@ private:
|
||||
boost::shared_ptr<QQmlApplicationEngine> myEngine;
|
||||
boost::shared_ptr<ConfigFile> myConfig;
|
||||
QmlConfig *myQmlConfig;
|
||||
CreateLocalGameViewImpl *myCreateLocalGameViewImpl;
|
||||
StartViewImpl *myStartViewImpl;
|
||||
};
|
||||
|
||||
#endif // QMLWRAPPER_H
|
||||
|
||||
@@ -1,7 +1,12 @@
|
||||
#include "startimpl.h"
|
||||
#include "startviewimpl.h"
|
||||
|
||||
StartImpl::StartImpl(QObject *parent) : QObject(parent)
|
||||
StartViewImpl::StartViewImpl(QObject *parent) : QObject(parent)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
void StartViewImpl::startLocalGame()
|
||||
{
|
||||
qDebug("startLocalGame im c++");
|
||||
}
|
||||
|
||||
|
||||
@@ -1,16 +1,18 @@
|
||||
#ifndef STARTIMPL_H
|
||||
#define STARTIMPL_H
|
||||
#ifndef STARTVIEWIMPL_H
|
||||
#define STARTVIEWIMPL_H
|
||||
#include <QtCore>
|
||||
|
||||
|
||||
class StartImpl : public QObject
|
||||
class StartViewImpl : public QObject
|
||||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
explicit StartImpl(QObject *parent = 0);
|
||||
explicit StartViewImpl(QObject *parent = 0);
|
||||
|
||||
signals:
|
||||
|
||||
public slots:
|
||||
Q_INVOKABLE void startLocalGame();
|
||||
|
||||
};
|
||||
|
||||
#endif // STARTIMPL_H
|
||||
#endif // STARTVIEWIMPL_H
|
||||
|
||||
Reference in New Issue
Block a user