added clientLib
3
.gitignore
vendored
@ -14,7 +14,8 @@
|
|||||||
# Qt-es
|
# Qt-es
|
||||||
/Build*
|
/Build*
|
||||||
/build*
|
/build*
|
||||||
Snake/build/
|
SnakeClient/Client/build/
|
||||||
|
SnakeClient/SnakeApp/build/
|
||||||
SnakeServer/Server/build/
|
SnakeServer/Server/build/
|
||||||
SnakeServer/serverProtocolTests/build/
|
SnakeServer/serverProtocolTests/build/
|
||||||
SnakeServer/Terminal/build
|
SnakeServer/Terminal/build
|
||||||
|
28
SnakeClient/Client/Client.pri
Normal file
@ -0,0 +1,28 @@
|
|||||||
|
#
|
||||||
|
# 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)
|
||||||
|
|
||||||
|
INCLUDEPATH += "$$PWD"
|
||||||
|
INCLUDEPATH += "$$PWD/front-end"
|
||||||
|
INCLUDEPATH += "$$PWD/back-end"
|
||||||
|
|
||||||
|
|
||||||
|
|
91
SnakeClient/Client/Client.pro
Normal file
@ -0,0 +1,91 @@
|
|||||||
|
#-------------------------------------------------
|
||||||
|
#
|
||||||
|
# Project created by QtCreator 2019-07-28T12:59:54
|
||||||
|
#
|
||||||
|
#-------------------------------------------------
|
||||||
|
|
||||||
|
|
||||||
|
TARGET = Client
|
||||||
|
TEMPLATE = lib
|
||||||
|
|
||||||
|
DEFINES += CLIENT_LIBRARY
|
||||||
|
|
||||||
|
QT += quick
|
||||||
|
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/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 \
|
||||||
|
client_global.h
|
||||||
|
|
||||||
|
|
||||||
|
SOURCES += \
|
||||||
|
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
|
||||||
|
|
||||||
|
|
||||||
|
# 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)
|
||||||
|
|
||||||
|
win32:RC_ICONS += img/icon.ico
|
@ -7,8 +7,9 @@
|
|||||||
#include "diff.h"
|
#include "diff.h"
|
||||||
#include "snake.h"
|
#include "snake.h"
|
||||||
#include "world.h"
|
#include "world.h"
|
||||||
|
#include "client_global.h"
|
||||||
|
|
||||||
class Controller : public QObject
|
class CLIENTSHARED_EXPORT Controller : public QObject
|
||||||
{
|
{
|
||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
|
|
@ -2,8 +2,9 @@
|
|||||||
#define DIFF_H
|
#define DIFF_H
|
||||||
|
|
||||||
#include <QObject>
|
#include <QObject>
|
||||||
|
#include "client_global.h"
|
||||||
|
|
||||||
class Diff
|
class CLIENTSHARED_EXPORT Diff
|
||||||
{
|
{
|
||||||
Q_GADGET
|
Q_GADGET
|
||||||
private:
|
private:
|
12
SnakeClient/Client/client_global.h
Normal file
@ -0,0 +1,12 @@
|
|||||||
|
#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
|
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: 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 |
@ -0,0 +1,44 @@
|
|||||||
|
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 += \
|
||||||
|
main.cpp
|
||||||
|
|
||||||
|
|
||||||
|
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/../Client/Client.pri)
|
||||||
|
|
||||||
|
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
|
Before Width: | Height: | Size: 2.4 KiB After Width: | Height: | Size: 2.4 KiB |
Before Width: | Height: | Size: 2.4 KiB After Width: | Height: | Size: 2.4 KiB |
Before Width: | Height: | Size: 2.4 KiB After Width: | Height: | Size: 2.4 KiB |
@ -1,4 +1,6 @@
|
|||||||
TEMPLATE = subdirs
|
TEMPLATE = subdirs
|
||||||
|
CONFIG += ordered
|
||||||
|
|
||||||
SUBDIRS += \
|
SUBDIRS += \
|
||||||
|
Client \
|
||||||
SnakeApp
|
SnakeApp
|
||||||
|
@ -4,9 +4,8 @@ CONFIG += ordered
|
|||||||
|
|
||||||
SUBDIRS += \
|
SUBDIRS += \
|
||||||
QuasarAppLib \
|
QuasarAppLib \
|
||||||
SnakeClient \
|
SnakeClient \
|
||||||
SnakeUtils \
|
SnakeUtils \
|
||||||
Snake \
|
|
||||||
SnakeServer \
|
SnakeServer \
|
||||||
|
|
||||||
QuasarAppLib.file = QuasarAppLib/QuasarApp.pro
|
QuasarAppLib.file = QuasarAppLib/QuasarApp.pro
|
||||||
|