move all logic flro client lib to clientApp
@ -1,31 +0,0 @@
|
||||
#
|
||||
# Copyright (C) 2018 - 2019 QuasarApp.
|
||||
# Distributed under the lgplv3 software license, see the accompanying
|
||||
# Everyone is permitted to copy and distribute verbatim copies
|
||||
# of this license document, but changing it is not allowed.
|
||||
#
|
||||
|
||||
!isEmpty(SERVER_LIB):error("Client.pri already included")
|
||||
CLIENT_LIB = 1
|
||||
|
||||
#DEPENDS
|
||||
CONFIG(release, debug|release): {
|
||||
CLIENT_LIB_OUTPUT_DIR="$$PWD/build/release"
|
||||
} else {
|
||||
CLIENT_LIB_OUTPUT_DIR="$$PWD/build/debug"
|
||||
}
|
||||
|
||||
LIBS += -L$$CLIENT_LIB_OUTPUT_DIR -lClient
|
||||
|
||||
include($$PWD/../../QuasarAppLib/QuasarLib.pri)
|
||||
include($$PWD/../../SnakeUtils/SnakeUtils.pri)
|
||||
include($$PWD/../../SnakeServer/ClientProtocol/ClientProtocol.pri)
|
||||
|
||||
INCLUDEPATH += "$$PWD"
|
||||
INCLUDEPATH += "$$PWD/front-end"
|
||||
INCLUDEPATH += "$$PWD/back-end"
|
||||
#INCLUDEPATH += "$$PWD/back-end/ProfileViewItems"
|
||||
|
||||
|
||||
|
||||
|
@ -1,101 +0,0 @@
|
||||
#-------------------------------------------------
|
||||
#
|
||||
# Project created by QtCreator 2019-07-28T12:59:54
|
||||
#
|
||||
#-------------------------------------------------
|
||||
|
||||
|
||||
TARGET = Client
|
||||
TEMPLATE = lib
|
||||
|
||||
DEFINES += CLIENT_LIBRARY
|
||||
|
||||
QT += quick concurrent
|
||||
CONFIG += c++17
|
||||
|
||||
# The following define makes your compiler emit warnings if you use
|
||||
# any feature of Qt which has been marked as deprecated (the exact warnings
|
||||
# depend on your compiler). Please consult the documentation of the
|
||||
# deprecated API in order to know how to port your code away from it.
|
||||
DEFINES += QT_DEPRECATED_WARNINGS
|
||||
|
||||
# You can also make your code fail to compile if you use deprecated APIs.
|
||||
# In order to do so, uncomment the following line.
|
||||
# You can also select to disable deprecated APIs only up to a certain version of Qt.
|
||||
#DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0x060000 # disables all the APIs deprecated before Qt 6.0.0
|
||||
|
||||
HEADERS += \
|
||||
back-end/ProfileViewItems/mainmenumodel.h \
|
||||
back-end/ProfileViewItems/playerclientdata.h \
|
||||
back-end/asyncimageresponse.h \
|
||||
back-end/baseclass.h \
|
||||
back-end/clientapp.h \
|
||||
back-end/head.h \
|
||||
back-end/imageprovider.h \
|
||||
back-end/snake.h \
|
||||
back-end/controller.h \
|
||||
back-end/ProfileViewItems/userview.h \
|
||||
back-end/world.h \
|
||||
back-end/itemworld.h \
|
||||
back-end/box.h \
|
||||
back-end/guiobject.h \
|
||||
back-end/guiobjectfactory.h \
|
||||
back-end/diff.h \
|
||||
back-end/background.h \
|
||||
back-end/backgrounditem.h \
|
||||
client_global.h
|
||||
|
||||
|
||||
SOURCES += \
|
||||
back-end/ProfileViewItems/mainmenumodel.cpp \
|
||||
back-end/ProfileViewItems/playerclientdata.cpp \
|
||||
back-end/asyncimageresponse.cpp \
|
||||
back-end/baseclass.cpp \
|
||||
back-end/clientapp.cpp \
|
||||
back-end/head.cpp \
|
||||
back-end/imageprovider.cpp \
|
||||
back-end/snake.cpp \
|
||||
back-end/controller.cpp \
|
||||
back-end/ProfileViewItems/userview.cpp \
|
||||
back-end/world.cpp \
|
||||
back-end/itemworld.cpp \
|
||||
back-end/box.cpp \
|
||||
back-end/guiobject.cpp \
|
||||
back-end/guiobjectfactory.cpp \
|
||||
back-end/diff.cpp \
|
||||
back-end/background.cpp \
|
||||
back-end/backgrounditem.cpp
|
||||
|
||||
|
||||
# The following define makes your compiler emit warnings if you use
|
||||
# any feature of Qt which as been marked deprecated (the exact warnings
|
||||
# depend on your compiler). Please consult the documentation of the
|
||||
# deprecated API in order to know how to port your code away from it.
|
||||
DEFINES += QT_DEPRECATED_WARNINGS
|
||||
|
||||
# You can also make your code fail to compile if you use deprecated APIs.
|
||||
# In order to do so, uncomment the following line.
|
||||
# You can also select to disable deprecated APIs only up to a certain version of Qt.
|
||||
#DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0x060000 # disables all the APIs deprecated before Qt 6.0.0
|
||||
|
||||
RESOURCES += qml.qrc
|
||||
|
||||
|
||||
CONFIG(release, debug|release): {
|
||||
DESTDIR = $$PWD/build/release
|
||||
|
||||
} else {
|
||||
DESTDIR = $$PWD/build/debug
|
||||
}
|
||||
|
||||
# Additional import path used to resolve QML modules in Qt Creator's code model
|
||||
QML_IMPORT_PATH =
|
||||
|
||||
# Additional import path used to resolve QML modules just for Qt Quick Designer
|
||||
QML_DESIGNER_IMPORT_PATH =
|
||||
|
||||
include($$PWD/../../QuasarAppLib/QuasarLib.pri)
|
||||
include($$PWD/../../SnakeUtils/SnakeUtils.pri)
|
||||
include($$PWD/../../SnakeServer/ClientProtocol/ClientProtocol.pri)
|
||||
|
||||
win32:RC_ICONS += img/icon.ico
|
@ -1,12 +0,0 @@
|
||||
#ifndef CLIENT_GLOBAL_H
|
||||
#define CLIENT_GLOBAL_H
|
||||
|
||||
#include <QtCore/qglobal.h>
|
||||
|
||||
#if defined(CLIENT_LIBRARY)
|
||||
# define CLIENTSHARED_EXPORT Q_DECL_EXPORT
|
||||
#else
|
||||
# define CLIENTSHARED_EXPORT Q_DECL_IMPORT
|
||||
#endif
|
||||
|
||||
#endif // CLIENT_GLOBAL_H
|
@ -1,4 +1,4 @@
|
||||
QT += quick
|
||||
QT += quick concurrent
|
||||
CONFIG += c++17
|
||||
|
||||
# The following define makes your compiler emit warnings if you use
|
||||
@ -13,7 +13,25 @@ DEFINES += QT_DEPRECATED_WARNINGS
|
||||
#DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0x060000 # disables all the APIs deprecated before Qt 6.0.0
|
||||
|
||||
SOURCES += \
|
||||
main.cpp
|
||||
back-end/ProfileViewItems/mainmenumodel.cpp \
|
||||
back-end/ProfileViewItems/playerclientdata.cpp \
|
||||
back-end/ProfileViewItems/userview.cpp \
|
||||
back-end/asyncimageresponse.cpp \
|
||||
back-end/background.cpp \
|
||||
back-end/backgrounditem.cpp \
|
||||
back-end/baseclass.cpp \
|
||||
back-end/box.cpp \
|
||||
back-end/clientapp.cpp \
|
||||
back-end/controller.cpp \
|
||||
back-end/diff.cpp \
|
||||
back-end/guiobject.cpp \
|
||||
back-end/guiobjectfactory.cpp \
|
||||
back-end/head.cpp \
|
||||
back-end/imageprovider.cpp \
|
||||
back-end/itemworld.cpp \
|
||||
back-end/snake.cpp \
|
||||
back-end/world.cpp \
|
||||
back-end/main.cpp
|
||||
|
||||
|
||||
TARGET = Snake
|
||||
@ -32,18 +50,27 @@ QML_IMPORT_PATH =
|
||||
# Additional import path used to resolve QML modules just for Qt Quick Designer
|
||||
QML_DESIGNER_IMPORT_PATH =
|
||||
|
||||
include($$PWD/../Client/Client.pri)
|
||||
include($$PWD/../../QuasarAppLib/QuasarLib.pri)
|
||||
include($$PWD/../../SnakeUtils/SnakeUtils.pri)
|
||||
include($$PWD/../../SnakeServer/ClientProtocol/ClientProtocol.pri)
|
||||
|
||||
DISTFILES += \
|
||||
android/AndroidManifest.xml \
|
||||
android/AndroidManifest.xml \
|
||||
android/AndroidManifest.xml \
|
||||
android/build.gradle \
|
||||
android/build.gradle \
|
||||
android/gradle/wrapper/gradle-wrapper.jar \
|
||||
android/gradle/wrapper/gradle-wrapper.jar \
|
||||
android/gradle/wrapper/gradle-wrapper.jar \
|
||||
android/gradle/wrapper/gradle-wrapper.properties \
|
||||
android/gradle/wrapper/gradle-wrapper.properties \
|
||||
android/gradlew \
|
||||
android/gradlew \
|
||||
android/gradlew \
|
||||
android/gradlew.bat \
|
||||
android/gradlew.bat \
|
||||
android/res/values/libs.xml \
|
||||
android/res/values/libs.xml \
|
||||
android/res/values/libs.xml \
|
||||
android/build.gradle \
|
||||
@ -52,3 +79,26 @@ DISTFILES += \
|
||||
front-end/PagePopUp.qml
|
||||
|
||||
ANDROID_PACKAGE_SOURCE_DIR = $$PWD/android
|
||||
|
||||
RESOURCES += \
|
||||
qml.qrc
|
||||
|
||||
HEADERS += \
|
||||
back-end/ProfileViewItems/mainmenumodel.h \
|
||||
back-end/ProfileViewItems/playerclientdata.h \
|
||||
back-end/ProfileViewItems/userview.h \
|
||||
back-end/asyncimageresponse.h \
|
||||
back-end/background.h \
|
||||
back-end/backgrounditem.h \
|
||||
back-end/baseclass.h \
|
||||
back-end/box.h \
|
||||
back-end/clientapp.h \
|
||||
back-end/controller.h \
|
||||
back-end/diff.h \
|
||||
back-end/guiobject.h \
|
||||
back-end/guiobjectfactory.h \
|
||||
back-end/head.h \
|
||||
back-end/imageprovider.h \
|
||||
back-end/itemworld.h \
|
||||
back-end/snake.h \
|
||||
back-end/world.h
|
||||
|
@ -1,5 +1,5 @@
|
||||
<?xml version="1.0"?>
|
||||
<manifest package="org.qtproject.example" xmlns:android="http://schemas.android.com/apk/res/android" android:versionName="1.0" android:versionCode="1" android:installLocation="auto">
|
||||
<manifest package="quasar.app.snake" xmlns:android="http://schemas.android.com/apk/res/android" android:versionName="1.0" android:versionCode="1" android:installLocation="auto">
|
||||
<application android:hardwareAccelerated="true" android:name="org.qtproject.qt5.android.bindings.QtApplication" android:label="-- %%INSERT_APP_NAME%% --" android:icon="@drawable/icon">
|
||||
<activity android:configChanges="orientation|uiMode|screenLayout|screenSize|smallestScreenSize|layoutDirection|locale|fontScale|keyboard|keyboardHidden|navigation" android:name="org.qtproject.qt5.android.bindings.QtActivity" android:label="-- %%INSERT_APP_NAME%% --" android:screenOrientation="landscape" android:launchMode="singleTop" android:theme="@android:style/Theme.NoTitleBar.Fullscreen">
|
||||
<intent-filter>
|
||||
|
@ -3,11 +3,10 @@
|
||||
|
||||
#include "controller.h"
|
||||
#include "diff.h"
|
||||
#include "client_global.h"
|
||||
|
||||
class QQmlApplicationEngine;
|
||||
|
||||
class CLIENTSHARED_EXPORT ClientApp
|
||||
class ClientApp
|
||||
{
|
||||
private:
|
||||
Controller contr;
|
@ -7,11 +7,10 @@
|
||||
#include "diff.h"
|
||||
#include "snake.h"
|
||||
#include "world.h"
|
||||
#include "client_global.h"
|
||||
|
||||
class MainMenuModel;
|
||||
|
||||
class CLIENTSHARED_EXPORT Controller : public QObject
|
||||
class Controller : public QObject
|
||||
{
|
||||
Q_OBJECT
|
||||
|
@ -2,9 +2,8 @@
|
||||
#define DIFF_H
|
||||
|
||||
#include <QObject>
|
||||
#include "client_global.h"
|
||||
|
||||
class CLIENTSHARED_EXPORT Diff
|
||||
class Diff
|
||||
{
|
||||
Q_GADGET
|
||||
private:
|
@ -5,9 +5,8 @@
|
||||
#include "QObject"
|
||||
|
||||
#include <QRectF>
|
||||
#include "client_global.h"
|
||||
|
||||
class CLIENTSHARED_EXPORT GuiObject:public QObject, public BaseClass
|
||||
class GuiObject:public QObject, public BaseClass
|
||||
{
|
||||
Q_OBJECT
|
||||
// @todo: add color
|
@ -1,6 +1,6 @@
|
||||
import QtQuick 2.9
|
||||
import QtQuick.Window 2.2
|
||||
import QtQuick.Controls 2.2
|
||||
import QtQuick 2.12
|
||||
import QtQuick.Window 2.12
|
||||
import QtQuick.Controls 2.12
|
||||
|
||||
ApplicationWindow {
|
||||
id: mainWindow;
|
Before Width: | Height: | Size: 28 KiB After Width: | Height: | Size: 28 KiB |
Before Width: | Height: | Size: 186 KiB After Width: | Height: | Size: 186 KiB |
Before Width: | Height: | Size: 79 KiB After Width: | Height: | Size: 79 KiB |
Before Width: | Height: | Size: 2.5 KiB After Width: | Height: | Size: 2.5 KiB |
Before Width: | Height: | Size: 18 KiB After Width: | Height: | Size: 18 KiB |
Before Width: | Height: | Size: 38 KiB After Width: | Height: | Size: 38 KiB |
Before Width: | Height: | Size: 32 KiB After Width: | Height: | Size: 32 KiB |
Before Width: | Height: | Size: 2.4 KiB After Width: | Height: | Size: 2.4 KiB |
Before Width: | Height: | Size: 1.3 KiB After Width: | Height: | Size: 1.3 KiB |
@ -1,79 +0,0 @@
|
||||
QT += quick
|
||||
CONFIG += c++17
|
||||
|
||||
# The following define makes your compiler emit warnings if you use
|
||||
# any feature of Qt which as been marked deprecated (the exact warnings
|
||||
# depend on your compiler). Please consult the documentation of the
|
||||
# deprecated API in order to know how to port your code away from it.
|
||||
DEFINES += QT_DEPRECATED_WARNINGS
|
||||
|
||||
# You can also make your code fail to compile if you use deprecated APIs.
|
||||
# In order to do so, uncomment the following line.
|
||||
# You can also select to disable deprecated APIs only up to a certain version of Qt.
|
||||
#DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0x060000 # disables all the APIs deprecated before Qt 6.0.0
|
||||
|
||||
SOURCES += \
|
||||
back-end/main.cpp \
|
||||
back-end/baseclass.cpp \
|
||||
back-end/head.cpp \
|
||||
back-end/snake.cpp \
|
||||
back-end/controller.cpp \
|
||||
back-end/world.cpp \
|
||||
back-end/itemworld.cpp \
|
||||
back-end/box.cpp \
|
||||
back-end/guiobject.cpp \
|
||||
back-end/guiobjectfactory.cpp \
|
||||
back-end/diff.cpp \
|
||||
back-end/background.cpp \
|
||||
back-end/backgrounditem.cpp
|
||||
|
||||
RESOURCES += qml.qrc
|
||||
|
||||
|
||||
CONFIG(release, debug|release): {
|
||||
DESTDIR = $$PWD/build/release
|
||||
|
||||
} else {
|
||||
DESTDIR = $$PWD/build/debug
|
||||
}
|
||||
|
||||
# Additional import path used to resolve QML modules in Qt Creator's code model
|
||||
QML_IMPORT_PATH =
|
||||
|
||||
# Additional import path used to resolve QML modules just for Qt Quick Designer
|
||||
QML_DESIGNER_IMPORT_PATH =
|
||||
|
||||
include($$PWD/../QuasarAppLib/QuasarLib.pri)
|
||||
include($$PWD/../SnakeUtils/SnakeUtils.pri)
|
||||
|
||||
install_data.files += $$QUASARAPP_LIB_OUTPUT_DIR/$$libfiletype
|
||||
install_data.files += $$DESTDIR/$$runfiletype
|
||||
|
||||
|
||||
HEADERS += \
|
||||
back-end/baseclass.h \
|
||||
back-end/head.h \
|
||||
back-end/snake.h \
|
||||
back-end/controller.h \
|
||||
back-end/world.h \
|
||||
back-end/itemworld.h \
|
||||
back-end/box.h \
|
||||
back-end/guiobject.h \
|
||||
back-end/guiobjectfactory.h \
|
||||
back-end/diff.h \
|
||||
back-end/background.h \
|
||||
back-end/backgrounditem.h
|
||||
|
||||
DISTFILES += \
|
||||
android/AndroidManifest.xml \
|
||||
android/gradle/wrapper/gradle-wrapper.jar \
|
||||
android/gradlew \
|
||||
android/res/values/libs.xml \
|
||||
android/build.gradle \
|
||||
android/gradle/wrapper/gradle-wrapper.properties \
|
||||
android/gradlew.bat \
|
||||
front-end/PagePopUp.qml
|
||||
|
||||
ANDROID_PACKAGE_SOURCE_DIR = $$PWD/android
|
||||
|
||||
win32:RC_ICONS += img/icon.ico
|
@ -2,5 +2,4 @@ TEMPLATE = subdirs
|
||||
CONFIG += ordered
|
||||
|
||||
SUBDIRS += \
|
||||
Client \
|
||||
SnakeApp
|
||||
|
@ -14,6 +14,7 @@
|
||||
QT -= gui
|
||||
QT += network
|
||||
|
||||
CONFIG += c++14
|
||||
TARGET = ClientProtocol
|
||||
TEMPLATE = lib
|
||||
|
||||
|