added clientLib
3
.gitignore
vendored
@ -14,7 +14,8 @@
|
||||
# Qt-es
|
||||
/Build*
|
||||
/build*
|
||||
Snake/build/
|
||||
SnakeClient/Client/build/
|
||||
SnakeClient/SnakeApp/build/
|
||||
SnakeServer/Server/build/
|
||||
SnakeServer/serverProtocolTests/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 "snake.h"
|
||||
#include "world.h"
|
||||
#include "client_global.h"
|
||||
|
||||
class Controller : public QObject
|
||||
class CLIENTSHARED_EXPORT Controller : public QObject
|
||||
{
|
||||
Q_OBJECT
|
||||
|
@ -2,8 +2,9 @@
|
||||
#define DIFF_H
|
||||
|
||||
#include <QObject>
|
||||
#include "client_global.h"
|
||||
|
||||
class Diff
|
||||
class CLIENTSHARED_EXPORT Diff
|
||||
{
|
||||
Q_GADGET
|
||||
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 ![]() (image error) Size: 28 KiB After ![]() (image error) Size: 28 KiB ![]() ![]() |
Before ![]() (image error) Size: 186 KiB After ![]() (image error) Size: 186 KiB ![]() ![]() |
Before ![]() (image error) Size: 79 KiB After ![]() (image error) Size: 79 KiB ![]() ![]() |
Before (image error) Size: 2.5 KiB After (image error) Size: 2.5 KiB |
Before (image error) Size: 32 KiB After (image error) Size: 32 KiB |
Before ![]() (image error) Size: 2.4 KiB After ![]() (image error) Size: 2.4 KiB ![]() ![]() |
Before (image error) Size: 1.3 KiB After (image error) 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
|
0
Snake/android/res/drawable-hdpi/icon.png → SnakeClient/SnakeApp/android/res/drawable-hdpi/icon.png
Before ![]() (image error) Size: 2.4 KiB After ![]() (image error) Size: 2.4 KiB ![]() ![]() |
0
Snake/android/res/drawable-ldpi/icon.png → SnakeClient/SnakeApp/android/res/drawable-ldpi/icon.png
Before ![]() (image error) Size: 2.4 KiB After ![]() (image error) Size: 2.4 KiB ![]() ![]() |
0
Snake/android/res/drawable-mdpi/icon.png → SnakeClient/SnakeApp/android/res/drawable-mdpi/icon.png
Before ![]() (image error) Size: 2.4 KiB After ![]() (image error) Size: 2.4 KiB ![]() ![]() |
@ -1,4 +1,6 @@
|
||||
TEMPLATE = subdirs
|
||||
CONFIG += ordered
|
||||
|
||||
SUBDIRS += \
|
||||
Client \
|
||||
SnakeApp
|
||||
|
@ -4,9 +4,8 @@ CONFIG += ordered
|
||||
|
||||
SUBDIRS += \
|
||||
QuasarAppLib \
|
||||
SnakeClient \
|
||||
SnakeClient \
|
||||
SnakeUtils \
|
||||
Snake \
|
||||
SnakeServer \
|
||||
|
||||
QuasarAppLib.file = QuasarAppLib/QuasarApp.pro
|
||||
|