diff --git a/prodejna.pro b/prodejna.pro index b8fd0cc..34039c1 100644 --- a/prodejna.pro +++ b/prodejna.pro @@ -8,5 +8,6 @@ SUBDIRS += \ accommodation \ services \ commodity \ - addressbook + addressbook \ + shop diff --git a/shop/data/voucher.cpp b/shop/data/voucher.cpp new file mode 100644 index 0000000..9742720 --- /dev/null +++ b/shop/data/voucher.cpp @@ -0,0 +1,6 @@ +#include "voucher.h" + +Voucher::Voucher(QObject *parent) : QObject(parent) +{ + +} diff --git a/shop/data/voucher.h b/shop/data/voucher.h new file mode 100644 index 0000000..83feb23 --- /dev/null +++ b/shop/data/voucher.h @@ -0,0 +1,17 @@ +#ifndef VOUCHER_H +#define VOUCHER_H + +#include + +class Voucher : public QObject +{ + Q_OBJECT +public: + explicit Voucher(QObject *parent = 0); + +signals: + +public slots: +}; + +#endif // VOUCHER_H \ No newline at end of file diff --git a/shop/shop.cpp b/shop/shop.cpp new file mode 100644 index 0000000..e1d782c --- /dev/null +++ b/shop/shop.cpp @@ -0,0 +1,17 @@ +#include "shop.h" +#include + + +Shop::Shop() +{ +} + +void Shop::initServiceUi() +{ + +} + +QIcon Shop::pluginIcon() +{ + return QIcon(); +} diff --git a/shop/shop.h b/shop/shop.h new file mode 100644 index 0000000..bfd1efc --- /dev/null +++ b/shop/shop.h @@ -0,0 +1,27 @@ +#ifndef SHOP_H +#define SHOP_H + +#include +#include +#include "shop_global.h" + +class SHOPSHARED_EXPORT Shop : public QObject, IMetaDataPlugin +{ + Q_OBJECT + + Q_PLUGIN_METADATA(IID PluginInterface_iid FILE "shop.json") + Q_INTERFACES(IPlugin) + +public: + Shop(); + +protected: + void initServiceUi() Q_DECL_OVERRIDE; + + + // IPlugin interface +public: + virtual QIcon pluginIcon(); +}; + +#endif // SHOP_H diff --git a/shop/shop.json b/shop/shop.json new file mode 100644 index 0000000..6411e0d --- /dev/null +++ b/shop/shop.json @@ -0,0 +1,17 @@ +{ + "id" : "SHOP", + "name" : { + "default" : "Shop", + "CZ" : "Prodejna" + }, + "descriptoin" : { + "default" : "", + "CZ" : "" + }, + "schemaVersion" : 1, + "sql" : [ + + + ], + "dependencies" : [] +} diff --git a/shop/shop.pro b/shop/shop.pro new file mode 100644 index 0000000..976c591 --- /dev/null +++ b/shop/shop.pro @@ -0,0 +1,58 @@ +#------------------------------------------------- +# +# Project created by QtCreator 2016-04-06T20:45:20 +# +#------------------------------------------------- + +QT += widgets sql + +TARGET = shop +TEMPLATE = lib + +DEFINES += SHOP_LIBRARY\ + _GLIBCXX_USE_CXX11_ABI=1 + +SOURCES += shop.cpp \ + data/voucher.cpp + +HEADERS += shop.h\ + shop_global.h \ + data/voucher.h + +unix { + target.path = /usr/lib + INSTALLS += target + QMAKE_CXXFLAGS += -std=c++11 + QMAKE_CXXFLAGS += -Wno-unknown-pragmas +} + +win32 { + QMAKE_CXXFLAGS += -wd4995 -wd4068 +} + +win32:CONFIG(release, debug|release): LIBS += -L$$OUT_PWD/../core/release/ -lcore +else:win32:CONFIG(debug, debug|release): LIBS += -L$$OUT_PWD/../core/debug/ -lcore +else:unix: LIBS += -L$$OUT_PWD/../core/ -lcore + +INCLUDEPATH += $$PWD/../core +DEPENDPATH += $$PWD/../core + +DESTDIR = ../plugins + +OTHER_FILES += shop.json + +#ODB_FILES = shop/data/....h +H_DIR = $$PWD/data/*.h +include(../odb.pri) + +win32:CONFIG(release, debug|release): LIBS += -L$$OUT_PWD/../qdecimal/lib/ -lqdecimal -ldecnumber +else:win32:CONFIG(debug, debug|release): LIBS += -L$$OUT_PWD/../qdecimal/lib/ -lqdecimal -ldecnumber +else:unix: LIBS += -L$$OUT_PWD/../qdecimal/lib/ -lqdecimal -ldecnumber + +INCLUDEPATH += $$PWD/../qdecimal/src +INCLUDEPATH += $$PWD/../qdecimal/decnumber +DEPENDPATH += $$PWD/../qdecimal/src + +RESOURCES += \ + shoprc.qrc + diff --git a/shop/shop_global.h b/shop/shop_global.h new file mode 100644 index 0000000..b29ff0d --- /dev/null +++ b/shop/shop_global.h @@ -0,0 +1,12 @@ +#ifndef SHOP_GLOBAL_H +#define SHOP_GLOBAL_H + +#include + +#if defined(SHOP_LIBRARY) +# define SHOPSHARED_EXPORT Q_DECL_EXPORT +#else +# define SHOPSHARED_EXPORT Q_DECL_IMPORT +#endif + +#endif // SHOP_GLOBAL_H diff --git a/shop/shoprc.qrc b/shop/shoprc.qrc new file mode 100644 index 0000000..7646d2b --- /dev/null +++ b/shop/shoprc.qrc @@ -0,0 +1 @@ +