Skip to content

Commit

Permalink
Cannot print report Competitors with rented cards #944 fixed
Browse files Browse the repository at this point in the history
  • Loading branch information
Fanda Vacek committed Aug 27, 2023
1 parent de2d139 commit f0e65a9
Show file tree
Hide file tree
Showing 6 changed files with 94 additions and 74 deletions.
12 changes: 7 additions & 5 deletions libqf/plugins/qf/core/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,29 +2,31 @@ qt_add_qml_module(qfcoreplugin
URI "qf.core"
VERSION "1.0"
PLUGIN_TARGET qfcoreplugin
RESOURCE_PREFIX qml/qf/core
# QML_FILES ${qml_files}
RESOURCE_PREFIX qf/core/qml
# PAST_MAJOR_VERSIONS 1
# NO_PLUGIN_OPTIONAL
# NO_GENERATE_PLUGIN_SOURCE
NO_GENERATE_PLUGIN_SOURCE
# NO_GENERATE_QMLTYPES
# INSTALL_SOURCE_QMLTYPES "plugins.qmltypes"
)


target_sources(qfcoreplugin PRIVATE
# src/qfcore_plugin.h
# src/qmlfilesingleton.cpp

src/qfcore_plugin.cpp
src/crypt.cpp
src/model/tablemodelcolumn.cpp
src/model/sqltablemodel.cpp
src/model/sqldatadocument.cpp
src/qmlfilesingleton.cpp
src/settings.cpp
src/sql/sqlconnection.cpp
src/sql/sqlquery.cpp
src/sql/sqlquerybuilder.cpp
src/sql/sqlrecord.cpp
src/sql/qmlsqlsingleton.cpp
#src/plugin.cpp
src/qmllogsingleton.cpp
core.qrc
)
Expand All @@ -33,7 +35,7 @@ target_include_directories(qfcoreplugin PRIVATE src/sql)

target_link_libraries(qfcoreplugin PUBLIC
Qt::Core
Qt::Gui
# Qt::Gui
Qt::Qml
libqfcore
)
Expand Down
60 changes: 0 additions & 60 deletions libqf/plugins/qf/core/src/plugin.cpp

This file was deleted.

64 changes: 64 additions & 0 deletions libqf/plugins/qf/core/src/qfcore_plugin.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,64 @@
#include "qfcore_plugin.h"

#include "crypt.h"
#include "settings.h"

#include "qmllogsingleton.h"
//#include "qmlfilesingleton.h"
#include "sql/qmlsqlsingleton.h"
#include "sql/sqlconnection.h"
#include "sql/sqlquery.h"
#include "sql/sqlrecord.h"
#include "sql/sqlquerybuilder.h"
#include "model/sqldatadocument.h"

#include "model/sqltablemodel.h"
#include "model/tablemodelcolumn.h"

//#include <qf/core/network/networkaccessmanager.h>
//#include <qf/core/network/networkreply.h>

//#include <qf/core/model/sqltablemodel.h>
//#include <qf/core/model/datadocument.h>

//#include <qf/core/log.h>

//#include <QQmlExtensionPlugin>
//#include <QQmlEngine>

#include <QtQml>

QT_BEGIN_NAMESPACE

void QFCorePlugin::registerTypes(const char *uri)
{
//qfLogFuncFrame() << uri;
Q_ASSERT(uri == QLatin1String("qf.core"));

qmlRegisterSingletonType<qf::core::qml::QmlLogSingleton>(uri, 1, 0, "Log_helper", &qf::core::qml::QmlLogSingleton::singletontype_provider);
//qmlRegisterSingletonType<qf::core::qml::QmlFileSingleton>(uri, 1, 0, "File", &qf::core::qml::QmlFileSingleton::singletontype_provider);
qmlRegisterSingletonType<qf::core::qml::QmlSqlSingleton>(uri, 1, 0, "Sql", &qf::core::qml::QmlSqlSingleton::singletontype_provider);

qmlRegisterType<qf::core::qml::SqlConnection>(uri, 1, 0, "SqlConnection");
qmlRegisterType<qf::core::qml::SqlQuery>(uri, 1, 0, "SqlQuery");
qmlRegisterType<qf::core::qml::SqlRecord>(uri, 1, 0, "SqlRecord");
qmlRegisterType<qf::core::qml::SqlQueryBuilder>(uri, 1, 0, "SqlQueryBuilder");
qmlRegisterType<qf::core::qml::SqlTableModel>(uri, 1, 0, "SqlTableModel");
qmlRegisterType<qf::core::model::TableModel>(uri, 1, 0, "TableModel");
qmlRegisterType<qf::core::qml::TableModelColumn>(uri, 1, 0, "ModelColumn");

qmlRegisterType<qf::core::model::DataDocument>(uri, 1, 0, "DataDocument");
qmlRegisterType<qf::core::qml::SqlDataDocument>(uri, 1, 0, "SqlDataDocument");

qmlRegisterType<qf::core::qml::Settings>(uri, 1, 0, "Settings");
qmlRegisterType<qf::core::qml::Crypt>(uri, 1, 0, "Crypt");

//qmlRegisterType<qf::core::network::NetworkAccessManager>(uri, 1, 0, "NetworkAccessManager");
//qmlRegisterType<qf::core::network::NetworkReply>(uri, 1, 0, "NetworkReply");

// Auto-increment the import to stay in sync with ALL future QtQuick minor versions
qmlRegisterModule(uri, 1, 0);
}

QT_END_NAMESPACE

17 changes: 17 additions & 0 deletions libqf/plugins/qf/core/src/qfcore_plugin.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
#pragma once

#include <QQmlExtensionPlugin>

QT_BEGIN_NAMESPACE

class QFCorePlugin : public QQmlExtensionPlugin
{
Q_OBJECT
Q_PLUGIN_METADATA(IID QQmlExtensionInterface_iid)

public:
QFCorePlugin(QObject *parent = 0) : QQmlExtensionPlugin(parent) { }
void registerTypes(const char *uri) override;
};

QT_END_NAMESPACE
5 changes: 1 addition & 4 deletions libqf/plugins/qf/qmlreports/src/qfqmlreports_plugin.cpp
Original file line number Diff line number Diff line change
@@ -1,6 +1,3 @@
// Copyright (C) 2016 Kurt Pattyn <[email protected]>.
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only

#include "qfqmlreports_plugin.h"

#include <qf/qmlwidgets/reports/processor/reportitempara.h>
Expand All @@ -19,7 +16,7 @@

QT_BEGIN_NAMESPACE

void QFQmlRepoertPlugin::registerTypes(const char *uri)
void QFQmlReportPlugin::registerTypes(const char *uri)
{
Q_ASSERT(uri == QLatin1String("qf.qmlreports"));

Expand Down
10 changes: 5 additions & 5 deletions libqf/plugins/qf/qmlreports/src/qfqmlreports_plugin.h
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,14 @@

QT_BEGIN_NAMESPACE

class QFQmlRepoertPlugin : public QQmlExtensionPlugin
class QFQmlReportPlugin : public QQmlExtensionPlugin
{
Q_OBJECT
Q_PLUGIN_METADATA(IID QQmlExtensionInterface_iid)
Q_OBJECT
Q_PLUGIN_METADATA(IID QQmlExtensionInterface_iid)

public:
QFQmlRepoertPlugin(QObject *parent = 0) : QQmlExtensionPlugin(parent) { }
void registerTypes(const char *uri) override;
QFQmlReportPlugin(QObject *parent = 0) : QQmlExtensionPlugin(parent) { }
void registerTypes(const char *uri) override;
};

QT_END_NAMESPACE
Expand Down

0 comments on commit f0e65a9

Please sign in to comment.