Compare commits
	
		
			4 Commits 
		
	
	
		
			30e6180c82
			...
			529f7f6e7d
		
	
	| Author | SHA1 | Date | 
|---|---|---|
| 
							
							
								
								 | 
						529f7f6e7d | 3 years ago | 
| 
							
							
								
								 | 
						ecf0815d9f | 3 years ago | 
| 
							
							
								
								 | 
						53b6b66cc8 | 3 years ago | 
| 
							
							
								
								 | 
						d699ce79f7 | 3 years ago | 
@ -0,0 +1,2 @@
 | 
			
		||||
cmake*
 | 
			
		||||
build
 | 
			
		||||
@ -0,0 +1,9 @@
 | 
			
		||||
[submodule "3rdparty/qdecimal"]
 | 
			
		||||
	path = 3rdparty/qdecimal
 | 
			
		||||
	url = https://github.com/semihc/qdecimal.git
 | 
			
		||||
[submodule "3rdparty/QxOrm"]
 | 
			
		||||
	path = 3rdparty/QxOrm
 | 
			
		||||
	url = https://github.com/PepaRokos/QxOrm.git
 | 
			
		||||
[submodule "3rdparty/LimeReport"]
 | 
			
		||||
	path = 3rdparty/LimeReport
 | 
			
		||||
	url = https://github.com/PepaRokos/LimeReport.git
 | 
			
		||||
@ -0,0 +1,3 @@
 | 
			
		||||
add_subdirectory(qdecimal)
 | 
			
		||||
add_subdirectory(QxOrm)
 | 
			
		||||
add_subdirectory(LimeReport)
 | 
			
		||||
@ -0,0 +1 @@
 | 
			
		||||
Subproject commit b1bfd131ad3a9a107c176b4661a47eee54dfd481
 | 
			
		||||
@ -0,0 +1 @@
 | 
			
		||||
Subproject commit 975c3b5ad3e02e3a257f28ff81071da0a17a1e64
 | 
			
		||||
@ -0,0 +1 @@
 | 
			
		||||
Subproject commit 31d650e0e61acdef1f5b2c23b6daf26ea409c22c
 | 
			
		||||
@ -0,0 +1,17 @@
 | 
			
		||||
cmake_minimum_required(VERSION 3.24)
 | 
			
		||||
project(prodejna-root)
 | 
			
		||||
 | 
			
		||||
add_subdirectory(3rdparty/qdecimal)
 | 
			
		||||
add_subdirectory(3rdparty/QxOrm)
 | 
			
		||||
add_subdirectory(3rdparty/LimeReport)
 | 
			
		||||
 | 
			
		||||
add_subdirectory(core)
 | 
			
		||||
add_subdirectory(application)
 | 
			
		||||
add_subdirectory(countryregister)
 | 
			
		||||
add_subdirectory(addressbook)
 | 
			
		||||
add_subdirectory(postregister)
 | 
			
		||||
add_subdirectory(services)
 | 
			
		||||
add_subdirectory(shop)
 | 
			
		||||
add_subdirectory(commodity)
 | 
			
		||||
add_subdirectory(camp)
 | 
			
		||||
 | 
			
		||||
@ -1,14 +0,0 @@
 | 
			
		||||
#include "accform.h"
 | 
			
		||||
#include "ui_accform.h"
 | 
			
		||||
 | 
			
		||||
AccForm::AccForm(QWidget *parent) :
 | 
			
		||||
    QWidget(parent),
 | 
			
		||||
    ui(new Ui::AccForm)
 | 
			
		||||
{
 | 
			
		||||
    ui->setupUi(this);
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
AccForm::~AccForm()
 | 
			
		||||
{
 | 
			
		||||
    delete ui;
 | 
			
		||||
}
 | 
			
		||||
@ -1,14 +0,0 @@
 | 
			
		||||
#include "accgrid.h"
 | 
			
		||||
 | 
			
		||||
#include "tablemodel.h"
 | 
			
		||||
 | 
			
		||||
AccGrid::AccGrid(QWidget *parent) :
 | 
			
		||||
    GridForm<Person>(parent)
 | 
			
		||||
{
 | 
			
		||||
    setTableModel(new TableModel());
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
AccGrid::~AccGrid()
 | 
			
		||||
{
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
@ -1,18 +0,0 @@
 | 
			
		||||
#ifndef ACCGRID_H
 | 
			
		||||
#define ACCGRID_H
 | 
			
		||||
 | 
			
		||||
#include <core.h>
 | 
			
		||||
#include "data/person.h"
 | 
			
		||||
 | 
			
		||||
#include "accommodation-odb.hxx"
 | 
			
		||||
 | 
			
		||||
class AccGrid : public GridForm<Person>
 | 
			
		||||
{
 | 
			
		||||
    Q_OBJECT
 | 
			
		||||
 | 
			
		||||
public:
 | 
			
		||||
    explicit AccGrid(QWidget *parent = NULL);
 | 
			
		||||
    ~AccGrid();
 | 
			
		||||
};
 | 
			
		||||
 | 
			
		||||
#endif // ACCGRID_H
 | 
			
		||||
@ -1,41 +0,0 @@
 | 
			
		||||
#include <context.h>
 | 
			
		||||
 | 
			
		||||
#include "accommodation.h"
 | 
			
		||||
#include <QDebug>
 | 
			
		||||
 | 
			
		||||
#include "data/person.h"
 | 
			
		||||
#include "accommodationservice.h"
 | 
			
		||||
 | 
			
		||||
#include "accgrid.h"
 | 
			
		||||
#include "acform.h"
 | 
			
		||||
 | 
			
		||||
Accommodation::Accommodation()
 | 
			
		||||
{
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
void Accommodation::initServiceUi()
 | 
			
		||||
{
 | 
			
		||||
    AccGrid *grid = new AccGrid();
 | 
			
		||||
    AcForm *form = new AcForm();
 | 
			
		||||
 | 
			
		||||
    grid->setForm(form);
 | 
			
		||||
    AccommodationService *service = new AccommodationService();
 | 
			
		||||
    m_service = service;
 | 
			
		||||
    m_ui = grid;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
QIcon Accommodation::pluginIcon()
 | 
			
		||||
{
 | 
			
		||||
    return QIcon(":/icons/accPlugin.svg");
 | 
			
		||||
}
 | 
			
		||||
/*
 | 
			
		||||
QWidget *Accommodation::ui()
 | 
			
		||||
{
 | 
			
		||||
    QWidget *ui = IPlugin::ui();
 | 
			
		||||
    AccGrid *form = qobject_cast<AccGrid*>(ui);
 | 
			
		||||
 | 
			
		||||
    form->fillData();
 | 
			
		||||
 | 
			
		||||
    return ui;
 | 
			
		||||
}
 | 
			
		||||
*/
 | 
			
		||||
@ -1,37 +0,0 @@
 | 
			
		||||
#ifndef ACCOMMODATION_H
 | 
			
		||||
#define ACCOMMODATION_H
 | 
			
		||||
 | 
			
		||||
#include "accommodation_global.h"
 | 
			
		||||
#include <core.h>
 | 
			
		||||
#include <QObject>
 | 
			
		||||
#include <QtPlugin>
 | 
			
		||||
 | 
			
		||||
class ACCOMMODATIONSHARED_EXPORT Accommodation : public QObject, IMetaDataPlugin
 | 
			
		||||
{
 | 
			
		||||
    Q_OBJECT
 | 
			
		||||
 | 
			
		||||
    Q_PLUGIN_METADATA(IID PluginInterface_iid FILE "accommodation.json")
 | 
			
		||||
    Q_INTERFACES(IPlugin)
 | 
			
		||||
 | 
			
		||||
public:
 | 
			
		||||
    Accommodation();
 | 
			
		||||
 | 
			
		||||
   // QString pluginName() Q_DECL_OVERRIDE;
 | 
			
		||||
   // void init(const QJsonObject &metaData) Q_DECL_OVERRIDE;
 | 
			
		||||
   // QString pluginId() Q_DECL_OVERRIDE;
 | 
			
		||||
 | 
			
		||||
protected:
 | 
			
		||||
    void initServiceUi() Q_DECL_OVERRIDE;
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
    // IPlugin interface
 | 
			
		||||
public:
 | 
			
		||||
    //QWidget *ui();
 | 
			
		||||
 | 
			
		||||
    // IPlugin interface
 | 
			
		||||
public:
 | 
			
		||||
    virtual QIcon pluginIcon();
 | 
			
		||||
 | 
			
		||||
};
 | 
			
		||||
 | 
			
		||||
#endif // ACCOMMODATION_H
 | 
			
		||||
@ -1,20 +0,0 @@
 | 
			
		||||
{
 | 
			
		||||
    "id" : "ACCOMMODATION",
 | 
			
		||||
    "name" : {
 | 
			
		||||
        "default" : "Accommodation",
 | 
			
		||||
        "CZ" : "Kemp"
 | 
			
		||||
    },
 | 
			
		||||
    "descriptoin" : {
 | 
			
		||||
        "default" : "",
 | 
			
		||||
        "CZ" : ""
 | 
			
		||||
    },
 | 
			
		||||
    "schemaVersion" : 1,
 | 
			
		||||
    "sql" : [
 | 
			
		||||
  "CREATE TABLE \"Person\" (
 | 
			
		||||
  \"id\" INTEGER NOT NULL PRIMARY KEY AUTOINCREMENT,
 | 
			
		||||
  \"firstName\" TEXT NULL,
 | 
			
		||||
  \"lastName\" TEXT NULL);"
 | 
			
		||||
 | 
			
		||||
    ],
 | 
			
		||||
    "dependencies" : []
 | 
			
		||||
}
 | 
			
		||||
@ -1,46 +0,0 @@
 | 
			
		||||
#-------------------------------------------------
 | 
			
		||||
#
 | 
			
		||||
# Project created by QtCreator 2015-10-28T15:27:14
 | 
			
		||||
#
 | 
			
		||||
#-------------------------------------------------
 | 
			
		||||
 | 
			
		||||
QT       += widgets sql
 | 
			
		||||
 | 
			
		||||
TARGET = accommodation
 | 
			
		||||
TEMPLATE = lib
 | 
			
		||||
 | 
			
		||||
DEFINES += ACCOMMODATION_LIBRARY
 | 
			
		||||
 | 
			
		||||
SOURCES += accommodation.cpp \
 | 
			
		||||
    data/person.cpp \
 | 
			
		||||
    accommodationservice.cpp \
 | 
			
		||||
    tablemodel.cpp \
 | 
			
		||||
    acform.cpp \
 | 
			
		||||
    accgrid.cpp \
 | 
			
		||||
    data/address.cpp
 | 
			
		||||
 | 
			
		||||
HEADERS += accommodation.h\
 | 
			
		||||
        accommodation_global.h \
 | 
			
		||||
    data/person.h \
 | 
			
		||||
    accommodationservice.h \
 | 
			
		||||
    tablemodel.h \
 | 
			
		||||
    acform.h \
 | 
			
		||||
    accgrid.h \
 | 
			
		||||
    data/address.h \
 | 
			
		||||
    data/accommodation-data.h
 | 
			
		||||
 | 
			
		||||
include(../config_plugin.pri)
 | 
			
		||||
 | 
			
		||||
OTHER_FILES += \
 | 
			
		||||
    accommodation.json
 | 
			
		||||
 | 
			
		||||
FORMS += \
 | 
			
		||||
    acform.ui
 | 
			
		||||
 | 
			
		||||
ODB_FILES = accommodation/data/accommodation-data.h
 | 
			
		||||
H_DIR = $$PWD/data/*.h
 | 
			
		||||
include(../odb.pri)
 | 
			
		||||
 | 
			
		||||
RESOURCES += \
 | 
			
		||||
    accrc.qrc
 | 
			
		||||
 | 
			
		||||
@ -1,12 +0,0 @@
 | 
			
		||||
#ifndef ACCOMMODATION_GLOBAL_H
 | 
			
		||||
#define ACCOMMODATION_GLOBAL_H
 | 
			
		||||
 | 
			
		||||
#include <QtCore/qglobal.h>
 | 
			
		||||
 | 
			
		||||
#if defined(ACCOMMODATION_LIBRARY)
 | 
			
		||||
#  define ACCOMMODATIONSHARED_EXPORT Q_DECL_EXPORT
 | 
			
		||||
#else
 | 
			
		||||
#  define ACCOMMODATIONSHARED_EXPORT Q_DECL_IMPORT
 | 
			
		||||
#endif
 | 
			
		||||
 | 
			
		||||
#endif // ACCOMMODATION_GLOBAL_H
 | 
			
		||||
@ -1,28 +0,0 @@
 | 
			
		||||
#include "accommodationservice.h"
 | 
			
		||||
 | 
			
		||||
#include <odb/database.hxx>
 | 
			
		||||
#include <odb/transaction.hxx>
 | 
			
		||||
 | 
			
		||||
#include "accommodation-odb.hxx"
 | 
			
		||||
 | 
			
		||||
AccommodationService::AccommodationService()
 | 
			
		||||
    :Service<Person>("ACCOMMODATION")
 | 
			
		||||
{
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
AccommodationService::~AccommodationService()
 | 
			
		||||
{
 | 
			
		||||
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
void AccommodationService::pokus(QSharedPointer<Person> entity)
 | 
			
		||||
{
 | 
			
		||||
    odb::database *db = Context::instance().db();
 | 
			
		||||
    //odb::transaction tr(db->begin());
 | 
			
		||||
 | 
			
		||||
    Transaction tr;
 | 
			
		||||
    this->all();
 | 
			
		||||
    db->persist(entity);
 | 
			
		||||
    tr.commit();
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
@ -1,19 +0,0 @@
 | 
			
		||||
#ifndef ACCOMMODATIONSERVICE_H
 | 
			
		||||
#define ACCOMMODATIONSERVICE_H
 | 
			
		||||
 | 
			
		||||
#include "data/person.h"
 | 
			
		||||
#include <core.h>
 | 
			
		||||
 | 
			
		||||
#include "accommodation_global.h"
 | 
			
		||||
#include "accommodation-odb.hxx"
 | 
			
		||||
 | 
			
		||||
class ACCOMMODATIONSHARED_EXPORT AccommodationService : public Service<Person>
 | 
			
		||||
{
 | 
			
		||||
public:
 | 
			
		||||
    AccommodationService();
 | 
			
		||||
    ~AccommodationService();
 | 
			
		||||
 | 
			
		||||
    void pokus(QSharedPointer<Person> entity);
 | 
			
		||||
};
 | 
			
		||||
 | 
			
		||||
#endif // ACCOMMODATIONSERVICE_H
 | 
			
		||||
@ -1,5 +0,0 @@
 | 
			
		||||
<RCC>
 | 
			
		||||
    <qresource prefix="/">
 | 
			
		||||
        <file>icons/accPlugin.svg</file>
 | 
			
		||||
    </qresource>
 | 
			
		||||
</RCC>
 | 
			
		||||
@ -1,34 +0,0 @@
 | 
			
		||||
#include "acform.h"
 | 
			
		||||
#include "ui_acform.h"
 | 
			
		||||
#include <QList>
 | 
			
		||||
 | 
			
		||||
#include <settingsservice.h>
 | 
			
		||||
#include <settings/globalsettings.h>
 | 
			
		||||
 | 
			
		||||
#include "accommodation-odb.hxx"
 | 
			
		||||
 | 
			
		||||
AcForm::AcForm(QWidget *parent) :
 | 
			
		||||
    AutoForm<Person>(parent),
 | 
			
		||||
    ui(new Ui::AcForm)
 | 
			
		||||
{
 | 
			
		||||
    ui->setupUi(this);
 | 
			
		||||
 | 
			
		||||
    registerBinding(ui->firstName);
 | 
			
		||||
    registerBinding(ui->lastName);
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
AcForm::~AcForm()
 | 
			
		||||
{
 | 
			
		||||
    delete ui;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
void AcForm::registerCombos()
 | 
			
		||||
{
 | 
			
		||||
    QList<ComboData> cbData;
 | 
			
		||||
    Service<Address> srv;
 | 
			
		||||
    foreach (QSharedPointer<Address> adr, srv.all()) {
 | 
			
		||||
        cbData.append(ComboData(adr));
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    registerBinding(ui->address, cbData);
 | 
			
		||||
}
 | 
			
		||||
@ -1,30 +0,0 @@
 | 
			
		||||
#ifndef ACFORM_H
 | 
			
		||||
#define ACFORM_H
 | 
			
		||||
 | 
			
		||||
#include <QWidget>
 | 
			
		||||
#include <autoform.h>
 | 
			
		||||
 | 
			
		||||
#include "data/person.h"
 | 
			
		||||
#include "accommodation-odb.hxx"
 | 
			
		||||
 | 
			
		||||
namespace Ui {
 | 
			
		||||
class AcForm;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
class AcForm : public AutoForm<Person>
 | 
			
		||||
{
 | 
			
		||||
    Q_OBJECT
 | 
			
		||||
 | 
			
		||||
public:
 | 
			
		||||
    explicit AcForm(QWidget *parent = 0);
 | 
			
		||||
    ~AcForm();
 | 
			
		||||
 | 
			
		||||
private:
 | 
			
		||||
    Ui::AcForm *ui;
 | 
			
		||||
 | 
			
		||||
    // AutoForm interface
 | 
			
		||||
protected:
 | 
			
		||||
    virtual void registerCombos();
 | 
			
		||||
};
 | 
			
		||||
 | 
			
		||||
#endif // ACFORM_H
 | 
			
		||||
@ -1,62 +0,0 @@
 | 
			
		||||
<?xml version="1.0" encoding="UTF-8"?>
 | 
			
		||||
<ui version="4.0">
 | 
			
		||||
 <class>AcForm</class>
 | 
			
		||||
 <widget class="QWidget" name="AcForm">
 | 
			
		||||
  <property name="geometry">
 | 
			
		||||
   <rect>
 | 
			
		||||
    <x>0</x>
 | 
			
		||||
    <y>0</y>
 | 
			
		||||
    <width>833</width>
 | 
			
		||||
    <height>536</height>
 | 
			
		||||
   </rect>
 | 
			
		||||
  </property>
 | 
			
		||||
  <property name="windowTitle">
 | 
			
		||||
   <string>Form</string>
 | 
			
		||||
  </property>
 | 
			
		||||
  <widget class="QLineEdit" name="firstName">
 | 
			
		||||
   <property name="geometry">
 | 
			
		||||
    <rect>
 | 
			
		||||
     <x>90</x>
 | 
			
		||||
     <y>60</y>
 | 
			
		||||
     <width>191</width>
 | 
			
		||||
     <height>20</height>
 | 
			
		||||
    </rect>
 | 
			
		||||
   </property>
 | 
			
		||||
  </widget>
 | 
			
		||||
  <widget class="QLineEdit" name="lastName">
 | 
			
		||||
   <property name="geometry">
 | 
			
		||||
    <rect>
 | 
			
		||||
     <x>90</x>
 | 
			
		||||
     <y>110</y>
 | 
			
		||||
     <width>191</width>
 | 
			
		||||
     <height>20</height>
 | 
			
		||||
    </rect>
 | 
			
		||||
   </property>
 | 
			
		||||
  </widget>
 | 
			
		||||
  <widget class="QPushButton" name="pushButton">
 | 
			
		||||
   <property name="geometry">
 | 
			
		||||
    <rect>
 | 
			
		||||
     <x>610</x>
 | 
			
		||||
     <y>410</y>
 | 
			
		||||
     <width>81</width>
 | 
			
		||||
     <height>22</height>
 | 
			
		||||
    </rect>
 | 
			
		||||
   </property>
 | 
			
		||||
   <property name="text">
 | 
			
		||||
    <string>PushButton</string>
 | 
			
		||||
   </property>
 | 
			
		||||
  </widget>
 | 
			
		||||
  <widget class="QComboBox" name="address">
 | 
			
		||||
   <property name="geometry">
 | 
			
		||||
    <rect>
 | 
			
		||||
     <x>110</x>
 | 
			
		||||
     <y>170</y>
 | 
			
		||||
     <width>191</width>
 | 
			
		||||
     <height>22</height>
 | 
			
		||||
    </rect>
 | 
			
		||||
   </property>
 | 
			
		||||
  </widget>
 | 
			
		||||
 </widget>
 | 
			
		||||
 <resources/>
 | 
			
		||||
 <connections/>
 | 
			
		||||
</ui>
 | 
			
		||||
@ -1,8 +0,0 @@
 | 
			
		||||
#ifndef ACCOMMODATIONDATA_H
 | 
			
		||||
#define ACCOMMODATIONDATA_H
 | 
			
		||||
 | 
			
		||||
#include "address.h"
 | 
			
		||||
#include "person.h"
 | 
			
		||||
 | 
			
		||||
#endif // ACCOMMODATIONDATA_H
 | 
			
		||||
 | 
			
		||||
@ -1,58 +0,0 @@
 | 
			
		||||
#include "address.h"
 | 
			
		||||
 | 
			
		||||
Address::Address(QObject *parent) : ComboItem(parent)
 | 
			
		||||
{
 | 
			
		||||
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
Address::~Address()
 | 
			
		||||
{
 | 
			
		||||
 | 
			
		||||
}
 | 
			
		||||
QString Address::city() const
 | 
			
		||||
{
 | 
			
		||||
    return m_city;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
void Address::setCity(const QString &city)
 | 
			
		||||
{
 | 
			
		||||
    m_city = city;
 | 
			
		||||
}
 | 
			
		||||
QString Address::street() const
 | 
			
		||||
{
 | 
			
		||||
    return m_street;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
void Address::setStreet(const QString &street)
 | 
			
		||||
{
 | 
			
		||||
    m_street = street;
 | 
			
		||||
}
 | 
			
		||||
QString Address::houseNumber() const
 | 
			
		||||
{
 | 
			
		||||
    return m_houseNumber;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
void Address::setHouseNumber(const QString &houseNumber)
 | 
			
		||||
{
 | 
			
		||||
    m_houseNumber = houseNumber;
 | 
			
		||||
}
 | 
			
		||||
int Address::id() const
 | 
			
		||||
{
 | 
			
		||||
    return m_id;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
void Address::setId(int id)
 | 
			
		||||
{
 | 
			
		||||
    m_id = id;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
bool Address::eq(ComboItem *other)
 | 
			
		||||
{
 | 
			
		||||
    Address *addr = qobject_cast<Address*>(other);
 | 
			
		||||
    return addr != NULL && m_id == addr->id();
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
QString Address::toString()
 | 
			
		||||
{
 | 
			
		||||
    return m_street + ", " + m_houseNumber + ", " + m_city;
 | 
			
		||||
}
 | 
			
		||||
@ -1,55 +0,0 @@
 | 
			
		||||
#ifndef ADDRESS_H
 | 
			
		||||
#define ADDRESS_H
 | 
			
		||||
 | 
			
		||||
#include <QObject>
 | 
			
		||||
#include <QString>
 | 
			
		||||
 | 
			
		||||
#include <data/comboitem.h>
 | 
			
		||||
 | 
			
		||||
#include <odb/core.hxx>
 | 
			
		||||
 | 
			
		||||
#pragma db object
 | 
			
		||||
class Address : public ComboItem
 | 
			
		||||
{
 | 
			
		||||
    Q_OBJECT
 | 
			
		||||
 | 
			
		||||
    Q_PROPERTY(QString city READ city WRITE setCity)
 | 
			
		||||
    Q_PROPERTY(QString street READ street WRITE setStreet)
 | 
			
		||||
    Q_PROPERTY(QString houseNumber READ houseNumber WRITE setHouseNumber)
 | 
			
		||||
 | 
			
		||||
public:
 | 
			
		||||
    explicit Address(QObject *parent = 0);
 | 
			
		||||
    ~Address();
 | 
			
		||||
 | 
			
		||||
    QString city() const;
 | 
			
		||||
    void setCity(const QString &city);
 | 
			
		||||
 | 
			
		||||
    QString street() const;
 | 
			
		||||
    void setStreet(const QString &street);
 | 
			
		||||
 | 
			
		||||
    QString houseNumber() const;
 | 
			
		||||
    void setHouseNumber(const QString &houseNumber);
 | 
			
		||||
 | 
			
		||||
    int id() const;
 | 
			
		||||
    void setId(int id);
 | 
			
		||||
 | 
			
		||||
private:
 | 
			
		||||
    friend class odb::access;
 | 
			
		||||
 | 
			
		||||
#pragma db id auto
 | 
			
		||||
    int m_id;
 | 
			
		||||
    QString m_city;
 | 
			
		||||
    QString m_street;
 | 
			
		||||
    QString m_houseNumber;
 | 
			
		||||
 | 
			
		||||
signals:
 | 
			
		||||
 | 
			
		||||
public slots:
 | 
			
		||||
 | 
			
		||||
    // ComboItem interface
 | 
			
		||||
public:
 | 
			
		||||
    virtual bool eq(ComboItem *other);
 | 
			
		||||
    virtual QString toString();
 | 
			
		||||
};
 | 
			
		||||
 | 
			
		||||
#endif // ADDRESS_H
 | 
			
		||||
@ -1,49 +0,0 @@
 | 
			
		||||
#include <data/comboitem.h>
 | 
			
		||||
#include "person.h"
 | 
			
		||||
 | 
			
		||||
Person::Person()
 | 
			
		||||
{
 | 
			
		||||
}
 | 
			
		||||
int Person::id() const
 | 
			
		||||
{
 | 
			
		||||
    return m_id;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
void Person::setId(int value)
 | 
			
		||||
{
 | 
			
		||||
    m_id = value;
 | 
			
		||||
}
 | 
			
		||||
QString Person::getFirstName() const
 | 
			
		||||
{
 | 
			
		||||
    return firstName;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
void Person::setFirstName(const QString &value)
 | 
			
		||||
{
 | 
			
		||||
    firstName = value;
 | 
			
		||||
}
 | 
			
		||||
QString Person::getLastName() const
 | 
			
		||||
{
 | 
			
		||||
    return lastName;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
void Person::setLastName(const QString &value)
 | 
			
		||||
{
 | 
			
		||||
    lastName = value;
 | 
			
		||||
}
 | 
			
		||||
QSharedPointer<QObject> Person::address() const
 | 
			
		||||
{
 | 
			
		||||
    return m_address;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
void Person::setAddress(const QSharedPointer<QObject> &address)
 | 
			
		||||
{
 | 
			
		||||
    if (qobject_cast<Address*>(address.data()) != NULL)
 | 
			
		||||
    {
 | 
			
		||||
        m_address = qSharedPointerDynamicCast<Address, QObject>(address);
 | 
			
		||||
    }
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
@ -1,44 +0,0 @@
 | 
			
		||||
#ifndef PERSON_H
 | 
			
		||||
#define PERSON_H
 | 
			
		||||
 | 
			
		||||
#include <QObject>
 | 
			
		||||
#include <QString>
 | 
			
		||||
 | 
			
		||||
#include "address.h"
 | 
			
		||||
 | 
			
		||||
#include <odb/core.hxx>
 | 
			
		||||
 | 
			
		||||
#pragma db object
 | 
			
		||||
class Person : public QObject
 | 
			
		||||
{
 | 
			
		||||
    Q_OBJECT
 | 
			
		||||
 | 
			
		||||
    Q_PROPERTY(QString firstName READ getFirstName WRITE setFirstName)
 | 
			
		||||
    Q_PROPERTY(QString lastName READ getLastName WRITE setLastName)
 | 
			
		||||
    Q_PROPERTY(QSharedPointer<QObject> address READ address WRITE setAddress)
 | 
			
		||||
public:
 | 
			
		||||
    Person();
 | 
			
		||||
 | 
			
		||||
    int id() const;
 | 
			
		||||
    void setId(int value);
 | 
			
		||||
 | 
			
		||||
    QString getFirstName() const;
 | 
			
		||||
    void setFirstName(const QString &value);
 | 
			
		||||
 | 
			
		||||
    QString getLastName() const;
 | 
			
		||||
    void setLastName(const QString &value);
 | 
			
		||||
 | 
			
		||||
    QSharedPointer<QObject> address() const;
 | 
			
		||||
    void setAddress(const QSharedPointer<QObject> &address);
 | 
			
		||||
 | 
			
		||||
private:
 | 
			
		||||
    friend class odb::access;
 | 
			
		||||
#pragma db id auto
 | 
			
		||||
    int m_id;
 | 
			
		||||
    QString firstName;
 | 
			
		||||
    QString lastName;
 | 
			
		||||
    QSharedPointer<Address> m_address;
 | 
			
		||||
 | 
			
		||||
};
 | 
			
		||||
 | 
			
		||||
#endif // PERSON_H
 | 
			
		||||
@ -1,7 +0,0 @@
 | 
			
		||||
<?xml version="1.0" ?><svg clip-rule="evenodd" fill-rule="evenodd" image-rendering="optimizeQuality" shape-rendering="geometricPrecision" text-rendering="geometricPrecision" viewBox="0 0 5000 5000" xmlns="http://www.w3.org/2000/svg"><defs><style type="text/css"><![CDATA[
 | 
			
		||||
    .str1 {stroke:#434242;stroke-width:100}
 | 
			
		||||
    .str0 {stroke:#434242;stroke-width:300;stroke-linecap:round}
 | 
			
		||||
    .fil0 {fill:none}
 | 
			
		||||
    .fil1 {fill:#434242}
 | 
			
		||||
    .fil2 {fill:url(#id0)}
 | 
			
		||||
   ]]></style><linearGradient gradientUnits="userSpaceOnUse" id="id0" x1="2500.01" x2="2500.01" y1="4260.19" y2="1474.81"><stop offset="0" stop-color="#008BFF"/><stop offset="1" stop-color="#0af"/></linearGradient></defs><g id="Layer_x0020_1"><path class="fil0 str0" d="M300 2000l2050-1600c100-50 200-50 300 0l2050 1500"/><path class="fil1" d="M3500 1022l600 439v-861c0-55-45-100-100-100h-400c-55 0-100 45-100 100v422z"/><path class="fil2 str1" d="M899 4700h901v-1500c0-110 90-200 200-200h900c110 0 200 90 200 200v1500h1001c165 0 300-135 300-300l-1-2000-1776-1328c-33-26-79-37-124-36s-92 14-127 40l-1773 1324-1 2000c0 165 135 300 300 300z"/></g></svg>
 | 
			
		||||
| 
		 Before Width: | Height: | Size: 1.1 KiB  | 
@ -1,8 +0,0 @@
 | 
			
		||||
#include "tablemodel.h"
 | 
			
		||||
 | 
			
		||||
TableModel::TableModel(QObject *parent)
 | 
			
		||||
    :AutoTableModel<Person>(parent)
 | 
			
		||||
{
 | 
			
		||||
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
@ -1,18 +0,0 @@
 | 
			
		||||
#ifndef TABLEMODEL_H
 | 
			
		||||
#define TABLEMODEL_H
 | 
			
		||||
 | 
			
		||||
#include <core.h>
 | 
			
		||||
#include <autotablemodel.h>
 | 
			
		||||
 | 
			
		||||
#include "data/person.h"
 | 
			
		||||
 | 
			
		||||
class TableModel : public AutoTableModel<Person>
 | 
			
		||||
{
 | 
			
		||||
    Q_OBJECT
 | 
			
		||||
 | 
			
		||||
public:
 | 
			
		||||
    explicit TableModel(QObject *parent = NULL);
 | 
			
		||||
 | 
			
		||||
};
 | 
			
		||||
 | 
			
		||||
#endif // TABLEMODEL_H
 | 
			
		||||
@ -0,0 +1,53 @@
 | 
			
		||||
cmake_minimum_required(VERSION 3.24)
 | 
			
		||||
project(addressbook)
 | 
			
		||||
 | 
			
		||||
include(../3rdparty/QxOrm/QxOrm.cmake)
 | 
			
		||||
 | 
			
		||||
set (CMAKE_LIBRARY_OUTPUT_DIRECTORY ../plugins)
 | 
			
		||||
 | 
			
		||||
set(CMAKE_CXX_STANDARD 17)
 | 
			
		||||
set(CMAKE_AUTOMOC ON)
 | 
			
		||||
set(CMAKE_AUTORCC ON)
 | 
			
		||||
set(CMAKE_AUTOUIC ON)
 | 
			
		||||
 | 
			
		||||
find_package(Qt6 COMPONENTS
 | 
			
		||||
        Core
 | 
			
		||||
        Gui
 | 
			
		||||
        Widgets
 | 
			
		||||
        REQUIRED)
 | 
			
		||||
 | 
			
		||||
add_library(addressbook SHARED
 | 
			
		||||
        addressbook.cpp
 | 
			
		||||
        addressbook.h
 | 
			
		||||
        addressbookrc.qrc
 | 
			
		||||
        addressbook_global.h
 | 
			
		||||
        addressbookform.cpp
 | 
			
		||||
        addressbookform.h
 | 
			
		||||
        addressbookform.ui
 | 
			
		||||
        addressbookgrid.cpp
 | 
			
		||||
        addressbookgrid.h
 | 
			
		||||
        addressbookservice.cpp
 | 
			
		||||
        addressbookservice.h
 | 
			
		||||
        addressbooktablemodel.cpp
 | 
			
		||||
        addressbooktablemodel.h
 | 
			
		||||
        data/addressbookdata.cpp
 | 
			
		||||
        data/addressbookdata.h)
 | 
			
		||||
 | 
			
		||||
target_compile_definitions(addressbook PRIVATE -DADDRESSBOOK_LIBRARY)
 | 
			
		||||
 | 
			
		||||
include_directories(../core)
 | 
			
		||||
include_directories(../countryregister)
 | 
			
		||||
 | 
			
		||||
target_link_libraries(addressbook
 | 
			
		||||
        Qt::Core
 | 
			
		||||
        Qt::Gui
 | 
			
		||||
        Qt::Widgets
 | 
			
		||||
        qdecimal
 | 
			
		||||
        decnumber
 | 
			
		||||
        QxOrm
 | 
			
		||||
        core
 | 
			
		||||
        countryregister
 | 
			
		||||
        )
 | 
			
		||||
 | 
			
		||||
install(TARGETS addressbook
 | 
			
		||||
        LIBRARY DESTINATION ../plugins)
 | 
			
		||||
@ -1,54 +0,0 @@
 | 
			
		||||
#-------------------------------------------------
 | 
			
		||||
#
 | 
			
		||||
# Project created by QtCreator 2016-02-09T21:27:28
 | 
			
		||||
#
 | 
			
		||||
#-------------------------------------------------
 | 
			
		||||
 | 
			
		||||
QT       += widgets sql
 | 
			
		||||
 | 
			
		||||
QT       -= gui
 | 
			
		||||
 | 
			
		||||
TARGET = addressbook
 | 
			
		||||
TEMPLATE = lib
 | 
			
		||||
 | 
			
		||||
DEFINES += ADDRESSBOOK_LIBRARY
 | 
			
		||||
 | 
			
		||||
SOURCES += addressbook.cpp \
 | 
			
		||||
    data/addressbookdata.cpp \
 | 
			
		||||
    addressbookform.cpp \
 | 
			
		||||
    addressbookgrid.cpp \
 | 
			
		||||
    addressbooktablemodel.cpp \
 | 
			
		||||
    addressbookservice.cpp
 | 
			
		||||
 | 
			
		||||
HEADERS += addressbook.h\
 | 
			
		||||
        addressbook_global.h \
 | 
			
		||||
    data/addressbookdata.h \
 | 
			
		||||
    addressbookform.h \
 | 
			
		||||
    addressbookgrid.h \
 | 
			
		||||
    addressbooktablemodel.h \
 | 
			
		||||
    addressbookservice.h
 | 
			
		||||
 | 
			
		||||
include(../config_plugin.pri)
 | 
			
		||||
 | 
			
		||||
ODB_FILES = addressbook/data/addressbookdata.h
 | 
			
		||||
H_DIR = $$PWD/data/*.h
 | 
			
		||||
ODB_OTHER_INCLUDES = -I $$PWD/../countryregister/data
 | 
			
		||||
include(../odb.pri)
 | 
			
		||||
 | 
			
		||||
OTHER_FILES += \
 | 
			
		||||
    addressbook.json
 | 
			
		||||
 | 
			
		||||
FORMS += \
 | 
			
		||||
    addressbookform.ui
 | 
			
		||||
 | 
			
		||||
RESOURCES += \
 | 
			
		||||
    addressbookrc.qrc
 | 
			
		||||
TRANSLATIONS = translations/addressbook_cs_CZ.ts
 | 
			
		||||
 | 
			
		||||
win32:CONFIG(release, debug|release): LIBS += -L$$OUT_PWD/../plugins/ -lcountryregister
 | 
			
		||||
else:win32:CONFIG(debug, debug|release): LIBS += -L$$OUT_PWD/../plugins/ -lcountryregister
 | 
			
		||||
else:unix: LIBS += -L$$OUT_PWD/../plugins/ -lcountryregister
 | 
			
		||||
 | 
			
		||||
INCLUDEPATH += $$PWD/../countryregister/data
 | 
			
		||||
INCLUDEPATH += $$PWD/../countryregister
 | 
			
		||||
 | 
			
		||||
@ -0,0 +1,38 @@
 | 
			
		||||
cmake_minimum_required(VERSION 3.24)
 | 
			
		||||
project(prodejna)
 | 
			
		||||
 | 
			
		||||
include(../3rdparty/QxOrm/QxOrm.cmake)
 | 
			
		||||
 | 
			
		||||
set(CMAKE_CXX_STANDARD 17)
 | 
			
		||||
set(CMAKE_AUTOMOC ON)
 | 
			
		||||
set(CMAKE_AUTORCC ON)
 | 
			
		||||
set(CMAKE_AUTOUIC ON)
 | 
			
		||||
 | 
			
		||||
find_package(Qt6 COMPONENTS
 | 
			
		||||
        Core
 | 
			
		||||
        Gui
 | 
			
		||||
        Widgets
 | 
			
		||||
        Sql
 | 
			
		||||
        REQUIRED)
 | 
			
		||||
 | 
			
		||||
include_directories(../core)
 | 
			
		||||
 | 
			
		||||
add_executable(prodejna
 | 
			
		||||
        main.cpp
 | 
			
		||||
        appRc.qrc
 | 
			
		||||
        application.cpp
 | 
			
		||||
        application.h
 | 
			
		||||
        logindialog.cpp
 | 
			
		||||
        logindialog.h
 | 
			
		||||
        logindialog.ui
 | 
			
		||||
        mainwindow.cpp
 | 
			
		||||
        mainwindow.h
 | 
			
		||||
        mainwindow.ui)
 | 
			
		||||
 | 
			
		||||
target_link_libraries(prodejna
 | 
			
		||||
        Qt::Core
 | 
			
		||||
        Qt::Gui
 | 
			
		||||
        Qt::Widgets
 | 
			
		||||
        Qt::Sql
 | 
			
		||||
        core
 | 
			
		||||
        )
 | 
			
		||||
@ -1,92 +0,0 @@
 | 
			
		||||
#-------------------------------------------------
 | 
			
		||||
#
 | 
			
		||||
# Project created by QtCreator 2015-10-28T15:23:55
 | 
			
		||||
#
 | 
			
		||||
#-------------------------------------------------
 | 
			
		||||
 | 
			
		||||
QT       += core gui sql
 | 
			
		||||
 | 
			
		||||
greaterThan(QT_MAJOR_VERSION, 4): QT += widgets
 | 
			
		||||
 | 
			
		||||
TARGET = prodejna
 | 
			
		||||
TEMPLATE = app
 | 
			
		||||
 | 
			
		||||
DEFINES += _GLIBCXX_USE_CXX11_ABI=1
 | 
			
		||||
 | 
			
		||||
CONFIG += c++11
 | 
			
		||||
 | 
			
		||||
include(../config_odb.pri)
 | 
			
		||||
 | 
			
		||||
win32 {
 | 
			
		||||
    INCLUDEPATH += $$ODB_INCLUDE_PREFIX/libodb-2.4.0
 | 
			
		||||
    INCLUDEPATH += $$ODB_INCLUDE_PREFIX/libodb-qt-2.4.0
 | 
			
		||||
    INCLUDEPATH += $$ODB_INCLUDE_PREFIX/libodb-sqlite-2.4.0
 | 
			
		||||
    INCLUDEPATH += $$ODB_INCLUDE_PREFIX/sqlite
 | 
			
		||||
 | 
			
		||||
    RC_FILE = shop.rc
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
SOURCES += main.cpp\
 | 
			
		||||
        mainwindow.cpp \
 | 
			
		||||
    logindialog.cpp \
 | 
			
		||||
    application.cpp
 | 
			
		||||
 | 
			
		||||
HEADERS  += mainwindow.h \
 | 
			
		||||
    logindialog.h \
 | 
			
		||||
    application.h
 | 
			
		||||
 | 
			
		||||
FORMS    += mainwindow.ui \
 | 
			
		||||
    logindialog.ui
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
unix{
 | 
			
		||||
    ARCH_TYPE      = unix
 | 
			
		||||
    macx{
 | 
			
		||||
        ARCH_TYPE      = macx
 | 
			
		||||
    }
 | 
			
		||||
    linux{
 | 
			
		||||
        !contains(QT_ARCH, x86_64){
 | 
			
		||||
            ARCH_TYPE      = linux32
 | 
			
		||||
        }else{
 | 
			
		||||
            ARCH_TYPE      = linux64
 | 
			
		||||
        }
 | 
			
		||||
    }
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
unix {
 | 
			
		||||
    QMAKE_CXXFLAGS += -Wno-unknown-pragmas
 | 
			
		||||
 | 
			
		||||
    CONFIG(debug, debug|release) {
 | 
			
		||||
        LIBS += -L$$PWD/../../LimeReport/build/$${QT_VERSION}/$${ARCH_TYPE}/debug/lib/ -llimereport -lQtZint
 | 
			
		||||
        #QMAKE_CXXFLAGS += -Wl,-rpath-link,$$PWD/../../LimeReport/build/$${QT_VERSION}/$${ARCH_TYPE}/debug/lib/
 | 
			
		||||
    } else {
 | 
			
		||||
        LIBS += -L$$PWD/../../LimeReport/build/$${QT_VERSION}/$${ARCH_TYPE}/release/lib/ -llimereport -lQtZint
 | 
			
		||||
        #QMAKE_CXXFLAGS += -Wl,-rpath-link,$$PWD/../../LimeReport/build/$${QT_VERSION}/$${ARCH_TYPE}/release/lib/
 | 
			
		||||
    }
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
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
 | 
			
		||||
 | 
			
		||||
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
 | 
			
		||||
 | 
			
		||||
RESOURCES += \
 | 
			
		||||
    appRc.qrc
 | 
			
		||||
 | 
			
		||||
TRANSLATIONS = translations/prodejna_cs_CZ.ts
 | 
			
		||||
 | 
			
		||||
DISTFILES += \
 | 
			
		||||
    shop.rc
 | 
			
		||||
@ -0,0 +1,83 @@
 | 
			
		||||
cmake_minimum_required(VERSION 3.24)
 | 
			
		||||
project(camp)
 | 
			
		||||
 | 
			
		||||
include(../3rdparty/QxOrm/QxOrm.cmake)
 | 
			
		||||
 | 
			
		||||
set (CMAKE_LIBRARY_OUTPUT_DIRECTORY ../plugins)
 | 
			
		||||
 | 
			
		||||
set(CMAKE_CXX_STANDARD 17)
 | 
			
		||||
set(CMAKE_AUTOMOC ON)
 | 
			
		||||
set(CMAKE_AUTORCC ON)
 | 
			
		||||
set(CMAKE_AUTOUIC ON)
 | 
			
		||||
 | 
			
		||||
find_package(Qt6 COMPONENTS
 | 
			
		||||
        Core
 | 
			
		||||
        Gui
 | 
			
		||||
        Widgets
 | 
			
		||||
        REQUIRED)
 | 
			
		||||
 | 
			
		||||
add_library(camp SHARED
 | 
			
		||||
        addservicedialog.cpp
 | 
			
		||||
        addservicedialog.h
 | 
			
		||||
        addservicedialog.ui
 | 
			
		||||
        camp.cpp
 | 
			
		||||
        camp.h
 | 
			
		||||
        camp_global.h
 | 
			
		||||
        campform.cpp
 | 
			
		||||
        campform.h
 | 
			
		||||
        campform.ui
 | 
			
		||||
        campgrid.cpp
 | 
			
		||||
        campgrid.h
 | 
			
		||||
        camprc.qrc
 | 
			
		||||
        campseller.cpp
 | 
			
		||||
        campseller.h
 | 
			
		||||
        campservice.cpp
 | 
			
		||||
        campservice.h
 | 
			
		||||
        campshopitem.cpp
 | 
			
		||||
        campshopitem.h
 | 
			
		||||
        campwizard.cpp
 | 
			
		||||
        campwizard.h
 | 
			
		||||
        campwizard.ui
 | 
			
		||||
        detailwidget.cpp
 | 
			
		||||
        detailwidget.h
 | 
			
		||||
        detailwidget.ui
 | 
			
		||||
        data/addressitem.cpp
 | 
			
		||||
        data/addressitem.h
 | 
			
		||||
        data/camp-data.h
 | 
			
		||||
        data/campdata.cpp
 | 
			
		||||
        data/campdata.h
 | 
			
		||||
        data/personprice.cpp
 | 
			
		||||
        data/personprice.h
 | 
			
		||||
        data/sale.cpp
 | 
			
		||||
        data/sale.h
 | 
			
		||||
        data/serviceitem.cpp
 | 
			
		||||
        data/serviceitem.h
 | 
			
		||||
        settings/campsettings.cpp
 | 
			
		||||
        settings/campsettings.h
 | 
			
		||||
        settings/campsettingsform.cpp
 | 
			
		||||
        settings/campsettingsform.h
 | 
			
		||||
        settings/campsettingsform.ui)
 | 
			
		||||
 | 
			
		||||
target_compile_definitions(camp PRIVATE -DCAMP_LIBRARY)
 | 
			
		||||
 | 
			
		||||
include_directories(../core)
 | 
			
		||||
include_directories(../countryregister
 | 
			
		||||
        ../addressbook
 | 
			
		||||
        ../services
 | 
			
		||||
        ../shop)
 | 
			
		||||
 | 
			
		||||
target_link_libraries(camp
 | 
			
		||||
        Qt::Core
 | 
			
		||||
        Qt::Gui
 | 
			
		||||
        Qt::Widgets
 | 
			
		||||
        qdecimal
 | 
			
		||||
        decnumber
 | 
			
		||||
        QxOrm
 | 
			
		||||
        core
 | 
			
		||||
        addressbook
 | 
			
		||||
        services
 | 
			
		||||
        shop
 | 
			
		||||
        )
 | 
			
		||||
 | 
			
		||||
install(TARGETS addressbook
 | 
			
		||||
        LIBRARY DESTINATION ../plugins)
 | 
			
		||||
@ -1,110 +0,0 @@
 | 
			
		||||
#-------------------------------------------------
 | 
			
		||||
#
 | 
			
		||||
# Project created by QtCreator 2017-04-19T09:20:32
 | 
			
		||||
#
 | 
			
		||||
#-------------------------------------------------
 | 
			
		||||
 | 
			
		||||
QT       += widgets sql
 | 
			
		||||
 | 
			
		||||
TARGET = camp
 | 
			
		||||
TEMPLATE = lib
 | 
			
		||||
 | 
			
		||||
DEFINES += CAMP_LIBRARY
 | 
			
		||||
 | 
			
		||||
# The following define makes your compiler emit warnings if you use
 | 
			
		||||
# any feature of Qt which as 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
 | 
			
		||||
 | 
			
		||||
SOURCES += camp.cpp \
 | 
			
		||||
    data/campdata.cpp \
 | 
			
		||||
    data/addressitem.cpp \
 | 
			
		||||
    data/serviceitem.cpp \
 | 
			
		||||
    campgrid.cpp \
 | 
			
		||||
    campform.cpp \
 | 
			
		||||
    data/sale.cpp \
 | 
			
		||||
    settings/campsettingsform.cpp \
 | 
			
		||||
    data/personprice.cpp \
 | 
			
		||||
    settings/campsettings.cpp \
 | 
			
		||||
    campwizard.cpp \
 | 
			
		||||
    campservice.cpp \
 | 
			
		||||
    addservicedialog.cpp \
 | 
			
		||||
    campshopitem.cpp \
 | 
			
		||||
    campseller.cpp \
 | 
			
		||||
    detailwidget.cpp
 | 
			
		||||
 | 
			
		||||
HEADERS += camp.h\
 | 
			
		||||
        camp_global.h \
 | 
			
		||||
    data/campdata.h \
 | 
			
		||||
    data/addressitem.h \
 | 
			
		||||
    data/serviceitem.h \
 | 
			
		||||
    data/camp-data.h \
 | 
			
		||||
    campgrid.h \
 | 
			
		||||
    campform.h \
 | 
			
		||||
    data/sale.h \
 | 
			
		||||
    settings/campsettingsform.h \
 | 
			
		||||
    data/personprice.h \
 | 
			
		||||
    settings/campsettings.h \
 | 
			
		||||
    campwizard.h \
 | 
			
		||||
    campservice.h \
 | 
			
		||||
    addservicedialog.h \
 | 
			
		||||
    campshopitem.h \
 | 
			
		||||
    campseller.h \
 | 
			
		||||
    detailwidget.h
 | 
			
		||||
 | 
			
		||||
include(../config_plugin.pri)
 | 
			
		||||
 | 
			
		||||
ODB_FILES = camp/data/camp-data.h
 | 
			
		||||
H_DIR = $$PWD/data/*.h
 | 
			
		||||
ODB_OTHER_INCLUDES = -I $$PWD/../shop -I $$PWD/../addressbook/data -I $$PWD/../countryregister/data -I $$PWD/../services/data
 | 
			
		||||
include(../odb.pri)
 | 
			
		||||
 | 
			
		||||
win32:CONFIG(release, debug|release): LIBS += -L$$OUT_PWD/../plugins/ -lshop
 | 
			
		||||
else:win32:CONFIG(debug, debug|release): LIBS += -L$$OUT_PWD/../plugins/ -lshop
 | 
			
		||||
else:unix: LIBS += -L$$OUT_PWD/../plugins/ -lshop
 | 
			
		||||
 | 
			
		||||
INCLUDEPATH += $$PWD/../shop
 | 
			
		||||
DEPENDPATH += $$PWD/../shop
 | 
			
		||||
 | 
			
		||||
win32:CONFIG(release, debug|release): LIBS += -L$$OUT_PWD/../plugins/ -laddressbook
 | 
			
		||||
else:win32:CONFIG(debug, debug|release): LIBS += -L$$OUT_PWD/../plugins/ -laddressbook
 | 
			
		||||
else:unix: LIBS += -L$$OUT_PWD/../plugins/ -laddressbook
 | 
			
		||||
 | 
			
		||||
INCLUDEPATH += $$PWD/../addressbook
 | 
			
		||||
INCLUDEPATH += $$PWD/../addressbook/data
 | 
			
		||||
DEPENDPATH += $$PWD/../addressbook
 | 
			
		||||
 | 
			
		||||
win32:CONFIG(release, debug|release): LIBS += -L$$OUT_PWD/../plugins/ -lcountryregister
 | 
			
		||||
else:win32:CONFIG(debug, debug|release): LIBS += -L$$OUT_PWD/../plugins/ -lcountryregister
 | 
			
		||||
 | 
			
		||||
INCLUDEPATH += $$PWD/../countryregister/data
 | 
			
		||||
INCLUDEPATH += $$PWD/../countryregister
 | 
			
		||||
 | 
			
		||||
win32:CONFIG(release, debug|release): LIBS += -L$$OUT_PWD/../plugins/ -lservices
 | 
			
		||||
else:win32:CONFIG(debug, debug|release): LIBS += -L$$OUT_PWD/../plugins/ -lservices
 | 
			
		||||
else:unix: LIBS += -L$$OUT_PWD/../plugins/ -lservices
 | 
			
		||||
 | 
			
		||||
INCLUDEPATH += $$PWD/../services
 | 
			
		||||
INCLUDEPATH += $$PWD/../services/data
 | 
			
		||||
DEPENDPATH += $$PWD/../services
 | 
			
		||||
 | 
			
		||||
TRANSLATIONS = translations/camp_cs_CZ.ts
 | 
			
		||||
 | 
			
		||||
DISTFILES += \
 | 
			
		||||
    camp.json
 | 
			
		||||
 | 
			
		||||
RESOURCES += \
 | 
			
		||||
    camprc.qrc
 | 
			
		||||
 | 
			
		||||
FORMS += \
 | 
			
		||||
    campform.ui \
 | 
			
		||||
    settings/campsettingsform.ui \
 | 
			
		||||
    campwizard.ui \
 | 
			
		||||
    addservicedialog.ui \
 | 
			
		||||
    detailwidget.ui
 | 
			
		||||
@ -0,0 +1,62 @@
 | 
			
		||||
cmake_minimum_required(VERSION 3.24)
 | 
			
		||||
project(commodity)
 | 
			
		||||
 | 
			
		||||
include(../3rdparty/QxOrm/QxOrm.cmake)
 | 
			
		||||
 | 
			
		||||
set (CMAKE_LIBRARY_OUTPUT_DIRECTORY ../plugins)
 | 
			
		||||
 | 
			
		||||
set(CMAKE_CXX_STANDARD 17)
 | 
			
		||||
set(CMAKE_AUTOMOC ON)
 | 
			
		||||
set(CMAKE_AUTORCC ON)
 | 
			
		||||
set(CMAKE_AUTOUIC ON)
 | 
			
		||||
 | 
			
		||||
find_package(Qt6 COMPONENTS
 | 
			
		||||
        Core
 | 
			
		||||
        Gui
 | 
			
		||||
        Widgets
 | 
			
		||||
        REQUIRED)
 | 
			
		||||
 | 
			
		||||
add_library(commodity SHARED
 | 
			
		||||
        commodity.cpp
 | 
			
		||||
        commodity.h
 | 
			
		||||
        commodity_global.h
 | 
			
		||||
        commodityform.cpp
 | 
			
		||||
        commodityform.h
 | 
			
		||||
        commodityform.ui
 | 
			
		||||
        commoditygrid.cpp
 | 
			
		||||
        commoditygrid.h
 | 
			
		||||
        commodityrc.qrc
 | 
			
		||||
        commodityservice.cpp
 | 
			
		||||
        commodityservice.h
 | 
			
		||||
        commoditysettingsform.cpp
 | 
			
		||||
        commoditysettingsform.h
 | 
			
		||||
        commoditysettingsform.ui
 | 
			
		||||
        commoditytablemodel.cpp
 | 
			
		||||
        commoditytablemodel.h
 | 
			
		||||
        data/commodity-data.h
 | 
			
		||||
        data/commoditydata.cpp
 | 
			
		||||
        data/commoditydata.h
 | 
			
		||||
        data/commoditytypedata.cpp
 | 
			
		||||
        data/commoditytypedata.h
 | 
			
		||||
        settings/commoditysettings.cpp
 | 
			
		||||
        settings/commoditysettings.h
 | 
			
		||||
        )
 | 
			
		||||
 | 
			
		||||
target_compile_definitions(commodity PRIVATE -DCOMMODITY_LIBRARY)
 | 
			
		||||
 | 
			
		||||
include_directories(../core)
 | 
			
		||||
include_directories(../shop)
 | 
			
		||||
 | 
			
		||||
target_link_libraries(commodity
 | 
			
		||||
        Qt::Core
 | 
			
		||||
        Qt::Gui
 | 
			
		||||
        Qt::Widgets
 | 
			
		||||
        qdecimal
 | 
			
		||||
        decnumber
 | 
			
		||||
        QxOrm
 | 
			
		||||
        core
 | 
			
		||||
        shop
 | 
			
		||||
        )
 | 
			
		||||
 | 
			
		||||
install(TARGETS commodity
 | 
			
		||||
        LIBRARY DESTINATION ../plugins)
 | 
			
		||||
@ -1,61 +0,0 @@
 | 
			
		||||
#-------------------------------------------------
 | 
			
		||||
#
 | 
			
		||||
# Project created by QtCreator 2016-02-09T21:26:14
 | 
			
		||||
#
 | 
			
		||||
#-------------------------------------------------
 | 
			
		||||
 | 
			
		||||
QT       += widgets sql
 | 
			
		||||
 | 
			
		||||
QT       -= gui
 | 
			
		||||
 | 
			
		||||
TARGET = commodity
 | 
			
		||||
TEMPLATE = lib
 | 
			
		||||
 | 
			
		||||
DEFINES += COMMODITY_LIBRARY
 | 
			
		||||
 | 
			
		||||
SOURCES += commodity.cpp \
 | 
			
		||||
    data/commoditydata.cpp \
 | 
			
		||||
    data/commoditytypedata.cpp \
 | 
			
		||||
    commoditytablemodel.cpp \
 | 
			
		||||
    commodityform.cpp \
 | 
			
		||||
    commoditygrid.cpp \
 | 
			
		||||
    commoditysettingsform.cpp \
 | 
			
		||||
    commodityservice.cpp \
 | 
			
		||||
    settings/commoditysettings.cpp
 | 
			
		||||
 | 
			
		||||
HEADERS += commodity.h\
 | 
			
		||||
        commodity_global.h \
 | 
			
		||||
    data/commoditydata.h \
 | 
			
		||||
    data/commoditytypedata.h \
 | 
			
		||||
    data/commodity-data.h \
 | 
			
		||||
    commoditytablemodel.h \
 | 
			
		||||
    commodityform.h \
 | 
			
		||||
    commoditygrid.h \
 | 
			
		||||
    commoditysettingsform.h \
 | 
			
		||||
    commodityservice.h \
 | 
			
		||||
    settings/commoditysettings.h
 | 
			
		||||
 | 
			
		||||
include(../config_plugin.pri)
 | 
			
		||||
 | 
			
		||||
ODB_FILES = commodity/data/commodity-data.h
 | 
			
		||||
H_DIR = $$PWD/data/*.h
 | 
			
		||||
ODB_OTHER_INCLUDES = -I $$PWD/../shop
 | 
			
		||||
include(../odb.pri)
 | 
			
		||||
 | 
			
		||||
OTHER_FILES += \
 | 
			
		||||
    commodity.json
 | 
			
		||||
 | 
			
		||||
FORMS += \
 | 
			
		||||
    commodityform.ui \
 | 
			
		||||
    commoditysettingsform.ui
 | 
			
		||||
 | 
			
		||||
RESOURCES += \
 | 
			
		||||
    commodityrc.qrc
 | 
			
		||||
TRANSLATIONS = translations/commodity_cs_CZ.ts
 | 
			
		||||
 | 
			
		||||
win32:CONFIG(release, debug|release): LIBS += -L$$OUT_PWD/../plugins/ -lshop
 | 
			
		||||
else:win32:CONFIG(debug, debug|release): LIBS += -L$$OUT_PWD/../plugins/ -lshop
 | 
			
		||||
else:unix: LIBS += -L$$OUT_PWD/../plugins/ -lshop
 | 
			
		||||
 | 
			
		||||
INCLUDEPATH += $$PWD/../shop
 | 
			
		||||
DEPENDPATH += $$PWD/../shop
 | 
			
		||||
@ -1,4 +0,0 @@
 | 
			
		||||
win32 {
 | 
			
		||||
    LIB_PATH = d:/prac/qt/lib
 | 
			
		||||
    ODB_INCLUDE_PREFIX = d:/prac/odb
 | 
			
		||||
}
 | 
			
		||||
Some files were not shown because too many files have changed in this diff Show More
					Loading…
					
					
				
		Reference in New Issue