diff --git a/CMakeLists.txt b/CMakeLists.txt
new file mode 100644
index 0000000..cec96ae
--- /dev/null
+++ b/CMakeLists.txt
@@ -0,0 +1,35 @@
+cmake_minimum_required(VERSION 3.1)
+
+project(appname CXX)
+
+# C++14
+set(CMAKE_CXX_STANDARD 14)
+set(CMAKE_CXX_STANDARD_REQUIRED ON)
+# cxx options
+if (MSVC)
+ set(CMAKE_CXX_FLAGS "/DUNICODE /D_UNICODE")
+ set(CMAKE_CXX_FLAGS_DEBUG "/DEBUG")
+ set(CMAKE_CXX_FLAGS_RELEASE "/O2 /DQT_NO_DEBUG /DTF_NO_DEBUG")
+else()
+ set(CMAKE_CXX_FLAGS "-Wall -W -D_REENTRANT")
+ set(CMAKE_CXX_FLAGS_DEBUG "-g")
+ set(CMAKE_CXX_FLAGS_RELEASE "-O2 -DQT_NO_DEBUG -DTF_NO_DEBUG")
+endif()
+
+# Auto generate moc files
+if (POLICY CMP0071)
+ cmake_policy(SET CMP0071 NEW)
+endif()
+set(CMAKE_AUTOMOC ON)
+
+find_package(TreeFrog REQUIRED)
+add_subdirectory(helpers)
+add_subdirectory(models)
+add_subdirectory(views)
+add_subdirectory(controllers)
+
+message(STATUS "Set CMAKE_GENERATOR: ${CMAKE_GENERATOR}")
+message(STATUS "Set CMAKE_BUILD_TYPE: ${CMAKE_BUILD_TYPE}")
+
+# Cutom target - cmake
+include(${PROJECT_SOURCE_DIR}/cmake/TargetCmake.cmake)
diff --git a/LICENSE b/LICENSE
new file mode 100644
index 0000000..39ec5d9
--- /dev/null
+++ b/LICENSE
@@ -0,0 +1,201 @@
+ Apache License
+ Version 2.0, January 2004
+ http://www.apache.org/licenses/
+
+TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
+
+1. Definitions.
+
+ "License" shall mean the terms and conditions for use, reproduction,
+ and distribution as defined by Sections 1 through 9 of this document.
+
+ "Licensor" shall mean the copyright owner or entity authorized by
+ the copyright owner that is granting the License.
+
+ "Legal Entity" shall mean the union of the acting entity and all
+ other entities that control, are controlled by, or are under common
+ control with that entity. For the purposes of this definition,
+ "control" means (i) the power, direct or indirect, to cause the
+ direction or management of such entity, whether by contract or
+ otherwise, or (ii) ownership of fifty percent (50%) or more of the
+ outstanding shares, or (iii) beneficial ownership of such entity.
+
+ "You" (or "Your") shall mean an individual or Legal Entity
+ exercising permissions granted by this License.
+
+ "Source" form shall mean the preferred form for making modifications,
+ including but not limited to software source code, documentation
+ source, and configuration files.
+
+ "Object" form shall mean any form resulting from mechanical
+ transformation or translation of a Source form, including but
+ not limited to compiled object code, generated documentation,
+ and conversions to other media types.
+
+ "Work" shall mean the work of authorship, whether in Source or
+ Object form, made available under the License, as indicated by a
+ copyright notice that is included in or attached to the work
+ (an example is provided in the Appendix below).
+
+ "Derivative Works" shall mean any work, whether in Source or Object
+ form, that is based on (or derived from) the Work and for which the
+ editorial revisions, annotations, elaborations, or other modifications
+ represent, as a whole, an original work of authorship. For the purposes
+ of this License, Derivative Works shall not include works that remain
+ separable from, or merely link (or bind by name) to the interfaces of,
+ the Work and Derivative Works thereof.
+
+ "Contribution" shall mean any work of authorship, including
+ the original version of the Work and any modifications or additions
+ to that Work or Derivative Works thereof, that is intentionally
+ submitted to Licensor for inclusion in the Work by the copyright owner
+ or by an individual or Legal Entity authorized to submit on behalf of
+ the copyright owner. For the purposes of this definition, "submitted"
+ means any form of electronic, verbal, or written communication sent
+ to the Licensor or its representatives, including but not limited to
+ communication on electronic mailing lists, source code control systems,
+ and issue tracking systems that are managed by, or on behalf of, the
+ Licensor for the purpose of discussing and improving the Work, but
+ excluding communication that is conspicuously marked or otherwise
+ designated in writing by the copyright owner as "Not a Contribution."
+
+ "Contributor" shall mean Licensor and any individual or Legal Entity
+ on behalf of whom a Contribution has been received by Licensor and
+ subsequently incorporated within the Work.
+
+2. Grant of Copyright License. Subject to the terms and conditions of
+ this License, each Contributor hereby grants to You a perpetual,
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+ copyright license to reproduce, prepare Derivative Works of,
+ publicly display, publicly perform, sublicense, and distribute the
+ Work and such Derivative Works in Source or Object form.
+
+3. Grant of Patent License. Subject to the terms and conditions of
+ this License, each Contributor hereby grants to You a perpetual,
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+ (except as stated in this section) patent license to make, have made,
+ use, offer to sell, sell, import, and otherwise transfer the Work,
+ where such license applies only to those patent claims licensable
+ by such Contributor that are necessarily infringed by their
+ Contribution(s) alone or by combination of their Contribution(s)
+ with the Work to which such Contribution(s) was submitted. If You
+ institute patent litigation against any entity (including a
+ cross-claim or counterclaim in a lawsuit) alleging that the Work
+ or a Contribution incorporated within the Work constitutes direct
+ or contributory patent infringement, then any patent licenses
+ granted to You under this License for that Work shall terminate
+ as of the date such litigation is filed.
+
+4. Redistribution. You may reproduce and distribute copies of the
+ Work or Derivative Works thereof in any medium, with or without
+ modifications, and in Source or Object form, provided that You
+ meet the following conditions:
+
+ (a) You must give any other recipients of the Work or
+ Derivative Works a copy of this License; and
+
+ (b) You must cause any modified files to carry prominent notices
+ stating that You changed the files; and
+
+ (c) You must retain, in the Source form of any Derivative Works
+ that You distribute, all copyright, patent, trademark, and
+ attribution notices from the Source form of the Work,
+ excluding those notices that do not pertain to any part of
+ the Derivative Works; and
+
+ (d) If the Work includes a "NOTICE" text file as part of its
+ distribution, then any Derivative Works that You distribute must
+ include a readable copy of the attribution notices contained
+ within such NOTICE file, excluding those notices that do not
+ pertain to any part of the Derivative Works, in at least one
+ of the following places: within a NOTICE text file distributed
+ as part of the Derivative Works; within the Source form or
+ documentation, if provided along with the Derivative Works; or,
+ within a display generated by the Derivative Works, if and
+ wherever such third-party notices normally appear. The contents
+ of the NOTICE file are for informational purposes only and
+ do not modify the License. You may add Your own attribution
+ notices within Derivative Works that You distribute, alongside
+ or as an addendum to the NOTICE text from the Work, provided
+ that such additional attribution notices cannot be construed
+ as modifying the License.
+
+ You may add Your own copyright statement to Your modifications and
+ may provide additional or different license terms and conditions
+ for use, reproduction, or distribution of Your modifications, or
+ for any such Derivative Works as a whole, provided Your use,
+ reproduction, and distribution of the Work otherwise complies with
+ the conditions stated in this License.
+
+5. Submission of Contributions. Unless You explicitly state otherwise,
+ any Contribution intentionally submitted for inclusion in the Work
+ by You to the Licensor shall be under the terms and conditions of
+ this License, without any additional terms or conditions.
+ Notwithstanding the above, nothing herein shall supersede or modify
+ the terms of any separate license agreement you may have executed
+ with Licensor regarding such Contributions.
+
+6. Trademarks. This License does not grant permission to use the trade
+ names, trademarks, service marks, or product names of the Licensor,
+ except as required for reasonable and customary use in describing the
+ origin of the Work and reproducing the content of the NOTICE file.
+
+7. Disclaimer of Warranty. Unless required by applicable law or
+ agreed to in writing, Licensor provides the Work (and each
+ Contributor provides its Contributions) on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
+ implied, including, without limitation, any warranties or conditions
+ of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
+ PARTICULAR PURPOSE. You are solely responsible for determining the
+ appropriateness of using or redistributing the Work and assume any
+ risks associated with Your exercise of permissions under this License.
+
+8. Limitation of Liability. In no event and under no legal theory,
+ whether in tort (including negligence), contract, or otherwise,
+ unless required by applicable law (such as deliberate and grossly
+ negligent acts) or agreed to in writing, shall any Contributor be
+ liable to You for damages, including any direct, indirect, special,
+ incidental, or consequential damages of any character arising as a
+ result of this License or out of the use or inability to use the
+ Work (including but not limited to damages for loss of goodwill,
+ work stoppage, computer failure or malfunction, or any and all
+ other commercial damages or losses), even if such Contributor
+ has been advised of the possibility of such damages.
+
+9. Accepting Warranty or Additional Liability. While redistributing
+ the Work or Derivative Works thereof, You may choose to offer,
+ and charge a fee for, acceptance of support, warranty, indemnity,
+ or other liability obligations and/or rights consistent with this
+ License. However, in accepting such obligations, You may act only
+ on Your own behalf and on Your sole responsibility, not on behalf
+ of any other Contributor, and only if You agree to indemnify,
+ defend, and hold each Contributor harmless for any liability
+ incurred by, or claims asserted against, such Contributor by reason
+ of your accepting any such warranty or additional liability.
+
+END OF TERMS AND CONDITIONS
+
+APPENDIX: How to apply the Apache License to your work.
+
+ To apply the Apache License to your work, attach the following
+ boilerplate notice, with the fields enclosed by brackets "[]"
+ replaced with your own identifying information. (Don't include
+ the brackets!) The text should be enclosed in the appropriate
+ comment syntax for the file format. We also recommend that a
+ file or class name and description of purpose be included on the
+ same "printed page" as the copyright notice for easier
+ identification within third-party archives.
+
+Copyright 2019 ZHENG Robert
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
diff --git a/Makefile b/Makefile
new file mode 100644
index 0000000..018a1b4
--- /dev/null
+++ b/Makefile
@@ -0,0 +1,432 @@
+#############################################################################
+# Makefile for building: itis_app
+# Generated by qmake (3.1) (Qt 5.12.8)
+# Project: itis_app.pro
+# Template: subdirs
+# Command: /usr/lib/qt5/bin/qmake -o Makefile itis_app.pro CONFIG+=debug
+#############################################################################
+
+MAKEFILE = Makefile
+
+EQ = =
+
+first: make_first
+QMAKE = /usr/lib/qt5/bin/qmake
+DEL_FILE = rm -f
+CHK_DIR_EXISTS= test -d
+MKDIR = mkdir -p
+COPY = cp -f
+COPY_FILE = cp -f
+COPY_DIR = cp -f -R
+INSTALL_FILE = install -m 644 -p
+INSTALL_PROGRAM = install -m 755 -p
+INSTALL_DIR = cp -f -R
+QINSTALL = /usr/lib/qt5/bin/qmake -install qinstall
+QINSTALL_PROGRAM = /usr/lib/qt5/bin/qmake -install qinstall -exe
+DEL_FILE = rm -f
+SYMLINK = ln -f -s
+DEL_DIR = rmdir
+MOVE = mv -f
+TAR = tar -cf
+COMPRESS = gzip -9f
+DISTNAME = itis_app1.0.0
+DISTDIR = /webapp_dez/itis_app/.tmp/itis_app1.0.0
+SUBTARGETS = \
+ sub-helpers \
+ sub-models \
+ sub-views \
+ sub-controllers
+
+
+sub-helpers-qmake_all: FORCE
+ @test -d helpers/ || mkdir -p helpers/
+ cd helpers/ && $(QMAKE) -o Makefile /webapp_dez/itis_app/helpers/helpers.pro CONFIG+=debug
+ cd helpers/ && $(MAKE) -f Makefile qmake_all
+sub-helpers: FORCE
+ @test -d helpers/ || mkdir -p helpers/
+ cd helpers/ && ( test -e Makefile || $(QMAKE) -o Makefile /webapp_dez/itis_app/helpers/helpers.pro CONFIG+=debug ) && $(MAKE) -f Makefile
+sub-helpers-make_first-ordered: FORCE
+ @test -d helpers/ || mkdir -p helpers/
+ cd helpers/ && ( test -e Makefile || $(QMAKE) -o Makefile /webapp_dez/itis_app/helpers/helpers.pro CONFIG+=debug ) && $(MAKE) -f Makefile
+sub-helpers-make_first: FORCE
+ @test -d helpers/ || mkdir -p helpers/
+ cd helpers/ && ( test -e Makefile || $(QMAKE) -o Makefile /webapp_dez/itis_app/helpers/helpers.pro CONFIG+=debug ) && $(MAKE) -f Makefile
+sub-helpers-all-ordered: FORCE
+ @test -d helpers/ || mkdir -p helpers/
+ cd helpers/ && ( test -e Makefile || $(QMAKE) -o Makefile /webapp_dez/itis_app/helpers/helpers.pro CONFIG+=debug ) && $(MAKE) -f Makefile all
+sub-helpers-all: FORCE
+ @test -d helpers/ || mkdir -p helpers/
+ cd helpers/ && ( test -e Makefile || $(QMAKE) -o Makefile /webapp_dez/itis_app/helpers/helpers.pro CONFIG+=debug ) && $(MAKE) -f Makefile all
+sub-helpers-clean-ordered: FORCE
+ @test -d helpers/ || mkdir -p helpers/
+ cd helpers/ && ( test -e Makefile || $(QMAKE) -o Makefile /webapp_dez/itis_app/helpers/helpers.pro CONFIG+=debug ) && $(MAKE) -f Makefile clean
+sub-helpers-clean: FORCE
+ @test -d helpers/ || mkdir -p helpers/
+ cd helpers/ && ( test -e Makefile || $(QMAKE) -o Makefile /webapp_dez/itis_app/helpers/helpers.pro CONFIG+=debug ) && $(MAKE) -f Makefile clean
+sub-helpers-distclean-ordered: FORCE
+ @test -d helpers/ || mkdir -p helpers/
+ cd helpers/ && ( test -e Makefile || $(QMAKE) -o Makefile /webapp_dez/itis_app/helpers/helpers.pro CONFIG+=debug ) && $(MAKE) -f Makefile distclean
+sub-helpers-distclean: FORCE
+ @test -d helpers/ || mkdir -p helpers/
+ cd helpers/ && ( test -e Makefile || $(QMAKE) -o Makefile /webapp_dez/itis_app/helpers/helpers.pro CONFIG+=debug ) && $(MAKE) -f Makefile distclean
+sub-helpers-install_subtargets-ordered: FORCE
+ @test -d helpers/ || mkdir -p helpers/
+ cd helpers/ && ( test -e Makefile || $(QMAKE) -o Makefile /webapp_dez/itis_app/helpers/helpers.pro CONFIG+=debug ) && $(MAKE) -f Makefile install
+sub-helpers-install_subtargets: FORCE
+ @test -d helpers/ || mkdir -p helpers/
+ cd helpers/ && ( test -e Makefile || $(QMAKE) -o Makefile /webapp_dez/itis_app/helpers/helpers.pro CONFIG+=debug ) && $(MAKE) -f Makefile install
+sub-helpers-uninstall_subtargets-ordered: FORCE
+ @test -d helpers/ || mkdir -p helpers/
+ cd helpers/ && ( test -e Makefile || $(QMAKE) -o Makefile /webapp_dez/itis_app/helpers/helpers.pro CONFIG+=debug ) && $(MAKE) -f Makefile uninstall
+sub-helpers-uninstall_subtargets: FORCE
+ @test -d helpers/ || mkdir -p helpers/
+ cd helpers/ && ( test -e Makefile || $(QMAKE) -o Makefile /webapp_dez/itis_app/helpers/helpers.pro CONFIG+=debug ) && $(MAKE) -f Makefile uninstall
+sub-models-qmake_all: sub-helpers-qmake_all FORCE
+ @test -d models/ || mkdir -p models/
+ cd models/ && $(QMAKE) -o Makefile /webapp_dez/itis_app/models/models.pro CONFIG+=debug
+ cd models/ && $(MAKE) -f Makefile qmake_all
+sub-models: FORCE
+ @test -d models/ || mkdir -p models/
+ cd models/ && ( test -e Makefile || $(QMAKE) -o Makefile /webapp_dez/itis_app/models/models.pro CONFIG+=debug ) && $(MAKE) -f Makefile
+sub-models-make_first-ordered: sub-helpers-make_first-ordered FORCE
+ @test -d models/ || mkdir -p models/
+ cd models/ && ( test -e Makefile || $(QMAKE) -o Makefile /webapp_dez/itis_app/models/models.pro CONFIG+=debug ) && $(MAKE) -f Makefile
+sub-models-make_first: FORCE
+ @test -d models/ || mkdir -p models/
+ cd models/ && ( test -e Makefile || $(QMAKE) -o Makefile /webapp_dez/itis_app/models/models.pro CONFIG+=debug ) && $(MAKE) -f Makefile
+sub-models-all-ordered: sub-helpers-all-ordered FORCE
+ @test -d models/ || mkdir -p models/
+ cd models/ && ( test -e Makefile || $(QMAKE) -o Makefile /webapp_dez/itis_app/models/models.pro CONFIG+=debug ) && $(MAKE) -f Makefile all
+sub-models-all: FORCE
+ @test -d models/ || mkdir -p models/
+ cd models/ && ( test -e Makefile || $(QMAKE) -o Makefile /webapp_dez/itis_app/models/models.pro CONFIG+=debug ) && $(MAKE) -f Makefile all
+sub-models-clean-ordered: sub-helpers-clean-ordered FORCE
+ @test -d models/ || mkdir -p models/
+ cd models/ && ( test -e Makefile || $(QMAKE) -o Makefile /webapp_dez/itis_app/models/models.pro CONFIG+=debug ) && $(MAKE) -f Makefile clean
+sub-models-clean: FORCE
+ @test -d models/ || mkdir -p models/
+ cd models/ && ( test -e Makefile || $(QMAKE) -o Makefile /webapp_dez/itis_app/models/models.pro CONFIG+=debug ) && $(MAKE) -f Makefile clean
+sub-models-distclean-ordered: sub-helpers-distclean-ordered FORCE
+ @test -d models/ || mkdir -p models/
+ cd models/ && ( test -e Makefile || $(QMAKE) -o Makefile /webapp_dez/itis_app/models/models.pro CONFIG+=debug ) && $(MAKE) -f Makefile distclean
+sub-models-distclean: FORCE
+ @test -d models/ || mkdir -p models/
+ cd models/ && ( test -e Makefile || $(QMAKE) -o Makefile /webapp_dez/itis_app/models/models.pro CONFIG+=debug ) && $(MAKE) -f Makefile distclean
+sub-models-install_subtargets-ordered: sub-helpers-install_subtargets-ordered FORCE
+ @test -d models/ || mkdir -p models/
+ cd models/ && ( test -e Makefile || $(QMAKE) -o Makefile /webapp_dez/itis_app/models/models.pro CONFIG+=debug ) && $(MAKE) -f Makefile install
+sub-models-install_subtargets: FORCE
+ @test -d models/ || mkdir -p models/
+ cd models/ && ( test -e Makefile || $(QMAKE) -o Makefile /webapp_dez/itis_app/models/models.pro CONFIG+=debug ) && $(MAKE) -f Makefile install
+sub-models-uninstall_subtargets-ordered: sub-helpers-uninstall_subtargets-ordered FORCE
+ @test -d models/ || mkdir -p models/
+ cd models/ && ( test -e Makefile || $(QMAKE) -o Makefile /webapp_dez/itis_app/models/models.pro CONFIG+=debug ) && $(MAKE) -f Makefile uninstall
+sub-models-uninstall_subtargets: FORCE
+ @test -d models/ || mkdir -p models/
+ cd models/ && ( test -e Makefile || $(QMAKE) -o Makefile /webapp_dez/itis_app/models/models.pro CONFIG+=debug ) && $(MAKE) -f Makefile uninstall
+sub-views-qmake_all: sub-models-qmake_all FORCE
+ @test -d views/ || mkdir -p views/
+ cd views/ && $(QMAKE) -o Makefile /webapp_dez/itis_app/views/views.pro CONFIG+=debug
+ cd views/ && $(MAKE) -f Makefile qmake_all
+sub-views: FORCE
+ @test -d views/ || mkdir -p views/
+ cd views/ && ( test -e Makefile || $(QMAKE) -o Makefile /webapp_dez/itis_app/views/views.pro CONFIG+=debug ) && $(MAKE) -f Makefile
+sub-views-make_first-ordered: sub-models-make_first-ordered FORCE
+ @test -d views/ || mkdir -p views/
+ cd views/ && ( test -e Makefile || $(QMAKE) -o Makefile /webapp_dez/itis_app/views/views.pro CONFIG+=debug ) && $(MAKE) -f Makefile
+sub-views-make_first: FORCE
+ @test -d views/ || mkdir -p views/
+ cd views/ && ( test -e Makefile || $(QMAKE) -o Makefile /webapp_dez/itis_app/views/views.pro CONFIG+=debug ) && $(MAKE) -f Makefile
+sub-views-all-ordered: sub-models-all-ordered FORCE
+ @test -d views/ || mkdir -p views/
+ cd views/ && ( test -e Makefile || $(QMAKE) -o Makefile /webapp_dez/itis_app/views/views.pro CONFIG+=debug ) && $(MAKE) -f Makefile all
+sub-views-all: FORCE
+ @test -d views/ || mkdir -p views/
+ cd views/ && ( test -e Makefile || $(QMAKE) -o Makefile /webapp_dez/itis_app/views/views.pro CONFIG+=debug ) && $(MAKE) -f Makefile all
+sub-views-clean-ordered: sub-models-clean-ordered FORCE
+ @test -d views/ || mkdir -p views/
+ cd views/ && ( test -e Makefile || $(QMAKE) -o Makefile /webapp_dez/itis_app/views/views.pro CONFIG+=debug ) && $(MAKE) -f Makefile clean
+sub-views-clean: FORCE
+ @test -d views/ || mkdir -p views/
+ cd views/ && ( test -e Makefile || $(QMAKE) -o Makefile /webapp_dez/itis_app/views/views.pro CONFIG+=debug ) && $(MAKE) -f Makefile clean
+sub-views-distclean-ordered: sub-models-distclean-ordered FORCE
+ @test -d views/ || mkdir -p views/
+ cd views/ && ( test -e Makefile || $(QMAKE) -o Makefile /webapp_dez/itis_app/views/views.pro CONFIG+=debug ) && $(MAKE) -f Makefile distclean
+sub-views-distclean: FORCE
+ @test -d views/ || mkdir -p views/
+ cd views/ && ( test -e Makefile || $(QMAKE) -o Makefile /webapp_dez/itis_app/views/views.pro CONFIG+=debug ) && $(MAKE) -f Makefile distclean
+sub-views-install_subtargets-ordered: sub-models-install_subtargets-ordered FORCE
+ @test -d views/ || mkdir -p views/
+ cd views/ && ( test -e Makefile || $(QMAKE) -o Makefile /webapp_dez/itis_app/views/views.pro CONFIG+=debug ) && $(MAKE) -f Makefile install
+sub-views-install_subtargets: FORCE
+ @test -d views/ || mkdir -p views/
+ cd views/ && ( test -e Makefile || $(QMAKE) -o Makefile /webapp_dez/itis_app/views/views.pro CONFIG+=debug ) && $(MAKE) -f Makefile install
+sub-views-uninstall_subtargets-ordered: sub-models-uninstall_subtargets-ordered FORCE
+ @test -d views/ || mkdir -p views/
+ cd views/ && ( test -e Makefile || $(QMAKE) -o Makefile /webapp_dez/itis_app/views/views.pro CONFIG+=debug ) && $(MAKE) -f Makefile uninstall
+sub-views-uninstall_subtargets: FORCE
+ @test -d views/ || mkdir -p views/
+ cd views/ && ( test -e Makefile || $(QMAKE) -o Makefile /webapp_dez/itis_app/views/views.pro CONFIG+=debug ) && $(MAKE) -f Makefile uninstall
+sub-controllers-qmake_all: sub-views-qmake_all FORCE
+ @test -d controllers/ || mkdir -p controllers/
+ cd controllers/ && $(QMAKE) -o Makefile /webapp_dez/itis_app/controllers/controllers.pro CONFIG+=debug
+ cd controllers/ && $(MAKE) -f Makefile qmake_all
+sub-controllers: FORCE
+ @test -d controllers/ || mkdir -p controllers/
+ cd controllers/ && ( test -e Makefile || $(QMAKE) -o Makefile /webapp_dez/itis_app/controllers/controllers.pro CONFIG+=debug ) && $(MAKE) -f Makefile
+sub-controllers-make_first-ordered: sub-views-make_first-ordered FORCE
+ @test -d controllers/ || mkdir -p controllers/
+ cd controllers/ && ( test -e Makefile || $(QMAKE) -o Makefile /webapp_dez/itis_app/controllers/controllers.pro CONFIG+=debug ) && $(MAKE) -f Makefile
+sub-controllers-make_first: FORCE
+ @test -d controllers/ || mkdir -p controllers/
+ cd controllers/ && ( test -e Makefile || $(QMAKE) -o Makefile /webapp_dez/itis_app/controllers/controllers.pro CONFIG+=debug ) && $(MAKE) -f Makefile
+sub-controllers-all-ordered: sub-views-all-ordered FORCE
+ @test -d controllers/ || mkdir -p controllers/
+ cd controllers/ && ( test -e Makefile || $(QMAKE) -o Makefile /webapp_dez/itis_app/controllers/controllers.pro CONFIG+=debug ) && $(MAKE) -f Makefile all
+sub-controllers-all: FORCE
+ @test -d controllers/ || mkdir -p controllers/
+ cd controllers/ && ( test -e Makefile || $(QMAKE) -o Makefile /webapp_dez/itis_app/controllers/controllers.pro CONFIG+=debug ) && $(MAKE) -f Makefile all
+sub-controllers-clean-ordered: sub-views-clean-ordered FORCE
+ @test -d controllers/ || mkdir -p controllers/
+ cd controllers/ && ( test -e Makefile || $(QMAKE) -o Makefile /webapp_dez/itis_app/controllers/controllers.pro CONFIG+=debug ) && $(MAKE) -f Makefile clean
+sub-controllers-clean: FORCE
+ @test -d controllers/ || mkdir -p controllers/
+ cd controllers/ && ( test -e Makefile || $(QMAKE) -o Makefile /webapp_dez/itis_app/controllers/controllers.pro CONFIG+=debug ) && $(MAKE) -f Makefile clean
+sub-controllers-distclean-ordered: sub-views-distclean-ordered FORCE
+ @test -d controllers/ || mkdir -p controllers/
+ cd controllers/ && ( test -e Makefile || $(QMAKE) -o Makefile /webapp_dez/itis_app/controllers/controllers.pro CONFIG+=debug ) && $(MAKE) -f Makefile distclean
+sub-controllers-distclean: FORCE
+ @test -d controllers/ || mkdir -p controllers/
+ cd controllers/ && ( test -e Makefile || $(QMAKE) -o Makefile /webapp_dez/itis_app/controllers/controllers.pro CONFIG+=debug ) && $(MAKE) -f Makefile distclean
+sub-controllers-install_subtargets-ordered: sub-views-install_subtargets-ordered FORCE
+ @test -d controllers/ || mkdir -p controllers/
+ cd controllers/ && ( test -e Makefile || $(QMAKE) -o Makefile /webapp_dez/itis_app/controllers/controllers.pro CONFIG+=debug ) && $(MAKE) -f Makefile install
+sub-controllers-install_subtargets: FORCE
+ @test -d controllers/ || mkdir -p controllers/
+ cd controllers/ && ( test -e Makefile || $(QMAKE) -o Makefile /webapp_dez/itis_app/controllers/controllers.pro CONFIG+=debug ) && $(MAKE) -f Makefile install
+sub-controllers-uninstall_subtargets-ordered: sub-views-uninstall_subtargets-ordered FORCE
+ @test -d controllers/ || mkdir -p controllers/
+ cd controllers/ && ( test -e Makefile || $(QMAKE) -o Makefile /webapp_dez/itis_app/controllers/controllers.pro CONFIG+=debug ) && $(MAKE) -f Makefile uninstall
+sub-controllers-uninstall_subtargets: FORCE
+ @test -d controllers/ || mkdir -p controllers/
+ cd controllers/ && ( test -e Makefile || $(QMAKE) -o Makefile /webapp_dez/itis_app/controllers/controllers.pro CONFIG+=debug ) && $(MAKE) -f Makefile uninstall
+
+Makefile: itis_app.pro /usr/lib/x86_64-linux-gnu/qt5/mkspecs/linux-g++/qmake.conf /usr/lib/x86_64-linux-gnu/qt5/mkspecs/features/spec_pre.prf \
+ /usr/lib/x86_64-linux-gnu/qt5/mkspecs/common/unix.conf \
+ /usr/lib/x86_64-linux-gnu/qt5/mkspecs/common/linux.conf \
+ /usr/lib/x86_64-linux-gnu/qt5/mkspecs/common/sanitize.conf \
+ /usr/lib/x86_64-linux-gnu/qt5/mkspecs/common/gcc-base.conf \
+ /usr/lib/x86_64-linux-gnu/qt5/mkspecs/common/gcc-base-unix.conf \
+ /usr/lib/x86_64-linux-gnu/qt5/mkspecs/common/g++-base.conf \
+ /usr/lib/x86_64-linux-gnu/qt5/mkspecs/common/g++-unix.conf \
+ /usr/lib/x86_64-linux-gnu/qt5/mkspecs/qconfig.pri \
+ /usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_accessibility_support_private.pri \
+ /usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_bootstrap_private.pri \
+ /usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_concurrent.pri \
+ /usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_concurrent_private.pri \
+ /usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_core.pri \
+ /usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_core_private.pri \
+ /usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_dbus.pri \
+ /usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_dbus_private.pri \
+ /usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_devicediscovery_support_private.pri \
+ /usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_edid_support_private.pri \
+ /usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_egl_support_private.pri \
+ /usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_eglfs_kms_support_private.pri \
+ /usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_eglfsdeviceintegration_private.pri \
+ /usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_eventdispatcher_support_private.pri \
+ /usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_fb_support_private.pri \
+ /usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_fontdatabase_support_private.pri \
+ /usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_glx_support_private.pri \
+ /usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_gui.pri \
+ /usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_gui_private.pri \
+ /usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_input_support_private.pri \
+ /usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_kms_support_private.pri \
+ /usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_linuxaccessibility_support_private.pri \
+ /usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_network.pri \
+ /usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_network_private.pri \
+ /usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_opengl.pri \
+ /usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_opengl_private.pri \
+ /usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_openglextensions.pri \
+ /usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_openglextensions_private.pri \
+ /usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_platformcompositor_support_private.pri \
+ /usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_printsupport.pri \
+ /usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_printsupport_private.pri \
+ /usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_qml.pri \
+ /usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_qmltest.pri \
+ /usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_quick.pri \
+ /usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_quickwidgets.pri \
+ /usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_service_support_private.pri \
+ /usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_sql.pri \
+ /usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_sql_private.pri \
+ /usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_testlib.pri \
+ /usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_testlib_private.pri \
+ /usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_theme_support_private.pri \
+ /usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_vulkan_support_private.pri \
+ /usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_widgets.pri \
+ /usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_widgets_private.pri \
+ /usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_xcb_qpa_lib_private.pri \
+ /usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_xml.pri \
+ /usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_xml_private.pri \
+ /usr/lib/x86_64-linux-gnu/qt5/mkspecs/features/qt_functions.prf \
+ /usr/lib/x86_64-linux-gnu/qt5/mkspecs/features/qt_config.prf \
+ /usr/lib/x86_64-linux-gnu/qt5/mkspecs/linux-g++/qmake.conf \
+ /usr/lib/x86_64-linux-gnu/qt5/mkspecs/features/spec_post.prf \
+ .qmake.stash \
+ /usr/lib/x86_64-linux-gnu/qt5/mkspecs/features/exclusive_builds.prf \
+ /usr/lib/x86_64-linux-gnu/qt5/mkspecs/features/toolchain.prf \
+ /usr/lib/x86_64-linux-gnu/qt5/mkspecs/features/default_pre.prf \
+ /usr/lib/x86_64-linux-gnu/qt5/mkspecs/features/resolve_config.prf \
+ /usr/lib/x86_64-linux-gnu/qt5/mkspecs/features/default_post.prf \
+ /usr/lib/x86_64-linux-gnu/qt5/mkspecs/features/warn_on.prf \
+ /usr/lib/x86_64-linux-gnu/qt5/mkspecs/features/qmake_use.prf \
+ /usr/lib/x86_64-linux-gnu/qt5/mkspecs/features/file_copies.prf \
+ /usr/lib/x86_64-linux-gnu/qt5/mkspecs/features/testcase_targets.prf \
+ /usr/lib/x86_64-linux-gnu/qt5/mkspecs/features/exceptions.prf \
+ /usr/lib/x86_64-linux-gnu/qt5/mkspecs/features/yacc.prf \
+ /usr/lib/x86_64-linux-gnu/qt5/mkspecs/features/lex.prf \
+ itis_app.pro
+ $(QMAKE) -o Makefile itis_app.pro CONFIG+=debug
+/usr/lib/x86_64-linux-gnu/qt5/mkspecs/features/spec_pre.prf:
+/usr/lib/x86_64-linux-gnu/qt5/mkspecs/common/unix.conf:
+/usr/lib/x86_64-linux-gnu/qt5/mkspecs/common/linux.conf:
+/usr/lib/x86_64-linux-gnu/qt5/mkspecs/common/sanitize.conf:
+/usr/lib/x86_64-linux-gnu/qt5/mkspecs/common/gcc-base.conf:
+/usr/lib/x86_64-linux-gnu/qt5/mkspecs/common/gcc-base-unix.conf:
+/usr/lib/x86_64-linux-gnu/qt5/mkspecs/common/g++-base.conf:
+/usr/lib/x86_64-linux-gnu/qt5/mkspecs/common/g++-unix.conf:
+/usr/lib/x86_64-linux-gnu/qt5/mkspecs/qconfig.pri:
+/usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_accessibility_support_private.pri:
+/usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_bootstrap_private.pri:
+/usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_concurrent.pri:
+/usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_concurrent_private.pri:
+/usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_core.pri:
+/usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_core_private.pri:
+/usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_dbus.pri:
+/usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_dbus_private.pri:
+/usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_devicediscovery_support_private.pri:
+/usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_edid_support_private.pri:
+/usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_egl_support_private.pri:
+/usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_eglfs_kms_support_private.pri:
+/usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_eglfsdeviceintegration_private.pri:
+/usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_eventdispatcher_support_private.pri:
+/usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_fb_support_private.pri:
+/usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_fontdatabase_support_private.pri:
+/usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_glx_support_private.pri:
+/usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_gui.pri:
+/usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_gui_private.pri:
+/usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_input_support_private.pri:
+/usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_kms_support_private.pri:
+/usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_linuxaccessibility_support_private.pri:
+/usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_network.pri:
+/usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_network_private.pri:
+/usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_opengl.pri:
+/usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_opengl_private.pri:
+/usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_openglextensions.pri:
+/usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_openglextensions_private.pri:
+/usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_platformcompositor_support_private.pri:
+/usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_printsupport.pri:
+/usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_printsupport_private.pri:
+/usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_qml.pri:
+/usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_qmltest.pri:
+/usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_quick.pri:
+/usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_quickwidgets.pri:
+/usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_service_support_private.pri:
+/usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_sql.pri:
+/usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_sql_private.pri:
+/usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_testlib.pri:
+/usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_testlib_private.pri:
+/usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_theme_support_private.pri:
+/usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_vulkan_support_private.pri:
+/usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_widgets.pri:
+/usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_widgets_private.pri:
+/usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_xcb_qpa_lib_private.pri:
+/usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_xml.pri:
+/usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_xml_private.pri:
+/usr/lib/x86_64-linux-gnu/qt5/mkspecs/features/qt_functions.prf:
+/usr/lib/x86_64-linux-gnu/qt5/mkspecs/features/qt_config.prf:
+/usr/lib/x86_64-linux-gnu/qt5/mkspecs/linux-g++/qmake.conf:
+/usr/lib/x86_64-linux-gnu/qt5/mkspecs/features/spec_post.prf:
+.qmake.stash:
+/usr/lib/x86_64-linux-gnu/qt5/mkspecs/features/exclusive_builds.prf:
+/usr/lib/x86_64-linux-gnu/qt5/mkspecs/features/toolchain.prf:
+/usr/lib/x86_64-linux-gnu/qt5/mkspecs/features/default_pre.prf:
+/usr/lib/x86_64-linux-gnu/qt5/mkspecs/features/resolve_config.prf:
+/usr/lib/x86_64-linux-gnu/qt5/mkspecs/features/default_post.prf:
+/usr/lib/x86_64-linux-gnu/qt5/mkspecs/features/warn_on.prf:
+/usr/lib/x86_64-linux-gnu/qt5/mkspecs/features/qmake_use.prf:
+/usr/lib/x86_64-linux-gnu/qt5/mkspecs/features/file_copies.prf:
+/usr/lib/x86_64-linux-gnu/qt5/mkspecs/features/testcase_targets.prf:
+/usr/lib/x86_64-linux-gnu/qt5/mkspecs/features/exceptions.prf:
+/usr/lib/x86_64-linux-gnu/qt5/mkspecs/features/yacc.prf:
+/usr/lib/x86_64-linux-gnu/qt5/mkspecs/features/lex.prf:
+itis_app.pro:
+qmake: FORCE
+ @$(QMAKE) -o Makefile itis_app.pro CONFIG+=debug
+
+qmake_all: sub-helpers-qmake_all sub-models-qmake_all sub-views-qmake_all sub-controllers-qmake_all FORCE
+
+make_first: sub-helpers-make_first-ordered sub-models-make_first-ordered sub-views-make_first-ordered sub-controllers-make_first-ordered FORCE
+all: sub-helpers-all-ordered sub-models-all-ordered sub-views-all-ordered sub-controllers-all-ordered FORCE
+clean: sub-helpers-clean-ordered sub-models-clean-ordered sub-views-clean-ordered sub-controllers-clean-ordered FORCE
+distclean: sub-helpers-distclean-ordered sub-models-distclean-ordered sub-views-distclean-ordered sub-controllers-distclean-ordered FORCE
+ -$(DEL_FILE) Makefile
+ -$(DEL_FILE) .qmake.stash
+install_subtargets: sub-helpers-install_subtargets-ordered sub-models-install_subtargets-ordered sub-views-install_subtargets-ordered sub-controllers-install_subtargets-ordered FORCE
+uninstall_subtargets: sub-helpers-uninstall_subtargets-ordered sub-models-uninstall_subtargets-ordered sub-views-uninstall_subtargets-ordered sub-controllers-uninstall_subtargets-ordered FORCE
+
+sub-helpers-check_ordered:
+ @test -d helpers/ || mkdir -p helpers/
+ cd helpers/ && ( test -e Makefile || $(QMAKE) -o Makefile /webapp_dez/itis_app/helpers/helpers.pro CONFIG+=debug ) && $(MAKE) -f Makefile check
+sub-models-check_ordered: sub-helpers-check_ordered
+ @test -d models/ || mkdir -p models/
+ cd models/ && ( test -e Makefile || $(QMAKE) -o Makefile /webapp_dez/itis_app/models/models.pro CONFIG+=debug ) && $(MAKE) -f Makefile check
+sub-views-check_ordered: sub-models-check_ordered
+ @test -d views/ || mkdir -p views/
+ cd views/ && ( test -e Makefile || $(QMAKE) -o Makefile /webapp_dez/itis_app/views/views.pro CONFIG+=debug ) && $(MAKE) -f Makefile check
+sub-controllers-check_ordered: sub-views-check_ordered
+ @test -d controllers/ || mkdir -p controllers/
+ cd controllers/ && ( test -e Makefile || $(QMAKE) -o Makefile /webapp_dez/itis_app/controllers/controllers.pro CONFIG+=debug ) && $(MAKE) -f Makefile check
+check: sub-helpers-check_ordered sub-models-check_ordered sub-views-check_ordered sub-controllers-check_ordered
+
+sub-helpers-benchmark_ordered:
+ @test -d helpers/ || mkdir -p helpers/
+ cd helpers/ && ( test -e Makefile || $(QMAKE) -o Makefile /webapp_dez/itis_app/helpers/helpers.pro CONFIG+=debug ) && $(MAKE) -f Makefile benchmark
+sub-models-benchmark_ordered: sub-helpers-benchmark_ordered
+ @test -d models/ || mkdir -p models/
+ cd models/ && ( test -e Makefile || $(QMAKE) -o Makefile /webapp_dez/itis_app/models/models.pro CONFIG+=debug ) && $(MAKE) -f Makefile benchmark
+sub-views-benchmark_ordered: sub-models-benchmark_ordered
+ @test -d views/ || mkdir -p views/
+ cd views/ && ( test -e Makefile || $(QMAKE) -o Makefile /webapp_dez/itis_app/views/views.pro CONFIG+=debug ) && $(MAKE) -f Makefile benchmark
+sub-controllers-benchmark_ordered: sub-views-benchmark_ordered
+ @test -d controllers/ || mkdir -p controllers/
+ cd controllers/ && ( test -e Makefile || $(QMAKE) -o Makefile /webapp_dez/itis_app/controllers/controllers.pro CONFIG+=debug ) && $(MAKE) -f Makefile benchmark
+benchmark: sub-helpers-benchmark_ordered sub-models-benchmark_ordered sub-views-benchmark_ordered sub-controllers-benchmark_ordered
+install:install_subtargets FORCE
+
+uninstall: uninstall_subtargets FORCE
+
+FORCE:
+
+dist: distdir FORCE
+ (cd `dirname $(DISTDIR)` && $(TAR) $(DISTNAME).tar $(DISTNAME) && $(COMPRESS) $(DISTNAME).tar) && $(MOVE) `dirname $(DISTDIR)`/$(DISTNAME).tar.gz . && $(DEL_FILE) -r $(DISTDIR)
+
+distdir: sub-helpers-distdir sub-models-distdir sub-views-distdir sub-controllers-distdir FORCE
+ @test -d $(DISTDIR) || mkdir -p $(DISTDIR)
+ $(COPY_FILE) --parents /usr/lib/x86_64-linux-gnu/qt5/mkspecs/features/spec_pre.prf /usr/lib/x86_64-linux-gnu/qt5/mkspecs/common/unix.conf /usr/lib/x86_64-linux-gnu/qt5/mkspecs/common/linux.conf /usr/lib/x86_64-linux-gnu/qt5/mkspecs/common/sanitize.conf /usr/lib/x86_64-linux-gnu/qt5/mkspecs/common/gcc-base.conf /usr/lib/x86_64-linux-gnu/qt5/mkspecs/common/gcc-base-unix.conf /usr/lib/x86_64-linux-gnu/qt5/mkspecs/common/g++-base.conf /usr/lib/x86_64-linux-gnu/qt5/mkspecs/common/g++-unix.conf /usr/lib/x86_64-linux-gnu/qt5/mkspecs/qconfig.pri /usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_accessibility_support_private.pri /usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_bootstrap_private.pri /usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_concurrent.pri /usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_concurrent_private.pri /usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_core.pri /usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_core_private.pri /usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_dbus.pri /usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_dbus_private.pri /usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_devicediscovery_support_private.pri /usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_edid_support_private.pri /usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_egl_support_private.pri /usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_eglfs_kms_support_private.pri /usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_eglfsdeviceintegration_private.pri /usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_eventdispatcher_support_private.pri /usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_fb_support_private.pri /usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_fontdatabase_support_private.pri /usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_glx_support_private.pri /usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_gui.pri /usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_gui_private.pri /usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_input_support_private.pri /usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_kms_support_private.pri /usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_linuxaccessibility_support_private.pri /usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_network.pri /usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_network_private.pri /usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_opengl.pri /usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_opengl_private.pri /usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_openglextensions.pri /usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_openglextensions_private.pri /usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_platformcompositor_support_private.pri /usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_printsupport.pri /usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_printsupport_private.pri /usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_qml.pri /usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_qmltest.pri /usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_quick.pri /usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_quickwidgets.pri /usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_service_support_private.pri /usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_sql.pri /usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_sql_private.pri /usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_testlib.pri /usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_testlib_private.pri /usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_theme_support_private.pri /usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_vulkan_support_private.pri /usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_widgets.pri /usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_widgets_private.pri /usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_xcb_qpa_lib_private.pri /usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_xml.pri /usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_xml_private.pri /usr/lib/x86_64-linux-gnu/qt5/mkspecs/features/qt_functions.prf /usr/lib/x86_64-linux-gnu/qt5/mkspecs/features/qt_config.prf /usr/lib/x86_64-linux-gnu/qt5/mkspecs/linux-g++/qmake.conf /usr/lib/x86_64-linux-gnu/qt5/mkspecs/features/spec_post.prf .qmake.stash /usr/lib/x86_64-linux-gnu/qt5/mkspecs/features/exclusive_builds.prf /usr/lib/x86_64-linux-gnu/qt5/mkspecs/features/toolchain.prf /usr/lib/x86_64-linux-gnu/qt5/mkspecs/features/default_pre.prf /usr/lib/x86_64-linux-gnu/qt5/mkspecs/features/resolve_config.prf /usr/lib/x86_64-linux-gnu/qt5/mkspecs/features/default_post.prf /usr/lib/x86_64-linux-gnu/qt5/mkspecs/features/warn_on.prf /usr/lib/x86_64-linux-gnu/qt5/mkspecs/features/qmake_use.prf /usr/lib/x86_64-linux-gnu/qt5/mkspecs/features/file_copies.prf /usr/lib/x86_64-linux-gnu/qt5/mkspecs/features/testcase_targets.prf /usr/lib/x86_64-linux-gnu/qt5/mkspecs/features/exceptions.prf /usr/lib/x86_64-linux-gnu/qt5/mkspecs/features/yacc.prf /usr/lib/x86_64-linux-gnu/qt5/mkspecs/features/lex.prf itis_app.pro $(DISTDIR)/
+
+sub-helpers-distdir: FORCE
+ @test -d helpers/ || mkdir -p helpers/
+ cd helpers/ && ( test -e Makefile || $(QMAKE) -o Makefile /webapp_dez/itis_app/helpers/helpers.pro CONFIG+=debug ) && $(MAKE) -e -f Makefile distdir DISTDIR=$(DISTDIR)/helpers
+
+sub-models-distdir: FORCE
+ @test -d models/ || mkdir -p models/
+ cd models/ && ( test -e Makefile || $(QMAKE) -o Makefile /webapp_dez/itis_app/models/models.pro CONFIG+=debug ) && $(MAKE) -e -f Makefile distdir DISTDIR=$(DISTDIR)/models
+
+sub-views-distdir: FORCE
+ @test -d views/ || mkdir -p views/
+ cd views/ && ( test -e Makefile || $(QMAKE) -o Makefile /webapp_dez/itis_app/views/views.pro CONFIG+=debug ) && $(MAKE) -e -f Makefile distdir DISTDIR=$(DISTDIR)/views
+
+sub-controllers-distdir: FORCE
+ @test -d controllers/ || mkdir -p controllers/
+ cd controllers/ && ( test -e Makefile || $(QMAKE) -o Makefile /webapp_dez/itis_app/controllers/controllers.pro CONFIG+=debug ) && $(MAKE) -e -f Makefile distdir DISTDIR=$(DISTDIR)/controllers
+
diff --git a/README.md b/README.md
new file mode 100644
index 0000000..7c9ca5f
--- /dev/null
+++ b/README.md
@@ -0,0 +1,2 @@
+# itis_digidocu_dev
+A RWA for documenting standards of (passive) IT-Infrastructure and Products. Based on digidocu.dev
diff --git a/appbase.pri b/appbase.pri
new file mode 100644
index 0000000..8d4acf3
--- /dev/null
+++ b/appbase.pri
@@ -0,0 +1,13 @@
+win32 {
+ INCLUDEPATH += $$quote($$(TFDIR)\\include)
+ LIBS += -L$$quote($$(TFDIR)\\bin)
+ CONFIG(debug, debug|release) {
+ LIBS += -ltreefrogd1
+ } else {
+ LIBS += -ltreefrog1
+ }
+} else {
+ unix:LIBS += -Wl,-rpath,. -Wl,-rpath,/usr/lib -L/usr/lib -ltreefrog
+ unix:INCLUDEPATH += /usr/include/treefrog
+ linux-*:LIBS += -lrt
+}
diff --git a/cmake/CacheClean.cmake b/cmake/CacheClean.cmake
new file mode 100644
index 0000000..46abb98
--- /dev/null
+++ b/cmake/CacheClean.cmake
@@ -0,0 +1,14 @@
+# Clean cache
+file(GLOB cmake_generated
+ ${CMAKE_BINARY_DIR}/CMakeCache.txt
+ ${CMAKE_BINARY_DIR}/cmake_install.cmake
+ ${CMAKE_BINARY_DIR}/*/Makefile
+ ${CMAKE_BINARY_DIR}/*/cmake_install.cmake
+ ${CMAKE_BINARY_DIR}/views/*.cpp
+)
+
+foreach(file ${cmake_generated})
+ if (EXISTS ${file})
+ file(REMOVE_RECURSE ${file})
+ endif()
+endforeach(file)
diff --git a/cmake/TargetCmake.cmake b/cmake/TargetCmake.cmake
new file mode 100644
index 0000000..9ff392e
--- /dev/null
+++ b/cmake/TargetCmake.cmake
@@ -0,0 +1,8 @@
+# Cutom target - cmake
+add_custom_target(cmake
+ COMMAND ${CMAKE_COMMAND} -P ${PROJECT_SOURCE_DIR}/cmake/CacheClean.cmake
+ COMMAND echo "Command: ${CMAKE_COMMAND} -G \"${CMAKE_GENERATOR}\" -DCMAKE_BUILD_TYPE=${CMAKE_BUILD_TYPE} ${PROJECT_SOURCE_DIR}"
+ COMMAND ${CMAKE_COMMAND} -G "${CMAKE_GENERATOR}" -DCMAKE_BUILD_TYPE=${CMAKE_BUILD_TYPE} ${PROJECT_SOURCE_DIR}
+)
+
+message(STATUS "Added a custom target for build: 'cmake'")
diff --git a/config/application.ini b/config/application.ini
new file mode 100644
index 0000000..f78a101
--- /dev/null
+++ b/config/application.ini
@@ -0,0 +1,287 @@
+##
+## Application settings file
+##
+[General]
+
+# Listens for incoming connections on the specified port.
+ListenPort=8787
+
+# Listens for incoming connections on the specified IP address. If this value
+# is empty, equivalent to "0.0.0.0".
+ListenAddress=
+
+# Sets the codec used by 'QObject::tr()' and 'toLocal8Bit()' to the
+# QTextCodec for the specified encoding. See QTextCodec class reference.
+InternalEncoding=UTF-8
+
+# Sets the codec for http output stream to the QTextCodec for the
+# specified encoding. See QTextCodec class reference.
+HttpOutputEncoding=UTF-8
+
+# Sets a language/country pair, such as en_US, ja_JP, etc.
+# If this value is empty, the system's locale is used.
+Locale=
+
+# Specify the multiprocessing module, such as thread or epoll.
+# thread: multithreading assigned to each socket, available for all platforms
+# epoll: scalable I/O event notification (epoll) in single thread, Linux only
+MultiProcessingModule=thread
+
+# Specify the absolute or relative path of the temporary directory
+# for HTTP uploaded files. Uses system default if not specified.
+UploadTemporaryDirectory=tmp
+
+# Specify setting files for SQL databases.
+SqlDatabaseSettingsFiles=database.ini
+
+# Specify the setting file for MongoDB.
+# To access MongoDB server, uncomment the following line.
+#MongoDbSettingsFile=mongodb.ini
+
+# Specify the setting file for Redis.
+# To access Redis server, uncomment the following line.
+#RedisSettingsFile=redis.ini
+
+# Specify the directory path to store SQL query files.
+SqlQueriesStoredDirectory=sql/
+
+# Determines whether it renders views without controllers directly
+# like PHP or not, which views are stored in the directory of
+# app/views/direct. By default, this parameter is false.
+DirectViewRenderMode=false
+
+# Specify a file path for system log.
+SystemLogFile=log/treefrog.log
+
+# Specify a file path for SQL query log.
+# If it's empty or the line is commented out, output to SQL query log
+# is disabled.
+SqlQueryLogFile=log/query.log
+
+# Determines whether the application aborts (to create a core dump
+# on Unix systems) or not when it output a fatal message by tFatal()
+# method.
+ApplicationAbortOnFatal=false
+
+# This directive specifies the number of bytes that are allowed in
+# a request body. 0 means unlimited.
+LimitRequestBody=0
+
+# If false is specified, the protective function against cross-site request
+# forgery never work; otherwise it's enabled.
+EnableCsrfProtectionModule=false
+
+# Enables HTTP method override if true. The following are priorities of
+# override.
+# - Value of query parameter named '_method'
+# - Value of X-HTTP-Method-Override header
+# - Value of X-HTTP-Method header
+# - Value of X-METHOD-OVERRIDE header
+EnableHttpMethodOverride=false
+
+# Enables the value of X-Forwarded-For header as originating IP address of
+# the client, if true.
+EnableForwardedForHeader=false
+
+# Specify IP addresses of the proxy servers to work the feature of
+# X-Forwarded-For header.
+TrustedProxyServers=
+
+# Sets the timeout in seconds during which a keep-alive HTTP connection
+# will stay open on the server side. The zero value disables keep-alive
+# client connections.
+HttpKeepAliveTimeout=10
+
+# Forces some libraries to be loaded before all others. It means to set
+# the LD_PRELOAD environment variable for the application server, Linux
+# only. The paths to shared objects, jemalloc or TCMalloc, can be
+# specified.
+LDPreload=
+
+# Searches those paths for JavaScript modules if they are not found elsewhere,
+# sets to a quoted semicolon-delimited list of relative or absolute paths.
+JavaScriptPath="script;node_modules"
+
+##
+## Session section
+##
+Session.Name=TFSESSION
+
+# Specify the session store type, such as 'sqlobject', 'file', 'cookie',
+# 'mongodb', 'redis', 'cachedb' or plugin module name.
+# For 'sqlobject', the settings specified in SqlDatabaseSettingsFiles are used.
+# For 'mongodb', the settings specified in MongoDbSettingsFile are used.
+# For 'redis', the settings specified in RedisSettingsFile are used.
+Session.StoreType=cookie
+
+# Replaces the session ID with a new one each time one connects, and
+# keeps the current session information.
+Session.AutoIdRegeneration=false
+
+# Specifies a Max-Age attribute of the session cookie in seconds. The value 0
+# means "until the browser is closed."
+Session.CookieMaxAge=0
+
+# Specifies a domain attribute to set in the session cookie.
+Session.CookieDomain=
+
+# Specifies a path attribute to set in the session cookie. Defaults to /.
+Session.CookiePath=/
+
+# Specifies a value to assert that a cookie must not be sent with cross-origin
+# requests; Strict, Lax or None.
+Session.CookieSameSite=Lax
+
+# Probability that the garbage collection starts.
+# If 100 specified, the GC of sessions starts at the rate of once per 100
+# accesses. If 0 specified, the GC never starts.
+Session.GcProbability=100
+
+# Specifies the number of seconds after which session data will be seen as
+# 'garbage' and potentially cleaned up.
+Session.GcMaxLifeTime=1800
+
+# Secret key for verifying cookie session data integrity.
+# Enter at least 30 characters and all random.
+Session.Secret=5MaymPYg602vepsn0ryIjz9yETuMMH
+
+# Specify CSRF protection key.
+# Uses it in case of cookie session.
+Session.CsrfProtectionKey=_csrfId
+
+##
+## MPM thread section
+##
+
+# Number of application server processes to be started.
+MPM.thread.MaxAppServers=1
+
+# Maximum number of action threads allowed to start simultaneously
+# per server process. Set max_connections parameter of the DBMS
+# to (MaxAppServers * MaxThreadsPerAppServer) or more.
+MPM.thread.MaxThreadsPerAppServer=128
+
+##
+## MPM epoll section
+##
+
+# Number of application server processes to be started.
+MPM.epoll.MaxAppServers=1
+
+##
+## SystemLog settings
+##
+
+# Specify the system log file name.
+SystemLog.FilePath=log/treefrog.log
+
+# Specify the layout of the system log
+# %d : Date-time
+# %p : Priority (lowercase)
+# %P : Priority (uppercase)
+# %t : Thread ID (dec)
+# %T : Thread ID (hex)
+# %i : PID (dec)
+# %I : PID (hex)
+# %m : Log message
+# %n : Newline code
+SystemLog.Layout="%d %5P [%t] %m%n"
+
+# Specify the date-time format of the system log
+SystemLog.DateTimeFormat="yyyy-MM-dd hh:mm:ss"
+
+##
+## AccessLog settings
+##
+
+# Specify the access log file name.
+AccessLog.FilePath=log/access.log
+
+# Specify the layout of the access log.
+# %h : Remote host
+# %d : Date-time the request was received
+# %r : First line of request
+# %s : Status code
+# %O : Bytes sent, including headers, cannot be zero
+# %n : Newline code
+AccessLog.Layout="%h %d \"%r\" %s %O%n"
+
+# Specify the date-time format of the access log
+AccessLog.DateTimeFormat="yyyy-MM-dd hh:mm:ss"
+
+##
+## ActionMailer section
+##
+
+# Specify the delivery method such as "smtp" or "sendmail".
+# If empty, the mail is not sent.
+ActionMailer.DeliveryMethod=smtp
+
+# Specify the character set of email. The system encodes with this codec,
+# and sends the encoded mail.
+ActionMailer.CharacterSet=UTF-8
+
+# Enables the delayed delivery of email if true. If enabled, deliver() method
+# only adds the email to the queue and therefore the method doesn't block.
+ActionMailer.DelayedDelivery=true
+
+##
+## ActionMailer SMTP section
+##
+
+# Specify the connection's host name or IP address.
+ActionMailer.smtp.HostName=smtp.googlemail.com
+
+# Specify the connection's port number.
+ActionMailer.smtp.Port=587
+
+# Enables SMTP authentication if true; disables SMTP
+# authentication if false.
+ActionMailer.smtp.Authentication=true
+
+# Requires TLS encrypted communication to SMTP server if true.
+ActionMailer.smtp.RequireTLS=true
+
+# Specify the user name for SMTP authentication.
+ActionMailer.smtp.UserName=zheng.bote@googlemail.com
+
+# Specify the password for SMTP authentication.
+ActionMailer.smtp.Password=ZB_Bamboo65
+
+# Enables POP before SMTP authentication if true.
+ActionMailer.smtp.EnablePopBeforeSmtp=false
+
+# Specify the POP host name for POP before SMTP.
+ActionMailer.smtp.PopServer.HostName=
+
+# Specify the port number for POP.
+ActionMailer.smtp.PopServer.Port=110
+
+# Enables APOP authentication for the POP server if true.
+ActionMailer.smtp.PopServer.EnableApop=false
+
+##
+## ActionMailer Sendmail section
+##
+
+ActionMailer.sendmail.CommandLocation=/usr/sbin/sendmail
+
+##
+## Cache section
+##
+
+# Specify the settings file to enable the cache module.
+# To enable cache, uncomment the following line.
+#Cache.SettingsFile=cache.ini
+
+# Specify the cache backend, such as 'sqlite', 'mongodb'
+# or 'redis'.
+Cache.Backend=sqlite
+
+# Probability of starting garbage collection (GC) for cache.
+# If 100 is specified, GC will be started at a rate of once per 100
+# sets. If 0 is specified, the GC never starts.
+Cache.GcProbability=100
+
+# If true, enable LZ4 compression when storing data.
+Cache.EnableCompression=true
diff --git a/config/cache.ini b/config/cache.ini
new file mode 100644
index 0000000..e444213
--- /dev/null
+++ b/config/cache.ini
@@ -0,0 +1,31 @@
+#
+# Cache settings
+#
+
+[sqlite]
+DatabaseName=tmp/cachedb
+HostName=
+Port=
+UserName=
+Password=
+ConnectOptions=
+PostOpenStatements=PRAGMA journal_mode=WAL; PRAGMA busy_timeout=5000; PRAGMA synchronous=NORMAL; VACUUM;
+
+[redis]
+DatabaseName=
+HostName=localhost
+Port=
+UserName=
+Password=
+ConnectOptions=
+PostOpenStatements=SELECT 1;
+
+[mongodb]
+DatabaseName=mdb
+HostName=localhost
+Port=
+UserName=
+Password=
+ConnectOptions=
+PostOpenStatements=
+
diff --git a/config/database.ini b/config/database.ini
new file mode 100644
index 0000000..7ed3db0
--- /dev/null
+++ b/config/database.ini
@@ -0,0 +1,50 @@
+#
+# Database settings file
+#
+
+# The currently available driver types are:
+# [Driver Type] [Description]
+# QDB2 IBM DB2
+# QIBASE Borland InterBase Driver
+# QMYSQL MySQL Driver
+# QOCI Oracle Call Interface Driver
+# QODBC ODBC Driver (includes Microsoft SQL Server)
+# QPSQL PostgreSQL Driver
+# QSQLITE SQLite version 3 or above
+# QSQLITE2 SQLite version 2
+#
+# In case of SQLite, specify the DB file path to DatabaseName as follows;
+# DatabaseName=db/dbfile
+
+[dev]
+DriverType=QPSQL
+DatabaseName=itis_dev
+HostName=itis_dbserver
+Port=5432
+UserName=
+Password=
+ConnectOptions=
+PostOpenStatements=
+EnableUpsert=false
+
+[test]
+DriverType=QPSQL
+DatabaseName=itis_test
+HostName=itis_dbserver
+Port=5432
+UserName=
+Password=
+ConnectOptions=
+PostOpenStatements=
+EnableUpsert=false
+
+[product]
+DriverType=QPSQL
+DatabaseName=itis_prod
+HostName=itis_dbserver
+Port=
+UserName=
+Password=
+ConnectOptions=
+PostOpenStatements=
+EnableUpsert=false
diff --git a/config/development.ini b/config/development.ini
new file mode 100644
index 0000000..e4e7957
--- /dev/null
+++ b/config/development.ini
@@ -0,0 +1,29 @@
+##
+## Development settings file
+##
+[General]
+
+##
+## Template system section
+##
+
+# Specify the template system of view, ERB or Otama.
+TemplateSystem=ERB
+
+
+##
+## ERB section
+##
+
+# Specify the trim mode of ERB.
+# 0 : off
+# 1 : normal trim mode
+# 2 : strong trim mode
+Erb.DefaultTrimMode=1
+
+
+##
+## Otama section
+##
+Otama.ReplaceMarker=%%
+
diff --git a/config/internet_media_types.ini b/config/internet_media_types.ini
new file mode 100644
index 0000000..f46567b
--- /dev/null
+++ b/config/internet_media_types.ini
@@ -0,0 +1,58 @@
+#
+# Internet media type settings file
+#
+[General]
+
+# application
+pdf=application/pdf
+js=application/javascript
+json=application/json
+zip=application/zip
+ogg=application/ogg
+ogx=application/ogg
+doc=application/msword
+docx=application/vnd.openxmlformats-officedocument.wordprocessingml.document
+xls=application/vnd.ms-excel
+xlsx=application/vnd.openxmlformats-officedocument.spreadsheetml.sheet
+ppt=application/vnd.ms-powerpoint
+pptx=application/vnd.openxmlformats-officedocument.presentationml.presentation
+odt=application/vnd.oasis.opendocument.text
+xml=application/xml
+rss=application/rss+xml
+
+# audio
+oga=audio/ogg
+mp3=audio/mpeg
+m4a=audio/mp4
+
+# image
+jpeg=image/jpeg
+jpg=image/jpeg
+gif=image/gif
+png=image/png
+tif=image/tiff
+tiff=image/tiff
+ico=image/vnd.microsoft.icon
+svg=image/svg+xml
+
+# text
+txt=text/plain
+html=text/html
+htm=text/html
+shtml=text/html
+rtf=text/rtf
+css=text/css
+csv=text/csv
+
+# video
+ogv=video/ogg
+3gp=video/3gpp
+3gpp=video/3gpp
+mpg=video/mpeg
+mpeg=video/mpeg
+mp4=video/mp4
+mov=video/quicktime
+webm=video/webm
+flv=video/x-flv
+wmv=video/x-ms-wmv
+avi=video/x-msvideo
\ No newline at end of file
diff --git a/config/logger.ini b/config/logger.ini
new file mode 100644
index 0000000..728f44a
--- /dev/null
+++ b/config/logger.ini
@@ -0,0 +1,38 @@
+##
+## Logger settings file
+##
+[General]
+
+# Specify loggers
+Loggers=FileLogger
+
+# Specify the default log text encoding. If not specified,
+# the codec will be based on a system locale.
+DefaultTextEncoding=
+
+##
+## FileLogger section
+##
+
+# Specify the application log file name.
+FileLogger.Target=log/app.log
+
+# Specify the layout of FileLogger.
+# %d : date-time
+# %p : priority (lowercase)
+# %P : priority (uppercase)
+# %t : thread ID (dec)
+# %T : thread ID (hex)
+# %i : PID (dec)
+# %I : PID (hex)
+# %m : log message
+# %n : newline code
+FileLogger.Layout="%d %5P [%t] %m%n"
+
+# Specify the date-time format of FileLogger, see also QDateTime
+# class reference.
+FileLogger.DateTimeFormat="yyyy-MM-dd hh:mm:ss"
+
+# Outputs the logs of equal or higher priority than this.
+FileLogger.Threshold=debug
+
diff --git a/config/mongodb.ini b/config/mongodb.ini
new file mode 100644
index 0000000..c67b3b8
--- /dev/null
+++ b/config/mongodb.ini
@@ -0,0 +1,27 @@
+#
+# MongoDB settings file
+#
+
+[dev]
+DatabaseName=mdb
+HostName=localhost
+Port=
+UserName=
+Password=
+ConnectOptions=
+
+[test]
+DatabaseName=
+HostName=localhost
+Port=
+UserName=
+Password=
+ConnectOptions=
+
+[product]
+DatabaseName=
+HostName=localhost
+Port=
+UserName=
+Password=
+ConnectOptions=
diff --git a/config/redis.ini b/config/redis.ini
new file mode 100644
index 0000000..6bdf095
--- /dev/null
+++ b/config/redis.ini
@@ -0,0 +1,27 @@
+#
+# Redis settings file
+#
+
+[dev]
+HostName=localhost
+Port=
+UserName=
+Password=
+ConnectOptions=
+PostOpenStatements=
+
+[test]
+HostName=
+Port=
+UserName=
+Password=
+ConnectOptions=
+PostOpenStatements=
+
+[product]
+HostName=
+Port=
+UserName=
+Password=
+ConnectOptions=
+PostOpenStatements=
diff --git a/config/routes.cfg b/config/routes.cfg
new file mode 100644
index 0000000..97a6e37
--- /dev/null
+++ b/config/routes.cfg
@@ -0,0 +1,15 @@
+# routes.cfg
+
+# The priority is based upon order of creation:
+# first entry -> highest priority.
+#
+# ':param' signifies one parameter.
+# ':params' signifies two or more parameters.
+
+# Samples of regular routes:
+# match / Book.index
+# get /Book/:param Book.show
+# post /Book/new Book.create
+# put /Book/:param Book.save
+# delete /Book/:param Book.remove
+# get / /index.html
diff --git a/config/validation.ini b/config/validation.ini
new file mode 100644
index 0000000..0566bf6
--- /dev/null
+++ b/config/validation.ini
@@ -0,0 +1,63 @@
+#
+# Validation settings file.
+#
+[General]
+
+# Sets the date format for validation of date string.
+# If you use the expression of short or long month name, note that the
+# application's locale settings. See QDate class reference.
+DateFormat="yyyy-MM-dd"
+
+# Sets the time format for validation of time string.
+# See QTime class reference.
+TimeFormat="hh:mm:ss"
+
+# Sets the date-time format for validation of date-time string.
+# If you use the expression of short or long month name, note that the
+# application's locale settings. See QDateTime class reference.
+DateTimeFormat="yyyy-MM-ddThh:mm:ss"
+
+#
+# Sets the default error messages below.
+#
+[ErrorMessage]
+
+# Required error
+0=This value is required.
+
+# MaxLength error
+1=This value is too long.
+
+# MinLength error
+2=This value is too short.
+
+# IntMax error
+3=This value is too big.
+
+# IntMin error
+4=This value is too small.
+
+# DoubleMax error
+5=This value is too big.
+
+# DoubleMin error
+6=This value is too small.
+
+# EMailAddress error
+7=This value is not email address.
+
+# Url error
+8=This value is invalid URL.
+
+# Date error
+9=This value is invalid date.
+
+# Time error
+10=This value is invalid time.
+
+# DateTime Error
+11=This value is invalid date or time.
+
+# UserDefined error
+12=This value is bad format.
+
diff --git a/controllers/CMakeLists.txt b/controllers/CMakeLists.txt
new file mode 100644
index 0000000..f7f8510
--- /dev/null
+++ b/controllers/CMakeLists.txt
@@ -0,0 +1,45 @@
+add_definitions(-DTF_DLL)
+
+find_package(Qt5 COMPONENTS Core Network Xml Sql REQUIRED)
+
+if (NOT Qt5_FOUND)
+ message(FATAL_ERROR "Qt5 was not found. Consider setting QT5_CMAKE_PATH to the Qt5Config.cmake directory.")
+endif()
+
+file(GLOB controller_headers ${PROJECT_SOURCE_DIR}/controllers/*.h)
+file(GLOB controller_srcs ${PROJECT_SOURCE_DIR}/controllers/*.cpp)
+
+add_library(controller SHARED
+ ${controller_headers}
+ ${controller_srcs}
+)
+target_include_directories(controller PUBLIC
+ ${Qt5Core_INCLUDE_DIRS}
+ ${Qt5Network_INCLUDE_DIRS}
+ ${Qt5Xml_INCLUDE_DIRS}
+ ${Qt5Sql_INCLUDE_DIRS}
+ ${TreeFrog_INCLUDE_DIR}
+ ${PROJECT_SOURCE_DIR}/helpers
+ ${PROJECT_SOURCE_DIR}/models
+)
+target_link_libraries(controller
+ Qt5::Core
+ Qt5::Network
+ Qt5::Xml
+ Qt5::Sql
+ ${TreeFrog_LIB}
+ helper
+ model
+)
+set_target_properties(controller PROPERTIES
+ LIBRARY_OUTPUT_DIRECTORY ${PROJECT_SOURCE_DIR}/lib
+ ARCHIVE_OUTPUT_DIRECTORY_RELEASE ${PROJECT_SOURCE_DIR}/lib
+ ARCHIVE_OUTPUT_DIRECTORY_DEBUG ${PROJECT_SOURCE_DIR}/lib
+ RUNTIME_OUTPUT_DIRECTORY_RELEASE ${PROJECT_SOURCE_DIR}/lib
+ RUNTIME_OUTPUT_DIRECTORY_DEBUG ${PROJECT_SOURCE_DIR}/lib
+ SOVERSION 1.0
+)
+add_dependencies(controller
+ helper
+ model
+)
diff --git a/controllers/Makefile b/controllers/Makefile
new file mode 100644
index 0000000..df4ab20
--- /dev/null
+++ b/controllers/Makefile
@@ -0,0 +1,1012 @@
+#############################################################################
+# Makefile for building: libcontroller.so.1.0.0
+# Generated by qmake (3.1) (Qt 5.12.8)
+# Project: controllers.pro
+# Template: lib
+# Command: /usr/lib/qt5/bin/qmake -o Makefile controllers.pro CONFIG+=debug
+#############################################################################
+
+MAKEFILE = Makefile
+
+EQ = =
+
+####### Compiler, tools and options
+
+CC = gcc
+CXX = g++
+DEFINES = -DTF_DLL -DQT_QML_LIB -DQT_NETWORK_LIB -DQT_SQL_LIB -DQT_XML_LIB -DQT_CORE_LIB
+CFLAGS = -pipe -g -Wall -W -D_REENTRANT -fPIC $(DEFINES)
+CXXFLAGS = -pipe -g -std=gnu++1y -Wall -W -D_REENTRANT -fPIC $(DEFINES)
+INCPATH = -I. -I../helpers -I../models -isystem /usr/include/treefrog -isystem /usr/include/x86_64-linux-gnu/qt5 -isystem /usr/include/x86_64-linux-gnu/qt5/QtQml -isystem /usr/include/x86_64-linux-gnu/qt5/QtNetwork -isystem /usr/include/x86_64-linux-gnu/qt5/QtSql -isystem /usr/include/x86_64-linux-gnu/qt5/QtXml -isystem /usr/include/x86_64-linux-gnu/qt5/QtCore -I.obj -I/usr/lib/x86_64-linux-gnu/qt5/mkspecs/linux-g++
+QMAKE = /usr/lib/qt5/bin/qmake
+DEL_FILE = rm -f
+CHK_DIR_EXISTS= test -d
+MKDIR = mkdir -p
+COPY = cp -f
+COPY_FILE = cp -f
+COPY_DIR = cp -f -R
+INSTALL_FILE = install -m 644 -p
+INSTALL_PROGRAM = install -m 755 -p
+INSTALL_DIR = cp -f -R
+QINSTALL = /usr/lib/qt5/bin/qmake -install qinstall
+QINSTALL_PROGRAM = /usr/lib/qt5/bin/qmake -install qinstall -exe
+DEL_FILE = rm -f
+SYMLINK = ln -f -s
+DEL_DIR = rmdir
+MOVE = mv -f
+TAR = tar -cf
+COMPRESS = gzip -9f
+DISTNAME = controller1.0.0
+DISTDIR = /webapp_dez/itis_app/controllers/.obj/controller1.0.0
+LINK = g++
+LFLAGS = -shared -Wl,-soname,libcontroller.so.1
+LIBS = $(SUBLIBS) -L../lib -lhelper -lmodel -Wl,-rpath,. -Wl,-rpath,/usr/lib -L/usr/lib -ltreefrog -lrt /usr/lib/x86_64-linux-gnu/libQt5Qml.so /usr/lib/x86_64-linux-gnu/libQt5Network.so /usr/lib/x86_64-linux-gnu/libQt5Sql.so /usr/lib/x86_64-linux-gnu/libQt5Xml.so /usr/lib/x86_64-linux-gnu/libQt5Core.so -lpthread
+AR = ar cqs
+RANLIB =
+SED = sed
+STRIP = strip
+
+####### Output directory
+
+OBJECTS_DIR = .obj/
+
+####### Files
+
+SOURCES = applicationcontroller.cpp \
+ standardsdatacontroller.cpp \
+ standardsmetacontroller.cpp \
+ stdsystemcontroller.cpp \
+ webmenucontroller.cpp \
+ accountcontroller.cpp \
+ admincontroller.cpp \
+ portaladmincontroller.cpp \
+ objectscontroller.cpp \
+ catclassescontroller.cpp \
+ acclassescontroller.cpp \
+ pcclassescontroller.cpp \
+ annexdatacontroller.cpp \
+ annexmetacontroller.cpp \
+ glossarcontroller.cpp \
+ informationmailer.cpp \
+ standardsdatacommentscontroller.cpp \
+ appvarscontroller.cpp \
+ itisnewscontroller.cpp \
+ actionrightscontroller.cpp \
+ itisgroupscontroller.cpp \
+ annexdatacommentscontroller.cpp \
+ releasemgmtcontroller.cpp \
+ lenkinfocontroller.cpp .obj/moc_applicationcontroller.cpp \
+ .obj/moc_standardsdatacontroller.cpp \
+ .obj/moc_standardsmetacontroller.cpp \
+ .obj/moc_stdsystemcontroller.cpp \
+ .obj/moc_webmenucontroller.cpp \
+ .obj/moc_accountcontroller.cpp \
+ .obj/moc_admincontroller.cpp \
+ .obj/moc_portaladmincontroller.cpp \
+ .obj/moc_objectscontroller.cpp \
+ .obj/moc_catclassescontroller.cpp \
+ .obj/moc_acclassescontroller.cpp \
+ .obj/moc_pcclassescontroller.cpp \
+ .obj/moc_annexdatacontroller.cpp \
+ .obj/moc_annexmetacontroller.cpp \
+ .obj/moc_glossarcontroller.cpp \
+ .obj/moc_standardsdatacommentscontroller.cpp \
+ .obj/moc_appvarscontroller.cpp \
+ .obj/moc_itisnewscontroller.cpp \
+ .obj/moc_actionrightscontroller.cpp \
+ .obj/moc_itisgroupscontroller.cpp \
+ .obj/moc_annexdatacommentscontroller.cpp \
+ .obj/moc_releasemgmtcontroller.cpp \
+ .obj/moc_lenkinfocontroller.cpp
+OBJECTS = .obj/applicationcontroller.o \
+ .obj/standardsdatacontroller.o \
+ .obj/standardsmetacontroller.o \
+ .obj/stdsystemcontroller.o \
+ .obj/webmenucontroller.o \
+ .obj/accountcontroller.o \
+ .obj/admincontroller.o \
+ .obj/portaladmincontroller.o \
+ .obj/objectscontroller.o \
+ .obj/catclassescontroller.o \
+ .obj/acclassescontroller.o \
+ .obj/pcclassescontroller.o \
+ .obj/annexdatacontroller.o \
+ .obj/annexmetacontroller.o \
+ .obj/glossarcontroller.o \
+ .obj/informationmailer.o \
+ .obj/standardsdatacommentscontroller.o \
+ .obj/appvarscontroller.o \
+ .obj/itisnewscontroller.o \
+ .obj/actionrightscontroller.o \
+ .obj/itisgroupscontroller.o \
+ .obj/annexdatacommentscontroller.o \
+ .obj/releasemgmtcontroller.o \
+ .obj/lenkinfocontroller.o \
+ .obj/moc_applicationcontroller.o \
+ .obj/moc_standardsdatacontroller.o \
+ .obj/moc_standardsmetacontroller.o \
+ .obj/moc_stdsystemcontroller.o \
+ .obj/moc_webmenucontroller.o \
+ .obj/moc_accountcontroller.o \
+ .obj/moc_admincontroller.o \
+ .obj/moc_portaladmincontroller.o \
+ .obj/moc_objectscontroller.o \
+ .obj/moc_catclassescontroller.o \
+ .obj/moc_acclassescontroller.o \
+ .obj/moc_pcclassescontroller.o \
+ .obj/moc_annexdatacontroller.o \
+ .obj/moc_annexmetacontroller.o \
+ .obj/moc_glossarcontroller.o \
+ .obj/moc_standardsdatacommentscontroller.o \
+ .obj/moc_appvarscontroller.o \
+ .obj/moc_itisnewscontroller.o \
+ .obj/moc_actionrightscontroller.o \
+ .obj/moc_itisgroupscontroller.o \
+ .obj/moc_annexdatacommentscontroller.o \
+ .obj/moc_releasemgmtcontroller.o \
+ .obj/moc_lenkinfocontroller.o
+DIST = /usr/lib/x86_64-linux-gnu/qt5/mkspecs/features/spec_pre.prf \
+ /usr/lib/x86_64-linux-gnu/qt5/mkspecs/common/unix.conf \
+ /usr/lib/x86_64-linux-gnu/qt5/mkspecs/common/linux.conf \
+ /usr/lib/x86_64-linux-gnu/qt5/mkspecs/common/sanitize.conf \
+ /usr/lib/x86_64-linux-gnu/qt5/mkspecs/common/gcc-base.conf \
+ /usr/lib/x86_64-linux-gnu/qt5/mkspecs/common/gcc-base-unix.conf \
+ /usr/lib/x86_64-linux-gnu/qt5/mkspecs/common/g++-base.conf \
+ /usr/lib/x86_64-linux-gnu/qt5/mkspecs/common/g++-unix.conf \
+ /usr/lib/x86_64-linux-gnu/qt5/mkspecs/qconfig.pri \
+ /usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_accessibility_support_private.pri \
+ /usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_bootstrap_private.pri \
+ /usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_concurrent.pri \
+ /usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_concurrent_private.pri \
+ /usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_core.pri \
+ /usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_core_private.pri \
+ /usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_dbus.pri \
+ /usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_dbus_private.pri \
+ /usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_devicediscovery_support_private.pri \
+ /usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_edid_support_private.pri \
+ /usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_egl_support_private.pri \
+ /usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_eglfs_kms_support_private.pri \
+ /usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_eglfsdeviceintegration_private.pri \
+ /usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_eventdispatcher_support_private.pri \
+ /usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_fb_support_private.pri \
+ /usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_fontdatabase_support_private.pri \
+ /usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_glx_support_private.pri \
+ /usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_gui.pri \
+ /usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_gui_private.pri \
+ /usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_input_support_private.pri \
+ /usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_kms_support_private.pri \
+ /usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_linuxaccessibility_support_private.pri \
+ /usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_network.pri \
+ /usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_network_private.pri \
+ /usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_opengl.pri \
+ /usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_opengl_private.pri \
+ /usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_openglextensions.pri \
+ /usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_openglextensions_private.pri \
+ /usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_platformcompositor_support_private.pri \
+ /usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_printsupport.pri \
+ /usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_printsupport_private.pri \
+ /usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_qml.pri \
+ /usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_qmltest.pri \
+ /usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_quick.pri \
+ /usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_quickwidgets.pri \
+ /usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_service_support_private.pri \
+ /usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_sql.pri \
+ /usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_sql_private.pri \
+ /usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_testlib.pri \
+ /usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_testlib_private.pri \
+ /usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_theme_support_private.pri \
+ /usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_vulkan_support_private.pri \
+ /usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_widgets.pri \
+ /usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_widgets_private.pri \
+ /usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_xcb_qpa_lib_private.pri \
+ /usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_xml.pri \
+ /usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_xml_private.pri \
+ /usr/lib/x86_64-linux-gnu/qt5/mkspecs/features/qt_functions.prf \
+ /usr/lib/x86_64-linux-gnu/qt5/mkspecs/features/qt_config.prf \
+ /usr/lib/x86_64-linux-gnu/qt5/mkspecs/linux-g++/qmake.conf \
+ /usr/lib/x86_64-linux-gnu/qt5/mkspecs/features/spec_post.prf \
+ ../.qmake.stash \
+ /usr/lib/x86_64-linux-gnu/qt5/mkspecs/features/exclusive_builds.prf \
+ /usr/lib/x86_64-linux-gnu/qt5/mkspecs/features/toolchain.prf \
+ /usr/lib/x86_64-linux-gnu/qt5/mkspecs/features/default_pre.prf \
+ ../appbase.pri \
+ /usr/lib/x86_64-linux-gnu/qt5/mkspecs/features/resolve_config.prf \
+ /usr/lib/x86_64-linux-gnu/qt5/mkspecs/features/default_post.prf \
+ /usr/lib/x86_64-linux-gnu/qt5/mkspecs/features/warn_on.prf \
+ /usr/lib/x86_64-linux-gnu/qt5/mkspecs/features/qt.prf \
+ /usr/lib/x86_64-linux-gnu/qt5/mkspecs/features/resources.prf \
+ /usr/lib/x86_64-linux-gnu/qt5/mkspecs/features/moc.prf \
+ /usr/lib/x86_64-linux-gnu/qt5/mkspecs/features/unix/thread.prf \
+ /usr/lib/x86_64-linux-gnu/qt5/mkspecs/features/qmake_use.prf \
+ /usr/lib/x86_64-linux-gnu/qt5/mkspecs/features/file_copies.prf \
+ /usr/lib/x86_64-linux-gnu/qt5/mkspecs/features/testcase_targets.prf \
+ /usr/lib/x86_64-linux-gnu/qt5/mkspecs/features/exceptions.prf \
+ /usr/lib/x86_64-linux-gnu/qt5/mkspecs/features/yacc.prf \
+ /usr/lib/x86_64-linux-gnu/qt5/mkspecs/features/lex.prf \
+ controllers.pro applicationcontroller.h \
+ standardsdatacontroller.h \
+ standardsmetacontroller.h \
+ stdsystemcontroller.h \
+ webmenucontroller.h \
+ accountcontroller.h \
+ admincontroller.h \
+ portaladmincontroller.h \
+ objectscontroller.h \
+ catclassescontroller.h \
+ acclassescontroller.h \
+ pcclassescontroller.h \
+ annexdatacontroller.h \
+ annexmetacontroller.h \
+ glossarcontroller.h \
+ informationmailer.h \
+ standardsdatacommentscontroller.h \
+ appvarscontroller.h \
+ itisnewscontroller.h \
+ actionrightscontroller.h \
+ itisgroupscontroller.h \
+ annexdatacommentscontroller.h \
+ releasemgmtcontroller.h \
+ lenkinfocontroller.h applicationcontroller.cpp \
+ standardsdatacontroller.cpp \
+ standardsmetacontroller.cpp \
+ stdsystemcontroller.cpp \
+ webmenucontroller.cpp \
+ accountcontroller.cpp \
+ admincontroller.cpp \
+ portaladmincontroller.cpp \
+ objectscontroller.cpp \
+ catclassescontroller.cpp \
+ acclassescontroller.cpp \
+ pcclassescontroller.cpp \
+ annexdatacontroller.cpp \
+ annexmetacontroller.cpp \
+ glossarcontroller.cpp \
+ informationmailer.cpp \
+ standardsdatacommentscontroller.cpp \
+ appvarscontroller.cpp \
+ itisnewscontroller.cpp \
+ actionrightscontroller.cpp \
+ itisgroupscontroller.cpp \
+ annexdatacommentscontroller.cpp \
+ releasemgmtcontroller.cpp \
+ lenkinfocontroller.cpp
+QMAKE_TARGET = controller
+DESTDIR = ../lib/
+TARGET = libcontroller.so.1.0.0
+TARGETA = ../lib/libcontroller.a
+TARGET0 = libcontroller.so
+TARGETD = libcontroller.so.1.0.0
+TARGET1 = libcontroller.so.1
+TARGET2 = libcontroller.so.1.0
+
+
+first: all
+####### Build rules
+
+../lib/libcontroller.so.1.0.0: $(OBJECTS) $(SUBLIBS) $(OBJCOMP)
+ @test -d ../lib/ || mkdir -p ../lib/
+ -$(DEL_FILE) $(TARGET) $(TARGET0) $(TARGET1) $(TARGET2)
+ $(LINK) $(LFLAGS) -o $(TARGET) $(OBJECTS) $(LIBS) $(OBJCOMP)
+ -ln -s $(TARGET) $(TARGET0)
+ -ln -s $(TARGET) $(TARGET1)
+ -ln -s $(TARGET) $(TARGET2)
+ -$(DEL_FILE) ../lib/$(TARGET)
+ -$(MOVE) $(TARGET) ../lib/$(TARGET)
+ -$(DEL_FILE) ../lib/$(TARGET0)
+ -$(DEL_FILE) ../lib/$(TARGET1)
+ -$(DEL_FILE) ../lib/$(TARGET2)
+ -$(MOVE) $(TARGET0) ../lib/$(TARGET0)
+ -$(MOVE) $(TARGET1) ../lib/$(TARGET1)
+ -$(MOVE) $(TARGET2) ../lib/$(TARGET2)
+
+
+
+staticlib: ../lib/libcontroller.a
+
+../lib/libcontroller.a: $(OBJECTS) $(OBJCOMP)
+ -$(DEL_FILE) $(TARGETA)
+ $(AR) $(TARGETA) $(OBJECTS)
+
+Makefile: controllers.pro /usr/lib/x86_64-linux-gnu/qt5/mkspecs/linux-g++/qmake.conf /usr/lib/x86_64-linux-gnu/qt5/mkspecs/features/spec_pre.prf \
+ /usr/lib/x86_64-linux-gnu/qt5/mkspecs/common/unix.conf \
+ /usr/lib/x86_64-linux-gnu/qt5/mkspecs/common/linux.conf \
+ /usr/lib/x86_64-linux-gnu/qt5/mkspecs/common/sanitize.conf \
+ /usr/lib/x86_64-linux-gnu/qt5/mkspecs/common/gcc-base.conf \
+ /usr/lib/x86_64-linux-gnu/qt5/mkspecs/common/gcc-base-unix.conf \
+ /usr/lib/x86_64-linux-gnu/qt5/mkspecs/common/g++-base.conf \
+ /usr/lib/x86_64-linux-gnu/qt5/mkspecs/common/g++-unix.conf \
+ /usr/lib/x86_64-linux-gnu/qt5/mkspecs/qconfig.pri \
+ /usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_accessibility_support_private.pri \
+ /usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_bootstrap_private.pri \
+ /usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_concurrent.pri \
+ /usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_concurrent_private.pri \
+ /usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_core.pri \
+ /usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_core_private.pri \
+ /usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_dbus.pri \
+ /usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_dbus_private.pri \
+ /usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_devicediscovery_support_private.pri \
+ /usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_edid_support_private.pri \
+ /usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_egl_support_private.pri \
+ /usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_eglfs_kms_support_private.pri \
+ /usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_eglfsdeviceintegration_private.pri \
+ /usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_eventdispatcher_support_private.pri \
+ /usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_fb_support_private.pri \
+ /usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_fontdatabase_support_private.pri \
+ /usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_glx_support_private.pri \
+ /usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_gui.pri \
+ /usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_gui_private.pri \
+ /usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_input_support_private.pri \
+ /usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_kms_support_private.pri \
+ /usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_linuxaccessibility_support_private.pri \
+ /usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_network.pri \
+ /usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_network_private.pri \
+ /usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_opengl.pri \
+ /usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_opengl_private.pri \
+ /usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_openglextensions.pri \
+ /usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_openglextensions_private.pri \
+ /usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_platformcompositor_support_private.pri \
+ /usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_printsupport.pri \
+ /usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_printsupport_private.pri \
+ /usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_qml.pri \
+ /usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_qmltest.pri \
+ /usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_quick.pri \
+ /usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_quickwidgets.pri \
+ /usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_service_support_private.pri \
+ /usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_sql.pri \
+ /usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_sql_private.pri \
+ /usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_testlib.pri \
+ /usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_testlib_private.pri \
+ /usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_theme_support_private.pri \
+ /usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_vulkan_support_private.pri \
+ /usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_widgets.pri \
+ /usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_widgets_private.pri \
+ /usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_xcb_qpa_lib_private.pri \
+ /usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_xml.pri \
+ /usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_xml_private.pri \
+ /usr/lib/x86_64-linux-gnu/qt5/mkspecs/features/qt_functions.prf \
+ /usr/lib/x86_64-linux-gnu/qt5/mkspecs/features/qt_config.prf \
+ /usr/lib/x86_64-linux-gnu/qt5/mkspecs/linux-g++/qmake.conf \
+ /usr/lib/x86_64-linux-gnu/qt5/mkspecs/features/spec_post.prf \
+ ../.qmake.stash \
+ /usr/lib/x86_64-linux-gnu/qt5/mkspecs/features/exclusive_builds.prf \
+ /usr/lib/x86_64-linux-gnu/qt5/mkspecs/features/toolchain.prf \
+ /usr/lib/x86_64-linux-gnu/qt5/mkspecs/features/default_pre.prf \
+ ../appbase.pri \
+ /usr/lib/x86_64-linux-gnu/qt5/mkspecs/features/resolve_config.prf \
+ /usr/lib/x86_64-linux-gnu/qt5/mkspecs/features/default_post.prf \
+ /usr/lib/x86_64-linux-gnu/qt5/mkspecs/features/warn_on.prf \
+ /usr/lib/x86_64-linux-gnu/qt5/mkspecs/features/qt.prf \
+ /usr/lib/x86_64-linux-gnu/qt5/mkspecs/features/resources.prf \
+ /usr/lib/x86_64-linux-gnu/qt5/mkspecs/features/moc.prf \
+ /usr/lib/x86_64-linux-gnu/qt5/mkspecs/features/unix/thread.prf \
+ /usr/lib/x86_64-linux-gnu/qt5/mkspecs/features/qmake_use.prf \
+ /usr/lib/x86_64-linux-gnu/qt5/mkspecs/features/file_copies.prf \
+ /usr/lib/x86_64-linux-gnu/qt5/mkspecs/features/testcase_targets.prf \
+ /usr/lib/x86_64-linux-gnu/qt5/mkspecs/features/exceptions.prf \
+ /usr/lib/x86_64-linux-gnu/qt5/mkspecs/features/yacc.prf \
+ /usr/lib/x86_64-linux-gnu/qt5/mkspecs/features/lex.prf \
+ controllers.pro
+ $(QMAKE) -o Makefile controllers.pro CONFIG+=debug
+/usr/lib/x86_64-linux-gnu/qt5/mkspecs/features/spec_pre.prf:
+/usr/lib/x86_64-linux-gnu/qt5/mkspecs/common/unix.conf:
+/usr/lib/x86_64-linux-gnu/qt5/mkspecs/common/linux.conf:
+/usr/lib/x86_64-linux-gnu/qt5/mkspecs/common/sanitize.conf:
+/usr/lib/x86_64-linux-gnu/qt5/mkspecs/common/gcc-base.conf:
+/usr/lib/x86_64-linux-gnu/qt5/mkspecs/common/gcc-base-unix.conf:
+/usr/lib/x86_64-linux-gnu/qt5/mkspecs/common/g++-base.conf:
+/usr/lib/x86_64-linux-gnu/qt5/mkspecs/common/g++-unix.conf:
+/usr/lib/x86_64-linux-gnu/qt5/mkspecs/qconfig.pri:
+/usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_accessibility_support_private.pri:
+/usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_bootstrap_private.pri:
+/usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_concurrent.pri:
+/usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_concurrent_private.pri:
+/usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_core.pri:
+/usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_core_private.pri:
+/usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_dbus.pri:
+/usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_dbus_private.pri:
+/usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_devicediscovery_support_private.pri:
+/usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_edid_support_private.pri:
+/usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_egl_support_private.pri:
+/usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_eglfs_kms_support_private.pri:
+/usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_eglfsdeviceintegration_private.pri:
+/usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_eventdispatcher_support_private.pri:
+/usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_fb_support_private.pri:
+/usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_fontdatabase_support_private.pri:
+/usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_glx_support_private.pri:
+/usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_gui.pri:
+/usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_gui_private.pri:
+/usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_input_support_private.pri:
+/usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_kms_support_private.pri:
+/usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_linuxaccessibility_support_private.pri:
+/usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_network.pri:
+/usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_network_private.pri:
+/usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_opengl.pri:
+/usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_opengl_private.pri:
+/usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_openglextensions.pri:
+/usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_openglextensions_private.pri:
+/usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_platformcompositor_support_private.pri:
+/usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_printsupport.pri:
+/usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_printsupport_private.pri:
+/usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_qml.pri:
+/usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_qmltest.pri:
+/usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_quick.pri:
+/usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_quickwidgets.pri:
+/usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_service_support_private.pri:
+/usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_sql.pri:
+/usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_sql_private.pri:
+/usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_testlib.pri:
+/usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_testlib_private.pri:
+/usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_theme_support_private.pri:
+/usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_vulkan_support_private.pri:
+/usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_widgets.pri:
+/usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_widgets_private.pri:
+/usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_xcb_qpa_lib_private.pri:
+/usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_xml.pri:
+/usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_xml_private.pri:
+/usr/lib/x86_64-linux-gnu/qt5/mkspecs/features/qt_functions.prf:
+/usr/lib/x86_64-linux-gnu/qt5/mkspecs/features/qt_config.prf:
+/usr/lib/x86_64-linux-gnu/qt5/mkspecs/linux-g++/qmake.conf:
+/usr/lib/x86_64-linux-gnu/qt5/mkspecs/features/spec_post.prf:
+../.qmake.stash:
+/usr/lib/x86_64-linux-gnu/qt5/mkspecs/features/exclusive_builds.prf:
+/usr/lib/x86_64-linux-gnu/qt5/mkspecs/features/toolchain.prf:
+/usr/lib/x86_64-linux-gnu/qt5/mkspecs/features/default_pre.prf:
+../appbase.pri:
+/usr/lib/x86_64-linux-gnu/qt5/mkspecs/features/resolve_config.prf:
+/usr/lib/x86_64-linux-gnu/qt5/mkspecs/features/default_post.prf:
+/usr/lib/x86_64-linux-gnu/qt5/mkspecs/features/warn_on.prf:
+/usr/lib/x86_64-linux-gnu/qt5/mkspecs/features/qt.prf:
+/usr/lib/x86_64-linux-gnu/qt5/mkspecs/features/resources.prf:
+/usr/lib/x86_64-linux-gnu/qt5/mkspecs/features/moc.prf:
+/usr/lib/x86_64-linux-gnu/qt5/mkspecs/features/unix/thread.prf:
+/usr/lib/x86_64-linux-gnu/qt5/mkspecs/features/qmake_use.prf:
+/usr/lib/x86_64-linux-gnu/qt5/mkspecs/features/file_copies.prf:
+/usr/lib/x86_64-linux-gnu/qt5/mkspecs/features/testcase_targets.prf:
+/usr/lib/x86_64-linux-gnu/qt5/mkspecs/features/exceptions.prf:
+/usr/lib/x86_64-linux-gnu/qt5/mkspecs/features/yacc.prf:
+/usr/lib/x86_64-linux-gnu/qt5/mkspecs/features/lex.prf:
+controllers.pro:
+qmake: FORCE
+ @$(QMAKE) -o Makefile controllers.pro CONFIG+=debug
+
+qmake_all: FORCE
+
+
+all: Makefile ../lib/libcontroller.so.1.0.0
+
+dist: distdir FORCE
+ (cd `dirname $(DISTDIR)` && $(TAR) $(DISTNAME).tar $(DISTNAME) && $(COMPRESS) $(DISTNAME).tar) && $(MOVE) `dirname $(DISTDIR)`/$(DISTNAME).tar.gz . && $(DEL_FILE) -r $(DISTDIR)
+
+distdir: FORCE
+ @test -d $(DISTDIR) || mkdir -p $(DISTDIR)
+ $(COPY_FILE) --parents $(DIST) $(DISTDIR)/
+ $(COPY_FILE) --parents /usr/lib/x86_64-linux-gnu/qt5/mkspecs/features/data/dummy.cpp $(DISTDIR)/
+ $(COPY_FILE) --parents applicationcontroller.h standardsdatacontroller.h standardsmetacontroller.h stdsystemcontroller.h webmenucontroller.h accountcontroller.h admincontroller.h portaladmincontroller.h objectscontroller.h catclassescontroller.h acclassescontroller.h pcclassescontroller.h annexdatacontroller.h annexmetacontroller.h glossarcontroller.h informationmailer.h standardsdatacommentscontroller.h appvarscontroller.h itisnewscontroller.h actionrightscontroller.h itisgroupscontroller.h annexdatacommentscontroller.h releasemgmtcontroller.h lenkinfocontroller.h $(DISTDIR)/
+ $(COPY_FILE) --parents applicationcontroller.cpp standardsdatacontroller.cpp standardsmetacontroller.cpp stdsystemcontroller.cpp webmenucontroller.cpp accountcontroller.cpp admincontroller.cpp portaladmincontroller.cpp objectscontroller.cpp catclassescontroller.cpp acclassescontroller.cpp pcclassescontroller.cpp annexdatacontroller.cpp annexmetacontroller.cpp glossarcontroller.cpp informationmailer.cpp standardsdatacommentscontroller.cpp appvarscontroller.cpp itisnewscontroller.cpp actionrightscontroller.cpp itisgroupscontroller.cpp annexdatacommentscontroller.cpp releasemgmtcontroller.cpp lenkinfocontroller.cpp $(DISTDIR)/
+
+
+clean: compiler_clean
+ -$(DEL_FILE) $(OBJECTS)
+ -$(DEL_FILE) *~ core *.core
+
+
+distclean: clean
+ -$(DEL_FILE) ../lib/$(TARGET)
+ -$(DEL_FILE) ../lib/$(TARGET0) ../lib/$(TARGET1) ../lib/$(TARGET2) $(TARGETA)
+ -$(DEL_FILE) Makefile
+
+
+####### Sub-libraries
+
+mocclean: compiler_moc_header_clean compiler_moc_objc_header_clean compiler_moc_source_clean
+
+mocables: compiler_moc_header_make_all compiler_moc_objc_header_make_all compiler_moc_source_make_all
+
+check: first
+
+benchmark: first
+
+compiler_rcc_make_all:
+compiler_rcc_clean:
+compiler_moc_predefs_make_all: .obj/moc_predefs.h
+compiler_moc_predefs_clean:
+ -$(DEL_FILE) .obj/moc_predefs.h
+.obj/moc_predefs.h: /usr/lib/x86_64-linux-gnu/qt5/mkspecs/features/data/dummy.cpp
+ g++ -pipe -g -std=gnu++1y -Wall -W -dM -E -o .obj/moc_predefs.h /usr/lib/x86_64-linux-gnu/qt5/mkspecs/features/data/dummy.cpp
+
+compiler_moc_header_make_all: .obj/moc_applicationcontroller.cpp .obj/moc_standardsdatacontroller.cpp .obj/moc_standardsmetacontroller.cpp .obj/moc_stdsystemcontroller.cpp .obj/moc_webmenucontroller.cpp .obj/moc_accountcontroller.cpp .obj/moc_admincontroller.cpp .obj/moc_portaladmincontroller.cpp .obj/moc_objectscontroller.cpp .obj/moc_catclassescontroller.cpp .obj/moc_acclassescontroller.cpp .obj/moc_pcclassescontroller.cpp .obj/moc_annexdatacontroller.cpp .obj/moc_annexmetacontroller.cpp .obj/moc_glossarcontroller.cpp .obj/moc_standardsdatacommentscontroller.cpp .obj/moc_appvarscontroller.cpp .obj/moc_itisnewscontroller.cpp .obj/moc_actionrightscontroller.cpp .obj/moc_itisgroupscontroller.cpp .obj/moc_annexdatacommentscontroller.cpp .obj/moc_releasemgmtcontroller.cpp .obj/moc_lenkinfocontroller.cpp
+compiler_moc_header_clean:
+ -$(DEL_FILE) .obj/moc_applicationcontroller.cpp .obj/moc_standardsdatacontroller.cpp .obj/moc_standardsmetacontroller.cpp .obj/moc_stdsystemcontroller.cpp .obj/moc_webmenucontroller.cpp .obj/moc_accountcontroller.cpp .obj/moc_admincontroller.cpp .obj/moc_portaladmincontroller.cpp .obj/moc_objectscontroller.cpp .obj/moc_catclassescontroller.cpp .obj/moc_acclassescontroller.cpp .obj/moc_pcclassescontroller.cpp .obj/moc_annexdatacontroller.cpp .obj/moc_annexmetacontroller.cpp .obj/moc_glossarcontroller.cpp .obj/moc_standardsdatacommentscontroller.cpp .obj/moc_appvarscontroller.cpp .obj/moc_itisnewscontroller.cpp .obj/moc_actionrightscontroller.cpp .obj/moc_itisgroupscontroller.cpp .obj/moc_annexdatacommentscontroller.cpp .obj/moc_releasemgmtcontroller.cpp .obj/moc_lenkinfocontroller.cpp
+.obj/moc_applicationcontroller.cpp: applicationcontroller.h \
+ ../helpers/applicationhelper.h \
+ .obj/moc_predefs.h \
+ /usr/lib/qt5/bin/moc
+ /usr/lib/qt5/bin/moc $(DEFINES) --include /webapp_dez/itis_app/controllers/.obj/moc_predefs.h -I/usr/lib/x86_64-linux-gnu/qt5/mkspecs/linux-g++ -I/webapp_dez/itis_app/controllers -I/webapp_dez/itis_app/helpers -I/webapp_dez/itis_app/models -I/usr/include/treefrog -I/usr/include/x86_64-linux-gnu/qt5 -I/usr/include/x86_64-linux-gnu/qt5/QtQml -I/usr/include/x86_64-linux-gnu/qt5/QtNetwork -I/usr/include/x86_64-linux-gnu/qt5/QtSql -I/usr/include/x86_64-linux-gnu/qt5/QtXml -I/usr/include/x86_64-linux-gnu/qt5/QtCore -I/usr/include/c++/9 -I/usr/include/x86_64-linux-gnu/c++/9 -I/usr/include/c++/9/backward -I/usr/lib/gcc/x86_64-linux-gnu/9/include -I/usr/local/include -I/usr/include/x86_64-linux-gnu -I/usr/include applicationcontroller.h -o .obj/moc_applicationcontroller.cpp
+
+.obj/moc_standardsdatacontroller.cpp: standardsdatacontroller.h \
+ applicationcontroller.h \
+ ../helpers/applicationhelper.h \
+ .obj/moc_predefs.h \
+ /usr/lib/qt5/bin/moc
+ /usr/lib/qt5/bin/moc $(DEFINES) --include /webapp_dez/itis_app/controllers/.obj/moc_predefs.h -I/usr/lib/x86_64-linux-gnu/qt5/mkspecs/linux-g++ -I/webapp_dez/itis_app/controllers -I/webapp_dez/itis_app/helpers -I/webapp_dez/itis_app/models -I/usr/include/treefrog -I/usr/include/x86_64-linux-gnu/qt5 -I/usr/include/x86_64-linux-gnu/qt5/QtQml -I/usr/include/x86_64-linux-gnu/qt5/QtNetwork -I/usr/include/x86_64-linux-gnu/qt5/QtSql -I/usr/include/x86_64-linux-gnu/qt5/QtXml -I/usr/include/x86_64-linux-gnu/qt5/QtCore -I/usr/include/c++/9 -I/usr/include/x86_64-linux-gnu/c++/9 -I/usr/include/c++/9/backward -I/usr/lib/gcc/x86_64-linux-gnu/9/include -I/usr/local/include -I/usr/include/x86_64-linux-gnu -I/usr/include standardsdatacontroller.h -o .obj/moc_standardsdatacontroller.cpp
+
+.obj/moc_standardsmetacontroller.cpp: standardsmetacontroller.h \
+ applicationcontroller.h \
+ ../helpers/applicationhelper.h \
+ .obj/moc_predefs.h \
+ /usr/lib/qt5/bin/moc
+ /usr/lib/qt5/bin/moc $(DEFINES) --include /webapp_dez/itis_app/controllers/.obj/moc_predefs.h -I/usr/lib/x86_64-linux-gnu/qt5/mkspecs/linux-g++ -I/webapp_dez/itis_app/controllers -I/webapp_dez/itis_app/helpers -I/webapp_dez/itis_app/models -I/usr/include/treefrog -I/usr/include/x86_64-linux-gnu/qt5 -I/usr/include/x86_64-linux-gnu/qt5/QtQml -I/usr/include/x86_64-linux-gnu/qt5/QtNetwork -I/usr/include/x86_64-linux-gnu/qt5/QtSql -I/usr/include/x86_64-linux-gnu/qt5/QtXml -I/usr/include/x86_64-linux-gnu/qt5/QtCore -I/usr/include/c++/9 -I/usr/include/x86_64-linux-gnu/c++/9 -I/usr/include/c++/9/backward -I/usr/lib/gcc/x86_64-linux-gnu/9/include -I/usr/local/include -I/usr/include/x86_64-linux-gnu -I/usr/include standardsmetacontroller.h -o .obj/moc_standardsmetacontroller.cpp
+
+.obj/moc_stdsystemcontroller.cpp: stdsystemcontroller.h \
+ applicationcontroller.h \
+ ../helpers/applicationhelper.h \
+ .obj/moc_predefs.h \
+ /usr/lib/qt5/bin/moc
+ /usr/lib/qt5/bin/moc $(DEFINES) --include /webapp_dez/itis_app/controllers/.obj/moc_predefs.h -I/usr/lib/x86_64-linux-gnu/qt5/mkspecs/linux-g++ -I/webapp_dez/itis_app/controllers -I/webapp_dez/itis_app/helpers -I/webapp_dez/itis_app/models -I/usr/include/treefrog -I/usr/include/x86_64-linux-gnu/qt5 -I/usr/include/x86_64-linux-gnu/qt5/QtQml -I/usr/include/x86_64-linux-gnu/qt5/QtNetwork -I/usr/include/x86_64-linux-gnu/qt5/QtSql -I/usr/include/x86_64-linux-gnu/qt5/QtXml -I/usr/include/x86_64-linux-gnu/qt5/QtCore -I/usr/include/c++/9 -I/usr/include/x86_64-linux-gnu/c++/9 -I/usr/include/c++/9/backward -I/usr/lib/gcc/x86_64-linux-gnu/9/include -I/usr/local/include -I/usr/include/x86_64-linux-gnu -I/usr/include stdsystemcontroller.h -o .obj/moc_stdsystemcontroller.cpp
+
+.obj/moc_webmenucontroller.cpp: webmenucontroller.h \
+ applicationcontroller.h \
+ ../helpers/applicationhelper.h \
+ .obj/moc_predefs.h \
+ /usr/lib/qt5/bin/moc
+ /usr/lib/qt5/bin/moc $(DEFINES) --include /webapp_dez/itis_app/controllers/.obj/moc_predefs.h -I/usr/lib/x86_64-linux-gnu/qt5/mkspecs/linux-g++ -I/webapp_dez/itis_app/controllers -I/webapp_dez/itis_app/helpers -I/webapp_dez/itis_app/models -I/usr/include/treefrog -I/usr/include/x86_64-linux-gnu/qt5 -I/usr/include/x86_64-linux-gnu/qt5/QtQml -I/usr/include/x86_64-linux-gnu/qt5/QtNetwork -I/usr/include/x86_64-linux-gnu/qt5/QtSql -I/usr/include/x86_64-linux-gnu/qt5/QtXml -I/usr/include/x86_64-linux-gnu/qt5/QtCore -I/usr/include/c++/9 -I/usr/include/x86_64-linux-gnu/c++/9 -I/usr/include/c++/9/backward -I/usr/lib/gcc/x86_64-linux-gnu/9/include -I/usr/local/include -I/usr/include/x86_64-linux-gnu -I/usr/include webmenucontroller.h -o .obj/moc_webmenucontroller.cpp
+
+.obj/moc_accountcontroller.cpp: accountcontroller.h \
+ applicationcontroller.h \
+ ../helpers/applicationhelper.h \
+ .obj/moc_predefs.h \
+ /usr/lib/qt5/bin/moc
+ /usr/lib/qt5/bin/moc $(DEFINES) --include /webapp_dez/itis_app/controllers/.obj/moc_predefs.h -I/usr/lib/x86_64-linux-gnu/qt5/mkspecs/linux-g++ -I/webapp_dez/itis_app/controllers -I/webapp_dez/itis_app/helpers -I/webapp_dez/itis_app/models -I/usr/include/treefrog -I/usr/include/x86_64-linux-gnu/qt5 -I/usr/include/x86_64-linux-gnu/qt5/QtQml -I/usr/include/x86_64-linux-gnu/qt5/QtNetwork -I/usr/include/x86_64-linux-gnu/qt5/QtSql -I/usr/include/x86_64-linux-gnu/qt5/QtXml -I/usr/include/x86_64-linux-gnu/qt5/QtCore -I/usr/include/c++/9 -I/usr/include/x86_64-linux-gnu/c++/9 -I/usr/include/c++/9/backward -I/usr/lib/gcc/x86_64-linux-gnu/9/include -I/usr/local/include -I/usr/include/x86_64-linux-gnu -I/usr/include accountcontroller.h -o .obj/moc_accountcontroller.cpp
+
+.obj/moc_admincontroller.cpp: admincontroller.h \
+ applicationcontroller.h \
+ ../helpers/applicationhelper.h \
+ .obj/moc_predefs.h \
+ /usr/lib/qt5/bin/moc
+ /usr/lib/qt5/bin/moc $(DEFINES) --include /webapp_dez/itis_app/controllers/.obj/moc_predefs.h -I/usr/lib/x86_64-linux-gnu/qt5/mkspecs/linux-g++ -I/webapp_dez/itis_app/controllers -I/webapp_dez/itis_app/helpers -I/webapp_dez/itis_app/models -I/usr/include/treefrog -I/usr/include/x86_64-linux-gnu/qt5 -I/usr/include/x86_64-linux-gnu/qt5/QtQml -I/usr/include/x86_64-linux-gnu/qt5/QtNetwork -I/usr/include/x86_64-linux-gnu/qt5/QtSql -I/usr/include/x86_64-linux-gnu/qt5/QtXml -I/usr/include/x86_64-linux-gnu/qt5/QtCore -I/usr/include/c++/9 -I/usr/include/x86_64-linux-gnu/c++/9 -I/usr/include/c++/9/backward -I/usr/lib/gcc/x86_64-linux-gnu/9/include -I/usr/local/include -I/usr/include/x86_64-linux-gnu -I/usr/include admincontroller.h -o .obj/moc_admincontroller.cpp
+
+.obj/moc_portaladmincontroller.cpp: portaladmincontroller.h \
+ applicationcontroller.h \
+ ../helpers/applicationhelper.h \
+ .obj/moc_predefs.h \
+ /usr/lib/qt5/bin/moc
+ /usr/lib/qt5/bin/moc $(DEFINES) --include /webapp_dez/itis_app/controllers/.obj/moc_predefs.h -I/usr/lib/x86_64-linux-gnu/qt5/mkspecs/linux-g++ -I/webapp_dez/itis_app/controllers -I/webapp_dez/itis_app/helpers -I/webapp_dez/itis_app/models -I/usr/include/treefrog -I/usr/include/x86_64-linux-gnu/qt5 -I/usr/include/x86_64-linux-gnu/qt5/QtQml -I/usr/include/x86_64-linux-gnu/qt5/QtNetwork -I/usr/include/x86_64-linux-gnu/qt5/QtSql -I/usr/include/x86_64-linux-gnu/qt5/QtXml -I/usr/include/x86_64-linux-gnu/qt5/QtCore -I/usr/include/c++/9 -I/usr/include/x86_64-linux-gnu/c++/9 -I/usr/include/c++/9/backward -I/usr/lib/gcc/x86_64-linux-gnu/9/include -I/usr/local/include -I/usr/include/x86_64-linux-gnu -I/usr/include portaladmincontroller.h -o .obj/moc_portaladmincontroller.cpp
+
+.obj/moc_objectscontroller.cpp: objectscontroller.h \
+ applicationcontroller.h \
+ ../helpers/applicationhelper.h \
+ .obj/moc_predefs.h \
+ /usr/lib/qt5/bin/moc
+ /usr/lib/qt5/bin/moc $(DEFINES) --include /webapp_dez/itis_app/controllers/.obj/moc_predefs.h -I/usr/lib/x86_64-linux-gnu/qt5/mkspecs/linux-g++ -I/webapp_dez/itis_app/controllers -I/webapp_dez/itis_app/helpers -I/webapp_dez/itis_app/models -I/usr/include/treefrog -I/usr/include/x86_64-linux-gnu/qt5 -I/usr/include/x86_64-linux-gnu/qt5/QtQml -I/usr/include/x86_64-linux-gnu/qt5/QtNetwork -I/usr/include/x86_64-linux-gnu/qt5/QtSql -I/usr/include/x86_64-linux-gnu/qt5/QtXml -I/usr/include/x86_64-linux-gnu/qt5/QtCore -I/usr/include/c++/9 -I/usr/include/x86_64-linux-gnu/c++/9 -I/usr/include/c++/9/backward -I/usr/lib/gcc/x86_64-linux-gnu/9/include -I/usr/local/include -I/usr/include/x86_64-linux-gnu -I/usr/include objectscontroller.h -o .obj/moc_objectscontroller.cpp
+
+.obj/moc_catclassescontroller.cpp: catclassescontroller.h \
+ applicationcontroller.h \
+ ../helpers/applicationhelper.h \
+ .obj/moc_predefs.h \
+ /usr/lib/qt5/bin/moc
+ /usr/lib/qt5/bin/moc $(DEFINES) --include /webapp_dez/itis_app/controllers/.obj/moc_predefs.h -I/usr/lib/x86_64-linux-gnu/qt5/mkspecs/linux-g++ -I/webapp_dez/itis_app/controllers -I/webapp_dez/itis_app/helpers -I/webapp_dez/itis_app/models -I/usr/include/treefrog -I/usr/include/x86_64-linux-gnu/qt5 -I/usr/include/x86_64-linux-gnu/qt5/QtQml -I/usr/include/x86_64-linux-gnu/qt5/QtNetwork -I/usr/include/x86_64-linux-gnu/qt5/QtSql -I/usr/include/x86_64-linux-gnu/qt5/QtXml -I/usr/include/x86_64-linux-gnu/qt5/QtCore -I/usr/include/c++/9 -I/usr/include/x86_64-linux-gnu/c++/9 -I/usr/include/c++/9/backward -I/usr/lib/gcc/x86_64-linux-gnu/9/include -I/usr/local/include -I/usr/include/x86_64-linux-gnu -I/usr/include catclassescontroller.h -o .obj/moc_catclassescontroller.cpp
+
+.obj/moc_acclassescontroller.cpp: acclassescontroller.h \
+ applicationcontroller.h \
+ ../helpers/applicationhelper.h \
+ .obj/moc_predefs.h \
+ /usr/lib/qt5/bin/moc
+ /usr/lib/qt5/bin/moc $(DEFINES) --include /webapp_dez/itis_app/controllers/.obj/moc_predefs.h -I/usr/lib/x86_64-linux-gnu/qt5/mkspecs/linux-g++ -I/webapp_dez/itis_app/controllers -I/webapp_dez/itis_app/helpers -I/webapp_dez/itis_app/models -I/usr/include/treefrog -I/usr/include/x86_64-linux-gnu/qt5 -I/usr/include/x86_64-linux-gnu/qt5/QtQml -I/usr/include/x86_64-linux-gnu/qt5/QtNetwork -I/usr/include/x86_64-linux-gnu/qt5/QtSql -I/usr/include/x86_64-linux-gnu/qt5/QtXml -I/usr/include/x86_64-linux-gnu/qt5/QtCore -I/usr/include/c++/9 -I/usr/include/x86_64-linux-gnu/c++/9 -I/usr/include/c++/9/backward -I/usr/lib/gcc/x86_64-linux-gnu/9/include -I/usr/local/include -I/usr/include/x86_64-linux-gnu -I/usr/include acclassescontroller.h -o .obj/moc_acclassescontroller.cpp
+
+.obj/moc_pcclassescontroller.cpp: pcclassescontroller.h \
+ applicationcontroller.h \
+ ../helpers/applicationhelper.h \
+ .obj/moc_predefs.h \
+ /usr/lib/qt5/bin/moc
+ /usr/lib/qt5/bin/moc $(DEFINES) --include /webapp_dez/itis_app/controllers/.obj/moc_predefs.h -I/usr/lib/x86_64-linux-gnu/qt5/mkspecs/linux-g++ -I/webapp_dez/itis_app/controllers -I/webapp_dez/itis_app/helpers -I/webapp_dez/itis_app/models -I/usr/include/treefrog -I/usr/include/x86_64-linux-gnu/qt5 -I/usr/include/x86_64-linux-gnu/qt5/QtQml -I/usr/include/x86_64-linux-gnu/qt5/QtNetwork -I/usr/include/x86_64-linux-gnu/qt5/QtSql -I/usr/include/x86_64-linux-gnu/qt5/QtXml -I/usr/include/x86_64-linux-gnu/qt5/QtCore -I/usr/include/c++/9 -I/usr/include/x86_64-linux-gnu/c++/9 -I/usr/include/c++/9/backward -I/usr/lib/gcc/x86_64-linux-gnu/9/include -I/usr/local/include -I/usr/include/x86_64-linux-gnu -I/usr/include pcclassescontroller.h -o .obj/moc_pcclassescontroller.cpp
+
+.obj/moc_annexdatacontroller.cpp: annexdatacontroller.h \
+ applicationcontroller.h \
+ ../helpers/applicationhelper.h \
+ .obj/moc_predefs.h \
+ /usr/lib/qt5/bin/moc
+ /usr/lib/qt5/bin/moc $(DEFINES) --include /webapp_dez/itis_app/controllers/.obj/moc_predefs.h -I/usr/lib/x86_64-linux-gnu/qt5/mkspecs/linux-g++ -I/webapp_dez/itis_app/controllers -I/webapp_dez/itis_app/helpers -I/webapp_dez/itis_app/models -I/usr/include/treefrog -I/usr/include/x86_64-linux-gnu/qt5 -I/usr/include/x86_64-linux-gnu/qt5/QtQml -I/usr/include/x86_64-linux-gnu/qt5/QtNetwork -I/usr/include/x86_64-linux-gnu/qt5/QtSql -I/usr/include/x86_64-linux-gnu/qt5/QtXml -I/usr/include/x86_64-linux-gnu/qt5/QtCore -I/usr/include/c++/9 -I/usr/include/x86_64-linux-gnu/c++/9 -I/usr/include/c++/9/backward -I/usr/lib/gcc/x86_64-linux-gnu/9/include -I/usr/local/include -I/usr/include/x86_64-linux-gnu -I/usr/include annexdatacontroller.h -o .obj/moc_annexdatacontroller.cpp
+
+.obj/moc_annexmetacontroller.cpp: annexmetacontroller.h \
+ applicationcontroller.h \
+ ../helpers/applicationhelper.h \
+ .obj/moc_predefs.h \
+ /usr/lib/qt5/bin/moc
+ /usr/lib/qt5/bin/moc $(DEFINES) --include /webapp_dez/itis_app/controllers/.obj/moc_predefs.h -I/usr/lib/x86_64-linux-gnu/qt5/mkspecs/linux-g++ -I/webapp_dez/itis_app/controllers -I/webapp_dez/itis_app/helpers -I/webapp_dez/itis_app/models -I/usr/include/treefrog -I/usr/include/x86_64-linux-gnu/qt5 -I/usr/include/x86_64-linux-gnu/qt5/QtQml -I/usr/include/x86_64-linux-gnu/qt5/QtNetwork -I/usr/include/x86_64-linux-gnu/qt5/QtSql -I/usr/include/x86_64-linux-gnu/qt5/QtXml -I/usr/include/x86_64-linux-gnu/qt5/QtCore -I/usr/include/c++/9 -I/usr/include/x86_64-linux-gnu/c++/9 -I/usr/include/c++/9/backward -I/usr/lib/gcc/x86_64-linux-gnu/9/include -I/usr/local/include -I/usr/include/x86_64-linux-gnu -I/usr/include annexmetacontroller.h -o .obj/moc_annexmetacontroller.cpp
+
+.obj/moc_glossarcontroller.cpp: glossarcontroller.h \
+ applicationcontroller.h \
+ ../helpers/applicationhelper.h \
+ .obj/moc_predefs.h \
+ /usr/lib/qt5/bin/moc
+ /usr/lib/qt5/bin/moc $(DEFINES) --include /webapp_dez/itis_app/controllers/.obj/moc_predefs.h -I/usr/lib/x86_64-linux-gnu/qt5/mkspecs/linux-g++ -I/webapp_dez/itis_app/controllers -I/webapp_dez/itis_app/helpers -I/webapp_dez/itis_app/models -I/usr/include/treefrog -I/usr/include/x86_64-linux-gnu/qt5 -I/usr/include/x86_64-linux-gnu/qt5/QtQml -I/usr/include/x86_64-linux-gnu/qt5/QtNetwork -I/usr/include/x86_64-linux-gnu/qt5/QtSql -I/usr/include/x86_64-linux-gnu/qt5/QtXml -I/usr/include/x86_64-linux-gnu/qt5/QtCore -I/usr/include/c++/9 -I/usr/include/x86_64-linux-gnu/c++/9 -I/usr/include/c++/9/backward -I/usr/lib/gcc/x86_64-linux-gnu/9/include -I/usr/local/include -I/usr/include/x86_64-linux-gnu -I/usr/include glossarcontroller.h -o .obj/moc_glossarcontroller.cpp
+
+.obj/moc_standardsdatacommentscontroller.cpp: standardsdatacommentscontroller.h \
+ applicationcontroller.h \
+ ../helpers/applicationhelper.h \
+ .obj/moc_predefs.h \
+ /usr/lib/qt5/bin/moc
+ /usr/lib/qt5/bin/moc $(DEFINES) --include /webapp_dez/itis_app/controllers/.obj/moc_predefs.h -I/usr/lib/x86_64-linux-gnu/qt5/mkspecs/linux-g++ -I/webapp_dez/itis_app/controllers -I/webapp_dez/itis_app/helpers -I/webapp_dez/itis_app/models -I/usr/include/treefrog -I/usr/include/x86_64-linux-gnu/qt5 -I/usr/include/x86_64-linux-gnu/qt5/QtQml -I/usr/include/x86_64-linux-gnu/qt5/QtNetwork -I/usr/include/x86_64-linux-gnu/qt5/QtSql -I/usr/include/x86_64-linux-gnu/qt5/QtXml -I/usr/include/x86_64-linux-gnu/qt5/QtCore -I/usr/include/c++/9 -I/usr/include/x86_64-linux-gnu/c++/9 -I/usr/include/c++/9/backward -I/usr/lib/gcc/x86_64-linux-gnu/9/include -I/usr/local/include -I/usr/include/x86_64-linux-gnu -I/usr/include standardsdatacommentscontroller.h -o .obj/moc_standardsdatacommentscontroller.cpp
+
+.obj/moc_appvarscontroller.cpp: appvarscontroller.h \
+ applicationcontroller.h \
+ ../helpers/applicationhelper.h \
+ .obj/moc_predefs.h \
+ /usr/lib/qt5/bin/moc
+ /usr/lib/qt5/bin/moc $(DEFINES) --include /webapp_dez/itis_app/controllers/.obj/moc_predefs.h -I/usr/lib/x86_64-linux-gnu/qt5/mkspecs/linux-g++ -I/webapp_dez/itis_app/controllers -I/webapp_dez/itis_app/helpers -I/webapp_dez/itis_app/models -I/usr/include/treefrog -I/usr/include/x86_64-linux-gnu/qt5 -I/usr/include/x86_64-linux-gnu/qt5/QtQml -I/usr/include/x86_64-linux-gnu/qt5/QtNetwork -I/usr/include/x86_64-linux-gnu/qt5/QtSql -I/usr/include/x86_64-linux-gnu/qt5/QtXml -I/usr/include/x86_64-linux-gnu/qt5/QtCore -I/usr/include/c++/9 -I/usr/include/x86_64-linux-gnu/c++/9 -I/usr/include/c++/9/backward -I/usr/lib/gcc/x86_64-linux-gnu/9/include -I/usr/local/include -I/usr/include/x86_64-linux-gnu -I/usr/include appvarscontroller.h -o .obj/moc_appvarscontroller.cpp
+
+.obj/moc_itisnewscontroller.cpp: itisnewscontroller.h \
+ applicationcontroller.h \
+ ../helpers/applicationhelper.h \
+ .obj/moc_predefs.h \
+ /usr/lib/qt5/bin/moc
+ /usr/lib/qt5/bin/moc $(DEFINES) --include /webapp_dez/itis_app/controllers/.obj/moc_predefs.h -I/usr/lib/x86_64-linux-gnu/qt5/mkspecs/linux-g++ -I/webapp_dez/itis_app/controllers -I/webapp_dez/itis_app/helpers -I/webapp_dez/itis_app/models -I/usr/include/treefrog -I/usr/include/x86_64-linux-gnu/qt5 -I/usr/include/x86_64-linux-gnu/qt5/QtQml -I/usr/include/x86_64-linux-gnu/qt5/QtNetwork -I/usr/include/x86_64-linux-gnu/qt5/QtSql -I/usr/include/x86_64-linux-gnu/qt5/QtXml -I/usr/include/x86_64-linux-gnu/qt5/QtCore -I/usr/include/c++/9 -I/usr/include/x86_64-linux-gnu/c++/9 -I/usr/include/c++/9/backward -I/usr/lib/gcc/x86_64-linux-gnu/9/include -I/usr/local/include -I/usr/include/x86_64-linux-gnu -I/usr/include itisnewscontroller.h -o .obj/moc_itisnewscontroller.cpp
+
+.obj/moc_actionrightscontroller.cpp: actionrightscontroller.h \
+ applicationcontroller.h \
+ ../helpers/applicationhelper.h \
+ .obj/moc_predefs.h \
+ /usr/lib/qt5/bin/moc
+ /usr/lib/qt5/bin/moc $(DEFINES) --include /webapp_dez/itis_app/controllers/.obj/moc_predefs.h -I/usr/lib/x86_64-linux-gnu/qt5/mkspecs/linux-g++ -I/webapp_dez/itis_app/controllers -I/webapp_dez/itis_app/helpers -I/webapp_dez/itis_app/models -I/usr/include/treefrog -I/usr/include/x86_64-linux-gnu/qt5 -I/usr/include/x86_64-linux-gnu/qt5/QtQml -I/usr/include/x86_64-linux-gnu/qt5/QtNetwork -I/usr/include/x86_64-linux-gnu/qt5/QtSql -I/usr/include/x86_64-linux-gnu/qt5/QtXml -I/usr/include/x86_64-linux-gnu/qt5/QtCore -I/usr/include/c++/9 -I/usr/include/x86_64-linux-gnu/c++/9 -I/usr/include/c++/9/backward -I/usr/lib/gcc/x86_64-linux-gnu/9/include -I/usr/local/include -I/usr/include/x86_64-linux-gnu -I/usr/include actionrightscontroller.h -o .obj/moc_actionrightscontroller.cpp
+
+.obj/moc_itisgroupscontroller.cpp: itisgroupscontroller.h \
+ applicationcontroller.h \
+ ../helpers/applicationhelper.h \
+ .obj/moc_predefs.h \
+ /usr/lib/qt5/bin/moc
+ /usr/lib/qt5/bin/moc $(DEFINES) --include /webapp_dez/itis_app/controllers/.obj/moc_predefs.h -I/usr/lib/x86_64-linux-gnu/qt5/mkspecs/linux-g++ -I/webapp_dez/itis_app/controllers -I/webapp_dez/itis_app/helpers -I/webapp_dez/itis_app/models -I/usr/include/treefrog -I/usr/include/x86_64-linux-gnu/qt5 -I/usr/include/x86_64-linux-gnu/qt5/QtQml -I/usr/include/x86_64-linux-gnu/qt5/QtNetwork -I/usr/include/x86_64-linux-gnu/qt5/QtSql -I/usr/include/x86_64-linux-gnu/qt5/QtXml -I/usr/include/x86_64-linux-gnu/qt5/QtCore -I/usr/include/c++/9 -I/usr/include/x86_64-linux-gnu/c++/9 -I/usr/include/c++/9/backward -I/usr/lib/gcc/x86_64-linux-gnu/9/include -I/usr/local/include -I/usr/include/x86_64-linux-gnu -I/usr/include itisgroupscontroller.h -o .obj/moc_itisgroupscontroller.cpp
+
+.obj/moc_annexdatacommentscontroller.cpp: annexdatacommentscontroller.h \
+ applicationcontroller.h \
+ ../helpers/applicationhelper.h \
+ .obj/moc_predefs.h \
+ /usr/lib/qt5/bin/moc
+ /usr/lib/qt5/bin/moc $(DEFINES) --include /webapp_dez/itis_app/controllers/.obj/moc_predefs.h -I/usr/lib/x86_64-linux-gnu/qt5/mkspecs/linux-g++ -I/webapp_dez/itis_app/controllers -I/webapp_dez/itis_app/helpers -I/webapp_dez/itis_app/models -I/usr/include/treefrog -I/usr/include/x86_64-linux-gnu/qt5 -I/usr/include/x86_64-linux-gnu/qt5/QtQml -I/usr/include/x86_64-linux-gnu/qt5/QtNetwork -I/usr/include/x86_64-linux-gnu/qt5/QtSql -I/usr/include/x86_64-linux-gnu/qt5/QtXml -I/usr/include/x86_64-linux-gnu/qt5/QtCore -I/usr/include/c++/9 -I/usr/include/x86_64-linux-gnu/c++/9 -I/usr/include/c++/9/backward -I/usr/lib/gcc/x86_64-linux-gnu/9/include -I/usr/local/include -I/usr/include/x86_64-linux-gnu -I/usr/include annexdatacommentscontroller.h -o .obj/moc_annexdatacommentscontroller.cpp
+
+.obj/moc_releasemgmtcontroller.cpp: releasemgmtcontroller.h \
+ applicationcontroller.h \
+ ../helpers/applicationhelper.h \
+ .obj/moc_predefs.h \
+ /usr/lib/qt5/bin/moc
+ /usr/lib/qt5/bin/moc $(DEFINES) --include /webapp_dez/itis_app/controllers/.obj/moc_predefs.h -I/usr/lib/x86_64-linux-gnu/qt5/mkspecs/linux-g++ -I/webapp_dez/itis_app/controllers -I/webapp_dez/itis_app/helpers -I/webapp_dez/itis_app/models -I/usr/include/treefrog -I/usr/include/x86_64-linux-gnu/qt5 -I/usr/include/x86_64-linux-gnu/qt5/QtQml -I/usr/include/x86_64-linux-gnu/qt5/QtNetwork -I/usr/include/x86_64-linux-gnu/qt5/QtSql -I/usr/include/x86_64-linux-gnu/qt5/QtXml -I/usr/include/x86_64-linux-gnu/qt5/QtCore -I/usr/include/c++/9 -I/usr/include/x86_64-linux-gnu/c++/9 -I/usr/include/c++/9/backward -I/usr/lib/gcc/x86_64-linux-gnu/9/include -I/usr/local/include -I/usr/include/x86_64-linux-gnu -I/usr/include releasemgmtcontroller.h -o .obj/moc_releasemgmtcontroller.cpp
+
+.obj/moc_lenkinfocontroller.cpp: lenkinfocontroller.h \
+ applicationcontroller.h \
+ ../helpers/applicationhelper.h \
+ .obj/moc_predefs.h \
+ /usr/lib/qt5/bin/moc
+ /usr/lib/qt5/bin/moc $(DEFINES) --include /webapp_dez/itis_app/controllers/.obj/moc_predefs.h -I/usr/lib/x86_64-linux-gnu/qt5/mkspecs/linux-g++ -I/webapp_dez/itis_app/controllers -I/webapp_dez/itis_app/helpers -I/webapp_dez/itis_app/models -I/usr/include/treefrog -I/usr/include/x86_64-linux-gnu/qt5 -I/usr/include/x86_64-linux-gnu/qt5/QtQml -I/usr/include/x86_64-linux-gnu/qt5/QtNetwork -I/usr/include/x86_64-linux-gnu/qt5/QtSql -I/usr/include/x86_64-linux-gnu/qt5/QtXml -I/usr/include/x86_64-linux-gnu/qt5/QtCore -I/usr/include/c++/9 -I/usr/include/x86_64-linux-gnu/c++/9 -I/usr/include/c++/9/backward -I/usr/lib/gcc/x86_64-linux-gnu/9/include -I/usr/local/include -I/usr/include/x86_64-linux-gnu -I/usr/include lenkinfocontroller.h -o .obj/moc_lenkinfocontroller.cpp
+
+compiler_moc_objc_header_make_all:
+compiler_moc_objc_header_clean:
+compiler_moc_source_make_all:
+compiler_moc_source_clean:
+compiler_yacc_decl_make_all:
+compiler_yacc_decl_clean:
+compiler_yacc_impl_make_all:
+compiler_yacc_impl_clean:
+compiler_lex_make_all:
+compiler_lex_clean:
+compiler_clean: compiler_moc_predefs_clean compiler_moc_header_clean
+
+####### Compile
+
+.obj/applicationcontroller.o: applicationcontroller.cpp applicationcontroller.h \
+ ../helpers/applicationhelper.h
+ $(CXX) -c $(CXXFLAGS) $(INCPATH) -o .obj/applicationcontroller.o applicationcontroller.cpp
+
+.obj/standardsdatacontroller.o: standardsdatacontroller.cpp standardsdatacontroller.h \
+ applicationcontroller.h \
+ ../helpers/applicationhelper.h \
+ ../models/standardsdata.h \
+ ../models/itisuser.h \
+ ../models/itisgroups.h \
+ accountcontroller.h \
+ ../models/actionrights.h \
+ ../models/objects.h \
+ ../models/catclasses.h \
+ ../models/stdsystem.h \
+ ../models/acclasses.h \
+ ../models/pcclasses.h \
+ ../models/standardsmeta.h \
+ ../models/standardsdatawaste.h \
+ ../models/standardsdatacomments.h
+ $(CXX) -c $(CXXFLAGS) $(INCPATH) -o .obj/standardsdatacontroller.o standardsdatacontroller.cpp
+
+.obj/standardsmetacontroller.o: standardsmetacontroller.cpp standardsmetacontroller.h \
+ applicationcontroller.h \
+ ../helpers/applicationhelper.h \
+ ../models/standardsmeta.h \
+ ../models/itisuser.h \
+ ../models/itisgroups.h \
+ accountcontroller.h \
+ ../models/actionrights.h
+ $(CXX) -c $(CXXFLAGS) $(INCPATH) -o .obj/standardsmetacontroller.o standardsmetacontroller.cpp
+
+.obj/stdsystemcontroller.o: stdsystemcontroller.cpp stdsystemcontroller.h \
+ applicationcontroller.h \
+ ../helpers/applicationhelper.h \
+ ../models/stdsystem.h \
+ ../models/itisuser.h \
+ ../models/itisgroups.h \
+ accountcontroller.h \
+ ../models/actionrights.h
+ $(CXX) -c $(CXXFLAGS) $(INCPATH) -o .obj/stdsystemcontroller.o stdsystemcontroller.cpp
+
+.obj/webmenucontroller.o: webmenucontroller.cpp webmenucontroller.h \
+ applicationcontroller.h \
+ ../helpers/applicationhelper.h \
+ ../models/webmenu.h \
+ ../models/itisuser.h \
+ ../models/itisgroups.h \
+ accountcontroller.h \
+ ../models/actionrights.h
+ $(CXX) -c $(CXXFLAGS) $(INCPATH) -o .obj/webmenucontroller.o webmenucontroller.cpp
+
+.obj/accountcontroller.o: accountcontroller.cpp accountcontroller.h \
+ applicationcontroller.h \
+ ../helpers/applicationhelper.h \
+ ../models/sqlobjects/itisuserobject.h \
+ informationmailer.h \
+ ../models/itisuser.h \
+ ../models/itisgroups.h \
+ ../models/actionrights.h
+ $(CXX) -c $(CXXFLAGS) $(INCPATH) -o .obj/accountcontroller.o accountcontroller.cpp
+
+.obj/admincontroller.o: admincontroller.cpp admincontroller.h \
+ applicationcontroller.h \
+ ../helpers/applicationhelper.h \
+ ../models/itisuser.h \
+ ../models/itisgroups.h \
+ accountcontroller.h \
+ ../models/actionrights.h
+ $(CXX) -c $(CXXFLAGS) $(INCPATH) -o .obj/admincontroller.o admincontroller.cpp
+
+.obj/portaladmincontroller.o: portaladmincontroller.cpp portaladmincontroller.h \
+ applicationcontroller.h \
+ ../helpers/applicationhelper.h \
+ ../models/itisuser.h \
+ ../models/itisgroups.h \
+ accountcontroller.h \
+ ../models/actionrights.h
+ $(CXX) -c $(CXXFLAGS) $(INCPATH) -o .obj/portaladmincontroller.o portaladmincontroller.cpp
+
+.obj/objectscontroller.o: objectscontroller.cpp objectscontroller.h \
+ applicationcontroller.h \
+ ../helpers/applicationhelper.h \
+ ../models/objects.h \
+ ../models/itisuser.h \
+ ../models/itisgroups.h \
+ accountcontroller.h \
+ ../models/actionrights.h
+ $(CXX) -c $(CXXFLAGS) $(INCPATH) -o .obj/objectscontroller.o objectscontroller.cpp
+
+.obj/catclassescontroller.o: catclassescontroller.cpp catclassescontroller.h \
+ applicationcontroller.h \
+ ../helpers/applicationhelper.h \
+ ../models/catclasses.h \
+ ../models/itisuser.h \
+ ../models/itisgroups.h \
+ accountcontroller.h \
+ ../models/actionrights.h
+ $(CXX) -c $(CXXFLAGS) $(INCPATH) -o .obj/catclassescontroller.o catclassescontroller.cpp
+
+.obj/acclassescontroller.o: acclassescontroller.cpp acclassescontroller.h \
+ applicationcontroller.h \
+ ../helpers/applicationhelper.h \
+ ../models/acclasses.h \
+ ../models/itisuser.h \
+ ../models/itisgroups.h \
+ accountcontroller.h \
+ ../models/actionrights.h
+ $(CXX) -c $(CXXFLAGS) $(INCPATH) -o .obj/acclassescontroller.o acclassescontroller.cpp
+
+.obj/pcclassescontroller.o: pcclassescontroller.cpp pcclassescontroller.h \
+ applicationcontroller.h \
+ ../helpers/applicationhelper.h \
+ ../models/pcclasses.h \
+ ../models/itisuser.h \
+ ../models/itisgroups.h \
+ accountcontroller.h \
+ ../models/actionrights.h
+ $(CXX) -c $(CXXFLAGS) $(INCPATH) -o .obj/pcclassescontroller.o pcclassescontroller.cpp
+
+.obj/annexdatacontroller.o: annexdatacontroller.cpp annexdatacontroller.h \
+ applicationcontroller.h \
+ ../helpers/applicationhelper.h \
+ ../models/annexdata.h \
+ ../models/itisuser.h \
+ ../models/itisgroups.h \
+ accountcontroller.h \
+ ../models/actionrights.h \
+ ../models/objects.h \
+ ../models/catclasses.h \
+ ../models/stdsystem.h \
+ ../models/acclasses.h \
+ ../models/pcclasses.h \
+ ../models/annexmeta.h \
+ ../models/annexdatawaste.h \
+ ../models/annexdatacomments.h
+ $(CXX) -c $(CXXFLAGS) $(INCPATH) -o .obj/annexdatacontroller.o annexdatacontroller.cpp
+
+.obj/annexmetacontroller.o: annexmetacontroller.cpp annexmetacontroller.h \
+ applicationcontroller.h \
+ ../helpers/applicationhelper.h \
+ ../models/annexmeta.h \
+ ../models/itisuser.h \
+ ../models/itisgroups.h \
+ accountcontroller.h \
+ ../models/actionrights.h
+ $(CXX) -c $(CXXFLAGS) $(INCPATH) -o .obj/annexmetacontroller.o annexmetacontroller.cpp
+
+.obj/glossarcontroller.o: glossarcontroller.cpp glossarcontroller.h \
+ applicationcontroller.h \
+ ../helpers/applicationhelper.h \
+ ../models/glossar.h \
+ ../models/itisuser.h \
+ ../models/itisgroups.h \
+ accountcontroller.h \
+ ../models/actionrights.h
+ $(CXX) -c $(CXXFLAGS) $(INCPATH) -o .obj/glossarcontroller.o glossarcontroller.cpp
+
+.obj/informationmailer.o: informationmailer.cpp informationmailer.h
+ $(CXX) -c $(CXXFLAGS) $(INCPATH) -o .obj/informationmailer.o informationmailer.cpp
+
+.obj/standardsdatacommentscontroller.o: standardsdatacommentscontroller.cpp standardsdatacommentscontroller.h \
+ applicationcontroller.h \
+ ../helpers/applicationhelper.h \
+ ../models/standardsdatacomments.h \
+ ../models/itisuser.h \
+ ../models/itisgroups.h \
+ accountcontroller.h \
+ ../models/actionrights.h
+ $(CXX) -c $(CXXFLAGS) $(INCPATH) -o .obj/standardsdatacommentscontroller.o standardsdatacommentscontroller.cpp
+
+.obj/appvarscontroller.o: appvarscontroller.cpp appvarscontroller.h \
+ applicationcontroller.h \
+ ../helpers/applicationhelper.h \
+ ../models/appvars.h \
+ ../models/itisuser.h \
+ ../models/itisgroups.h \
+ accountcontroller.h \
+ ../models/actionrights.h
+ $(CXX) -c $(CXXFLAGS) $(INCPATH) -o .obj/appvarscontroller.o appvarscontroller.cpp
+
+.obj/itisnewscontroller.o: itisnewscontroller.cpp itisnewscontroller.h \
+ applicationcontroller.h \
+ ../helpers/applicationhelper.h \
+ ../models/itisnews.h \
+ ../models/itisuser.h \
+ ../models/itisgroups.h \
+ accountcontroller.h \
+ ../models/actionrights.h
+ $(CXX) -c $(CXXFLAGS) $(INCPATH) -o .obj/itisnewscontroller.o itisnewscontroller.cpp
+
+.obj/actionrightscontroller.o: actionrightscontroller.cpp actionrightscontroller.h \
+ applicationcontroller.h \
+ ../helpers/applicationhelper.h \
+ ../models/actionrights.h \
+ ../models/itisuser.h \
+ ../models/itisgroups.h \
+ accountcontroller.h
+ $(CXX) -c $(CXXFLAGS) $(INCPATH) -o .obj/actionrightscontroller.o actionrightscontroller.cpp
+
+.obj/itisgroupscontroller.o: itisgroupscontroller.cpp itisgroupscontroller.h \
+ applicationcontroller.h \
+ ../helpers/applicationhelper.h \
+ ../models/itisuser.h \
+ ../models/itisgroups.h \
+ accountcontroller.h \
+ ../models/actionrights.h
+ $(CXX) -c $(CXXFLAGS) $(INCPATH) -o .obj/itisgroupscontroller.o itisgroupscontroller.cpp
+
+.obj/annexdatacommentscontroller.o: annexdatacommentscontroller.cpp annexdatacommentscontroller.h \
+ applicationcontroller.h \
+ ../helpers/applicationhelper.h \
+ ../models/annexdatacomments.h \
+ ../models/itisuser.h \
+ ../models/itisgroups.h \
+ accountcontroller.h \
+ ../models/actionrights.h
+ $(CXX) -c $(CXXFLAGS) $(INCPATH) -o .obj/annexdatacommentscontroller.o annexdatacommentscontroller.cpp
+
+.obj/releasemgmtcontroller.o: releasemgmtcontroller.cpp releasemgmtcontroller.h \
+ applicationcontroller.h \
+ ../helpers/applicationhelper.h \
+ ../models/releasemgmt.h \
+ ../models/itisuser.h \
+ ../models/itisgroups.h \
+ accountcontroller.h \
+ ../models/actionrights.h \
+ ../models/catclasses.h \
+ ../models/releaseannex.h \
+ ../models/lenkinfo.h
+ $(CXX) -c $(CXXFLAGS) $(INCPATH) -o .obj/releasemgmtcontroller.o releasemgmtcontroller.cpp
+
+.obj/lenkinfocontroller.o: lenkinfocontroller.cpp lenkinfocontroller.h \
+ applicationcontroller.h \
+ ../helpers/applicationhelper.h \
+ ../models/lenkinfo.h \
+ ../models/itisuser.h \
+ ../models/itisgroups.h \
+ accountcontroller.h \
+ ../models/actionrights.h
+ $(CXX) -c $(CXXFLAGS) $(INCPATH) -o .obj/lenkinfocontroller.o lenkinfocontroller.cpp
+
+.obj/moc_applicationcontroller.o: .obj/moc_applicationcontroller.cpp
+ $(CXX) -c $(CXXFLAGS) $(INCPATH) -o .obj/moc_applicationcontroller.o .obj/moc_applicationcontroller.cpp
+
+.obj/moc_standardsdatacontroller.o: .obj/moc_standardsdatacontroller.cpp
+ $(CXX) -c $(CXXFLAGS) $(INCPATH) -o .obj/moc_standardsdatacontroller.o .obj/moc_standardsdatacontroller.cpp
+
+.obj/moc_standardsmetacontroller.o: .obj/moc_standardsmetacontroller.cpp
+ $(CXX) -c $(CXXFLAGS) $(INCPATH) -o .obj/moc_standardsmetacontroller.o .obj/moc_standardsmetacontroller.cpp
+
+.obj/moc_stdsystemcontroller.o: .obj/moc_stdsystemcontroller.cpp
+ $(CXX) -c $(CXXFLAGS) $(INCPATH) -o .obj/moc_stdsystemcontroller.o .obj/moc_stdsystemcontroller.cpp
+
+.obj/moc_webmenucontroller.o: .obj/moc_webmenucontroller.cpp
+ $(CXX) -c $(CXXFLAGS) $(INCPATH) -o .obj/moc_webmenucontroller.o .obj/moc_webmenucontroller.cpp
+
+.obj/moc_accountcontroller.o: .obj/moc_accountcontroller.cpp
+ $(CXX) -c $(CXXFLAGS) $(INCPATH) -o .obj/moc_accountcontroller.o .obj/moc_accountcontroller.cpp
+
+.obj/moc_admincontroller.o: .obj/moc_admincontroller.cpp
+ $(CXX) -c $(CXXFLAGS) $(INCPATH) -o .obj/moc_admincontroller.o .obj/moc_admincontroller.cpp
+
+.obj/moc_portaladmincontroller.o: .obj/moc_portaladmincontroller.cpp
+ $(CXX) -c $(CXXFLAGS) $(INCPATH) -o .obj/moc_portaladmincontroller.o .obj/moc_portaladmincontroller.cpp
+
+.obj/moc_objectscontroller.o: .obj/moc_objectscontroller.cpp
+ $(CXX) -c $(CXXFLAGS) $(INCPATH) -o .obj/moc_objectscontroller.o .obj/moc_objectscontroller.cpp
+
+.obj/moc_catclassescontroller.o: .obj/moc_catclassescontroller.cpp
+ $(CXX) -c $(CXXFLAGS) $(INCPATH) -o .obj/moc_catclassescontroller.o .obj/moc_catclassescontroller.cpp
+
+.obj/moc_acclassescontroller.o: .obj/moc_acclassescontroller.cpp
+ $(CXX) -c $(CXXFLAGS) $(INCPATH) -o .obj/moc_acclassescontroller.o .obj/moc_acclassescontroller.cpp
+
+.obj/moc_pcclassescontroller.o: .obj/moc_pcclassescontroller.cpp
+ $(CXX) -c $(CXXFLAGS) $(INCPATH) -o .obj/moc_pcclassescontroller.o .obj/moc_pcclassescontroller.cpp
+
+.obj/moc_annexdatacontroller.o: .obj/moc_annexdatacontroller.cpp
+ $(CXX) -c $(CXXFLAGS) $(INCPATH) -o .obj/moc_annexdatacontroller.o .obj/moc_annexdatacontroller.cpp
+
+.obj/moc_annexmetacontroller.o: .obj/moc_annexmetacontroller.cpp
+ $(CXX) -c $(CXXFLAGS) $(INCPATH) -o .obj/moc_annexmetacontroller.o .obj/moc_annexmetacontroller.cpp
+
+.obj/moc_glossarcontroller.o: .obj/moc_glossarcontroller.cpp
+ $(CXX) -c $(CXXFLAGS) $(INCPATH) -o .obj/moc_glossarcontroller.o .obj/moc_glossarcontroller.cpp
+
+.obj/moc_standardsdatacommentscontroller.o: .obj/moc_standardsdatacommentscontroller.cpp
+ $(CXX) -c $(CXXFLAGS) $(INCPATH) -o .obj/moc_standardsdatacommentscontroller.o .obj/moc_standardsdatacommentscontroller.cpp
+
+.obj/moc_appvarscontroller.o: .obj/moc_appvarscontroller.cpp
+ $(CXX) -c $(CXXFLAGS) $(INCPATH) -o .obj/moc_appvarscontroller.o .obj/moc_appvarscontroller.cpp
+
+.obj/moc_itisnewscontroller.o: .obj/moc_itisnewscontroller.cpp
+ $(CXX) -c $(CXXFLAGS) $(INCPATH) -o .obj/moc_itisnewscontroller.o .obj/moc_itisnewscontroller.cpp
+
+.obj/moc_actionrightscontroller.o: .obj/moc_actionrightscontroller.cpp
+ $(CXX) -c $(CXXFLAGS) $(INCPATH) -o .obj/moc_actionrightscontroller.o .obj/moc_actionrightscontroller.cpp
+
+.obj/moc_itisgroupscontroller.o: .obj/moc_itisgroupscontroller.cpp
+ $(CXX) -c $(CXXFLAGS) $(INCPATH) -o .obj/moc_itisgroupscontroller.o .obj/moc_itisgroupscontroller.cpp
+
+.obj/moc_annexdatacommentscontroller.o: .obj/moc_annexdatacommentscontroller.cpp
+ $(CXX) -c $(CXXFLAGS) $(INCPATH) -o .obj/moc_annexdatacommentscontroller.o .obj/moc_annexdatacommentscontroller.cpp
+
+.obj/moc_releasemgmtcontroller.o: .obj/moc_releasemgmtcontroller.cpp
+ $(CXX) -c $(CXXFLAGS) $(INCPATH) -o .obj/moc_releasemgmtcontroller.o .obj/moc_releasemgmtcontroller.cpp
+
+.obj/moc_lenkinfocontroller.o: .obj/moc_lenkinfocontroller.cpp
+ $(CXX) -c $(CXXFLAGS) $(INCPATH) -o .obj/moc_lenkinfocontroller.o .obj/moc_lenkinfocontroller.cpp
+
+####### Install
+
+install: FORCE
+
+uninstall: FORCE
+
+FORCE:
+
diff --git a/controllers/acclassescontroller.cpp b/controllers/acclassescontroller.cpp
new file mode 100644
index 0000000..942d9c1
--- /dev/null
+++ b/controllers/acclassescontroller.cpp
@@ -0,0 +1,251 @@
+#include "acclassescontroller.h"
+#include "acclasses.h"
+
+#include "itisuser.h"
+#include "itisgroups.h"
+#include "accountcontroller.h"
+#include "actionrights.h"
+
+void AcClassesController::getObjAcJson()
+{
+ QString obj = httpRequest().queryItemValue("obj");
+ QString strActive = httpRequest().queryItemValue("active");
+ int active = 1;
+
+ if(strActive.compare("0") == 0)
+ {
+ active = 0;
+ }
+ renderJson( AcClasses::getObjAcJson(obj, active) );
+}
+
+void AcClassesController::getAcClassesJson()
+{
+ renderJson( AcClasses::getAcClassesJson() );
+}
+
+void AcClassesController::list_all()
+{
+ QString username = identityKeyOfLoginUser();
+ ItisUser user = ItisUser::getByIdentityKey(username);
+ if (!user.isNull())
+ {
+ auto conti = TActionController::name();
+ auto con = TActionController::activeAction();
+ QString uri = "/" + conti + "/" + con;
+
+ if(ActionRights::isInGroups(user.groups(), "r", uri))
+ {
+ auto acClassesList = AcClasses::getAll();
+ texport(acClassesList);
+ render();
+ }
+ else
+ {
+ QString red_msg = " Not authorized to access the page or resource you were trying to reach.";
+ texport(red_msg);
+ render("index");
+ }
+ }
+ else
+ {
+ redirect(QUrl("/account/form"));
+ }
+}
+
+void AcClassesController::index()
+{
+ QString username = identityKeyOfLoginUser();
+ ItisUser user = ItisUser::getByIdentityKey(username);
+ if (!user.isNull())
+ {
+ render();
+ }
+ else
+ {
+ redirect(QUrl("/account/form"));
+ }
+}
+
+void AcClassesController::show(const QString &id)
+{
+ QString username = identityKeyOfLoginUser();
+ ItisUser user = ItisUser::getByIdentityKey(username);
+ if (!user.isNull())
+ {
+ auto conti = TActionController::name();
+ auto con = TActionController::activeAction();
+ QString uri = "/" + conti + "/" + con;
+
+ if(ActionRights::isInGroups(user.groups(), "r_d", uri))
+ {
+ auto acClasses = AcClasses::get(id.toInt());
+ texport(acClasses);
+ render();
+ }
+ else
+ {
+ QString red_msg = " Not authorized to access the page or resource you were trying to reach.";
+ texport(red_msg);
+ render("index");
+ }
+ }
+ else
+ {
+ redirect(QUrl("/account/form"));
+ }
+}
+
+void AcClassesController::create()
+{
+ QString username = identityKeyOfLoginUser();
+ ItisUser user = ItisUser::getByIdentityKey(username);
+ if (!user.isNull())
+ {
+ auto conti = TActionController::name();
+ auto con = TActionController::activeAction();
+ QString uri = "/" + conti + "/" + con;
+
+ if(ActionRights::isInGroups(user.groups(), "c", uri))
+ {
+ switch (httpRequest().method()) {
+ case Tf::Get:
+ render();
+ break;
+
+ case Tf::Post: {
+ auto acClasses = httpRequest().formItems("acClasses");
+ auto model = AcClasses::create(acClasses);
+
+ if (!model.isNull()) {
+ QString notice = "Created successfully.";
+ tflash(notice);
+ redirect(urla("show", model.id()));
+ } else {
+ QString error = "Failed to create.";
+ texport(error);
+ texport(acClasses);
+ render();
+ }
+ break; }
+
+ default:
+ renderErrorResponse(Tf::NotFound);
+ break;
+ }
+ }
+ else
+ {
+ QString red_msg = " Not authorized to access the page or resource you were trying to reach.";
+ texport(red_msg);
+ render("index");
+ }
+ }
+ else
+ {
+ redirect(QUrl("/account/form"));
+ }
+}
+
+void AcClassesController::save(const QString &id)
+{
+ QString username = identityKeyOfLoginUser();
+ ItisUser user = ItisUser::getByIdentityKey(username);
+ if (!user.isNull())
+ {
+ auto conti = TActionController::name();
+ auto con = TActionController::activeAction();
+ QString uri = "/" + conti + "/" + con;
+
+ if(ActionRights::isInGroups(user.groups(), "u", uri))
+ {
+ switch (httpRequest().method()) {
+ case Tf::Get: {
+ auto model = AcClasses::get(id.toInt());
+ if (!model.isNull()) {
+ auto acClasses = model.toVariantMap();
+ texport(acClasses);
+ render();
+ }
+ break; }
+
+ case Tf::Post: {
+ QString error;
+ auto model = AcClasses::get(id.toInt());
+
+ if (model.isNull()) {
+ error = "Original data not found. It may have been updated/removed by another transaction.";
+ tflash(error);
+ redirect(urla("save", id));
+ break;
+ }
+
+ auto acClasses = httpRequest().formItems("acClasses");
+ model.setProperties(acClasses);
+ if (model.save()) {
+ QString notice = "Updated successfully.";
+ tflash(notice);
+ redirect(urla("show", model.id()));
+ } else {
+ error = "Failed to update.";
+ texport(error);
+ texport(acClasses);
+ render();
+ }
+ break; }
+
+ default:
+ renderErrorResponse(Tf::NotFound);
+ break;
+ }
+ }
+ else
+ {
+ QString red_msg = " Not authorized to access the page or resource you were trying to reach.";
+ texport(red_msg);
+ render("index");
+ }
+ }
+ else
+ {
+ redirect(QUrl("/account/form"));
+ }
+}
+
+void AcClassesController::remove(const QString &id)
+{
+ QString username = identityKeyOfLoginUser();
+ ItisUser user = ItisUser::getByIdentityKey(username);
+ if (!user.isNull())
+ {
+ auto conti = TActionController::name();
+ auto con = TActionController::activeAction();
+ QString uri = "/" + conti + "/" + con;
+
+ if(ActionRights::isInGroups(user.groups(), "d", uri))
+ {
+ if (httpRequest().method() != Tf::Post) {
+ renderErrorResponse(Tf::NotFound);
+ return;
+ }
+
+ auto acClasses = AcClasses::get(id.toInt());
+ acClasses.remove();
+ redirect(urla("index"));
+ }
+ else
+ {
+ QString red_msg = " Not authorized to access the page or resource you were trying to reach.";
+ texport(red_msg);
+ render("index");
+ }
+ }
+ else
+ {
+ redirect(QUrl("/account/form"));
+ }
+}
+
+
+// Don't remove below this line
+T_DEFINE_CONTROLLER(AcClassesController)
diff --git a/controllers/acclassescontroller.h b/controllers/acclassescontroller.h
new file mode 100644
index 0000000..cd6b349
--- /dev/null
+++ b/controllers/acclassescontroller.h
@@ -0,0 +1,26 @@
+#ifndef ACCLASSESCONTROLLER_H
+#define ACCLASSESCONTROLLER_H
+
+#include "applicationcontroller.h"
+
+
+class T_CONTROLLER_EXPORT AcClassesController : public ApplicationController
+{
+ Q_OBJECT
+public:
+ AcClassesController() : ApplicationController() {}
+
+public slots:
+ void index();
+ void list_all();
+
+ void show(const QString &id);
+ void create();
+ void save(const QString &id);
+ void remove(const QString &id);
+
+ void getAcClassesJson();
+ void getObjAcJson();
+};
+
+#endif // ACCLASSESCONTROLLER_H
diff --git a/controllers/accountcontroller.cpp b/controllers/accountcontroller.cpp
new file mode 100644
index 0000000..462b5f8
--- /dev/null
+++ b/controllers/accountcontroller.cpp
@@ -0,0 +1,641 @@
+#include "accountcontroller.h"
+
+#include
+#include "sqlobjects/itisuserobject.h"
+
+#include "informationmailer.h"
+
+#include "itisuser.h"
+#include "itisgroups.h"
+#include "accountcontroller.h"
+#include "actionrights.h"
+
+void AccountController::list_all()
+{
+ QString username = identityKeyOfLoginUser();
+ ItisUser user = ItisUser::getByIdentityKey(username);
+ if (!user.isNull())
+ {
+ auto conti = TActionController::name();
+ auto con = TActionController::activeAction();
+ QString uri = "/" + conti + "/" + con;
+
+ if(ActionRights::isInGroups(user.groups(), "r", uri))
+ {
+ auto itisUserList = ItisUser::getAll();
+ texport(itisUserList);
+ render();
+ }
+ else
+ {
+ QString red_msg = " Not authorized to access the page or resource you were trying to reach.";
+ texport(red_msg);
+ render("index");
+ }
+ }
+ else
+ {
+ redirect(QUrl("/account/form"));
+ }
+}
+
+void AccountController::index()
+{
+ QString username = identityKeyOfLoginUser();
+ ItisUser user = ItisUser::getByIdentityKey(username);
+ if (!user.isNull())
+ {
+ render();
+ }
+ else
+ {
+ redirect(QUrl("/account/form"));
+ }
+}
+
+void AccountController::show(const QString &id)
+{
+ QString username = identityKeyOfLoginUser();
+ ItisUser user = ItisUser::getByIdentityKey(username);
+ if (!user.isNull())
+ {
+ auto conti = TActionController::name();
+ auto con = TActionController::activeAction();
+ QString uri = "/" + conti + "/" + con;
+
+ if(ActionRights::isInGroups(user.groups(), "r_d", uri))
+ {
+ auto user = ItisUser::get(id.toInt());
+ texport(user);
+ render();
+ }
+ else
+ {
+ QString red_msg = " Not authorized to access the page or resource you were trying to reach.";
+ texport(red_msg);
+ render("index");
+ }
+ }
+ else
+ {
+ redirect(QUrl("/account/form"));
+ }
+}
+
+void AccountController::userRegisterElectron()
+{
+ QJsonObject jsonObject;
+ QJsonArray jsonArray;
+
+ switch (httpRequest().method())
+ {
+ case Tf::Get:
+ render();
+ break;
+
+ case Tf::Post:
+ {
+ QString username = httpRequest().formItemValue("username");
+ QString firstname = httpRequest().formItemValue("firstname");
+ QString surname = httpRequest().formItemValue("surname");
+ QString email = httpRequest().formItemValue("email");
+ QString company = httpRequest().formItemValue("company");
+ QString userTimezone = httpRequest().formItemValue("userTimezone");
+ QString groupname = httpRequest().formItemValue("groupname");
+ QString groups = httpRequest().formItemValue("groups");
+ QString pwd = httpRequest().formItemValue("password");
+ QString newsletter = httpRequest().formItemValue("newsletter");
+ QDateTime lastLogin(QDate(1970, 1, 1), QTime(1, 0, 0));
+ QDateTime loginTime(QDate(1970, 1, 1), QTime(1, 0, 0));
+ QDateTime loggedOut(QDate(1970, 1, 1), QTime(1, 0, 0));
+ QDateTime pwdChangedTime = QDateTime::currentDateTime();
+
+ QString pwdforce = httpRequest().formItemValue("pwdChangeForce");
+ int pwdChangeForce = pwdforce.toInt();
+ QString actv = httpRequest().formItemValue("active");
+ int active = actv.toInt();
+
+ auto model = ItisUser::create(username, firstname, surname, email, company, userTimezone, groupname, groups, pwd, lastLogin, loginTime, loggedOut, pwdChangedTime, pwdChangeForce, active);
+
+ if (!model.isNull())
+ {
+ InformationMailer().regUserAdmInfo(model.username());
+ //InformationMailer().crUserPwd(user.value("username").toString(), user.value("password").toString());
+ ItisUser::setUserNewsCfg(username, newsletter);
+
+ jsonObject["errMsg"] = "Created successfully";
+ jsonObject["ERROR"] = "0";
+ jsonArray.append(jsonObject);
+ renderJson(jsonArray);
+ } else
+ {
+ jsonObject["errMsg"] = "Failed to create.";
+ jsonObject["ERROR"] = "1";
+ jsonArray.append(jsonObject);
+ renderJson(jsonArray);
+ }
+ break; }
+
+ default:
+ renderErrorResponse(Tf::NotFound);
+ break;
+ }
+}
+
+void AccountController::create()
+{
+ QString username = identityKeyOfLoginUser();
+ ItisUser user = ItisUser::getByIdentityKey(username);
+ if (!user.isNull())
+ {
+ auto conti = TActionController::name();
+ auto con = TActionController::activeAction();
+ QString uri = "/" + conti + "/" + con;
+
+ if(ActionRights::isInGroups(user.groups(), "c", uri))
+ {
+ switch (httpRequest().method()) {
+ case Tf::Get:
+ {
+ auto itisGroupsList = ItisGroups::getAll();
+ texport(itisGroupsList);
+ render();
+ break;
+ }
+
+ case Tf::Post: {
+ auto user = httpRequest().formItems("user");
+ auto model = ItisUser::create(user);
+
+ if (!model.isNull())
+ {
+ InformationMailer().crUser(model.username());
+ InformationMailer().crUserPwd(user.value("username").toString(), user.value("password").toString());
+
+ QString notice = "Created successfully.";
+ tflash(notice);
+ redirect(urla("show", model.id()));
+ } else {
+ QString error = "Failed to create.";
+ texport(error);
+ texport(user);
+ render();
+ }
+ break; }
+
+ default:
+ renderErrorResponse(Tf::NotFound);
+ break;
+ }
+ }
+ else
+ {
+ QString red_msg = " Not authorized to access the page or resource you were trying to reach.";
+ texport(red_msg);
+ render("index");
+ }
+ }
+ else
+ {
+ redirect(QUrl("/account/form"));
+ }
+}
+
+void AccountController::save(const QString &id)
+{
+ QString username = identityKeyOfLoginUser();
+ ItisUser user = ItisUser::getByIdentityKey(username);
+ if (!user.isNull())
+ {
+ auto conti = TActionController::name();
+ auto con = TActionController::activeAction();
+ QString uri = "/" + conti + "/" + con;
+
+ if(ActionRights::isInGroups(user.groups(), "u", uri))
+ {
+ switch (httpRequest().method()) {
+ case Tf::Get: {
+ auto model = ItisUser::get(id.toInt());
+ if (!model.isNull())
+ {
+ auto itisGroupsList = ItisGroups::getAll();
+ texport(itisGroupsList);
+ auto user = model.toVariantMap();
+ texport(user);
+ render();
+ }
+ break; }
+
+ case Tf::Post: {
+ QString error;
+ auto model = ItisUser::get(id.toInt());
+
+ if (model.isNull()) {
+ error = "Original data not found. It may have been updated/removed by another transaction.";
+ tflash(error);
+ redirect(urla("save", id));
+ break;
+ }
+
+ auto user = httpRequest().formItems("user");
+ model.setProperties(user);
+ if (model.save()) {
+ QString notice = "Updated successfully.";
+ tflash(notice);
+ redirect(urla("show", model.id()));
+ } else {
+ error = "Failed to update.";
+ texport(error);
+ texport(user);
+ render();
+ }
+ break; }
+
+ default:
+ renderErrorResponse(Tf::NotFound);
+ break;
+ }
+ }
+ else
+ {
+ QString red_msg = " Not authorized to access the page or resource you were trying to reach.";
+ texport(red_msg);
+ render("index");
+ }
+ }
+ else
+ {
+ redirect(QUrl("/account/form"));
+ }
+}
+
+void AccountController::remove(const QString &id)
+{
+ QString username = identityKeyOfLoginUser();
+ ItisUser user = ItisUser::getByIdentityKey(username);
+ if (!user.isNull())
+ {
+ auto conti = TActionController::name();
+ auto con = TActionController::activeAction();
+ QString uri = "/" + conti + "/" + con;
+
+ if(ActionRights::isInGroups(user.groups(), "d", uri))
+ {
+ if (httpRequest().method() != Tf::Post) {
+ renderErrorResponse(Tf::NotFound);
+ return;
+ }
+
+ auto user = ItisUser::get(id.toInt());
+ user.remove();
+ redirect(urla("index"));
+ }
+ else
+ {
+ QString red_msg = " Not authorized to access the page or resource you were trying to reach.";
+ texport(red_msg);
+ render("index");
+ }
+ }
+ else
+ {
+ redirect(QUrl("/account/form"));
+ }
+}
+
+void AccountController::setUserPwd()
+{
+ QString username = identityKeyOfLoginUser();
+ ItisUser user = ItisUser::getByIdentityKey(username);
+ if (!user.isNull())
+ {
+ QString pwd = httpRequest().formItemValue("pwd");
+ InformationMailer().infoUserPwd(user.username());
+ renderJson( ItisUser::setUserPwd(user.username(), pwd) );
+ }
+ else
+ {
+ redirect(QUrl("/account/form"));
+ }
+}
+
+void AccountController::userPwd()
+{
+ QString username = identityKeyOfLoginUser();
+ ItisUser user = ItisUser::getByIdentityKey(username);
+ if (!user.isNull())
+ {
+ QString uFname = user.firstname();
+ texport(uFname);
+
+ QString uSname = user.surname().toUpper();
+ texport(uSname);
+
+ render("userpwd");
+ }
+ else
+ {
+ redirect(QUrl("/account/form"));
+ }
+}
+
+void AccountController::userPwdElectron()
+{
+ QString username = identityKeyOfLoginUser();
+ ItisUser user = ItisUser::getByIdentityKey(username);
+ if (!user.isNull())
+ {
+ QString uFname = user.firstname();
+ texport(uFname);
+
+ QString uSname = user.surname().toUpper();
+ texport(uSname);
+
+ render("userpwdElectron");
+ }
+ else
+ {
+ redirect(QUrl("/account/formElectron"));
+ }
+}
+
+void AccountController::setUserNewsCfg()
+{
+ QString username = identityKeyOfLoginUser();
+ ItisUser user = ItisUser::getByIdentityKey(username);
+ if (!user.isNull())
+ {
+ QString username = httpRequest().formItemValue("username");
+ QString newsletter = httpRequest().formItemValue("newsletter");
+
+ //ItisUser::setUserNewsCfg(username, newsletter);
+ renderJson( ItisUser::setUserNewsCfg(username, newsletter) );
+ }
+ else
+ {
+ redirect(QUrl("/account/formElectron"));
+ }
+}
+
+void AccountController::userHome()
+{
+ QString username = identityKeyOfLoginUser();
+ ItisUser user = ItisUser::getByIdentityKey(username);
+ if (!user.isNull())
+ {
+
+ QString username = user.username();
+ texport(username);
+
+ QString firstname = user.firstname();
+ texport(firstname);
+
+ QString surname = user.surname();
+ texport(surname);
+
+ QString email = user.email();
+ texport(email);
+
+ QString company = user.company();
+ texport(company);
+
+ QString lastLogin = user.lastLogin().toString();
+ texport(lastLogin);
+
+ QString lastLogout = user.loggedOut().toString();
+ texport(lastLogout);
+
+ QString lastPwdChangeTime = user.pwdChangedTime().toString();
+ texport(lastPwdChangeTime);
+
+ QString usertimezone = user.userTimezone();
+ texport(usertimezone);
+
+ QString groupname = user.groupname();
+ texport(groupname);
+
+ QString groups = user.groups();
+ texport(groups);
+
+ QString newsletter = ItisUser::getUserNewsCfg( user.username() );
+ texport(newsletter);
+
+ quint64 difference = qAbs(user.pwdChangedTime().date().daysTo(QDateTime::currentDateTime().date()));
+
+ QString pwdToChangeIn;
+ int timediff = static_cast(difference);
+
+ if(timediff >= 30)
+ {
+ QString red_msg = "Ihr Passwort ist abgelaufen. Bitte ändern Sie aus Sicherheitsgründen Ihr Passwort!";
+ texport(red_msg);
+ render("userpwd");
+ }
+ else if(timediff > 20 && timediff < 30)
+ {
+ pwdToChangeIn = "Passwort-Änderung erforderlich in " + QString::number(30 - timediff) + " Tagen";
+ }
+ else
+ {
+ pwdToChangeIn = "Passwort-Änderung erforderlich in " + QString::number(30 - timediff) + " Tagen";
+ }
+ texport(pwdToChangeIn);
+
+ render("userhome");
+ }
+ else
+ {
+ redirect(QUrl("/account/form"));
+ }
+}
+
+void AccountController::userHomeElectron()
+{
+ QString username = identityKeyOfLoginUser();
+ ItisUser user = ItisUser::getByIdentityKey(username);
+ if (!user.isNull())
+ {
+
+ QString username = user.username();
+ texport(username);
+
+ QString firstname = user.firstname();
+ texport(firstname);
+
+ QString surname = user.surname();
+ texport(surname);
+
+ QString email = user.email();
+ texport(email);
+
+ QString company = user.company();
+ texport(company);
+
+ QString lastLogin = user.lastLogin().toString();
+ texport(lastLogin);
+
+ QString lastLogout = user.loggedOut().toString();
+ texport(lastLogout);
+
+ QString lastPwdChangeTime = user.pwdChangedTime().toString();
+ texport(lastPwdChangeTime);
+
+ QString usertimezone = user.userTimezone();
+ texport(usertimezone);
+
+ QString groupname = user.groupname();
+ texport(groupname);
+
+ QString groups = user.groups();
+ texport(groups);
+
+ QString newsletter = ItisUser::getUserNewsCfg( user.username() );
+ texport(newsletter);
+
+ quint64 difference = qAbs(user.pwdChangedTime().date().daysTo(QDateTime::currentDateTime().date()));
+
+ QString pwdToChangeIn;
+ int timediff = static_cast(difference);
+
+ if(timediff >= 30)
+ {
+ QString error = "Passwort-Änderung erforderlich! " + QString::number(timediff - 30);
+ texport(error);
+ render("userpwdElectron");
+ }
+ else if(timediff > 20 && timediff < 30)
+ {
+ pwdToChangeIn = "Passwort-Änderung erforderlich in " + QString::number(30 - timediff) + " Tagen";
+ }
+ else
+ {
+ pwdToChangeIn = "Passwort-Änderung erforderlich in " + QString::number(30 - timediff) + " Tagen";
+ }
+ texport(pwdToChangeIn);
+
+ render("userhomeElectron");
+ }
+ else
+ {
+ redirect(QUrl("/account/formElectron"));
+ }
+}
+
+/*!
+ * \brief AccountController::form
+ * Login Mask
+*/
+void AccountController::form()
+{
+ userLogout(); // forcibly logged out
+ render(); // shows form view
+}
+
+void AccountController::formElectron()
+{
+ userLogout(); // forcibly logged out
+ render(); // shows form view
+}
+
+void AccountController::login()
+{
+ QString username = httpRequest().formItemValue("username");
+ QString s = httpRequest().formItemValue("password");
+
+ QString error;
+ QByteArray password = QCryptographicHash::hash(s.toLocal8Bit(), QCryptographicHash::Sha256);
+ ItisUser user = ItisUser::authenticate(username, password);
+
+ if (!user.isNull())
+ {
+ if(user.active() == 0)
+ {
+ error = "Your account is disabled, please contact your Admin.";
+ texport(error);
+ render("form");
+ }
+ userLogin(&user);
+ session().insert("identityKey", username);
+ user.setLoginTime(QDateTime::currentDateTime());
+
+ if(user.pwdChangeForce() == 1)
+ {
+ error = "Bitte ändern Sie aus Sicherheitsgründen Ihr Passwort.";
+ texport(error);
+ render("userpwd");
+ }
+
+ redirect(QUrl("/account/userHome"));
+ }
+ else
+ {
+ error = "Login failed";
+ texport(error);
+ render("form");
+ }
+}
+
+void AccountController::loginElectron()
+{
+ QString username = httpRequest().formItemValue("username");
+ QString s = httpRequest().formItemValue("password");
+
+ QByteArray password = QCryptographicHash::hash(s.toLocal8Bit(), QCryptographicHash::Sha256);
+
+ ItisUser user = ItisUser::authenticate(username, password);
+ if (!user.isNull())
+ {
+ if(user.active() == 0)
+ {
+ QString red_msg = "Your account is disabled, please contact your Admin.";
+ texport(red_msg);
+ render("formElectron");
+ }
+ userLogin(&user);
+ session().insert("identityKey", username);
+ user.setLoginTime(QDateTime::currentDateTime());
+
+ if(user.pwdChangeForce() == 1)
+ {
+ QString red_msg = "Bitte ändern Sie aus Sicherheitsgründen Ihr Passwort.";
+ texport(red_msg);
+ render("userpwdElectron");
+ }
+
+ redirect(QUrl("/account/userHomeElectron"));
+ }
+ else
+ {
+ QString red_msg = "Login failed";
+ texport(red_msg);
+ render("formElectron");
+ }
+}
+
+void AccountController::logout()
+{
+ QString username = identityKeyOfLoginUser();
+ ItisUser user = ItisUser::getByIdentityKey(username);
+ user.setLoggedOut(QDateTime::currentDateTime());
+ userLogout();
+
+ QString green_msg = "live long and prosper 🖖";
+ texport(green_msg);
+
+ render("form");
+}
+
+void AccountController::logoutElectron()
+{
+ QString username = identityKeyOfLoginUser();
+ ItisUser user = ItisUser::getByIdentityKey(username);
+ user.setLoggedOut(QDateTime::currentDateTime());
+ userLogout();
+
+ QString green_msg = "Sie wurden vom System abgemeldet";
+ texport(green_msg);
+ render("formElectron");
+}
+
+// Don't remove below this line
+T_DEFINE_CONTROLLER(AccountController)
diff --git a/controllers/accountcontroller.h b/controllers/accountcontroller.h
new file mode 100644
index 0000000..832b523
--- /dev/null
+++ b/controllers/accountcontroller.h
@@ -0,0 +1,39 @@
+#ifndef ACCOUNTCONTROLLER_H
+#define ACCOUNTCONTROLLER_H
+
+#include "applicationcontroller.h"
+
+
+class T_CONTROLLER_EXPORT AccountController : public ApplicationController
+{
+ Q_OBJECT
+public:
+ AccountController() : ApplicationController() { }
+
+public slots:
+ void index();
+ void list_all();
+
+ void form();
+ void login();
+ void logout();
+ void logoutElectron();
+
+ void formElectron();
+ void loginElectron();
+ void userHomeElectron();
+ void userPwdElectron();
+
+ void userHome();
+ void userPwd();
+ void setUserPwd();
+ void setUserNewsCfg();
+
+ void show(const QString &id);
+ void create();
+ void userRegisterElectron();
+ void save(const QString &id);
+ void remove(const QString &id);
+};
+
+#endif // ACCOUNTCONTROLLER_H
diff --git a/controllers/actionrightscontroller.cpp b/controllers/actionrightscontroller.cpp
new file mode 100644
index 0000000..8c10427
--- /dev/null
+++ b/controllers/actionrightscontroller.cpp
@@ -0,0 +1,314 @@
+#include "actionrightscontroller.h"
+#include "actionrights.h"
+
+#include "itisuser.h"
+#include "itisgroups.h"
+#include "accountcontroller.h"
+#include "actionrights.h"
+
+void ActionRightsController::getRoutes()
+{
+ QString username = identityKeyOfLoginUser();
+ ItisUser user = ItisUser::getByIdentityKey(username);
+ if (!user.isNull())
+ {
+ auto conti = TActionController::name();
+ auto con = TActionController::activeAction();
+ QString uri = "/" + conti + "/" + con;
+
+ if(ActionRights::isInGroups(user.groups(), "crud", uri))
+ {
+ //auto conti = TActionController::name(); auto con = TActionController::activeAction();
+
+ QJsonObject jsonObject;
+ QJsonArray jsonArray;
+
+ QProcess p;
+ QString program = "treefrog";
+ QStringList arguments;
+ arguments << "--show-routes";
+
+ p.start(program,arguments);
+ p.waitForStarted();
+ p.waitForReadyRead();
+ p.waitForFinished();
+ QString line= p.readAllStandardOutput();
+
+ QStringList list;
+ list = line.split(QRegExp("match"));
+
+ QRegularExpression re(".*Available controllers:.*");
+ QRegularExpression re1("(\\s+)([\\/|a-z|A-Z|_]+)(/:param|)(\\s+->)");
+ for (int i = 0; i < list.size(); ++i)
+ {
+ QRegularExpressionMatch match = re.match(list[i]);
+ if (! match.hasMatch())
+ {
+ //jsonObject["output"] = list[i];
+ //jsonArray.append(jsonObject);
+
+ match = re1.match(list[i]);
+ if (match.hasMatch())
+ {
+ //jsonObject["output"] = list[i];
+ jsonObject["output"] = match.captured(2);
+ jsonArray.append(jsonObject);
+ }
+ }
+ }
+
+ QStringList contis = TActionController::availableControllers();
+ for (int i = 0; i < contis.size(); ++i)
+ {
+ jsonObject["controller"] = contis[i];
+ jsonArray.append(jsonObject);
+ }
+
+ renderJson(jsonArray);
+ }
+ else
+ {
+ QString red_msg = " Not authorized to access the page or resource you were trying to reach.";
+ texport(red_msg);
+ render("index");
+ }
+ }
+ else
+ {
+ redirect(QUrl("/account/form"));
+ }
+}
+
+void ActionRightsController::list_all()
+{
+ QString username = identityKeyOfLoginUser();
+ ItisUser user = ItisUser::getByIdentityKey(username);
+ if (!user.isNull())
+ {
+ auto conti = TActionController::name();
+ auto con = TActionController::activeAction();
+ QString uri = "/" + conti + "/" + con;
+
+ if(ActionRights::isInGroups(user.groups(), "r", uri))
+ {
+ auto actionRightsList = ActionRights::getAll();
+ texport(actionRightsList);
+ render();
+ }
+ else
+ {
+ QString red_msg = " Not authorized to access the page or resource you were trying to reach.";
+ texport(red_msg);
+ render("index");
+ }
+ }
+ else
+ {
+ redirect(QUrl("/account/form"));
+ }
+}
+
+void ActionRightsController::index()
+{
+ QString username = identityKeyOfLoginUser();
+ ItisUser user = ItisUser::getByIdentityKey(username);
+ if (!user.isNull())
+ {
+ render();
+ }
+ else
+ {
+ redirect(QUrl("/account/form"));
+ }
+}
+
+void ActionRightsController::show(const QString &id)
+{
+ QString username = identityKeyOfLoginUser();
+ ItisUser user = ItisUser::getByIdentityKey(username);
+ if (!user.isNull())
+ {
+ auto conti = TActionController::name();
+ auto con = TActionController::activeAction();
+ QString uri = "/" + conti + "/" + con;
+
+ if(ActionRights::isInGroups(user.groups(), "r_d", uri))
+ {
+ auto actionRights = ActionRights::get(id.toInt());
+ texport(actionRights);
+ render();
+ }
+ else
+ {
+ QString red_msg = " Not authorized to access the page or resource you were trying to reach.";
+ texport(red_msg);
+ render("index");
+ }
+ }
+ else
+ {
+ redirect(QUrl("/account/form"));
+ }
+}
+
+void ActionRightsController::create()
+{
+ QString username = identityKeyOfLoginUser();
+ ItisUser user = ItisUser::getByIdentityKey(username);
+ if (!user.isNull())
+ {
+ auto conti = TActionController::name();
+ auto con = TActionController::activeAction();
+ QString uri = "/" + conti + "/" + con;
+
+ if(ActionRights::isInGroups(user.groups(), "c", uri))
+ {
+ switch (httpRequest().method()) {
+ case Tf::Get:
+ {
+ auto itisGroupsList = ItisGroups::getAll();
+ texport(itisGroupsList);
+ render();
+ break;
+ }
+
+ case Tf::Post: {
+ auto actionRights = httpRequest().formItems("actionRights");
+ auto model = ActionRights::create(actionRights);
+
+ if (!model.isNull()) {
+ QString notice = "Created successfully.";
+ tflash(notice);
+ redirect(urla("show", model.id()));
+ } else {
+ QString error = "Failed to create.";
+ texport(error);
+ texport(actionRights);
+ render();
+ }
+ break; }
+
+ default:
+ renderErrorResponse(Tf::NotFound);
+ break;
+ }
+ }
+ else
+ {
+ QString red_msg = " Not authorized to access the page or resource you were trying to reach.";
+ texport(red_msg);
+ render("index");
+ }
+ }
+ else
+ {
+ redirect(QUrl("/account/form"));
+ }
+}
+
+void ActionRightsController::save(const QString &id)
+{
+ QString username = identityKeyOfLoginUser();
+ ItisUser user = ItisUser::getByIdentityKey(username);
+ if (!user.isNull())
+ {
+ auto conti = TActionController::name();
+ auto con = TActionController::activeAction();
+ QString uri = "/" + conti + "/" + con;
+
+ if(ActionRights::isInGroups(user.groups(), "u", uri))
+ {
+ switch (httpRequest().method()) {
+ case Tf::Get: {
+ auto model = ActionRights::get(id.toInt());
+ if (!model.isNull()) {
+ auto actionRights = model.toVariantMap();
+ texport(actionRights);
+
+ auto itisGroupsList = ItisGroups::getAll();
+ texport(itisGroupsList);
+
+ render();
+ }
+ break; }
+
+ case Tf::Post: {
+ QString error;
+ auto model = ActionRights::get(id.toInt());
+
+ if (model.isNull()) {
+ error = "Original data not found. It may have been updated/removed by another transaction.";
+ tflash(error);
+ redirect(urla("save", id));
+ break;
+ }
+
+ auto actionRights = httpRequest().formItems("actionRights");
+ model.setProperties(actionRights);
+ if (model.save()) {
+ QString notice = "Updated successfully.";
+ tflash(notice);
+ redirect(urla("show", model.id()));
+ } else {
+ error = "Failed to update.";
+ texport(error);
+ texport(actionRights);
+ render();
+ }
+ break; }
+
+ default:
+ renderErrorResponse(Tf::NotFound);
+ break;
+ }
+ }
+ else
+ {
+ QString red_msg = " Not authorized to access the page or resource you were trying to reach.";
+ texport(red_msg);
+ render("index");
+ }
+ }
+ else
+ {
+ redirect(QUrl("/account/form"));
+ }
+}
+
+void ActionRightsController::remove(const QString &id)
+{
+ QString username = identityKeyOfLoginUser();
+ ItisUser user = ItisUser::getByIdentityKey(username);
+ if (!user.isNull())
+ {
+ auto conti = TActionController::name();
+ auto con = TActionController::activeAction();
+ QString uri = "/" + conti + "/" + con;
+
+ if(ActionRights::isInGroups(user.groups(), "d", uri))
+ {
+ if (httpRequest().method() != Tf::Post) {
+ renderErrorResponse(Tf::NotFound);
+ return;
+ }
+
+ auto actionRights = ActionRights::get(id.toInt());
+ actionRights.remove();
+ redirect(urla("index"));
+ }
+ else
+ {
+ QString red_msg = " Not authorized to access the page or resource you were trying to reach.";
+ texport(red_msg);
+ render("index");
+ }
+ }
+ else
+ {
+ redirect(QUrl("/account/form"));
+ }
+}
+
+
+// Don't remove below this line
+T_DEFINE_CONTROLLER(ActionRightsController)
diff --git a/controllers/actionrightscontroller.h b/controllers/actionrightscontroller.h
new file mode 100644
index 0000000..b44ff0f
--- /dev/null
+++ b/controllers/actionrightscontroller.h
@@ -0,0 +1,25 @@
+#ifndef ACTIONRIGHTSCONTROLLER_H
+#define ACTIONRIGHTSCONTROLLER_H
+
+#include "applicationcontroller.h"
+
+
+class T_CONTROLLER_EXPORT ActionRightsController : public ApplicationController
+{
+ Q_OBJECT
+public:
+ ActionRightsController() : ApplicationController() {}
+
+public slots:
+ void index();
+ void list_all();
+
+ void getRoutes();
+
+ void show(const QString &id);
+ void create();
+ void save(const QString &id);
+ void remove(const QString &id);
+};
+
+#endif // ACTIONRIGHTSCONTROLLER_H
diff --git a/controllers/admincontroller.cpp b/controllers/admincontroller.cpp
new file mode 100644
index 0000000..f663d6c
--- /dev/null
+++ b/controllers/admincontroller.cpp
@@ -0,0 +1,76 @@
+#include "admincontroller.h"
+
+#include "itisuser.h"
+#include "itisgroups.h"
+#include "accountcontroller.h"
+#include "actionrights.h"
+
+void AdminController::showGallery()
+{
+
+ QJsonObject jsonObject;
+ QJsonArray jsonArray;
+ // PRO
+ QString pathToImg = "/webapp/html/itis/Img/Annexspecs";
+ // DEV QString pathToImg = "/webapp_dez/itis_app/public/images";
+ QDir directory(pathToImg);
+ QStringList images = directory.entryList(QStringList() << "*.jpg" << "*.jpeg" << "*.png" << "*.bmp" << "*.gif",QDir::Files);
+
+ foreach(QString filename, images)
+ {
+ QFileInfo info(pathToImg + "/" + filename);
+ jsonObject["size"] = info.size() / 1024;
+ // PROD
+ jsonObject["img"] = "/Annexspecs/" + filename;
+ // DEV jsonObject["img"] = "/images/" + filename;
+ jsonObject["name"] = filename;
+ jsonArray.append(jsonObject);
+ }
+
+ pathToImg = "/webapp/html/itis/Img/Objspecs";
+ QDir direct(pathToImg);
+ QStringList imag = direct.entryList(QStringList() << "*.jpg" << "*.jpeg" << "*.png" << "*.bmp" << "*.gif",QDir::Files);
+
+ foreach(QString filename, imag)
+ {
+ QFileInfo info(pathToImg + "/" + filename);
+ jsonObject["size"] = info.size() / 1024;
+ jsonObject["img"] = "/Objspecs/" + filename;
+ jsonObject["name"] = filename;
+ jsonArray.append(jsonObject);
+ }
+
+ //renderJson(jsonArray);
+ texport(jsonArray);
+
+ render();
+}
+
+void AdminController::index()
+{
+ QString username = identityKeyOfLoginUser();
+ ItisUser user = ItisUser::getByIdentityKey(username);
+ if (!user.isNull())
+ {
+ QString uFname = user.firstname();
+ texport(uFname);
+
+ QString lastLogin = user.lastLogin().toString();
+ texport(lastLogin);
+
+ QString lastLogout = user.loggedOut().toString();
+ texport(lastLogout);
+
+ QString lastPwdChangeTime = user.pwdChangedTime().toString();
+ texport(lastPwdChangeTime);
+
+ render("index");
+ }
+ else
+ {
+ redirect(QUrl("/account/form"));
+ }
+}
+
+// Don't remove below this line
+T_DEFINE_CONTROLLER(AdminController)
diff --git a/controllers/admincontroller.h b/controllers/admincontroller.h
new file mode 100644
index 0000000..7f7ea28
--- /dev/null
+++ b/controllers/admincontroller.h
@@ -0,0 +1,19 @@
+#ifndef ADMINCONTROLLER_H
+#define ADMINCONTROLLER_H
+
+#include "applicationcontroller.h"
+
+
+class T_CONTROLLER_EXPORT AdminController : public ApplicationController
+{
+ Q_OBJECT
+public:
+ AdminController() : ApplicationController() { }
+
+public slots:
+ void index();
+
+ void showGallery();
+};
+
+#endif // ADMINCONTROLLER_H
diff --git a/controllers/annexdatacommentscontroller.cpp b/controllers/annexdatacommentscontroller.cpp
new file mode 100644
index 0000000..6ca1c6e
--- /dev/null
+++ b/controllers/annexdatacommentscontroller.cpp
@@ -0,0 +1,293 @@
+#include "annexdatacommentscontroller.h"
+#include "annexdatacomments.h"
+
+#include "itisuser.h"
+#include "itisgroups.h"
+#include "accountcontroller.h"
+#include "actionrights.h"
+
+void AnnexDataCommentsController::getSpecComments(const QString &spec_id)
+{
+ QString username = identityKeyOfLoginUser();
+ ItisUser user = ItisUser::getByIdentityKey(username);
+ if (!user.isNull())
+ {
+ auto conti = TActionController::name();
+ auto con = TActionController::activeAction();
+ QString uri = "/" + conti + "/" + con;
+
+ if(ActionRights::isInGroups(user.groups(), "r", uri))
+ {
+ renderJson( AnnexDataComments::getSpecComments( spec_id.toInt() ) );
+ }
+ else
+ {
+ QString red_msg = " Not authorized to access the page or resource you were trying to reach.";
+ texport(red_msg);
+ render("index");
+ }
+ }
+ else
+ {
+ redirect(QUrl("/account/form"));
+ }
+}
+
+void AnnexDataCommentsController::list_all()
+{
+ QString username = identityKeyOfLoginUser();
+ ItisUser user = ItisUser::getByIdentityKey(username);
+ if (!user.isNull())
+ {
+ auto conti = TActionController::name();
+ auto con = TActionController::activeAction();
+ QString uri = "/" + conti + "/" + con;
+
+ if(ActionRights::isInGroups(user.groups(), "r", uri))
+ {
+ auto annexDataCommentsList = AnnexDataComments::getAll();
+ texport(annexDataCommentsList);
+ render();
+ }
+ else
+ {
+ QString red_msg = " Not authorized to access the page or resource you were trying to reach.";
+ texport(red_msg);
+ render("index");
+ }
+ }
+ else
+ {
+ redirect(QUrl("/account/form"));
+ }
+}
+
+void AnnexDataCommentsController::index()
+{
+ QString username = identityKeyOfLoginUser();
+ ItisUser user = ItisUser::getByIdentityKey(username);
+ if (!user.isNull())
+ {
+ auto statistik = AnnexDataComments::getStatistics();
+
+ QString count_id = statistik["count_id"];
+ texport(count_id);
+ QString count_users = statistik["count_users"];
+ texport(count_users);
+
+ render();
+ }
+ else
+ {
+ redirect(QUrl("/account/form"));
+ }
+}
+
+void AnnexDataCommentsController::show(const QString &id)
+{
+ QString username = identityKeyOfLoginUser();
+ ItisUser user = ItisUser::getByIdentityKey(username);
+ if (!user.isNull())
+ {
+ auto conti = TActionController::name();
+ auto con = TActionController::activeAction();
+ QString uri = "/" + conti + "/" + con;
+
+ if(ActionRights::isInGroups(user.groups(), "r_d", uri))
+ {
+ auto annexDataComments = AnnexDataComments::get(id.toInt());
+ texport(annexDataComments);
+ render();
+ }
+ else
+ {
+ QString red_msg = " Not authorized to access the page or resource you were trying to reach.";
+ texport(red_msg);
+ render("index");
+ }
+ }
+ else
+ {
+ redirect(QUrl("/account/form"));
+ }
+}
+
+void AnnexDataCommentsController::createComment()
+{
+ QString username = identityKeyOfLoginUser();
+ ItisUser user = ItisUser::getByIdentityKey(username);
+ if (!user.isNull())
+ {
+ QString spec_id = httpRequest().formItemValue("spec_id");
+ QString spec_title = httpRequest().formItemValue("spec_title");
+ QString spec_version = httpRequest().formItemValue("spec_version");
+ QString user_comment = httpRequest().formItemValue("user_comment");
+
+ renderJson( AnnexDataComments::createComment(spec_id.toInt(), spec_title, spec_version, user_comment, user.username()) );
+ }
+ else
+ {
+ redirect(QUrl("/account/form"));
+ }
+}
+
+void AnnexDataCommentsController::create()
+{
+ QString username = identityKeyOfLoginUser();
+ ItisUser user = ItisUser::getByIdentityKey(username);
+ if (!user.isNull())
+ {
+ auto conti = TActionController::name();
+ auto con = TActionController::activeAction();
+ QString uri = "/" + conti + "/" + con;
+
+ if(ActionRights::isInGroups(user.groups(), "c", uri))
+ {
+ switch (httpRequest().method()) {
+ case Tf::Get:
+ {
+ QString usermail = user.email();
+ texport(usermail);
+ render();
+ break;
+ }
+
+ case Tf::Post: {
+ auto annexDataComments = httpRequest().formItems("annexDataComments");
+ auto model = AnnexDataComments::create(annexDataComments);
+
+ if (!model.isNull()) {
+ QString notice = "Created successfully.";
+ tflash(notice);
+ redirect(urla("show", model.id()));
+ } else {
+ QString error = "Failed to create.";
+ texport(error);
+ texport(annexDataComments);
+ render();
+ }
+ break; }
+
+ default:
+ renderErrorResponse(Tf::NotFound);
+ break;
+ }
+ }
+ else
+ {
+ QString red_msg = " Not authorized to access the page or resource you were trying to reach.";
+ texport(red_msg);
+ render("index");
+ }
+ }
+ else
+ {
+ redirect(QUrl("/account/form"));
+ }
+}
+
+void AnnexDataCommentsController::save(const QString &id)
+{
+ QString username = identityKeyOfLoginUser();
+ ItisUser user = ItisUser::getByIdentityKey(username);
+ if (!user.isNull())
+ {
+ auto conti = TActionController::name();
+ auto con = TActionController::activeAction();
+ QString uri = "/" + conti + "/" + con;
+
+ if(ActionRights::isInGroups(user.groups(), "u", uri))
+ {
+ switch (httpRequest().method()) {
+ case Tf::Get: {
+ auto model = AnnexDataComments::get(id.toInt());
+ if (!model.isNull()) {
+ auto annexDataComments = model.toVariantMap();
+ texport(annexDataComments);
+
+ QString usermail = user.email();
+ texport(usermail);
+ render();
+ }
+ break; }
+
+ case Tf::Post: {
+ QString error;
+ auto model = AnnexDataComments::get(id.toInt());
+
+ if (model.isNull()) {
+ error = "Original data not found. It may have been updated/removed by another transaction.";
+ tflash(error);
+ redirect(urla("save", id));
+ break;
+ }
+
+ auto annexDataComments = httpRequest().formItems("annexDataComments");
+ model.setProperties(annexDataComments);
+ if (model.save()) {
+ QString notice = "Updated successfully.";
+ tflash(notice);
+ redirect(urla("show", model.id()));
+ } else {
+ error = "Failed to update.";
+ texport(error);
+ texport(annexDataComments);
+ render();
+ }
+ break; }
+
+ default:
+ renderErrorResponse(Tf::NotFound);
+ break;
+ }
+ }
+ else
+ {
+ QString red_msg = " Not authorized to access the page or resource you were trying to reach.";
+ texport(red_msg);
+ render("index");
+ }
+ }
+ else
+ {
+ redirect(QUrl("/account/form"));
+ }
+}
+
+void AnnexDataCommentsController::remove(const QString &id)
+{
+ QString username = identityKeyOfLoginUser();
+ ItisUser user = ItisUser::getByIdentityKey(username);
+ if (!user.isNull())
+ {
+ auto conti = TActionController::name();
+ auto con = TActionController::activeAction();
+ QString uri = "/" + conti + "/" + con;
+
+ if(ActionRights::isInGroups(user.groups(), "d", uri))
+ {
+ if (httpRequest().method() != Tf::Post) {
+ renderErrorResponse(Tf::NotFound);
+ return;
+ }
+
+ auto annexDataComments = AnnexDataComments::get(id.toInt());
+ annexDataComments.remove();
+ redirect(urla("index"));
+ }
+ else
+ {
+ QString red_msg = " Not authorized to access the page or resource you were trying to reach.";
+ texport(red_msg);
+ render("index");
+ }
+ }
+ else
+ {
+ redirect(QUrl("/account/form"));
+ }
+}
+
+
+// Don't remove below this line
+T_DEFINE_CONTROLLER(AnnexDataCommentsController)
diff --git a/controllers/annexdatacommentscontroller.h b/controllers/annexdatacommentscontroller.h
new file mode 100644
index 0000000..9f58016
--- /dev/null
+++ b/controllers/annexdatacommentscontroller.h
@@ -0,0 +1,27 @@
+#ifndef ANNEXDATACOMMENTSCONTROLLER_H
+#define ANNEXDATACOMMENTSCONTROLLER_H
+
+#include "applicationcontroller.h"
+
+
+class T_CONTROLLER_EXPORT AnnexDataCommentsController : public ApplicationController
+{
+ Q_OBJECT
+public:
+ AnnexDataCommentsController() : ApplicationController() {}
+
+public slots:
+ void index();
+ void list_all();
+
+ void show(const QString &id);
+ void create();
+ void createComment();
+ void save(const QString &id);
+ void remove(const QString &id);
+
+ void getSpecComments(const QString &spec_id);
+
+};
+
+#endif // ANNEXDATACOMMENTSCONTROLLER_H
diff --git a/controllers/annexdatacontroller.cpp b/controllers/annexdatacontroller.cpp
new file mode 100644
index 0000000..55e246d
--- /dev/null
+++ b/controllers/annexdatacontroller.cpp
@@ -0,0 +1,1171 @@
+#include "annexdatacontroller.h"
+#include "annexdata.h"
+
+#include "itisuser.h"
+#include "itisgroups.h"
+#include "accountcontroller.h"
+#include "actionrights.h"
+
+#include "objects.h"
+#include "catclasses.h"
+#include "stdsystem.h"
+#include "acclasses.h"
+#include "pcclasses.h"
+#include "annexmeta.h"
+#include "annexdatawaste.h"
+#include "annexdatacomments.h"
+
+void AnnexDataController::writeAnnex()
+{
+
+ QMap stdDataMap;
+ QString msg;
+
+ stdDataMap["obj_sname"] = "Annex A";
+ stdDataMap["country"] = "WW";
+ stdDataMap["lang"] = "de_DE";
+ stdDataMap["spec_active"] = "1";
+ stdDataMap["ac_class"] = "1";
+ stdDataMap["pc_class"] = "1";
+ stdDataMap["spec_release"] = "pre-release";
+ stdDataMap["release_version"] = "01.00.00";
+ stdDataMap["getStdType"] = "show";
+
+ AnnexData::writeAnnex(stdDataMap);
+}
+
+void AnnexDataController::doReleased()
+{
+ QString username = identityKeyOfLoginUser();
+ ItisUser user = ItisUser::getByIdentityKey(username);
+ if (!user.isNull())
+ {
+ auto conti = TActionController::name();
+ auto con = TActionController::activeAction();
+ QString uri = "/" + conti + "/" + con;
+
+ if(ActionRights::isInGroups(user.groups(), "u", uri))
+ {
+ QMap stdDataMap;
+
+ stdDataMap["release_id"] = httpRequest().formItemValue("release_id");
+ stdDataMap["rel_creator"] = user.email();
+
+ renderJson( AnnexData::doReleased(stdDataMap) );
+ }
+ else
+ {
+ QString red_msg = " Not authorized to access the page or resource you were trying to reach. " + uri;
+ texport(red_msg);
+ render("index");
+ }
+ }
+ else
+ {
+ redirect(QUrl("/account/form"));
+ }
+}
+
+void AnnexDataController::upReleased()
+{
+ QString username = identityKeyOfLoginUser();
+ ItisUser user = ItisUser::getByIdentityKey(username);
+ if (!user.isNull())
+ {
+ auto conti = TActionController::name();
+ auto con = TActionController::activeAction();
+ QString uri = "/" + conti + "/" + con;
+
+ if(ActionRights::isInGroups(user.groups(), "u", uri))
+ {
+ QString id = httpRequest().formItemValue("id");
+ int lid = id.toInt();
+ renderJson( AnnexData::upReleased(lid) );
+ }
+ else
+ {
+ QString red_msg = " Not authorized to access the page or resource you were trying to reach.";
+ texport(red_msg);
+ render("index");
+ }
+ }
+ else
+ {
+ redirect(QUrl("/account/form"));
+ }
+}
+
+void AnnexDataController::doPreRelease()
+{
+ QString username = identityKeyOfLoginUser();
+ ItisUser user = ItisUser::getByIdentityKey(username);
+ if (!user.isNull())
+ {
+ auto conti = TActionController::name();
+ auto con = TActionController::activeAction();
+ QString uri = "/" + conti + "/" + con;
+
+ if(ActionRights::isInGroups(user.groups(), "u", uri))
+ {
+ QMap stdDataMap;
+
+ stdDataMap["obj_sname"] = httpRequest().formItemValue("obj_sname");
+ stdDataMap["ac_classes"] = httpRequest().formItemValue("ac_classes");
+ stdDataMap["pc_classes"] = httpRequest().formItemValue("pc_classes");
+ stdDataMap["cat_class"] = httpRequest().formItemValue("cat_class");
+ stdDataMap["country"] = httpRequest().formItemValue("country");
+ stdDataMap["lang"] = httpRequest().formItemValue("lang");
+ stdDataMap["doc_type"] = "annex";
+ stdDataMap["rel_requester"] = user.email();
+ stdDataMap["relrequest_date"] = httpRequest().formItemValue("relrequest_date");
+
+ renderJson( AnnexData::doPreRelease(stdDataMap) );
+ }
+ else
+ {
+ QString red_msg = " Not authorized to access the page or resource you were trying to reach. " + uri;
+ texport(red_msg);
+ render("index");
+ }
+ }
+ else
+ {
+ redirect(QUrl("/account/form"));
+ }
+}
+
+void AnnexDataController::upPrelease()
+{
+ QString username = identityKeyOfLoginUser();
+ ItisUser user = ItisUser::getByIdentityKey(username);
+ if (!user.isNull())
+ {
+ auto conti = TActionController::name();
+ auto con = TActionController::activeAction();
+ QString uri = "/" + conti + "/" + con;
+
+ if(ActionRights::isInGroups(user.groups(), "u", uri))
+ {
+ QString id = httpRequest().formItemValue("id");
+ int lid = id.toInt();
+ renderJson( AnnexData::upPrelease(lid) );
+ }
+ else
+ {
+ QString red_msg = " Not authorized to access the page or resource you were trying to reach.";
+ texport(red_msg);
+ render("index");
+ }
+ }
+ else
+ {
+ redirect(QUrl("/account/form"));
+ }
+}
+
+void AnnexDataController::updAnnexData()
+{
+ QString username = identityKeyOfLoginUser();
+ ItisUser user = ItisUser::getByIdentityKey(username);
+ if (!user.isNull())
+ {
+ auto conti = TActionController::name();
+ auto con = TActionController::activeAction();
+ QString uri = "/" + conti + "/" + con;
+
+ if(ActionRights::isInGroups(user.groups(), "u", uri))
+ {
+ QMap stdDataMap;
+
+ stdDataMap["id"] = httpRequest().formItemValue("id");
+ stdDataMap["spec_title"] = httpRequest().formItemValue("spec_title");
+ stdDataMap["spec_desc"] = httpRequest().formItemValue("spec_desc");
+ stdDataMap["obj_sname"] = httpRequest().formItemValue("obj_sname");
+ stdDataMap["cat_class"] = httpRequest().formItemValue("cat_class");
+ stdDataMap["country"] = httpRequest().formItemValue("country");
+ stdDataMap["lang"] = httpRequest().formItemValue("lang");
+ stdDataMap["ac_classes"] = httpRequest().formItemValue("ac_classes");
+ stdDataMap["pc_classes"] = httpRequest().formItemValue("pc_classes");
+ stdDataMap["spec_version"] = httpRequest().formItemValue("spec_version");
+ stdDataMap["spec_version_new"] = httpRequest().formItemValue("spec_version_new");
+ stdDataMap["lfdnr"] = httpRequest().formItemValue("lfdnr");
+ stdDataMap["spec_release"] = httpRequest().formItemValue("spec_release");
+ stdDataMap["last_editor"] = httpRequest().formItemValue("last_editor");
+ stdDataMap["spec_valid_start"] = httpRequest().formItemValue("spec_valid_start");
+ stdDataMap["spec_valid_end"] = httpRequest().formItemValue("spec_valid_end");
+ stdDataMap["spec_active"] = httpRequest().formItemValue("spec_active");
+ stdDataMap["spec_content"] = httpRequest().formItemValue("spec_content");
+ stdDataMap["g_legacy"] = httpRequest().formItemValue("g_legacy");
+ stdDataMap["resp"] = httpRequest().formItemValue("resp");
+ stdDataMap["comment"] = httpRequest().formItemValue("comment");
+ stdDataMap["marker"] = httpRequest().formItemValue("marker");
+
+ renderJson( AnnexData::updAnnexData(stdDataMap) );
+ }
+ else
+ {
+ QString red_msg = " Not authorized to access the page or resource you were trying to reach.";
+ texport(red_msg);
+ render("index");
+ }
+ }
+ else
+ {
+ redirect(QUrl("/account/form"));
+ }
+}
+
+void AnnexDataController::setAnnexData()
+{
+ QString username = identityKeyOfLoginUser();
+ ItisUser user = ItisUser::getByIdentityKey(username);
+ if (!user.isNull())
+ {
+ auto conti = TActionController::name();
+ auto con = TActionController::activeAction();
+ QString uri = "/" + conti + "/" + con;
+
+ if(ActionRights::isInGroups(user.groups(), "c", uri))
+ {
+ QMap stdDataMap;
+
+ stdDataMap["spec_title"] = httpRequest().formItemValue("spec_title");
+ stdDataMap["spec_desc"] = httpRequest().formItemValue("spec_desc");
+ stdDataMap["obj_sname"] = httpRequest().formItemValue("obj_sname");
+ stdDataMap["cat_class"] = httpRequest().formItemValue("cat_class");
+ stdDataMap["country"] = httpRequest().formItemValue("country");
+ stdDataMap["lang"] = httpRequest().formItemValue("lang");
+ stdDataMap["ac_classes"] = httpRequest().formItemValue("ac_classes");
+ stdDataMap["pc_classes"] = httpRequest().formItemValue("pc_classes");
+ stdDataMap["spec_version"] = httpRequest().formItemValue("spec_version");
+ stdDataMap["spec_version_new"] = httpRequest().formItemValue("spec_version_new");
+ stdDataMap["lfdnr"] = httpRequest().formItemValue("lfdnr");
+ stdDataMap["spec_release"] = httpRequest().formItemValue("spec_release");
+ stdDataMap["last_editor"] = httpRequest().formItemValue("last_editor");
+ stdDataMap["spec_valid_start"] = httpRequest().formItemValue("spec_valid_start");
+ stdDataMap["spec_valid_end"] = httpRequest().formItemValue("spec_valid_end");
+ stdDataMap["spec_active"] = httpRequest().formItemValue("spec_active");
+ stdDataMap["spec_content"] = httpRequest().formItemValue("spec_content");
+ stdDataMap["g_legacy"] = httpRequest().formItemValue("g_legacy");
+ stdDataMap["resp"] = httpRequest().formItemValue("resp");
+ stdDataMap["comment"] = httpRequest().formItemValue("comment");
+ stdDataMap["marker"] = httpRequest().formItemValue("marker");
+
+ renderJson( AnnexData::setAnnexData(stdDataMap) );
+ }
+ else
+ {
+ QString red_msg = " Not authorized to access the page or resource you were trying to reach.";
+ texport(red_msg);
+ render("index");
+ }
+ }
+ else
+ {
+ redirect(QUrl("/account/form"));
+ }
+}
+
+void AnnexDataController::getAnnexSpec()
+{
+ QString username = identityKeyOfLoginUser();
+ ItisUser user = ItisUser::getByIdentityKey(username);
+ if (!user.isNull())
+ {
+ auto conti = TActionController::name();
+ auto con = TActionController::activeAction();
+ QString uri = "/" + conti + "/" + con;
+
+ if(ActionRights::isInGroups(user.groups(), "r", uri))
+ {
+ QString id = httpRequest().queryItemValue("id");
+ int lid = id.toInt();
+ renderJson( AnnexData::getAnnexSpec(lid) );
+ }
+ else
+ {
+ QString red_msg = " Not authorized to access the page or resource you were trying to reach.";
+ texport(red_msg);
+ render("index");
+ }
+ }
+ else
+ {
+ redirect(QUrl("/account/form"));
+ }
+}
+
+void AnnexDataController::getAnnexToc()
+{
+ QString username = identityKeyOfLoginUser();
+ ItisUser user = ItisUser::getByIdentityKey(username);
+ if (!user.isNull())
+ {
+ QMap stdDataMap;
+
+ stdDataMap["obj_sname"] = httpRequest().formItemValue("obj_sname");
+ stdDataMap["cat_sname_en"] = httpRequest().formItemValue("cat_sname_en");
+ stdDataMap["country"] = httpRequest().formItemValue("country");
+ stdDataMap["lang"] = httpRequest().formItemValue("lang");
+ stdDataMap["spec_active"] = httpRequest().formItemValue("spec_active");
+ stdDataMap["ac_class"] = httpRequest().formItemValue("ac_class");
+ stdDataMap["pc_class"] = httpRequest().formItemValue("pc_class");
+ stdDataMap["spec_release"] = httpRequest().formItemValue("spec_release");
+ stdDataMap["getStdType"] = httpRequest().formItemValue("getStdType");
+
+ /* ####
+ stdDataMap["obj_sname"] = "Annex D";
+ stdDataMap["cat_sname_en"] = "Cabling";
+ stdDataMap["country"] = "WW";
+ stdDataMap["lang"] = "de_DE";
+ stdDataMap["spec_active"] = "1";
+ stdDataMap["ac_class"] = "3";
+ stdDataMap["pc_class"] = "3";
+ stdDataMap["spec_release"] = "draft";
+ stdDataMap["getStdType"] = "show";
+ */
+
+ renderJson( AnnexData::getAnnexToc(stdDataMap) );
+ }
+ else
+ {
+ redirect(QUrl("/account/form"));
+ }
+}
+
+void AnnexDataController::getAnnexList()
+{
+ QString username = identityKeyOfLoginUser();
+ ItisUser user = ItisUser::getByIdentityKey(username);
+ if (!user.isNull())
+ {
+ auto conti = TActionController::name();
+ auto con = TActionController::activeAction();
+ QString uri = "/" + conti + "/" + con;
+
+ if(ActionRights::isInGroups(user.groups(), "r", uri))
+ {
+ QMap stdDataMap;
+
+ stdDataMap["obj_sname"] = httpRequest().formItemValue("obj_sname");
+ stdDataMap["cat_sname_en"] = httpRequest().formItemValue("cat_sname_en");
+ stdDataMap["country"] = httpRequest().formItemValue("country");
+ stdDataMap["lang"] = httpRequest().formItemValue("lang");
+ stdDataMap["spec_active"] = httpRequest().formItemValue("spec_active");
+ stdDataMap["ac_class"] = httpRequest().formItemValue("ac_class");
+ stdDataMap["pc_class"] = httpRequest().formItemValue("pc_class");
+ stdDataMap["spec_release"] = httpRequest().formItemValue("spec_release");
+ stdDataMap["getStdType"] = httpRequest().formItemValue("getStdType");
+
+ /*/ ####
+ stdDataMap["obj_sname"] = "Annex A";
+ stdDataMap["cat_sname_en"] = "Cabling";
+ stdDataMap["country"] = "WW";
+ stdDataMap["lang"] = "de_DE";
+ stdDataMap["spec_active"] = "1";
+ stdDataMap["ac_class"] = "3";
+ stdDataMap["pc_class"] = "3";
+ stdDataMap["spec_release"] = "draft";
+ stdDataMap["getStdType"] = "show";
+ */
+
+ if(stdDataMap["getStdType"].compare("list") == 0)
+ {
+ renderJson( AnnexData::getAnnexList(stdDataMap) );
+ }
+ else
+ {
+ renderJson( AnnexData::getAnnexShow(stdDataMap) );
+ }
+ }
+ else
+ {
+ QString red_msg = " Not authorized to access the page or resource you were trying to reach.";
+ texport(red_msg);
+ render("index");
+ }
+ }
+ else
+ {
+ redirect(QUrl("/account/form"));
+ }
+}
+
+void AnnexDataController::getExistCountries()
+{
+ renderJson( AnnexData::getExistCountries() );
+}
+
+void AnnexDataController::printCiAnnex()
+{
+
+ QJsonArray jsonCategories = CatClasses::getAllJson("1", "category", "{Portal-Admin}");
+ texport(jsonCategories);
+/*
+ QString obj_sname = httpRequest().formItemValue("obj_sname");
+ texport(obj_sname);
+ QString country = httpRequest().formItemValue("country");
+ texport(country);
+ QString lang = httpRequest().formItemValue("lang");
+ texport(lang);
+ QString ac_class = httpRequest().formItemValue("ac_class");
+ texport(ac_class);
+ QString pc_class = httpRequest().formItemValue("pc_class");
+ texport(pc_class);
+ QString spec_release = httpRequest().formItemValue("spec_release");
+ texport(spec_release);
+ QString getStdTyp = httpRequest().formItemValue("getStdType");
+ texport(getStdTyp);
+ QString release_id = httpRequest().formItemValue("release_id");
+ texport(release_id);
+*/
+ //* / ####
+ QString obj_sname = "Annex G4";
+ texport(obj_sname);
+ QString country = "DE";
+ texport(country);
+ QString lang = "de_DE";
+ texport(lang);
+ QString ac_class = "3";
+ texport(ac_class);
+ QString pc_class = "3";
+ texport(pc_class);
+ QString spec_release = "draft";
+ texport(spec_release);
+ QString getStdType = "show";
+ texport(getStdType);
+ //*/
+
+ render();
+
+}
+
+void AnnexDataController::showCiAnnex()
+{
+ QString username = identityKeyOfLoginUser();
+ ItisUser user = ItisUser::getByIdentityKey(username);
+ if (!user.isNull())
+ {
+ auto conti = TActionController::name();
+ auto con = TActionController::activeAction();
+ QString uri = "/" + conti + "/" + con;
+
+ if(ActionRights::isInGroups(user.groups(), "r", uri))
+ {
+
+ QString strGroups = ItisUser::sqlGroups( user.groups(), "r" );
+ QJsonArray jsonCategories = CatClasses::getAllJson("1", "category", strGroups);
+ // QJsonArray jsonCategories = CatClasses::getAllJson("1", "category", "{Portal-Admin}");
+ texport(jsonCategories);
+
+ QString obj_sname = httpRequest().formItemValue("obj_sname");
+ texport(obj_sname);
+ QString country = httpRequest().formItemValue("country");
+ texport(country);
+ QString lang = httpRequest().formItemValue("lang");
+ texport(lang);
+ QString ac_class = httpRequest().formItemValue("ac_class");
+ texport(ac_class);
+ QString pc_class = httpRequest().formItemValue("pc_class");
+ texport(pc_class);
+ QString spec_release = httpRequest().formItemValue("spec_release");
+ texport(spec_release);
+ QString getStdTyp = httpRequest().formItemValue("getStdType");
+ texport(getStdTyp);
+ QString release_id = httpRequest().formItemValue("release_id");
+ texport(release_id);
+
+ /* / ####
+ QString obj_sname = "Annex G4";
+ texport(obj_sname);
+ QString country = "DE";
+ texport(country);
+ QString lang = "de_DE";
+ texport(lang);
+ QString ac_class = "3";
+ texport(ac_class);
+ QString pc_class = "3";
+ texport(pc_class);
+ QString spec_release = "pre-release";
+ texport(spec_release);
+ QString getStdType = "show";
+ texport(getStdType);
+ */
+
+ render();
+ }
+ else
+ {
+ QString red_msg = " Not authorized to access the page or resource you were trying to reach.";
+ texport(red_msg);
+ render("index");
+ }
+ }
+ else
+ {
+ redirect(QUrl("/account/form"));
+ }
+}
+
+void AnnexDataController::showAnnex()
+{
+ QString username = identityKeyOfLoginUser();
+ ItisUser user = ItisUser::getByIdentityKey(username);
+ if (!user.isNull())
+ {
+ auto conti = TActionController::name();
+ auto con = TActionController::activeAction();
+ QString uri = "/" + conti + "/" + con;
+
+ if(ActionRights::isInGroups(user.groups(), "r", uri))
+ {
+ QString strGroups = ItisUser::sqlGroups( user.groups(), "r" );
+
+ QJsonArray jsonReleaseTypes = StdSystem::getAllJson("1", "release_types");
+ texport(jsonReleaseTypes);
+
+ QJsonArray jsonLanguages = StdSystem::getAllJson("1", "languages");
+ texport(jsonLanguages);
+
+ //QJsonArray jsonObjects = CatClasses::getAllJson("1", "annex");
+ QJsonArray jsonObjects = CatClasses::getAllJson("1", "annex", strGroups);
+ texport(jsonObjects);
+
+ // QJsonArray jsonCategories= CatClasses::getAllJson("1", "category");
+ QJsonArray jsonCategories = CatClasses::getAllJson("1", "category", strGroups);
+ texport(jsonCategories);
+
+ QJsonArray jsonExistCountries= AnnexData::getExistCountries();
+ texport(jsonExistCountries);
+
+ render();
+ }
+ else
+ {
+ QString red_msg = " Not authorized to access the page or resource you were trying to reach.";
+ texport(red_msg);
+ render("index");
+ }
+ }
+ else
+ {
+ redirect(QUrl("/account/form"));
+ }
+}
+
+void AnnexDataController::showAnnexElectron()
+{
+ QString username = identityKeyOfLoginUser();
+ ItisUser user = ItisUser::getByIdentityKey(username);
+ if (!user.isNull())
+ {
+ auto conti = TActionController::name();
+ auto con = TActionController::activeAction();
+ QString uri = "/" + conti + "/" + con;
+
+ if(ActionRights::isInGroups(user.groups(), "r", uri))
+ {
+ QString strGroups = ItisUser::sqlGroups( user.groups(), "r" );
+
+ QJsonArray jsonReleaseTypes = StdSystem::getAllJson("1", "release_types");
+ texport(jsonReleaseTypes);
+
+ QJsonArray jsonLanguages = StdSystem::getAllJson("1", "languages");
+ texport(jsonLanguages);
+
+ QJsonArray jsonObjects = CatClasses::getAllJson("1", "annex", strGroups);
+ texport(jsonObjects);
+
+ //QJsonArray jsonCategories= CatClasses::getAllJson("1", "category");
+ QJsonArray jsonCategories = CatClasses::getAllJson("1", "category", strGroups);
+ texport(jsonCategories);
+
+ QJsonArray jsonExistCountries= AnnexData::getExistCountries();
+ texport(jsonExistCountries);
+
+ render();
+ }
+ else
+ {
+ QString red_msg = " Not authorized to access the page or resource you were trying to reach.";
+ texport(red_msg);
+ render("index");
+ }
+ }
+ else
+ {
+ redirect(QUrl("/account/form"));
+ }
+}
+
+void AnnexDataController::listAnnex()
+{
+ QString username = identityKeyOfLoginUser();
+ ItisUser user = ItisUser::getByIdentityKey(username);
+ if (!user.isNull())
+ {
+ auto conti = TActionController::name();
+ auto con = TActionController::activeAction();
+ QString uri = "/" + conti + "/" + con;
+
+ if(ActionRights::isInGroups(user.groups(), "r", uri))
+ {
+ QString strGroups = ItisUser::sqlGroups( user.groups(), "r" );
+
+ QJsonArray jsonReleaseTypes = StdSystem::getAllJson("1", "release_types");
+ texport(jsonReleaseTypes);
+
+ QJsonArray jsonLanguages = StdSystem::getAllJson("1", "languages");
+ texport(jsonLanguages);
+
+ //QJsonArray jsonObjects = CatClasses::getAllJson("1", "annex");
+ QJsonArray jsonObjects = CatClasses::getAllJson("1", "annex", strGroups);
+ texport(jsonObjects);
+
+ //QJsonArray jsonCategories= CatClasses::getAllJson("1", "category");
+ QJsonArray jsonCategories = CatClasses::getAllJson("1", "category", strGroups);
+ texport(jsonCategories);
+
+ QJsonArray jsonExistCountries= AnnexData::getExistCountries();
+ texport(jsonExistCountries);
+
+ render();
+ }
+ else
+ {
+ QString red_msg = " Not authorized to access the page or resource you were trying to reach.";
+ texport(red_msg);
+ render("index");
+ }
+ }
+ else
+ {
+ redirect(QUrl("/account/form"));
+ }
+}
+
+void AnnexDataController::doRecover(const QString &id)
+{
+ QString username = identityKeyOfLoginUser();
+ ItisUser user = ItisUser::getByIdentityKey(username);
+ if (!user.isNull())
+ {
+ auto conti = TActionController::name();
+ auto con = TActionController::activeAction();
+ QString uri = "/" + conti + "/" + con;
+
+ if(ActionRights::isInGroups(user.groups(), "c", uri))
+ {
+ renderJson( AnnexDataWaste::doRecover(id.toInt()) );
+ }
+ else
+ {
+ QString red_msg = " Not authorized to access the page or resource you were trying to reach.";
+ texport(red_msg);
+ render("index");
+ }
+ }
+ else
+ {
+ redirect(QUrl("/account/form"));
+ }
+}
+
+void AnnexDataController::listWaste()
+{
+ QString username = identityKeyOfLoginUser();
+ ItisUser user = ItisUser::getByIdentityKey(username);
+ if (!user.isNull())
+ {
+ auto conti = TActionController::name();
+ auto con = TActionController::activeAction();
+ QString uri = "/" + conti + "/" + con;
+
+ if(ActionRights::isInGroups(user.groups(), "r", uri))
+ {
+ int count = AnnexDataWaste::count();
+ QString counter = QString::number(count);
+ texport(counter);
+
+ // bug in PROD
+ auto annexDataWasteList = AnnexDataWaste::getAll();
+ texport(annexDataWasteList);
+
+ render();
+ }
+ else
+ {
+ QString red_msg = " Not authorized to access the page or resource you were trying to reach.";
+ texport(red_msg);
+ render("index");
+ }
+ }
+ else
+ {
+ redirect(QUrl("/account/form"));
+ }
+}
+
+void AnnexDataController::chkLfdnrEditor()
+{
+ QMap editMap;
+
+ editMap["cat_class"] = httpRequest().queryItemValue("cat");
+ editMap["lfdnr"] = httpRequest().queryItemValue("lfdnr");
+
+ renderJson( AnnexData::chkLfdnrEditor(editMap) );
+}
+
+void AnnexDataController::getHighestLfdnr(const QString &category)
+{
+ renderJson( AnnexData::getHighestLfdnr(category) );
+}
+
+void AnnexDataController::editor_upd(const QString &id)
+{
+ QString username = identityKeyOfLoginUser();
+ ItisUser user = ItisUser::getByIdentityKey(username);
+ if (!user.isNull())
+ {
+ auto conti = TActionController::name();
+ auto con = TActionController::activeAction();
+ QString uri = "/" + conti + "/" + con;
+
+ if(ActionRights::isInGroups(user.groups(), "u", uri))
+ {
+ auto annexData = AnnexData::get(id.toInt());
+ texport(annexData);
+
+ auto annexMeta = AnnexMeta::getBySpecDataId(id.toInt());
+ texport(annexMeta);
+
+ QJsonArray jsonReleaseTypes = StdSystem::getAllJson("1", "release_types");
+ texport(jsonReleaseTypes);
+ QJsonArray jsonPcClasses = PcClasses::getPcClassesJson();
+ texport(jsonPcClasses);
+ QJsonArray jsonAcClasses = AcClasses::getAcClassesJson();
+ texport(jsonAcClasses);
+ QJsonArray jsonLanguages = StdSystem::getAllJson("1", "languages");
+ texport(jsonLanguages);
+ QJsonArray jsonObjects = CatClasses::getAllJson("1", "annex");
+ texport(jsonObjects);
+ QJsonArray jsonCategories= CatClasses::getAllJson("1", "category");
+ texport(jsonCategories);
+ QString userMail = user.email();
+ texport(userMail);
+ QString textcomment = QString::number( AnnexDataComments::getSpecsCommentsCount(id.toInt() ));
+ texport(textcomment);
+
+ render();
+ }
+ else
+ {
+ QString red_msg = " Not authorized to access the page or resource you were trying to reach.";
+ texport(red_msg);
+ render("index");
+ }
+ }
+ else
+ {
+ redirect(QUrl("/account/form"));
+ }
+}
+
+void AnnexDataController::editor_add()
+{
+ QString username = identityKeyOfLoginUser();
+ ItisUser user = ItisUser::getByIdentityKey(username);
+ if (!user.isNull())
+ {
+ auto conti = TActionController::name();
+ auto con = TActionController::activeAction();
+ QString uri = "/" + conti + "/" + con;
+
+ if(ActionRights::isInGroups(user.groups(), "c", uri))
+ {
+ QJsonArray jsonReleaseTypes = StdSystem::getAllJson("1", "release_types");
+ texport(jsonReleaseTypes);
+ QJsonArray jsonPcClasses = PcClasses::getPcClassesJson();
+ texport(jsonPcClasses);
+ QJsonArray jsonAcClasses = AcClasses::getAcClassesJson();
+ texport(jsonAcClasses);
+ QJsonArray jsonLanguages = StdSystem::getAllJson("1", "languages");
+ texport(jsonLanguages);
+ QJsonArray jsonObjects = CatClasses::getAllJson("1", "annex");
+ texport(jsonObjects);
+ QJsonArray jsonCategories= CatClasses::getAllJson("1", "category");
+ texport(jsonCategories);
+ QString userMail = user.email();
+ texport(userMail);
+
+ render();
+ }
+ else
+ {
+ QString red_msg = " Not authorized to access the page or resource you were trying to reach.";
+ texport(red_msg);
+ render("index");
+ }
+ }
+ else
+ {
+ redirect(QUrl("/account/form"));
+ }
+}
+
+void AnnexDataController::uploadImg()
+{
+ QString username = identityKeyOfLoginUser();
+ ItisUser user = ItisUser::getByIdentityKey(username);
+ if (!user.isNull())
+ {
+ QJsonObject textObject;
+
+ TMultipartFormData &formdata = httpRequest().multipartFormData();
+ //QString origname = formdata.originalFileName("picture");
+
+ QString origname = formdata.originalFileName("upload");
+ origname = origname.toLower();
+
+ QString fpath = "/webapp/html/itis/Img/Annexspecs/" + origname;
+ formdata.renameUploadedFile("upload", fpath);
+
+ textObject["url"] = "/Annexspecs/" + origname;
+ renderJson(textObject);
+ }
+ else
+ {
+ redirect(QUrl("/account/form"));
+ }
+}
+
+void AnnexDataController::getImages()
+{
+ QJsonObject jsonObject;
+ QJsonArray jsonArray;
+ QString pathToImg = "/webapp/html/itis/Img/Annexspecs";
+ //QString pathToImg = "/webapp_dez/itis_app/public/images";
+ QDir directory(pathToImg);
+ QStringList images = directory.entryList(QStringList() << "*.jpg" << "*.jpeg" << "*.png" << "*.bmp" << "*.gif",QDir::Files);
+
+ foreach(QString filename, images)
+ {
+ QFileInfo info(pathToImg + "/" + filename);
+ jsonObject["size"] = info.size() / 1024;
+ jsonObject["img"] = "/Annexspecs/" + filename;
+ //jsonObject["img"] = "/images/" + filename;
+ jsonObject["name"] = filename;
+ jsonArray.append(jsonObject);
+ }
+ renderJson(jsonArray);
+}
+
+void AnnexDataController::checkLfdnrCat()
+{
+ QString username = identityKeyOfLoginUser();
+ ItisUser user = ItisUser::getByIdentityKey(username);
+ if (!user.isNull())
+ {
+ QString countCheckLfdnrCat = QString::number( AnnexData::countCheckLfdnrCat() );
+ texport(countCheckLfdnrCat);
+
+ render();
+ }
+ else
+ {
+ redirect(QUrl("/account/form"));
+ }
+}
+
+void AnnexDataController::getStatistics()
+{
+ renderJson( AnnexData::getStatistics() );
+}
+
+void AnnexDataController::list_all()
+{
+ QString username = identityKeyOfLoginUser();
+ ItisUser user = ItisUser::getByIdentityKey(username);
+ if (!user.isNull())
+ {
+ auto conti = TActionController::name();
+ auto con = TActionController::activeAction();
+ QString uri = "/" + conti + "/" + con;
+
+ if(ActionRights::isInGroups(user.groups(), "r", uri))
+ {
+ auto annexDataList = AnnexData::getAll();
+ texport(annexDataList);
+ render();
+ }
+ else
+ {
+ QString red_msg = " Not authorized to access the page or resource you were trying to reach.";
+ texport(red_msg);
+ render("index");
+ }
+ }
+ else
+ {
+ redirect(QUrl("/account/form"));
+ }
+}
+
+void AnnexDataController::index()
+{
+ QString username = identityKeyOfLoginUser();
+ ItisUser user = ItisUser::getByIdentityKey(username);
+ if (!user.isNull())
+ {
+ render();
+ }
+ else
+ {
+ redirect(QUrl("/account/form"));
+ }
+}
+
+void AnnexDataController::show(const QString &id)
+{
+ QString username = identityKeyOfLoginUser();
+ ItisUser user = ItisUser::getByIdentityKey(username);
+ if (!user.isNull())
+ {
+ auto conti = TActionController::name();
+ auto con = TActionController::activeAction();
+ QString uri = "/" + conti + "/" + con;
+
+ if(ActionRights::isInGroups(user.groups(), "r_d", uri))
+ {
+ auto annexData = AnnexData::get(id.toInt());
+ texport(annexData);
+ render();
+ }
+ else
+ {
+ QString red_msg = " Not authorized to access the page or resource you were trying to reach.";
+ texport(red_msg);
+ render("index");
+ }
+ }
+ else
+ {
+ redirect(QUrl("/account/form"));
+ }
+}
+
+void AnnexDataController::showWaste(const QString &id)
+{
+ QString username = identityKeyOfLoginUser();
+ ItisUser user = ItisUser::getByIdentityKey(username);
+ if (!user.isNull())
+ {
+ auto conti = TActionController::name();
+ auto con = TActionController::activeAction();
+ QString uri = "/" + conti + "/" + con;
+
+ if(ActionRights::isInGroups(user.groups(), "cr_d", uri))
+ {
+ auto annexDataWaste = AnnexDataWaste::get(id.toInt());
+ texport(annexDataWaste);
+ render();
+ }
+ else
+ {
+ QString red_msg = " Not authorized to access the page or resource you were trying to reach.";
+ texport(red_msg);
+ render("index");
+ }
+ }
+ else
+ {
+ redirect(QUrl("/account/form"));
+ }
+}
+
+void AnnexDataController::create()
+{
+ QString username = identityKeyOfLoginUser();
+ ItisUser user = ItisUser::getByIdentityKey(username);
+ if (!user.isNull())
+ {
+ auto conti = TActionController::name();
+ auto con = TActionController::activeAction();
+ QString uri = "/" + conti + "/" + con;
+
+ if(ActionRights::isInGroups(user.groups(), "c", uri))
+ {
+ switch (httpRequest().method()) {
+ case Tf::Get:
+ render();
+ break;
+
+ case Tf::Post: {
+ auto annexData = httpRequest().formItems("annexData");
+ auto model = AnnexData::create(annexData);
+
+ if (!model.isNull()) {
+ QString notice = "Created successfully.";
+ tflash(notice);
+ redirect(urla("show", model.id()));
+ } else {
+ QString error = "Failed to create.";
+ texport(error);
+ texport(annexData);
+ render();
+ }
+ break; }
+
+ default:
+ renderErrorResponse(Tf::NotFound);
+ break;
+ }
+ }
+ else
+ {
+ QString red_msg = " Not authorized to access the page or resource you were trying to reach.";
+ texport(red_msg);
+ render("index");
+ }
+ }
+ else
+ {
+ redirect(QUrl("/account/form"));
+ }
+}
+
+void AnnexDataController::save(const QString &id)
+{
+ QString username = identityKeyOfLoginUser();
+ ItisUser user = ItisUser::getByIdentityKey(username);
+ if (!user.isNull())
+ {
+ auto conti = TActionController::name();
+ auto con = TActionController::activeAction();
+ QString uri = "/" + conti + "/" + con;
+
+ if(ActionRights::isInGroups(user.groups(), "u", uri))
+ {
+ switch (httpRequest().method()) {
+ case Tf::Get: {
+ auto model = AnnexData::get(id.toInt());
+ if (!model.isNull()) {
+ auto annexData = model.toVariantMap();
+ texport(annexData);
+ render();
+ }
+ break; }
+
+ case Tf::Post: {
+ QString error;
+ auto model = AnnexData::get(id.toInt());
+
+ if (model.isNull()) {
+ error = "Original data not found. It may have been updated/removed by another transaction.";
+ tflash(error);
+ redirect(urla("save", id));
+ break;
+ }
+
+ auto annexData = httpRequest().formItems("annexData");
+ model.setProperties(annexData);
+ if (model.save()) {
+ QString notice = "Updated successfully.";
+ tflash(notice);
+ redirect(urla("show", model.id()));
+ } else {
+ error = "Failed to update.";
+ texport(error);
+ texport(annexData);
+ render();
+ }
+ break; }
+
+ default:
+ renderErrorResponse(Tf::NotFound);
+ break;
+ }
+ }
+ else
+ {
+ QString red_msg = " Not authorized to access the page or resource you were trying to reach.";
+ texport(red_msg);
+ render("index");
+ }
+ }
+ else
+ {
+ redirect(QUrl("/account/form"));
+ }
+}
+
+void AnnexDataController::remove(const QString &id)
+{
+ QString username = identityKeyOfLoginUser();
+ ItisUser user = ItisUser::getByIdentityKey(username);
+ if (!user.isNull())
+ {
+ auto conti = TActionController::name();
+ auto con = TActionController::activeAction();
+ QString uri = "/" + conti + "/" + con;
+
+ if(ActionRights::isInGroups(user.groups(), "d", uri))
+ {
+ if (httpRequest().method() != Tf::Post) {
+ renderErrorResponse(Tf::NotFound);
+ return;
+ }
+
+ auto annexData = AnnexData::get(id.toInt());
+ annexData.remove();
+ redirect(urla("index"));
+ }
+ else
+ {
+ QString red_msg = " Not authorized to access the page or resource you were trying to reach.";
+ texport(red_msg);
+ render("index");
+ }
+ }
+ else
+ {
+ redirect(QUrl("/account/form"));
+ }
+}
+
+void AnnexDataController::removeWaste(const QString &id)
+{
+ QString username = identityKeyOfLoginUser();
+ ItisUser user = ItisUser::getByIdentityKey(username);
+ if (!user.isNull())
+ {
+ auto conti = TActionController::name();
+ auto con = TActionController::activeAction();
+ QString uri = "/" + conti + "/" + con;
+
+ if(ActionRights::isInGroups(user.groups(), "d", uri))
+ {
+ if (httpRequest().method() != Tf::Post) {
+ renderErrorResponse(Tf::NotFound);
+ return;
+ }
+
+ auto annexDataWaste = AnnexDataWaste::get(id.toInt());
+ annexDataWaste.remove();
+ redirect(urla("listWaste"));
+ }
+ else
+ {
+ QString red_msg = " Not authorized to access the page or resource you were trying to reach.";
+ texport(red_msg);
+ render("index");
+ }
+ }
+ else
+ {
+ redirect(QUrl("/account/form"));
+ }
+}
+
+// Don't remove below this line
+T_DEFINE_CONTROLLER(AnnexDataController)
diff --git a/controllers/annexdatacontroller.cpp_2021-02-13_1334 b/controllers/annexdatacontroller.cpp_2021-02-13_1334
new file mode 100644
index 0000000..9e6849b
--- /dev/null
+++ b/controllers/annexdatacontroller.cpp_2021-02-13_1334
@@ -0,0 +1,869 @@
+#include "annexdatacontroller.h"
+#include "annexdata.h"
+
+#include "itisuser.h"
+#include "itisgroups.h"
+#include "accountcontroller.h"
+#include "actionrights.h"
+
+#include "objects.h"
+#include "catclasses.h"
+#include "stdsystem.h"
+#include "acclasses.h"
+#include "pcclasses.h"
+#include "annexmeta.h"
+#include "annexdatawaste.h"
+
+void AnnexDataController::updAnnexData()
+{
+ QString username = identityKeyOfLoginUser();
+ ItisUser user = ItisUser::getByIdentityKey(username);
+ if (!user.isNull())
+ {
+ auto conti = TActionController::name();
+ auto con = TActionController::activeAction();
+ QString uri = "/" + conti + "/" + con;
+
+ if(ActionRights::isInGroups(user.groups(), "u", uri))
+ {
+ QMap stdDataMap;
+
+ stdDataMap["id"] = httpRequest().formItemValue("id");
+ stdDataMap["spec_title"] = httpRequest().formItemValue("spec_title");
+ stdDataMap["spec_desc"] = httpRequest().formItemValue("spec_desc");
+ stdDataMap["obj_sname"] = httpRequest().formItemValue("obj_sname");
+ stdDataMap["cat_class"] = httpRequest().formItemValue("cat_class");
+ stdDataMap["country"] = httpRequest().formItemValue("country");
+ stdDataMap["lang"] = httpRequest().formItemValue("lang");
+ stdDataMap["ac_classes"] = httpRequest().formItemValue("ac_classes");
+ stdDataMap["pc_classes"] = httpRequest().formItemValue("pc_classes");
+ stdDataMap["spec_version"] = httpRequest().formItemValue("spec_version");
+ stdDataMap["spec_version_new"] = httpRequest().formItemValue("spec_version_new");
+ stdDataMap["lfdnr"] = httpRequest().formItemValue("lfdnr");
+ stdDataMap["spec_release"] = httpRequest().formItemValue("spec_release");
+ stdDataMap["last_editor"] = httpRequest().formItemValue("last_editor");
+ stdDataMap["spec_valid_start"] = httpRequest().formItemValue("spec_valid_start");
+ stdDataMap["spec_valid_end"] = httpRequest().formItemValue("spec_valid_end");
+ stdDataMap["spec_active"] = httpRequest().formItemValue("spec_active");
+ stdDataMap["spec_content"] = httpRequest().formItemValue("spec_content");
+ stdDataMap["g_legacy"] = httpRequest().formItemValue("g_legacy");
+ stdDataMap["resp"] = httpRequest().formItemValue("resp");
+ stdDataMap["comment"] = httpRequest().formItemValue("comment");
+ stdDataMap["marker"] = httpRequest().formItemValue("marker");
+
+ renderJson( AnnexData::updAnnexData(stdDataMap) );
+ }
+ else
+ {
+ QString red_msg = " Not authorized to access the page or resource you were trying to reach.";
+ texport(red_msg);
+ render("index");
+ }
+ }
+ else
+ {
+ redirect(QUrl("/account/form"));
+ }
+}
+
+void AnnexDataController::setAnnexData()
+{
+ QString username = identityKeyOfLoginUser();
+ ItisUser user = ItisUser::getByIdentityKey(username);
+ if (!user.isNull())
+ {
+ auto conti = TActionController::name();
+ auto con = TActionController::activeAction();
+ QString uri = "/" + conti + "/" + con;
+
+ if(ActionRights::isInGroups(user.groups(), "c", uri))
+ {
+ QMap stdDataMap;
+
+ stdDataMap["spec_title"] = httpRequest().formItemValue("spec_title");
+ stdDataMap["spec_desc"] = httpRequest().formItemValue("spec_desc");
+ stdDataMap["obj_sname"] = httpRequest().formItemValue("obj_sname");
+ stdDataMap["cat_class"] = httpRequest().formItemValue("cat_class");
+ stdDataMap["country"] = httpRequest().formItemValue("country");
+ stdDataMap["lang"] = httpRequest().formItemValue("lang");
+ stdDataMap["ac_classes"] = httpRequest().formItemValue("ac_classes");
+ stdDataMap["pc_classes"] = httpRequest().formItemValue("pc_classes");
+ stdDataMap["spec_version"] = httpRequest().formItemValue("spec_version");
+ stdDataMap["spec_version_new"] = httpRequest().formItemValue("spec_version_new");
+ stdDataMap["lfdnr"] = httpRequest().formItemValue("lfdnr");
+ stdDataMap["spec_release"] = httpRequest().formItemValue("spec_release");
+ stdDataMap["last_editor"] = httpRequest().formItemValue("last_editor");
+ stdDataMap["spec_valid_start"] = httpRequest().formItemValue("spec_valid_start");
+ stdDataMap["spec_valid_end"] = httpRequest().formItemValue("spec_valid_end");
+ stdDataMap["spec_active"] = httpRequest().formItemValue("spec_active");
+ stdDataMap["spec_content"] = httpRequest().formItemValue("spec_content");
+ stdDataMap["g_legacy"] = httpRequest().formItemValue("g_legacy");
+ stdDataMap["resp"] = httpRequest().formItemValue("resp");
+ stdDataMap["comment"] = httpRequest().formItemValue("comment");
+ stdDataMap["marker"] = httpRequest().formItemValue("marker");
+
+ renderJson( AnnexData::setAnnexData(stdDataMap) );
+ }
+ else
+ {
+ QString red_msg = " Not authorized to access the page or resource you were trying to reach.";
+ texport(red_msg);
+ render("index");
+ }
+ }
+ else
+ {
+ redirect(QUrl("/account/form"));
+ }
+}
+
+void AnnexDataController::getAnnexSpec()
+{
+ QString username = identityKeyOfLoginUser();
+ ItisUser user = ItisUser::getByIdentityKey(username);
+ if (!user.isNull())
+ {
+ auto conti = TActionController::name();
+ auto con = TActionController::activeAction();
+ QString uri = "/" + conti + "/" + con;
+
+ if(ActionRights::isInGroups(user.groups(), "r", uri))
+ {
+ QString id = httpRequest().queryItemValue("id");
+ int lid = id.toInt();
+ renderJson( AnnexData::getAnnexSpec(lid) );
+ }
+ else
+ {
+ QString red_msg = " Not authorized to access the page or resource you were trying to reach.";
+ texport(red_msg);
+ render("index");
+ }
+ }
+ else
+ {
+ redirect(QUrl("/account/form"));
+ }
+}
+
+void AnnexDataController::getAnnexList()
+{
+ QString username = identityKeyOfLoginUser();
+ ItisUser user = ItisUser::getByIdentityKey(username);
+ if (!user.isNull())
+ {
+ auto conti = TActionController::name();
+ auto con = TActionController::activeAction();
+ QString uri = "/" + conti + "/" + con;
+
+ if(ActionRights::isInGroups(user.groups(), "r", uri))
+ {
+ QMap stdDataMap;
+
+ stdDataMap["obj_sname"] = httpRequest().formItemValue("obj_sname");
+ stdDataMap["cat_sname_en"] = httpRequest().formItemValue("cat_sname_en");
+ stdDataMap["country"] = httpRequest().formItemValue("country");
+ stdDataMap["lang"] = httpRequest().formItemValue("lang");
+ stdDataMap["spec_active"] = httpRequest().formItemValue("spec_active");
+ stdDataMap["ac_class"] = httpRequest().formItemValue("ac_class");
+ stdDataMap["pc_class"] = httpRequest().formItemValue("pc_class");
+ stdDataMap["spec_release"] = httpRequest().formItemValue("spec_release");
+ stdDataMap["getStdType"] = httpRequest().formItemValue("getStdType");
+
+ /* ####
+ stdDataMap["obj_sname"] = "Annex A";
+ stdDataMap["cat_sname_en"] = "Cabling";
+ stdDataMap["country"] = "WW";
+ stdDataMap["lang"] = "de_DE";
+ stdDataMap["spec_active"] = "1";
+ stdDataMap["ac_class"] = "3";
+ stdDataMap["pc_class"] = "3";
+ stdDataMap["spec_release"] = "draft";
+ stdDataMap["getStdType"] = "show";
+ */
+
+ if(stdDataMap["getStdType"].compare("list") == 0)
+ {
+ renderJson( AnnexData::getAnnexList(stdDataMap) );
+ }
+ else
+ {
+ renderJson( AnnexData::getAnnexShow(stdDataMap) );
+ }
+ }
+ else
+ {
+ QString red_msg = " Not authorized to access the page or resource you were trying to reach.";
+ texport(red_msg);
+ render("index");
+ }
+ }
+ else
+ {
+ redirect(QUrl("/account/form"));
+ }
+}
+
+void AnnexDataController::getExistCountries()
+{
+ renderJson( AnnexData::getExistCountries() );
+}
+
+void AnnexDataController::showAnnex()
+{
+ QString username = identityKeyOfLoginUser();
+ ItisUser user = ItisUser::getByIdentityKey(username);
+ if (!user.isNull())
+ {
+ auto conti = TActionController::name();
+ auto con = TActionController::activeAction();
+ QString uri = "/" + conti + "/" + con;
+
+ if(ActionRights::isInGroups(user.groups(), "r", uri))
+ {
+ QString strGroups = ItisUser::sqlGroups( user.groups(), "r" );
+
+ QJsonArray jsonReleaseTypes = StdSystem::getAllJson("1", "release_types");
+ texport(jsonReleaseTypes);
+
+ QJsonArray jsonLanguages = StdSystem::getAllJson("1", "languages");
+ texport(jsonLanguages);
+
+ //QJsonArray jsonObjects = CatClasses::getAllJson("1", "annex");
+ QJsonArray jsonObjects = CatClasses::getAllJson("1", "annex", strGroups);
+ texport(jsonObjects);
+
+ // QJsonArray jsonCategories= CatClasses::getAllJson("1", "category");
+ QJsonArray jsonCategories = CatClasses::getAllJson("1", "category", strGroups);
+ texport(jsonCategories);
+
+ QJsonArray jsonExistCountries= AnnexData::getExistCountries();
+ texport(jsonExistCountries);
+
+ render();
+ }
+ else
+ {
+ QString red_msg = " Not authorized to access the page or resource you were trying to reach.";
+ texport(red_msg);
+ render("index");
+ }
+ }
+ else
+ {
+ redirect(QUrl("/account/form"));
+ }
+}
+
+void AnnexDataController::showAnnexElectron()
+{
+ QString username = identityKeyOfLoginUser();
+ ItisUser user = ItisUser::getByIdentityKey(username);
+ if (!user.isNull())
+ {
+ auto conti = TActionController::name();
+ auto con = TActionController::activeAction();
+ QString uri = "/" + conti + "/" + con;
+
+ if(ActionRights::isInGroups(user.groups(), "r", uri))
+ {
+ QString strGroups = ItisUser::sqlGroups( user.groups(), "r" );
+
+ QJsonArray jsonReleaseTypes = StdSystem::getAllJson("1", "release_types");
+ texport(jsonReleaseTypes);
+
+ QJsonArray jsonLanguages = StdSystem::getAllJson("1", "languages");
+ texport(jsonLanguages);
+
+ QJsonArray jsonObjects = CatClasses::getAllJson("1", "annex", strGroups);
+ texport(jsonObjects);
+
+ //QJsonArray jsonCategories= CatClasses::getAllJson("1", "category");
+ QJsonArray jsonCategories = CatClasses::getAllJson("1", "category", strGroups);
+ texport(jsonCategories);
+
+ QJsonArray jsonExistCountries= AnnexData::getExistCountries();
+ texport(jsonExistCountries);
+
+ render();
+ }
+ else
+ {
+ QString red_msg = " Not authorized to access the page or resource you were trying to reach.";
+ texport(red_msg);
+ render("index");
+ }
+ }
+ else
+ {
+ redirect(QUrl("/account/form"));
+ }
+}
+
+void AnnexDataController::listAnnex()
+{
+ QString username = identityKeyOfLoginUser();
+ ItisUser user = ItisUser::getByIdentityKey(username);
+ if (!user.isNull())
+ {
+ auto conti = TActionController::name();
+ auto con = TActionController::activeAction();
+ QString uri = "/" + conti + "/" + con;
+
+ if(ActionRights::isInGroups(user.groups(), "r", uri))
+ {
+ QString strGroups = ItisUser::sqlGroups( user.groups(), "r" );
+
+ QJsonArray jsonReleaseTypes = StdSystem::getAllJson("1", "release_types");
+ texport(jsonReleaseTypes);
+
+ QJsonArray jsonLanguages = StdSystem::getAllJson("1", "languages");
+ texport(jsonLanguages);
+
+ //QJsonArray jsonObjects = CatClasses::getAllJson("1", "annex");
+ QJsonArray jsonObjects = CatClasses::getAllJson("1", "annex", strGroups);
+ texport(jsonObjects);
+
+ //QJsonArray jsonCategories= CatClasses::getAllJson("1", "category");
+ QJsonArray jsonCategories = CatClasses::getAllJson("1", "category", strGroups);
+ texport(jsonCategories);
+
+ QJsonArray jsonExistCountries= AnnexData::getExistCountries();
+ texport(jsonExistCountries);
+
+ render();
+ }
+ else
+ {
+ QString red_msg = " Not authorized to access the page or resource you were trying to reach.";
+ texport(red_msg);
+ render("index");
+ }
+ }
+ else
+ {
+ redirect(QUrl("/account/form"));
+ }
+}
+
+void AnnexDataController::doRecover(const QString &id)
+{
+ QString username = identityKeyOfLoginUser();
+ ItisUser user = ItisUser::getByIdentityKey(username);
+ if (!user.isNull())
+ {
+ auto conti = TActionController::name();
+ auto con = TActionController::activeAction();
+ QString uri = "/" + conti + "/" + con;
+
+ if(ActionRights::isInGroups(user.groups(), "c", uri))
+ {
+ renderJson( AnnexDataWaste::doRecover(id.toInt()) );
+ }
+ else
+ {
+ QString red_msg = " Not authorized to access the page or resource you were trying to reach.";
+ texport(red_msg);
+ render("index");
+ }
+ }
+ else
+ {
+ redirect(QUrl("/account/form"));
+ }
+}
+
+void AnnexDataController::listWaste()
+{
+ QString username = identityKeyOfLoginUser();
+ ItisUser user = ItisUser::getByIdentityKey(username);
+ if (!user.isNull())
+ {
+ auto conti = TActionController::name();
+ auto con = TActionController::activeAction();
+ QString uri = "/" + conti + "/" + con;
+
+ if(ActionRights::isInGroups(user.groups(), "r", uri))
+ {
+ int count = AnnexDataWaste::count();
+ QString counter = QString::number(count);
+ texport(counter);
+
+ // bug in PROD
+ auto annexDataWasteList = AnnexDataWaste::getAll();
+ texport(annexDataWasteList);
+
+ render();
+ }
+ else
+ {
+ QString red_msg = " Not authorized to access the page or resource you were trying to reach.";
+ texport(red_msg);
+ render("index");
+ }
+ }
+ else
+ {
+ redirect(QUrl("/account/form"));
+ }
+}
+
+void AnnexDataController::chkLfdnrEditor()
+{
+ QMap editMap;
+
+ editMap["cat_class"] = httpRequest().queryItemValue("cat");
+ editMap["lfdnr"] = httpRequest().queryItemValue("lfdnr");
+
+ renderJson( AnnexData::chkLfdnrEditor(editMap) );
+}
+
+void AnnexDataController::getHighestLfdnr(const QString &category)
+{
+ renderJson( AnnexData::getHighestLfdnr(category) );
+}
+
+void AnnexDataController::editor_upd(const QString &id)
+{
+ QString username = identityKeyOfLoginUser();
+ ItisUser user = ItisUser::getByIdentityKey(username);
+ if (!user.isNull())
+ {
+ auto conti = TActionController::name();
+ auto con = TActionController::activeAction();
+ QString uri = "/" + conti + "/" + con;
+
+ if(ActionRights::isInGroups(user.groups(), "u", uri))
+ {
+ auto annexData = AnnexData::get(id.toInt());
+ texport(annexData);
+
+ auto annexMeta = AnnexMeta::getBySpecDataId(id.toInt());
+ texport(annexMeta);
+
+ QJsonArray jsonReleaseTypes = StdSystem::getAllJson("1", "release_types");
+ texport(jsonReleaseTypes);
+ QJsonArray jsonPcClasses = PcClasses::getPcClassesJson();
+ texport(jsonPcClasses);
+ QJsonArray jsonAcClasses = AcClasses::getAcClassesJson();
+ texport(jsonAcClasses);
+ QJsonArray jsonLanguages = StdSystem::getAllJson("1", "languages");
+ texport(jsonLanguages);
+ QJsonArray jsonObjects = CatClasses::getAllJson("1", "annex");
+ texport(jsonObjects);
+ QJsonArray jsonCategories= CatClasses::getAllJson("1", "category");
+ texport(jsonCategories);
+ QString userMail = user.email();
+ texport(userMail);
+
+ render();
+ }
+ else
+ {
+ QString red_msg = " Not authorized to access the page or resource you were trying to reach.";
+ texport(red_msg);
+ render("index");
+ }
+ }
+ else
+ {
+ redirect(QUrl("/account/form"));
+ }
+}
+
+void AnnexDataController::editor_add()
+{
+ QString username = identityKeyOfLoginUser();
+ ItisUser user = ItisUser::getByIdentityKey(username);
+ if (!user.isNull())
+ {
+ auto conti = TActionController::name();
+ auto con = TActionController::activeAction();
+ QString uri = "/" + conti + "/" + con;
+
+ if(ActionRights::isInGroups(user.groups(), "c", uri))
+ {
+ QJsonArray jsonReleaseTypes = StdSystem::getAllJson("1", "release_types");
+ texport(jsonReleaseTypes);
+ QJsonArray jsonPcClasses = PcClasses::getPcClassesJson();
+ texport(jsonPcClasses);
+ QJsonArray jsonAcClasses = AcClasses::getAcClassesJson();
+ texport(jsonAcClasses);
+ QJsonArray jsonLanguages = StdSystem::getAllJson("1", "languages");
+ texport(jsonLanguages);
+ QJsonArray jsonObjects = CatClasses::getAllJson("1", "annex");
+ texport(jsonObjects);
+ QJsonArray jsonCategories= CatClasses::getAllJson("1", "category");
+ texport(jsonCategories);
+ QString userMail = user.email();
+ texport(userMail);
+
+ render();
+ }
+ else
+ {
+ QString red_msg = " Not authorized to access the page or resource you were trying to reach.";
+ texport(red_msg);
+ render("index");
+ }
+ }
+ else
+ {
+ redirect(QUrl("/account/form"));
+ }
+}
+
+void AnnexDataController::uploadImg()
+{
+ QString username = identityKeyOfLoginUser();
+ ItisUser user = ItisUser::getByIdentityKey(username);
+ if (!user.isNull())
+ {
+ QJsonObject textObject;
+
+ TMultipartFormData &formdata = httpRequest().multipartFormData();
+ //QString origname = formdata.originalFileName("picture");
+
+ QString origname = formdata.originalFileName("upload");
+ origname = origname.toLower();
+
+ QString fpath = "/webapp/html/itis/Img/Annexspecs/" + origname;
+ formdata.renameUploadedFile("upload", fpath);
+
+ textObject["url"] = "/Annexspecs/" + origname;
+ renderJson(textObject);
+ }
+ else
+ {
+ redirect(QUrl("/account/form"));
+ }
+}
+
+void AnnexDataController::getImages()
+{
+ QJsonObject jsonObject;
+ QJsonArray jsonArray;
+ QString pathToImg = "/webapp/html/itis/Img/Annexspecs";
+ QDir directory(pathToImg);
+ QStringList images = directory.entryList(QStringList() << "*.jpg" << "*.jpeg" << "*.png" << "*.bmp" << "*.gif",QDir::Files);
+
+ foreach(QString filename, images)
+ {
+ QFileInfo info(pathToImg + "/" + filename);
+ jsonObject["size"] = info.size() / 1024;
+ jsonObject["img"] = "/Annexspecs/" + filename;
+ jsonObject["name"] = filename;
+ jsonArray.append(jsonObject);
+ }
+ renderJson(jsonArray);
+}
+
+void AnnexDataController::checkLfdnrCat()
+{
+ QString username = identityKeyOfLoginUser();
+ ItisUser user = ItisUser::getByIdentityKey(username);
+ if (!user.isNull())
+ {
+ QString countCheckLfdnrCat = QString::number( AnnexData::countCheckLfdnrCat() );
+ texport(countCheckLfdnrCat);
+
+ render();
+ }
+ else
+ {
+ redirect(QUrl("/account/form"));
+ }
+}
+
+void AnnexDataController::getStatistics()
+{
+ renderJson( AnnexData::getStatistics() );
+}
+
+void AnnexDataController::list_all()
+{
+ QString username = identityKeyOfLoginUser();
+ ItisUser user = ItisUser::getByIdentityKey(username);
+ if (!user.isNull())
+ {
+ auto conti = TActionController::name();
+ auto con = TActionController::activeAction();
+ QString uri = "/" + conti + "/" + con;
+
+ if(ActionRights::isInGroups(user.groups(), "r", uri))
+ {
+ auto annexDataList = AnnexData::getAll();
+ texport(annexDataList);
+ render();
+ }
+ else
+ {
+ QString red_msg = " Not authorized to access the page or resource you were trying to reach.";
+ texport(red_msg);
+ render("index");
+ }
+ }
+ else
+ {
+ redirect(QUrl("/account/form"));
+ }
+}
+
+void AnnexDataController::index()
+{
+ QString username = identityKeyOfLoginUser();
+ ItisUser user = ItisUser::getByIdentityKey(username);
+ if (!user.isNull())
+ {
+ render();
+ }
+ else
+ {
+ redirect(QUrl("/account/form"));
+ }
+}
+
+void AnnexDataController::show(const QString &id)
+{
+ QString username = identityKeyOfLoginUser();
+ ItisUser user = ItisUser::getByIdentityKey(username);
+ if (!user.isNull())
+ {
+ auto conti = TActionController::name();
+ auto con = TActionController::activeAction();
+ QString uri = "/" + conti + "/" + con;
+
+ if(ActionRights::isInGroups(user.groups(), "r_d", uri))
+ {
+ auto annexData = AnnexData::get(id.toInt());
+ texport(annexData);
+ render();
+ }
+ else
+ {
+ QString red_msg = " Not authorized to access the page or resource you were trying to reach.";
+ texport(red_msg);
+ render("index");
+ }
+ }
+ else
+ {
+ redirect(QUrl("/account/form"));
+ }
+}
+
+void AnnexDataController::showWaste(const QString &id)
+{
+ QString username = identityKeyOfLoginUser();
+ ItisUser user = ItisUser::getByIdentityKey(username);
+ if (!user.isNull())
+ {
+ auto conti = TActionController::name();
+ auto con = TActionController::activeAction();
+ QString uri = "/" + conti + "/" + con;
+
+ if(ActionRights::isInGroups(user.groups(), "cr_d", uri))
+ {
+ auto annexDataWaste = AnnexDataWaste::get(id.toInt());
+ texport(annexDataWaste);
+ render();
+ }
+ else
+ {
+ QString red_msg = " Not authorized to access the page or resource you were trying to reach.";
+ texport(red_msg);
+ render("index");
+ }
+ }
+ else
+ {
+ redirect(QUrl("/account/form"));
+ }
+}
+
+void AnnexDataController::create()
+{
+ QString username = identityKeyOfLoginUser();
+ ItisUser user = ItisUser::getByIdentityKey(username);
+ if (!user.isNull())
+ {
+ auto conti = TActionController::name();
+ auto con = TActionController::activeAction();
+ QString uri = "/" + conti + "/" + con;
+
+ if(ActionRights::isInGroups(user.groups(), "c", uri))
+ {
+ switch (httpRequest().method()) {
+ case Tf::Get:
+ render();
+ break;
+
+ case Tf::Post: {
+ auto annexData = httpRequest().formItems("annexData");
+ auto model = AnnexData::create(annexData);
+
+ if (!model.isNull()) {
+ QString notice = "Created successfully.";
+ tflash(notice);
+ redirect(urla("show", model.id()));
+ } else {
+ QString error = "Failed to create.";
+ texport(error);
+ texport(annexData);
+ render();
+ }
+ break; }
+
+ default:
+ renderErrorResponse(Tf::NotFound);
+ break;
+ }
+ }
+ else
+ {
+ QString red_msg = " Not authorized to access the page or resource you were trying to reach.";
+ texport(red_msg);
+ render("index");
+ }
+ }
+ else
+ {
+ redirect(QUrl("/account/form"));
+ }
+}
+
+void AnnexDataController::save(const QString &id)
+{
+ QString username = identityKeyOfLoginUser();
+ ItisUser user = ItisUser::getByIdentityKey(username);
+ if (!user.isNull())
+ {
+ auto conti = TActionController::name();
+ auto con = TActionController::activeAction();
+ QString uri = "/" + conti + "/" + con;
+
+ if(ActionRights::isInGroups(user.groups(), "u", uri))
+ {
+ switch (httpRequest().method()) {
+ case Tf::Get: {
+ auto model = AnnexData::get(id.toInt());
+ if (!model.isNull()) {
+ auto annexData = model.toVariantMap();
+ texport(annexData);
+ render();
+ }
+ break; }
+
+ case Tf::Post: {
+ QString error;
+ auto model = AnnexData::get(id.toInt());
+
+ if (model.isNull()) {
+ error = "Original data not found. It may have been updated/removed by another transaction.";
+ tflash(error);
+ redirect(urla("save", id));
+ break;
+ }
+
+ auto annexData = httpRequest().formItems("annexData");
+ model.setProperties(annexData);
+ if (model.save()) {
+ QString notice = "Updated successfully.";
+ tflash(notice);
+ redirect(urla("show", model.id()));
+ } else {
+ error = "Failed to update.";
+ texport(error);
+ texport(annexData);
+ render();
+ }
+ break; }
+
+ default:
+ renderErrorResponse(Tf::NotFound);
+ break;
+ }
+ }
+ else
+ {
+ QString red_msg = " Not authorized to access the page or resource you were trying to reach.";
+ texport(red_msg);
+ render("index");
+ }
+ }
+ else
+ {
+ redirect(QUrl("/account/form"));
+ }
+}
+
+void AnnexDataController::remove(const QString &id)
+{
+ QString username = identityKeyOfLoginUser();
+ ItisUser user = ItisUser::getByIdentityKey(username);
+ if (!user.isNull())
+ {
+ auto conti = TActionController::name();
+ auto con = TActionController::activeAction();
+ QString uri = "/" + conti + "/" + con;
+
+ if(ActionRights::isInGroups(user.groups(), "d", uri))
+ {
+ if (httpRequest().method() != Tf::Post) {
+ renderErrorResponse(Tf::NotFound);
+ return;
+ }
+
+ auto annexData = AnnexData::get(id.toInt());
+ annexData.remove();
+ redirect(urla("index"));
+ }
+ else
+ {
+ QString red_msg = " Not authorized to access the page or resource you were trying to reach.";
+ texport(red_msg);
+ render("index");
+ }
+ }
+ else
+ {
+ redirect(QUrl("/account/form"));
+ }
+}
+
+void AnnexDataController::removeWaste(const QString &id)
+{
+ QString username = identityKeyOfLoginUser();
+ ItisUser user = ItisUser::getByIdentityKey(username);
+ if (!user.isNull())
+ {
+ auto conti = TActionController::name();
+ auto con = TActionController::activeAction();
+ QString uri = "/" + conti + "/" + con;
+
+ if(ActionRights::isInGroups(user.groups(), "d", uri))
+ {
+ if (httpRequest().method() != Tf::Post) {
+ renderErrorResponse(Tf::NotFound);
+ return;
+ }
+
+ auto annexDataWaste = AnnexDataWaste::get(id.toInt());
+ annexDataWaste.remove();
+ redirect(urla("listWaste"));
+ }
+ else
+ {
+ QString red_msg = " Not authorized to access the page or resource you were trying to reach.";
+ texport(red_msg);
+ render("index");
+ }
+ }
+ else
+ {
+ redirect(QUrl("/account/form"));
+ }
+}
+
+// Don't remove below this line
+T_DEFINE_CONTROLLER(AnnexDataController)
diff --git a/controllers/annexdatacontroller.h b/controllers/annexdatacontroller.h
new file mode 100644
index 0000000..c772a3b
--- /dev/null
+++ b/controllers/annexdatacontroller.h
@@ -0,0 +1,59 @@
+#ifndef ANNEXDATACONTROLLER_H
+#define ANNEXDATACONTROLLER_H
+
+#include "applicationcontroller.h"
+
+
+class T_CONTROLLER_EXPORT AnnexDataController : public ApplicationController
+{
+ Q_OBJECT
+public:
+ AnnexDataController() : ApplicationController() {}
+
+public slots:
+ void index();
+ void list_all();
+
+ void show(const QString &id);
+ void create();
+ void save(const QString &id);
+ void remove(const QString &id);
+
+ void getStatistics();
+ void getHighestLfdnr(const QString &category);
+ void getImages();
+ void checkLfdnrCat();
+ void getCheckLfdnrCat();
+
+ void listAnnex();
+ void showAnnex();
+ void showCiAnnex();
+ void printCiAnnex();
+ void showAnnexElectron();
+ void listWaste();
+ void getExistCountries();
+
+ void editor_add();
+ void editor_upd(const QString &id);
+ void chkLfdnrEditor();
+ void setAnnexData();
+ void updAnnexData();
+ void upPrelease();
+ void doPreRelease();
+ void upReleased();
+ void doReleased();
+
+ void doRecover(const QString &id);
+ void showWaste(const QString &id);
+ void removeWaste(const QString &id);
+
+ void uploadImg();
+
+ void getAnnexList();
+ void getAnnexSpec();
+ void getAnnexToc();
+
+ void writeAnnex();
+};
+
+#endif // ANNEXDATACONTROLLER_H
diff --git a/controllers/annexmetacontroller.cpp b/controllers/annexmetacontroller.cpp
new file mode 100644
index 0000000..f8eab0c
--- /dev/null
+++ b/controllers/annexmetacontroller.cpp
@@ -0,0 +1,213 @@
+#include "annexmetacontroller.h"
+#include "annexmeta.h"
+
+#include "itisuser.h"
+#include "itisgroups.h"
+#include "accountcontroller.h"
+#include "actionrights.h"
+
+void AnnexMetaController::getBySpecDataId(const QString &spec_data_id)
+{
+ auto annexMeta = AnnexMeta::getBySpecDataId(spec_data_id.toInt());
+ texport(annexMeta);
+ render();
+}
+
+void AnnexMetaController::index()
+{
+ QString username = identityKeyOfLoginUser();
+ ItisUser user = ItisUser::getByIdentityKey(username);
+ if (!user.isNull())
+ {
+ auto annexMetaList = AnnexMeta::getAll();
+ texport(annexMetaList);
+ render();
+ }
+ else
+ {
+ redirect(QUrl("/account/form"));
+ }
+}
+
+void AnnexMetaController::show(const QString &id)
+{
+ QString username = identityKeyOfLoginUser();
+ ItisUser user = ItisUser::getByIdentityKey(username);
+ if (!user.isNull())
+ {
+ auto conti = TActionController::name();
+ auto con = TActionController::activeAction();
+ QString uri = "/" + conti + "/" + con;
+
+ if(ActionRights::isInGroups(user.groups(), "r_d", uri))
+ {
+ auto annexMeta = AnnexMeta::get(id.toInt());
+ texport(annexMeta);
+ render();
+ }
+ else
+ {
+ QString red_msg = " Not authorized to access the page or resource you were trying to reach.";
+ texport(red_msg);
+ render("index");
+ }
+ }
+ else
+ {
+ redirect(QUrl("/account/form"));
+ }
+}
+
+void AnnexMetaController::create()
+{
+ QString username = identityKeyOfLoginUser();
+ ItisUser user = ItisUser::getByIdentityKey(username);
+ if (!user.isNull())
+ {
+ auto conti = TActionController::name();
+ auto con = TActionController::activeAction();
+ QString uri = "/" + conti + "/" + con;
+
+ if(ActionRights::isInGroups(user.groups(), "c", uri))
+ {
+ switch (httpRequest().method()) {
+ case Tf::Get:
+ render();
+ break;
+
+ case Tf::Post: {
+ auto annexMeta = httpRequest().formItems("annexMeta");
+ auto model = AnnexMeta::create(annexMeta);
+
+ if (!model.isNull()) {
+ QString notice = "Created successfully.";
+ tflash(notice);
+ redirect(urla("show", model.id()));
+ } else {
+ QString error = "Failed to create.";
+ texport(error);
+ texport(annexMeta);
+ render();
+ }
+ break; }
+
+ default:
+ renderErrorResponse(Tf::NotFound);
+ break;
+ }
+ }
+ else
+ {
+ QString red_msg = " Not authorized to access the page or resource you were trying to reach.";
+ texport(red_msg);
+ render("index");
+ }
+ }
+ else
+ {
+ redirect(QUrl("/account/form"));
+ }
+}
+
+void AnnexMetaController::save(const QString &id)
+{
+ QString username = identityKeyOfLoginUser();
+ ItisUser user = ItisUser::getByIdentityKey(username);
+ if (!user.isNull())
+ {
+ auto conti = TActionController::name();
+ auto con = TActionController::activeAction();
+ QString uri = "/" + conti + "/" + con;
+
+ if(ActionRights::isInGroups(user.groups(), "u", uri))
+ {
+ switch (httpRequest().method()) {
+ case Tf::Get: {
+ auto model = AnnexMeta::get(id.toInt());
+ if (!model.isNull()) {
+ auto annexMeta = model.toVariantMap();
+ texport(annexMeta);
+ render();
+ }
+ break; }
+
+ case Tf::Post: {
+ QString error;
+ auto model = AnnexMeta::get(id.toInt());
+
+ if (model.isNull()) {
+ error = "Original data not found. It may have been updated/removed by another transaction.";
+ tflash(error);
+ redirect(urla("save", id));
+ break;
+ }
+
+ auto annexMeta = httpRequest().formItems("annexMeta");
+ model.setProperties(annexMeta);
+ if (model.save()) {
+ QString notice = "Updated successfully.";
+ tflash(notice);
+ redirect(urla("show", model.id()));
+ } else {
+ error = "Failed to update.";
+ texport(error);
+ texport(annexMeta);
+ render();
+ }
+ break; }
+
+ default:
+ renderErrorResponse(Tf::NotFound);
+ break;
+ }
+ }
+ else
+ {
+ QString red_msg = " Not authorized to access the page or resource you were trying to reach.";
+ texport(red_msg);
+ render("index");
+ }
+ }
+ else
+ {
+ redirect(QUrl("/account/form"));
+ }
+}
+
+void AnnexMetaController::remove(const QString &id)
+{
+ QString username = identityKeyOfLoginUser();
+ ItisUser user = ItisUser::getByIdentityKey(username);
+ if (!user.isNull())
+ {
+ auto conti = TActionController::name();
+ auto con = TActionController::activeAction();
+ QString uri = "/" + conti + "/" + con;
+
+ if(ActionRights::isInGroups(user.groups(), "d", uri))
+ {
+ if (httpRequest().method() != Tf::Post) {
+ renderErrorResponse(Tf::NotFound);
+ return;
+ }
+
+ auto annexMeta = AnnexMeta::get(id.toInt());
+ annexMeta.remove();
+ redirect(urla("index"));
+ }
+ else
+ {
+ QString red_msg = " Not authorized to access the page or resource you were trying to reach.";
+ texport(red_msg);
+ render("index");
+ }
+ }
+ else
+ {
+ redirect(QUrl("/account/form"));
+ }
+}
+
+
+// Don't remove below this line
+T_DEFINE_CONTROLLER(AnnexMetaController)
diff --git a/controllers/annexmetacontroller.h b/controllers/annexmetacontroller.h
new file mode 100644
index 0000000..ca4df1a
--- /dev/null
+++ b/controllers/annexmetacontroller.h
@@ -0,0 +1,23 @@
+#ifndef ANNEXMETACONTROLLER_H
+#define ANNEXMETACONTROLLER_H
+
+#include "applicationcontroller.h"
+
+
+class T_CONTROLLER_EXPORT AnnexMetaController : public ApplicationController
+{
+ Q_OBJECT
+public:
+ AnnexMetaController() : ApplicationController() {}
+
+public slots:
+ void index();
+ void show(const QString &id);
+ void create();
+ void save(const QString &id);
+ void remove(const QString &id);
+
+ void getBySpecDataId(const QString &spec_data_id);
+};
+
+#endif // ANNEXMETACONTROLLER_H
diff --git a/controllers/applicationcontroller.cpp b/controllers/applicationcontroller.cpp
new file mode 100644
index 0000000..43657ed
--- /dev/null
+++ b/controllers/applicationcontroller.cpp
@@ -0,0 +1,22 @@
+#include "applicationcontroller.h"
+
+ApplicationController::ApplicationController()
+ : TActionController()
+{ }
+
+ApplicationController::~ApplicationController()
+{ }
+
+void ApplicationController::staticInitialize()
+{ }
+
+void ApplicationController::staticRelease()
+{ }
+
+bool ApplicationController::preFilter()
+{
+ return true;
+}
+
+// Don't remove below this line
+T_DEFINE_CONTROLLER(ApplicationController)
diff --git a/controllers/applicationcontroller.h b/controllers/applicationcontroller.h
new file mode 100644
index 0000000..54634dd
--- /dev/null
+++ b/controllers/applicationcontroller.h
@@ -0,0 +1,20 @@
+#pragma once
+#include
+#include "applicationhelper.h"
+
+
+class T_CONTROLLER_EXPORT ApplicationController : public TActionController
+{
+ Q_OBJECT
+public:
+ ApplicationController();
+ virtual ~ApplicationController();
+
+public slots:
+ void staticInitialize();
+ void staticRelease();
+
+protected:
+ virtual bool preFilter();
+};
+
diff --git a/controllers/appvarscontroller.cpp b/controllers/appvarscontroller.cpp
new file mode 100644
index 0000000..8473af8
--- /dev/null
+++ b/controllers/appvarscontroller.cpp
@@ -0,0 +1,235 @@
+#include "appvarscontroller.h"
+#include "appvars.h"
+
+#include "itisuser.h"
+#include "itisgroups.h"
+#include "accountcontroller.h"
+#include "actionrights.h"
+
+void AppVarsController::list_all()
+{
+ QString username = identityKeyOfLoginUser();
+ ItisUser user = ItisUser::getByIdentityKey(username);
+ if (!user.isNull())
+ {
+ auto conti = TActionController::name();
+ auto con = TActionController::activeAction();
+ QString uri = "/" + conti + "/" + con;
+
+ if(ActionRights::isInGroups(user.groups(), "r", uri))
+ {
+ auto appVarsList = AppVars::getAll();
+ texport(appVarsList);
+ render();
+ }
+ else
+ {
+ QString red_msg = " Not authorized to access the page or resource you were trying to reach.";
+ texport(red_msg);
+ render("index");
+ }
+ }
+ else
+ {
+ redirect(QUrl("/account/form"));
+ }
+}
+
+void AppVarsController::index()
+{
+ QString username = identityKeyOfLoginUser();
+ ItisUser user = ItisUser::getByIdentityKey(username);
+ if (!user.isNull())
+ {
+ render();
+ }
+ else
+ {
+ redirect(QUrl("/account/form"));
+ }
+}
+
+void AppVarsController::show(const QString &id)
+{
+ QString username = identityKeyOfLoginUser();
+ ItisUser user = ItisUser::getByIdentityKey(username);
+ if (!user.isNull())
+ {
+ auto conti = TActionController::name();
+ auto con = TActionController::activeAction();
+ QString uri = "/" + conti + "/" + con;
+
+ if(ActionRights::isInGroups(user.groups(), "r_d", uri))
+ {
+ auto appVars = AppVars::get(id.toInt());
+ texport(appVars);
+ render();
+ }
+ else
+ {
+ QString red_msg = " Not authorized to access the page or resource you were trying to reach.";
+ texport(red_msg);
+ render("index");
+ }
+ }
+ else
+ {
+ redirect(QUrl("/account/form"));
+ }
+}
+
+void AppVarsController::create()
+{
+ QString username = identityKeyOfLoginUser();
+ ItisUser user = ItisUser::getByIdentityKey(username);
+ if (!user.isNull())
+ {
+ auto conti = TActionController::name();
+ auto con = TActionController::activeAction();
+ QString uri = "/" + conti + "/" + con;
+
+ if(ActionRights::isInGroups(user.groups(), "c", uri))
+ {
+ switch (httpRequest().method())
+ {
+ case Tf::Get:
+ render();
+ break;
+
+ case Tf::Post: {
+ auto appVars = httpRequest().formItems("appVars");
+ auto model = AppVars::create(appVars);
+
+ if (!model.isNull()) {
+ QString notice = "Created successfully.";
+ tflash(notice);
+ redirect(urla("show", model.id()));
+ } else {
+ QString error = "Failed to create.";
+ texport(error);
+ texport(appVars);
+ render();
+ }
+ break; }
+
+ default:
+ renderErrorResponse(Tf::NotFound);
+ break;
+ }
+ }
+ else
+ {
+ QString red_msg = " Not authorized to access the page or resource you were trying to reach.";
+ texport(red_msg);
+ render("index");
+ }
+ }
+ else
+ {
+ redirect(QUrl("/account/form"));
+ }
+}
+
+void AppVarsController::save(const QString &id)
+{
+ QString username = identityKeyOfLoginUser();
+ ItisUser user = ItisUser::getByIdentityKey(username);
+ if (!user.isNull())
+ {
+ auto conti = TActionController::name();
+ auto con = TActionController::activeAction();
+ QString uri = "/" + conti + "/" + con;
+
+ if(ActionRights::isInGroups(user.groups(), "u", uri))
+ {
+ switch (httpRequest().method()) {
+ case Tf::Get: {
+ auto model = AppVars::get(id.toInt());
+ if (!model.isNull()) {
+ auto appVars = model.toVariantMap();
+ texport(appVars);
+ render();
+ }
+ break; }
+
+ case Tf::Post: {
+ QString error;
+ auto model = AppVars::get(id.toInt());
+
+ if (model.isNull()) {
+ error = "Original data not found. It may have been updated/removed by another transaction.";
+ tflash(error);
+ redirect(urla("save", id));
+ break;
+ }
+
+ auto appVars = httpRequest().formItems("appVars");
+ model.setProperties(appVars);
+ if (model.save()) {
+ QString notice = "Updated successfully.";
+ tflash(notice);
+ redirect(urla("show", model.id()));
+ } else {
+ error = "Failed to update.";
+ texport(error);
+ texport(appVars);
+ render();
+ }
+ break; }
+
+ default:
+ renderErrorResponse(Tf::NotFound);
+ break;
+ }
+ }
+ else
+ {
+ QString red_msg = " Not authorized to access the page or resource you were trying to reach.";
+ texport(red_msg);
+ render("index");
+ }
+ }
+ else
+ {
+ redirect(QUrl("/account/form"));
+ }
+}
+
+void AppVarsController::remove(const QString &id)
+{
+ QString username = identityKeyOfLoginUser();
+ ItisUser user = ItisUser::getByIdentityKey(username);
+ if (!user.isNull())
+ {
+ auto conti = TActionController::name();
+ auto con = TActionController::activeAction();
+ QString uri = "/" + conti + "/" + con;
+
+ if(ActionRights::isInGroups(user.groups(), "d", uri))
+ {
+ if (httpRequest().method() != Tf::Post)
+ {
+ renderErrorResponse(Tf::NotFound);
+ return;
+ }
+
+ auto appVars = AppVars::get(id.toInt());
+ appVars.remove();
+ redirect(urla("index"));
+ }
+ else
+ {
+ QString red_msg = " Not authorized to access the page or resource you were trying to reach.";
+ texport(red_msg);
+ render("index");
+ }
+ }
+ else
+ {
+ redirect(QUrl("/account/form"));
+ }
+}
+
+
+// Don't remove below this line
+T_DEFINE_CONTROLLER(AppVarsController)
diff --git a/controllers/appvarscontroller.h b/controllers/appvarscontroller.h
new file mode 100644
index 0000000..016e54f
--- /dev/null
+++ b/controllers/appvarscontroller.h
@@ -0,0 +1,23 @@
+#ifndef APPVARSCONTROLLER_H
+#define APPVARSCONTROLLER_H
+
+#include "applicationcontroller.h"
+
+
+class T_CONTROLLER_EXPORT AppVarsController : public ApplicationController
+{
+ Q_OBJECT
+public:
+ AppVarsController() : ApplicationController() {}
+
+public slots:
+ void index();
+ void list_all();
+
+ void show(const QString &id);
+ void create();
+ void save(const QString &id);
+ void remove(const QString &id);
+};
+
+#endif // APPVARSCONTROLLER_H
diff --git a/controllers/catclassescontroller.cpp b/controllers/catclassescontroller.cpp
new file mode 100644
index 0000000..fabda31
--- /dev/null
+++ b/controllers/catclassescontroller.cpp
@@ -0,0 +1,248 @@
+#include "catclassescontroller.h"
+#include "catclasses.h"
+
+#include "itisuser.h"
+#include "itisgroups.h"
+#include "accountcontroller.h"
+#include "actionrights.h"
+
+void CatClassesController::list_all()
+{
+ QString username = identityKeyOfLoginUser();
+ ItisUser user = ItisUser::getByIdentityKey(username);
+ if (!user.isNull())
+ {
+ auto conti = TActionController::name();
+ auto con = TActionController::activeAction();
+ QString uri = "/" + conti + "/" + con;
+
+ if(ActionRights::isInGroups(user.groups(), "r", uri))
+ {
+ auto catClassesList = CatClasses::getAll();
+ texport(catClassesList);
+ render();
+ }
+ else
+ {
+ QString red_msg = " Not authorized to access the page or resource you were trying to reach.";
+ texport(red_msg);
+ render("index");
+ }
+ }
+ else
+ {
+ redirect(QUrl("/account/form"));
+ }
+}
+
+void CatClassesController::getAllJson()
+{
+ renderJson( CatClasses::getAllJson() );
+}
+
+void CatClassesController::getAllJson(const QString &active, const QString &class_type)
+{
+ renderJson( CatClasses::getAllJson(active, class_type) );
+}
+
+void CatClassesController::getAllJson(const QString &active, const QString &class_type, const QString strGroups)
+{
+ renderJson( CatClasses::getAllJson( active, class_type, strGroups ) );
+}
+
+void CatClassesController::index()
+{
+ QString username = identityKeyOfLoginUser();
+ ItisUser user = ItisUser::getByIdentityKey(username);
+ if (!user.isNull())
+ {
+ render();
+ }
+ else
+ {
+ redirect(QUrl("/account/form"));
+ }
+}
+
+void CatClassesController::show(const QString &id)
+{
+ QString username = identityKeyOfLoginUser();
+ ItisUser user = ItisUser::getByIdentityKey(username);
+ if (!user.isNull())
+ {
+ auto conti = TActionController::name();
+ auto con = TActionController::activeAction();
+ QString uri = "/" + conti + "/" + con;
+
+ if(ActionRights::isInGroups(user.groups(), "r_d", uri))
+ {
+ auto catClasses = CatClasses::get(id.toInt());
+ texport(catClasses);
+ render();
+ }
+ else
+ {
+ QString red_msg = " Not authorized to access the page or resource you were trying to reach.";
+ texport(red_msg);
+ render("index");
+ }
+ }
+ else
+ {
+ redirect(QUrl("/account/form"));
+ }
+}
+
+void CatClassesController::create()
+{
+ QString username = identityKeyOfLoginUser();
+ ItisUser user = ItisUser::getByIdentityKey(username);
+ if (!user.isNull())
+ {
+ auto conti = TActionController::name();
+ auto con = TActionController::activeAction();
+ QString uri = "/" + conti + "/" + con;
+
+ if(ActionRights::isInGroups(user.groups(), "c", uri))
+ {
+ switch (httpRequest().method()) {
+ case Tf::Get:
+ render();
+ break;
+
+ case Tf::Post: {
+ auto catClasses = httpRequest().formItems("catClasses");
+ auto model = CatClasses::create(catClasses);
+
+ if (!model.isNull()) {
+ QString notice = "Created successfully.";
+ tflash(notice);
+ redirect(urla("show", model.id()));
+ } else {
+ QString error = "Failed to create.";
+ texport(error);
+ texport(catClasses);
+ render();
+ }
+ break; }
+
+ default:
+ renderErrorResponse(Tf::NotFound);
+ break;
+ }
+ }
+ else
+ {
+ QString red_msg = " Not authorized to access the page or resource you were trying to reach.";
+ texport(red_msg);
+ render("index");
+ }
+ }
+ else
+ {
+ redirect(QUrl("/account/form"));
+ }
+}
+
+void CatClassesController::save(const QString &id)
+{
+ QString username = identityKeyOfLoginUser();
+ ItisUser user = ItisUser::getByIdentityKey(username);
+ if (!user.isNull())
+ {
+ auto conti = TActionController::name();
+ auto con = TActionController::activeAction();
+ QString uri = "/" + conti + "/" + con;
+
+ if(ActionRights::isInGroups(user.groups(), "u", uri))
+ {
+ switch (httpRequest().method()) {
+ case Tf::Get: {
+ auto model = CatClasses::get(id.toInt());
+ if (!model.isNull()) {
+ auto catClasses = model.toVariantMap();
+ texport(catClasses);
+ render();
+ }
+ break; }
+
+ case Tf::Post: {
+ QString error;
+ auto model = CatClasses::get(id.toInt());
+
+ if (model.isNull()) {
+ error = "Original data not found. It may have been updated/removed by another transaction.";
+ tflash(error);
+ redirect(urla("save", id));
+ break;
+ }
+
+ auto catClasses = httpRequest().formItems("catClasses");
+ model.setProperties(catClasses);
+ if (model.save()) {
+ QString notice = "Updated successfully.";
+ tflash(notice);
+ redirect(urla("show", model.id()));
+ } else {
+ error = "Failed to update.";
+ texport(error);
+ texport(catClasses);
+ render();
+ }
+ break; }
+
+ default:
+ renderErrorResponse(Tf::NotFound);
+ break;
+ }
+ }
+ else
+ {
+ QString red_msg = " Not authorized to access the page or resource you were trying to reach.";
+ texport(red_msg);
+ render("index");
+ }
+ }
+ else
+ {
+ redirect(QUrl("/account/form"));
+ }
+}
+
+void CatClassesController::remove(const QString &id)
+{
+ QString username = identityKeyOfLoginUser();
+ ItisUser user = ItisUser::getByIdentityKey(username);
+ if (!user.isNull())
+ {
+ auto conti = TActionController::name();
+ auto con = TActionController::activeAction();
+ QString uri = "/" + conti + "/" + con;
+
+ if(ActionRights::isInGroups(user.groups(), "d", uri))
+ {
+ if (httpRequest().method() != Tf::Post) {
+ renderErrorResponse(Tf::NotFound);
+ return;
+ }
+
+ auto catClasses = CatClasses::get(id.toInt());
+ catClasses.remove();
+ redirect(urla("index"));
+ }
+ else
+ {
+ QString red_msg = " Not authorized to access the page or resource you were trying to reach.";
+ texport(red_msg);
+ render("index");
+ }
+ }
+ else
+ {
+ redirect(QUrl("/account/form"));
+ }
+}
+
+
+// Don't remove below this line
+T_DEFINE_CONTROLLER(CatClassesController)
diff --git a/controllers/catclassescontroller.h b/controllers/catclassescontroller.h
new file mode 100644
index 0000000..388ea16
--- /dev/null
+++ b/controllers/catclassescontroller.h
@@ -0,0 +1,27 @@
+#ifndef CATCLASSESCONTROLLER_H
+#define CATCLASSESCONTROLLER_H
+
+#include "applicationcontroller.h"
+
+
+class T_CONTROLLER_EXPORT CatClassesController : public ApplicationController
+{
+ Q_OBJECT
+public:
+ CatClassesController() : ApplicationController() {}
+
+public slots:
+ void index();
+ void list_all();
+
+ void show(const QString &id);
+ void create();
+ void save(const QString &id);
+ void remove(const QString &id);
+
+ void getAllJson();
+ void getAllJson(const QString &active, const QString &class_type);
+ void getAllJson(const QString &active, const QString &class_type, const QString strGroups);
+};
+
+#endif // CATCLASSESCONTROLLER_H
diff --git a/controllers/controllers.pro b/controllers/controllers.pro
new file mode 100644
index 0000000..7bb6406
--- /dev/null
+++ b/controllers/controllers.pro
@@ -0,0 +1,63 @@
+TARGET = controller
+TEMPLATE = lib
+CONFIG += shared c++14 x86_64
+QT += network sql xml qml
+QT -= gui
+DEFINES += TF_DLL
+DESTDIR = ../lib
+INCLUDEPATH += ../helpers ../models
+DEPENDPATH += ../helpers ../models
+LIBS += -L../lib -lhelper -lmodel
+MOC_DIR = .obj/
+OBJECTS_DIR = .obj/
+
+include(../appbase.pri)
+
+HEADERS += applicationcontroller.h
+SOURCES += applicationcontroller.cpp
+HEADERS += standardsdatacontroller.h
+SOURCES += standardsdatacontroller.cpp
+HEADERS += standardsmetacontroller.h
+SOURCES += standardsmetacontroller.cpp
+HEADERS += stdsystemcontroller.h
+SOURCES += stdsystemcontroller.cpp
+HEADERS += webmenucontroller.h
+SOURCES += webmenucontroller.cpp
+HEADERS += accountcontroller.h
+SOURCES += accountcontroller.cpp
+HEADERS += admincontroller.h
+SOURCES += admincontroller.cpp
+HEADERS += portaladmincontroller.h
+SOURCES += portaladmincontroller.cpp
+HEADERS += objectscontroller.h
+SOURCES += objectscontroller.cpp
+HEADERS += catclassescontroller.h
+SOURCES += catclassescontroller.cpp
+HEADERS += acclassescontroller.h
+SOURCES += acclassescontroller.cpp
+HEADERS += pcclassescontroller.h
+SOURCES += pcclassescontroller.cpp
+HEADERS += annexdatacontroller.h
+SOURCES += annexdatacontroller.cpp
+HEADERS += annexmetacontroller.h
+SOURCES += annexmetacontroller.cpp
+HEADERS += glossarcontroller.h
+SOURCES += glossarcontroller.cpp
+HEADERS += informationmailer.h
+SOURCES += informationmailer.cpp
+HEADERS += standardsdatacommentscontroller.h
+SOURCES += standardsdatacommentscontroller.cpp
+HEADERS += appvarscontroller.h
+SOURCES += appvarscontroller.cpp
+HEADERS += itisnewscontroller.h
+SOURCES += itisnewscontroller.cpp
+HEADERS += actionrightscontroller.h
+SOURCES += actionrightscontroller.cpp
+HEADERS += itisgroupscontroller.h
+SOURCES += itisgroupscontroller.cpp
+HEADERS += annexdatacommentscontroller.h
+SOURCES += annexdatacommentscontroller.cpp
+HEADERS += releasemgmtcontroller.h
+SOURCES += releasemgmtcontroller.cpp
+HEADERS += lenkinfocontroller.h
+SOURCES += lenkinfocontroller.cpp
diff --git a/controllers/glossarcontroller.cpp b/controllers/glossarcontroller.cpp
new file mode 100644
index 0000000..35b5aac
--- /dev/null
+++ b/controllers/glossarcontroller.cpp
@@ -0,0 +1,285 @@
+#include "glossarcontroller.h"
+#include "glossar.h"
+
+#include "itisuser.h"
+#include "itisgroups.h"
+#include "accountcontroller.h"
+#include "actionrights.h"
+
+void GlossarController::getAllJson()
+{
+ renderJson( Glossar::getAllJson() );
+}
+
+void GlossarController::getAllJsonSorted()
+{
+ renderJson( Glossar::getAllJsonSorted() );
+}
+
+void GlossarController::list_all()
+{
+ QString username = identityKeyOfLoginUser();
+ ItisUser user = ItisUser::getByIdentityKey(username);
+ if (!user.isNull())
+ {
+ auto conti = TActionController::name();
+ auto con = TActionController::activeAction();
+ QString uri = "/" + conti + "/" + con;
+
+ if(ActionRights::isInGroups(user.groups(), "r", uri))
+ {
+ auto glossarList = Glossar::getAll();
+ texport(glossarList);
+ render();
+ }
+ else
+ {
+ QString red_msg = " Not authorized to access the page or resource you were trying to reach.";
+ texport(red_msg);
+ render("index");
+ }
+ }
+ else
+ {
+ redirect(QUrl("/account/form"));
+ }
+}
+
+void GlossarController::list_allElectron()
+{
+ QString username = identityKeyOfLoginUser();
+ ItisUser user = ItisUser::getByIdentityKey(username);
+ if (!user.isNull())
+ {
+ auto conti = TActionController::name();
+ auto con = TActionController::activeAction();
+ QString uri = "/" + conti + "/" + con;
+
+ if(ActionRights::isInGroups(user.groups(), "r", uri))
+ {
+ auto glossarList = Glossar::getAll();
+ texport(glossarList);
+ render();
+ }
+ else
+ {
+ QString red_msg = " Not authorized to access the page or resource you were trying to reach.";
+ texport(red_msg);
+ render("index");
+ }
+ }
+ else
+ {
+ redirect(QUrl("/account/form"));
+ }
+}
+
+void GlossarController::index()
+{
+ QString username = identityKeyOfLoginUser();
+ ItisUser user = ItisUser::getByIdentityKey(username);
+ if (!user.isNull())
+ {
+ QMap qmapStat = Glossar::getStatistics();
+
+ QString glossar_count = qmapStat["glossar_count"];
+ QString de_terms = qmapStat["de_terms"];
+ QString en_terms = qmapStat["en_terms"];
+
+ texport(glossar_count);
+ texport(de_terms);
+ texport(en_terms);
+
+ auto glossarList = Glossar::getAll();
+ texport(glossarList);
+
+ render();
+ }
+ else
+ {
+ redirect(QUrl("/account/formElectron"));
+ }
+}
+
+void GlossarController::show(const QString &id)
+{
+ QString username = identityKeyOfLoginUser();
+ ItisUser user = ItisUser::getByIdentityKey(username);
+ if (!user.isNull())
+ {
+ auto conti = TActionController::name();
+ auto con = TActionController::activeAction();
+ QString uri = "/" + conti + "/" + con;
+
+ if(ActionRights::isInGroups(user.groups(), "r_d", uri))
+ {
+ auto glossar = Glossar::get(id.toInt());
+ texport(glossar);
+ render();
+ }
+ else
+ {
+ QString red_msg = " Not authorized to access the page or resource you were trying to reach.";
+ texport(red_msg);
+ render("index");
+ }
+ }
+ else
+ {
+ redirect(QUrl("/account/form"));
+ }
+}
+
+void GlossarController::create()
+{
+ QString username = identityKeyOfLoginUser();
+ ItisUser user = ItisUser::getByIdentityKey(username);
+ if (!user.isNull())
+ {
+ auto conti = TActionController::name();
+ auto con = TActionController::activeAction();
+ QString uri = "/" + conti + "/" + con;
+
+ if(ActionRights::isInGroups(user.groups(), "c", uri))
+ {
+ switch (httpRequest().method()) {
+ case Tf::Get:
+ render();
+ break;
+
+ case Tf::Post: {
+ auto glossar = httpRequest().formItems("glossar");
+ auto model = Glossar::create(glossar);
+
+ if (!model.isNull()) {
+ QString notice = "Created successfully.";
+ tflash(notice);
+ redirect(urla("show", model.id()));
+ } else {
+ QString error = "Failed to create.";
+ texport(error);
+ texport(glossar);
+ render();
+ }
+ break; }
+
+ default:
+ renderErrorResponse(Tf::NotFound);
+ break;
+ }
+ }
+ else
+ {
+ QString red_msg = " Not authorized to access the page or resource you were trying to reach.";
+ texport(red_msg);
+ render("index");
+ }
+ }
+ else
+ {
+ redirect(QUrl("/account/form"));
+ }
+}
+
+void GlossarController::save(const QString &id)
+{
+ QString username = identityKeyOfLoginUser();
+ ItisUser user = ItisUser::getByIdentityKey(username);
+ if (!user.isNull())
+ {
+ auto conti = TActionController::name();
+ auto con = TActionController::activeAction();
+ QString uri = "/" + conti + "/" + con;
+
+ if(ActionRights::isInGroups(user.groups(), "u", uri))
+ {
+ switch (httpRequest().method()) {
+ case Tf::Get: {
+ auto model = Glossar::get(id.toInt());
+ if (!model.isNull()) {
+ auto glossar = model.toVariantMap();
+ texport(glossar);
+ render();
+ }
+ break; }
+
+ case Tf::Post: {
+ QString error;
+ auto model = Glossar::get(id.toInt());
+
+ if (model.isNull()) {
+ error = "Original data not found. It may have been updated/removed by another transaction.";
+ tflash(error);
+ redirect(urla("save", id));
+ break;
+ }
+
+ auto glossar = httpRequest().formItems("glossar");
+ model.setProperties(glossar);
+ if (model.save()) {
+ QString notice = "Updated successfully.";
+ tflash(notice);
+ redirect(urla("show", model.id()));
+ } else {
+ error = "Failed to update.";
+ texport(error);
+ texport(glossar);
+ render();
+ }
+ break; }
+
+ default:
+ renderErrorResponse(Tf::NotFound);
+ break;
+ }
+ }
+ else
+ {
+ QString red_msg = " Not authorized to access the page or resource you were trying to reach.";
+ texport(red_msg);
+ render("index");
+ }
+ }
+ else
+ {
+ redirect(QUrl("/account/form"));
+ }
+}
+
+void GlossarController::remove(const QString &id)
+{
+ QString username = identityKeyOfLoginUser();
+ ItisUser user = ItisUser::getByIdentityKey(username);
+ if (!user.isNull())
+ {
+ auto conti = TActionController::name();
+ auto con = TActionController::activeAction();
+ QString uri = "/" + conti + "/" + con;
+
+ if(ActionRights::isInGroups(user.groups(), "d", uri))
+ {
+ if (httpRequest().method() != Tf::Post) {
+ renderErrorResponse(Tf::NotFound);
+ return;
+ }
+
+ auto glossar = Glossar::get(id.toInt());
+ glossar.remove();
+ redirect(urla("index"));
+ }
+ else
+ {
+ QString red_msg = " Not authorized to access the page or resource you were trying to reach.";
+ texport(red_msg);
+ render("index");
+ }
+ }
+ else
+ {
+ redirect(QUrl("/account/form"));
+ }
+}
+
+
+// Don't remove below this line
+T_DEFINE_CONTROLLER(GlossarController)
diff --git a/controllers/glossarcontroller.h b/controllers/glossarcontroller.h
new file mode 100644
index 0000000..e5e09e5
--- /dev/null
+++ b/controllers/glossarcontroller.h
@@ -0,0 +1,27 @@
+#ifndef GLOSSARCONTROLLER_H
+#define GLOSSARCONTROLLER_H
+
+#include "applicationcontroller.h"
+
+
+class T_CONTROLLER_EXPORT GlossarController : public ApplicationController
+{
+ Q_OBJECT
+public:
+ GlossarController() : ApplicationController() {}
+
+public slots:
+ void index();
+ void list_all();
+ void list_allElectron();
+
+ void getAllJson();
+ void getAllJsonSorted();
+
+ void show(const QString &id);
+ void create();
+ void save(const QString &id);
+ void remove(const QString &id);
+};
+
+#endif // GLOSSARCONTROLLER_H
diff --git a/controllers/informationmailer.cpp b/controllers/informationmailer.cpp
new file mode 100644
index 0000000..8afc02c
--- /dev/null
+++ b/controllers/informationmailer.cpp
@@ -0,0 +1,42 @@
+#include "informationmailer.h"
+
+
+void InformationMailer::preleaseInfo(const QString &username, const QString &id)
+{
+ texport(username);
+ texport(id);
+ deliver("preleaseInfo");
+}
+
+
+void InformationMailer::send()
+{
+ QString to = "zb_bamboo@live.de";
+ texport(to);
+ deliver("mail"); // ← mail.erb Mail sent by template
+}
+
+void InformationMailer::crUser(const QString &username)
+{
+ texport(username);
+ deliver("crUser");
+}
+
+void InformationMailer::crUserPwd(const QString &username, const QString &userpwd)
+{
+ texport(username);
+ texport(userpwd);
+ deliver("crUserPwd");
+}
+
+void InformationMailer::infoUserPwd(const QString &username)
+{
+ texport(username);
+ deliver("infoUserPwd");
+}
+
+void InformationMailer::regUserAdmInfo(const QString &username)
+{
+ texport(username);
+ deliver("regUserAdmInfo");
+}
diff --git a/controllers/informationmailer.h b/controllers/informationmailer.h
new file mode 100644
index 0000000..53066d8
--- /dev/null
+++ b/controllers/informationmailer.h
@@ -0,0 +1,20 @@
+#ifndef INFORMATIONMAILER_H
+#define INFORMATIONMAILER_H
+
+#include
+
+
+class InformationMailer : public TActionMailer
+{
+public:
+ InformationMailer() { }
+ void send();
+ void crUser(const QString &username);
+ void crUserPwd(const QString &username, const QString &userpwd);
+ void infoUserPwd(const QString &username);
+ void regUserAdmInfo(const QString &username);
+
+ void preleaseInfo(const QString &username, const QString &id);
+};
+
+#endif // INFORMATIONMAILER_H
diff --git a/controllers/itisgroupscontroller.cpp b/controllers/itisgroupscontroller.cpp
new file mode 100644
index 0000000..f2061bb
--- /dev/null
+++ b/controllers/itisgroupscontroller.cpp
@@ -0,0 +1,232 @@
+#include "itisgroupscontroller.h"
+
+#include "itisuser.h"
+#include "itisgroups.h"
+#include "accountcontroller.h"
+#include "actionrights.h"
+
+void ItisGroupsController::list_all()
+{
+ QString username = identityKeyOfLoginUser();
+ ItisUser user = ItisUser::getByIdentityKey(username);
+ if (!user.isNull())
+ {
+ auto conti = TActionController::name();
+ auto con = TActionController::activeAction();
+ QString uri = "/" + conti + "/" + con;
+
+ if(ActionRights::isInGroups(user.groups(), "r", uri))
+ {
+ auto itisGroupsList = ItisGroups::getAll();
+ texport(itisGroupsList);
+ render();
+ }
+ else
+ {
+ QString red_msg = " Not authorized to access the page or resource you were trying to reach.";
+ texport(red_msg);
+ render("index");
+ }
+ }
+ else
+ {
+ redirect(QUrl("/account/form"));
+ }
+}
+
+void ItisGroupsController::index()
+{
+ QString username = identityKeyOfLoginUser();
+ ItisUser user = ItisUser::getByIdentityKey(username);
+ if (!user.isNull())
+ {
+ render();
+ }
+ else
+ {
+ redirect(QUrl("/account/form"));
+ }
+}
+
+void ItisGroupsController::show(const QString &id)
+{
+ QString username = identityKeyOfLoginUser();
+ ItisUser user = ItisUser::getByIdentityKey(username);
+ if (!user.isNull())
+ {
+ auto conti = TActionController::name();
+ auto con = TActionController::activeAction();
+ QString uri = "/" + conti + "/" + con;
+
+ if(ActionRights::isInGroups(user.groups(), "r_d", uri))
+ {
+ auto itisGroups = ItisGroups::get(id.toInt());
+ texport(itisGroups);
+ render();
+ }
+ else
+ {
+ QString red_msg = " Not authorized to access the page or resource you were trying to reach.";
+ texport(red_msg);
+ render("index");
+ }
+ }
+ else
+ {
+ redirect(QUrl("/account/form"));
+ }
+}
+
+void ItisGroupsController::create()
+{
+ QString username = identityKeyOfLoginUser();
+ ItisUser user = ItisUser::getByIdentityKey(username);
+ if (!user.isNull())
+ {
+ auto conti = TActionController::name();
+ auto con = TActionController::activeAction();
+ QString uri = "/" + conti + "/" + con;
+
+ if(ActionRights::isInGroups(user.groups(), "c", uri))
+ {
+ switch (httpRequest().method()) {
+ case Tf::Get:
+ render();
+ break;
+
+ case Tf::Post: {
+ auto itisGroups = httpRequest().formItems("itisGroups");
+ auto model = ItisGroups::create(itisGroups);
+
+ if (!model.isNull()) {
+ QString notice = "Created successfully.";
+ tflash(notice);
+ redirect(urla("show", model.id()));
+ } else {
+ QString error = "Failed to create.";
+ texport(error);
+ texport(itisGroups);
+ render();
+ }
+ break; }
+
+ default:
+ renderErrorResponse(Tf::NotFound);
+ break;
+ }
+ }
+ else
+ {
+ QString red_msg = " Not authorized to access the page or resource you were trying to reach.";
+ texport(red_msg);
+ render("index");
+ }
+ }
+ else
+ {
+ redirect(QUrl("/account/form"));
+ }
+}
+
+void ItisGroupsController::save(const QString &id)
+{
+ QString username = identityKeyOfLoginUser();
+ ItisUser user = ItisUser::getByIdentityKey(username);
+ if (!user.isNull())
+ {
+ auto conti = TActionController::name();
+ auto con = TActionController::activeAction();
+ QString uri = "/" + conti + "/" + con;
+
+ if(ActionRights::isInGroups(user.groups(), "u", uri))
+ {
+ switch (httpRequest().method()) {
+ case Tf::Get: {
+ auto model = ItisGroups::get(id.toInt());
+ if (!model.isNull()) {
+ auto itisGroups = model.toVariantMap();
+ texport(itisGroups);
+ render();
+ }
+ break; }
+
+ case Tf::Post: {
+ QString error;
+ auto model = ItisGroups::get(id.toInt());
+
+ if (model.isNull()) {
+ error = "Original data not found. It may have been updated/removed by another transaction.";
+ tflash(error);
+ redirect(urla("save", id));
+ break;
+ }
+
+ auto itisGroups = httpRequest().formItems("itisGroups");
+ model.setProperties(itisGroups);
+ if (model.save()) {
+ QString notice = "Updated successfully.";
+ tflash(notice);
+ redirect(urla("show", model.id()));
+ } else {
+ error = "Failed to update.";
+ texport(error);
+ texport(itisGroups);
+ render();
+ }
+ break; }
+
+ default:
+ renderErrorResponse(Tf::NotFound);
+ break;
+ }
+ }
+ else
+ {
+ QString red_msg = " Not authorized to access the page or resource you were trying to reach.";
+ texport(red_msg);
+ render("index");
+ }
+ }
+ else
+ {
+ redirect(QUrl("/account/form"));
+ }
+}
+
+void ItisGroupsController::remove(const QString &id)
+{
+ QString username = identityKeyOfLoginUser();
+ ItisUser user = ItisUser::getByIdentityKey(username);
+ if (!user.isNull())
+ {
+ auto conti = TActionController::name();
+ auto con = TActionController::activeAction();
+ QString uri = "/" + conti + "/" + con;
+
+ if(ActionRights::isInGroups(user.groups(), "d", uri))
+ {
+ if (httpRequest().method() != Tf::Post) {
+ renderErrorResponse(Tf::NotFound);
+ return;
+ }
+
+ auto itisGroups = ItisGroups::get(id.toInt());
+ itisGroups.remove();
+ redirect(urla("index"));
+ }
+ else
+ {
+ QString red_msg = " Not authorized to access the page or resource you were trying to reach.";
+ texport(red_msg);
+ render("index");
+ }
+ }
+ else
+ {
+ redirect(QUrl("/account/form"));
+ }
+}
+
+
+// Don't remove below this line
+T_DEFINE_CONTROLLER(ItisGroupsController)
diff --git a/controllers/itisgroupscontroller.h b/controllers/itisgroupscontroller.h
new file mode 100644
index 0000000..c91d596
--- /dev/null
+++ b/controllers/itisgroupscontroller.h
@@ -0,0 +1,23 @@
+#ifndef ITISGROUPSCONTROLLER_H
+#define ITISGROUPSCONTROLLER_H
+
+#include "applicationcontroller.h"
+
+
+class T_CONTROLLER_EXPORT ItisGroupsController : public ApplicationController
+{
+ Q_OBJECT
+public:
+ ItisGroupsController() : ApplicationController() {}
+
+public slots:
+ void index();
+ void list_all();
+
+ void show(const QString &id);
+ void create();
+ void save(const QString &id);
+ void remove(const QString &id);
+};
+
+#endif // ITISGROUPSCONTROLLER_H
diff --git a/controllers/itisnewscontroller.cpp b/controllers/itisnewscontroller.cpp
new file mode 100644
index 0000000..c3dfa7c
--- /dev/null
+++ b/controllers/itisnewscontroller.cpp
@@ -0,0 +1,242 @@
+#include "itisnewscontroller.h"
+#include "itisnews.h"
+
+#include "itisuser.h"
+#include "itisgroups.h"
+#include "accountcontroller.h"
+#include "actionrights.h"
+
+void ItisNewsController::list_all()
+{
+ QString username = identityKeyOfLoginUser();
+ ItisUser user = ItisUser::getByIdentityKey(username);
+ if (!user.isNull())
+ {
+ auto conti = TActionController::name();
+ auto con = TActionController::activeAction();
+ QString uri = "/" + conti + "/" + con;
+
+ if(ActionRights::isInGroups(user.groups(), "r", uri))
+ {
+ auto itisNewsList = ItisNews::getAll();
+ texport(itisNewsList);
+ render();
+ }
+ else
+ {
+ QString red_msg = " Not authorized to access the page or resource you were trying to reach.";
+ texport(red_msg);
+ render("index");
+ }
+ }
+ else
+ {
+ redirect(QUrl("/account/form"));
+ }
+}
+
+void ItisNewsController::index()
+{
+ QString username = identityKeyOfLoginUser();
+ ItisUser user = ItisUser::getByIdentityKey(username);
+ if (!user.isNull())
+ {
+ render();
+ }
+ else
+ {
+ redirect(QUrl("/account/form"));
+ }
+}
+
+void ItisNewsController::indexElectron()
+{
+ render();
+}
+
+void ItisNewsController::show(const QString &id)
+{
+ QString username = identityKeyOfLoginUser();
+ ItisUser user = ItisUser::getByIdentityKey(username);
+ if (!user.isNull())
+ {
+ auto conti = TActionController::name();
+ auto con = TActionController::activeAction();
+ QString uri = "/" + conti + "/" + con;
+
+ if(ActionRights::isInGroups(user.groups(), "r_d", uri))
+ {
+ auto itisNews = ItisNews::get(id.toInt());
+ texport(itisNews);
+ render();
+ }
+ else
+ {
+ QString red_msg = " Not authorized to access the page or resource you were trying to reach.";
+ texport(red_msg);
+ render("index");
+ }
+ }
+ else
+ {
+ redirect(QUrl("/account/form"));
+ }
+}
+
+void ItisNewsController::create()
+{
+ QString username = identityKeyOfLoginUser();
+ ItisUser user = ItisUser::getByIdentityKey(username);
+ if (!user.isNull())
+ {
+ auto conti = TActionController::name();
+ auto con = TActionController::activeAction();
+ QString uri = "/" + conti + "/" + con;
+
+ if(ActionRights::isInGroups(user.groups(), "c", uri))
+ {
+ switch (httpRequest().method()) {
+ case Tf::Get:
+ {
+ QString usermail = user.email();
+ texport(usermail);
+ render();
+ break;
+ }
+
+ case Tf::Post: {
+ auto itisNews = httpRequest().formItems("itisNews");
+ auto model = ItisNews::create(itisNews);
+
+ if (!model.isNull()) {
+ QString notice = "Created successfully.";
+ tflash(notice);
+ redirect(urla("show", model.id()));
+ } else {
+ QString error = "Failed to create.";
+ texport(error);
+ texport(itisNews);
+ render();
+ }
+ break; }
+
+ default:
+ renderErrorResponse(Tf::NotFound);
+ break;
+ }
+ }
+ else
+ {
+ QString red_msg = " Not authorized to access the page or resource you were trying to reach.";
+ texport(red_msg);
+ render("index");
+ }
+ }
+ else
+ {
+ redirect(QUrl("/account/form"));
+ }
+}
+
+void ItisNewsController::save(const QString &id)
+{
+ QString username = identityKeyOfLoginUser();
+ ItisUser user = ItisUser::getByIdentityKey(username);
+ if (!user.isNull())
+ {
+ auto conti = TActionController::name();
+ auto con = TActionController::activeAction();
+ QString uri = "/" + conti + "/" + con;
+
+ if(ActionRights::isInGroups(user.groups(), "u", uri))
+ {
+ switch (httpRequest().method()) {
+ case Tf::Get: {
+ auto model = ItisNews::get(id.toInt());
+ if (!model.isNull()) {
+ auto itisNews = model.toVariantMap();
+ texport(itisNews);
+ render();
+ }
+ break; }
+
+ case Tf::Post: {
+ QString error;
+ auto model = ItisNews::get(id.toInt());
+
+ if (model.isNull()) {
+ error = "Original data not found. It may have been updated/removed by another transaction.";
+ tflash(error);
+ redirect(urla("save", id));
+ break;
+ }
+
+ auto itisNews = httpRequest().formItems("itisNews");
+ model.setProperties(itisNews);
+ if (model.save()) {
+ QString notice = "Updated successfully.";
+ tflash(notice);
+ redirect(urla("show", model.id()));
+ } else {
+ error = "Failed to update.";
+ texport(error);
+ texport(itisNews);
+ render();
+ }
+ break; }
+
+ default:
+ renderErrorResponse(Tf::NotFound);
+ break;
+ }
+ }
+ else
+ {
+ QString red_msg = " Not authorized to access the page or resource you were trying to reach.";
+ texport(red_msg);
+ render("index");
+ }
+ }
+ else
+ {
+ redirect(QUrl("/account/form"));
+ }
+}
+
+void ItisNewsController::remove(const QString &id)
+{
+ QString username = identityKeyOfLoginUser();
+ ItisUser user = ItisUser::getByIdentityKey(username);
+ if (!user.isNull())
+ {
+ auto conti = TActionController::name();
+ auto con = TActionController::activeAction();
+ QString uri = "/" + conti + "/" + con;
+
+ if(ActionRights::isInGroups(user.groups(), "d", uri))
+ {
+ if (httpRequest().method() != Tf::Post) {
+ renderErrorResponse(Tf::NotFound);
+ return;
+ }
+
+ auto itisNews = ItisNews::get(id.toInt());
+ itisNews.remove();
+ redirect(urla("index"));
+ }
+ else
+ {
+ QString red_msg = " Not authorized to access the page or resource you were trying to reach.";
+ texport(red_msg);
+ render("index");
+ }
+ }
+ else
+ {
+ redirect(QUrl("/account/form"));
+ }
+}
+
+
+// Don't remove below this line
+T_DEFINE_CONTROLLER(ItisNewsController)
diff --git a/controllers/itisnewscontroller.h b/controllers/itisnewscontroller.h
new file mode 100644
index 0000000..3c2c6c3
--- /dev/null
+++ b/controllers/itisnewscontroller.h
@@ -0,0 +1,24 @@
+#ifndef ITISNEWSCONTROLLER_H
+#define ITISNEWSCONTROLLER_H
+
+#include "applicationcontroller.h"
+
+
+class T_CONTROLLER_EXPORT ItisNewsController : public ApplicationController
+{
+ Q_OBJECT
+public:
+ ItisNewsController() : ApplicationController() {}
+
+public slots:
+ void index();
+ void indexElectron();
+ void list_all();
+
+ void show(const QString &id);
+ void create();
+ void save(const QString &id);
+ void remove(const QString &id);
+};
+
+#endif // ITISNEWSCONTROLLER_H
diff --git a/controllers/lenkinfocontroller.cpp b/controllers/lenkinfocontroller.cpp
new file mode 100644
index 0000000..0c76e97
--- /dev/null
+++ b/controllers/lenkinfocontroller.cpp
@@ -0,0 +1,318 @@
+#include "lenkinfocontroller.h"
+#include "lenkinfo.h"
+
+#include "itisuser.h"
+#include "itisgroups.h"
+#include "accountcontroller.h"
+#include "actionrights.h"
+
+void LenkinfoController::getJson()
+{
+ QString username = identityKeyOfLoginUser();
+ ItisUser user = ItisUser::getByIdentityKey(username);
+ if (!user.isNull())
+ {
+ auto conti = TActionController::name();
+ auto con = TActionController::activeAction();
+ QString uri = "/" + conti + "/" + con;
+
+ if(ActionRights::isInGroups(user.groups(), "r", uri))
+ {
+ QMap stdDataMap;
+ stdDataMap["spec_obj"] = httpRequest().formItemValue("spec_obj");
+ stdDataMap["ac_class"] = httpRequest().formItemValue("ac_class");
+ stdDataMap["pc_class"] = httpRequest().formItemValue("pc_class");
+ stdDataMap["country"] = httpRequest().formItemValue("country");
+ stdDataMap["lang"] = httpRequest().formItemValue("lang");
+
+ /*
+ stdDataMap["spec_obj"] = "Annex B-2";
+ stdDataMap["ac_class"] = "1";
+ stdDataMap["pc_class"] = "1";
+ stdDataMap["country"] = "WW";
+ stdDataMap["lang"] = "de_DE";
+ */
+ renderJson( Lenkinfo::getJson(stdDataMap) );
+ }
+ else
+ {
+ QString red_msg = " Not authorized to access the page or resource you were trying to reach. " + uri;
+ texport(red_msg);
+ render("index");
+ }
+ }
+ else
+ {
+ redirect(QUrl("/account/form"));
+ }
+}
+
+void LenkinfoController::list_all()
+{
+ QString username = identityKeyOfLoginUser();
+ ItisUser user = ItisUser::getByIdentityKey(username);
+ if (!user.isNull())
+ {
+ auto conti = TActionController::name();
+ auto con = TActionController::activeAction();
+ QString uri = "/" + conti + "/" + con;
+
+ if(ActionRights::isInGroups(user.groups(), "r", uri))
+ {
+ auto lenkinfoList = Lenkinfo::getAll();
+ texport(lenkinfoList);
+ render();
+ }
+ else
+ {
+ QString red_msg = " Not authorized to access the page or resource you were trying to reach.";
+ texport(red_msg);
+ render("index");
+ }
+ }
+ else
+ {
+ redirect(QUrl("/account/form"));
+ }
+}
+
+void LenkinfoController::index()
+{
+ render();
+}
+
+void LenkinfoController::show(const QString &id)
+{
+ QString username = identityKeyOfLoginUser();
+ ItisUser user = ItisUser::getByIdentityKey(username);
+ if (!user.isNull())
+ {
+ auto conti = TActionController::name();
+ auto con = TActionController::activeAction();
+ QString uri = "/" + conti + "/" + con;
+
+ if(ActionRights::isInGroups(user.groups(), "r_d", uri))
+ {
+ auto lenkinfo = Lenkinfo::get(id.toInt());
+ texport(lenkinfo);
+ render();
+ }
+ else
+ {
+ QString red_msg = " Not authorized to access the page or resource you were trying to reach.";
+ texport(red_msg);
+ render("index");
+ }
+ }
+ else
+ {
+ redirect(QUrl("/account/form"));
+ }
+}
+
+void LenkinfoController::create_silent()
+{
+ QString username = identityKeyOfLoginUser();
+ ItisUser user = ItisUser::getByIdentityKey(username);
+ if (!user.isNull())
+ {
+ auto conti = TActionController::name();
+ auto con = TActionController::activeAction();
+ QString uri = "/" + conti + "/" + con;
+
+ if(ActionRights::isInGroups(user.groups(), "c", uri))
+ {
+ switch (httpRequest().method()) {
+ case Tf::Get:
+ render("save");
+ break;
+
+ case Tf::Post: {
+ auto lenkinfo = httpRequest().formItems("lenkinfo");
+ auto model = Lenkinfo::create(lenkinfo);
+
+ if (!model.isNull()) {
+ QString id = httpRequest().formItemValue("release_id");
+ QString notice = "Lenkungsinformation angelegt.";
+ tflash(notice);
+ redirect(QUrl("/releasemgmt/save/" + id + "?show"));
+ //redirect(urla("/releasemgmt/save/", id));
+ } else {
+ QString error = "Failed to create.";
+ texport(error);
+ texport(lenkinfo);
+ render();
+ }
+ break; }
+
+ default:
+ renderErrorResponse(Tf::NotFound);
+ break;
+ }
+ }
+ else
+ {
+ QString red_msg = " Not authorized to access the page or resource you were trying to reach.";
+ texport(red_msg);
+ render("index");
+ }
+ }
+ else
+ {
+ redirect(QUrl("/account/form"));
+ }
+}
+
+void LenkinfoController::create()
+{
+ QString username = identityKeyOfLoginUser();
+ ItisUser user = ItisUser::getByIdentityKey(username);
+ if (!user.isNull())
+ {
+ auto conti = TActionController::name();
+ auto con = TActionController::activeAction();
+ QString uri = "/" + conti + "/" + con;
+
+ if(ActionRights::isInGroups(user.groups(), "c", uri))
+ {
+ switch (httpRequest().method()) {
+ case Tf::Get:
+ render();
+ break;
+
+ case Tf::Post: {
+ auto lenkinfo = httpRequest().formItems("lenkinfo");
+ auto model = Lenkinfo::create(lenkinfo);
+
+ if (!model.isNull()) {
+ QString notice = "Created successfully.";
+ tflash(notice);
+ redirect(urla("show", model.id()));
+ } else {
+ QString error = "Failed to create.";
+ texport(error);
+ texport(lenkinfo);
+ render();
+ }
+ break; }
+
+ default:
+ renderErrorResponse(Tf::NotFound);
+ break;
+ }
+ }
+ else
+ {
+ QString red_msg = " Not authorized to access the page or resource you were trying to reach.";
+ texport(red_msg);
+ render("index");
+ }
+ }
+ else
+ {
+ redirect(QUrl("/account/form"));
+ }
+}
+
+void LenkinfoController::save(const QString &id)
+{
+ QString username = identityKeyOfLoginUser();
+ ItisUser user = ItisUser::getByIdentityKey(username);
+ if (!user.isNull())
+ {
+ auto conti = TActionController::name();
+ auto con = TActionController::activeAction();
+ QString uri = "/" + conti + "/" + con;
+
+ if(ActionRights::isInGroups(user.groups(), "u", uri))
+ {
+ switch (httpRequest().method()) {
+ case Tf::Get: {
+ auto model = Lenkinfo::get(id.toInt());
+ if (!model.isNull()) {
+ auto lenkinfo = model.toVariantMap();
+ texport(lenkinfo);
+ render();
+ }
+ break; }
+
+ case Tf::Post: {
+ QString error;
+ auto model = Lenkinfo::get(id.toInt());
+
+ if (model.isNull()) {
+ error = "Original data not found. It may have been updated/removed by another transaction.";
+ tflash(error);
+ redirect(urla("save", id));
+ break;
+ }
+
+ auto lenkinfo = httpRequest().formItems("lenkinfo");
+ model.setProperties(lenkinfo);
+ if (model.save()) {
+ QString notice = "Updated successfully.";
+ tflash(notice);
+ redirect(urla("show", model.id()));
+ } else {
+ error = "Failed to update.";
+ texport(error);
+ texport(lenkinfo);
+ render();
+ }
+ break; }
+
+ default:
+ renderErrorResponse(Tf::NotFound);
+ break;
+ }
+ }
+ else
+ {
+ QString red_msg = " Not authorized to access the page or resource you were trying to reach.";
+ texport(red_msg);
+ render("index");
+ }
+ }
+ else
+ {
+ redirect(QUrl("/account/form"));
+ }
+}
+
+void LenkinfoController::remove(const QString &id)
+{
+ QString username = identityKeyOfLoginUser();
+ ItisUser user = ItisUser::getByIdentityKey(username);
+ if (!user.isNull())
+ {
+ auto conti = TActionController::name();
+ auto con = TActionController::activeAction();
+ QString uri = "/" + conti + "/" + con;
+
+ if(ActionRights::isInGroups(user.groups(), "d", uri))
+ {
+ if (httpRequest().method() != Tf::Post) {
+ renderErrorResponse(Tf::NotFound);
+ return;
+ }
+
+ auto lenkinfo = Lenkinfo::get(id.toInt());
+ lenkinfo.remove();
+ redirect(urla("index"));
+ }
+ else
+ {
+ QString red_msg = " Not authorized to access the page or resource you were trying to reach.";
+ texport(red_msg);
+ render("index");
+ }
+ }
+ else
+ {
+ redirect(QUrl("/account/form"));
+ }
+}
+
+
+// Don't remove below this line
+T_DEFINE_CONTROLLER(LenkinfoController)
diff --git a/controllers/lenkinfocontroller.h b/controllers/lenkinfocontroller.h
new file mode 100644
index 0000000..611b641
--- /dev/null
+++ b/controllers/lenkinfocontroller.h
@@ -0,0 +1,26 @@
+#ifndef LENKINFOCONTROLLER_H
+#define LENKINFOCONTROLLER_H
+
+#include "applicationcontroller.h"
+
+
+class T_CONTROLLER_EXPORT LenkinfoController : public ApplicationController
+{
+ Q_OBJECT
+public:
+ LenkinfoController() : ApplicationController() {}
+
+public slots:
+ void index();
+ void list_all();
+
+ void show(const QString &id);
+ void create();
+ void create_silent();
+ void save(const QString &id);
+ void remove(const QString &id);
+
+ void getJson();
+};
+
+#endif // LENKINFOCONTROLLER_H
diff --git a/controllers/objectscontroller.cpp b/controllers/objectscontroller.cpp
new file mode 100644
index 0000000..efd06c7
--- /dev/null
+++ b/controllers/objectscontroller.cpp
@@ -0,0 +1,248 @@
+#include "objectscontroller.h"
+#include "objects.h"
+
+#include "itisuser.h"
+#include "itisgroups.h"
+#include "accountcontroller.h"
+#include "actionrights.h"
+
+void ObjectsController::list_all()
+{
+ QString username = identityKeyOfLoginUser();
+ ItisUser user = ItisUser::getByIdentityKey(username);
+ if (!user.isNull())
+ {
+ auto conti = TActionController::name();
+ auto con = TActionController::activeAction();
+ QString uri = "/" + conti + "/" + con;
+
+ if(ActionRights::isInGroups(user.groups(), "r", uri))
+ {
+ auto objectsList = Objects::getAll();
+ texport(objectsList);
+ render();
+ }
+ else
+ {
+ QString red_msg = " Not authorized to access the page or resource you were trying to reach.";
+ texport(red_msg);
+ render("index");
+ }
+ }
+ else
+ {
+ redirect(QUrl("/account/form"));
+ }
+}
+
+void ObjectsController::index()
+{
+ QString username = identityKeyOfLoginUser();
+ ItisUser user = ItisUser::getByIdentityKey(username);
+ if (!user.isNull())
+ {
+ render();
+ }
+ else
+ {
+ redirect(QUrl("/account/form"));
+ }
+}
+
+void ObjectsController::getAllJson(const QString &active, QString strGroups)
+{
+ renderJson( Objects::getAllJson( active, strGroups ) );
+}
+
+void ObjectsController::getAllJson(const QString &active)
+{
+ renderJson( Objects::getAllJson(active) );
+}
+
+void ObjectsController::getAllJson()
+{
+ renderJson( Objects::getAllJson() );
+}
+
+void ObjectsController::show(const QString &id)
+{
+ QString username = identityKeyOfLoginUser();
+ ItisUser user = ItisUser::getByIdentityKey(username);
+ if (!user.isNull())
+ {
+ auto conti = TActionController::name();
+ auto con = TActionController::activeAction();
+ QString uri = "/" + conti + "/" + con;
+
+ if(ActionRights::isInGroups(user.groups(), "r_d", uri))
+ {
+ auto objects = Objects::get(id.toInt());
+ texport(objects);
+ render();
+ }
+ else
+ {
+ QString red_msg = " Not authorized to access the page or resource you were trying to reach.";
+ texport(red_msg);
+ render("index");
+ }
+ }
+ else
+ {
+ redirect(QUrl("/account/form"));
+ }
+}
+
+void ObjectsController::create()
+{
+ QString username = identityKeyOfLoginUser();
+ ItisUser user = ItisUser::getByIdentityKey(username);
+ if (!user.isNull())
+ {
+ auto conti = TActionController::name();
+ auto con = TActionController::activeAction();
+ QString uri = "/" + conti + "/" + con;
+
+ if(ActionRights::isInGroups(user.groups(), "c", uri))
+ {
+ switch (httpRequest().method()) {
+ case Tf::Get:
+ render();
+ break;
+
+ case Tf::Post: {
+ auto objects = httpRequest().formItems("objects");
+ auto model = Objects::create(objects);
+
+ if (!model.isNull()) {
+ QString notice = "Created successfully.";
+ tflash(notice);
+ redirect(urla("show", model.id()));
+ } else {
+ QString error = "Failed to create.";
+ texport(error);
+ texport(objects);
+ render();
+ }
+ break; }
+
+ default:
+ renderErrorResponse(Tf::NotFound);
+ break;
+ }
+ }
+ else
+ {
+ QString red_msg = " Not authorized to access the page or resource you were trying to reach.";
+ texport(red_msg);
+ render("index");
+ }
+ }
+ else
+ {
+ redirect(QUrl("/account/form"));
+ }
+}
+
+void ObjectsController::save(const QString &id)
+{
+ QString username = identityKeyOfLoginUser();
+ ItisUser user = ItisUser::getByIdentityKey(username);
+ if (!user.isNull())
+ {
+ auto conti = TActionController::name();
+ auto con = TActionController::activeAction();
+ QString uri = "/" + conti + "/" + con;
+
+ if(ActionRights::isInGroups(user.groups(), "u", uri))
+ {
+ switch (httpRequest().method()) {
+ case Tf::Get: {
+ auto model = Objects::get(id.toInt());
+ if (!model.isNull()) {
+ auto objects = model.toVariantMap();
+ texport(objects);
+ render();
+ }
+ break; }
+
+ case Tf::Post: {
+ QString error;
+ auto model = Objects::get(id.toInt());
+
+ if (model.isNull()) {
+ error = "Original data not found. It may have been updated/removed by another transaction.";
+ tflash(error);
+ redirect(urla("save", id));
+ break;
+ }
+
+ auto objects = httpRequest().formItems("objects");
+ model.setProperties(objects);
+ if (model.save()) {
+ QString notice = "Updated successfully.";
+ tflash(notice);
+ redirect(urla("show", model.id()));
+ } else {
+ error = "Failed to update.";
+ texport(error);
+ texport(objects);
+ render();
+ }
+ break; }
+
+ default:
+ renderErrorResponse(Tf::NotFound);
+ break;
+ }
+ }
+ else
+ {
+ QString red_msg = " Not authorized to access the page or resource you were trying to reach.";
+ texport(red_msg);
+ render("index");
+ }
+ }
+ else
+ {
+ redirect(QUrl("/account/form"));
+ }
+}
+
+void ObjectsController::remove(const QString &id)
+{
+ QString username = identityKeyOfLoginUser();
+ ItisUser user = ItisUser::getByIdentityKey(username);
+ if (!user.isNull())
+ {
+ auto conti = TActionController::name();
+ auto con = TActionController::activeAction();
+ QString uri = "/" + conti + "/" + con;
+
+ if(ActionRights::isInGroups(user.groups(), "d", uri))
+ {
+ if (httpRequest().method() != Tf::Post) {
+ renderErrorResponse(Tf::NotFound);
+ return;
+ }
+
+ auto objects = Objects::get(id.toInt());
+ objects.remove();
+ redirect(urla("index"));
+ }
+ else
+ {
+ QString red_msg = " Not authorized to access the page or resource you were trying to reach.";
+ texport(red_msg);
+ render("index");
+ }
+ }
+ else
+ {
+ redirect(QUrl("/account/form"));
+ }
+}
+
+
+// Don't remove below this line
+T_DEFINE_CONTROLLER(ObjectsController)
diff --git a/controllers/objectscontroller.h b/controllers/objectscontroller.h
new file mode 100644
index 0000000..352d8af
--- /dev/null
+++ b/controllers/objectscontroller.h
@@ -0,0 +1,27 @@
+#ifndef OBJECTSCONTROLLER_H
+#define OBJECTSCONTROLLER_H
+
+#include "applicationcontroller.h"
+
+
+class T_CONTROLLER_EXPORT ObjectsController : public ApplicationController
+{
+ Q_OBJECT
+public:
+ ObjectsController() : ApplicationController() {}
+
+public slots:
+ void index();
+ void list_all();
+
+ void getAllJson();
+ void getAllJson(const QString &active);
+ void getAllJson(const QString &active, QString strGroups);
+
+ void show(const QString &id);
+ void create();
+ void save(const QString &id);
+ void remove(const QString &id);
+};
+
+#endif // OBJECTSCONTROLLER_H
diff --git a/controllers/pcclassescontroller.cpp b/controllers/pcclassescontroller.cpp
new file mode 100644
index 0000000..82afe96
--- /dev/null
+++ b/controllers/pcclassescontroller.cpp
@@ -0,0 +1,251 @@
+#include "pcclassescontroller.h"
+#include "pcclasses.h"
+
+#include "itisuser.h"
+#include "itisgroups.h"
+#include "accountcontroller.h"
+#include "actionrights.h"
+
+void PcClassesController::getObjPcJson()
+{
+ QString obj = httpRequest().queryItemValue("obj");
+ QString strActive = httpRequest().queryItemValue("active");
+ int active = 1;
+
+ if(strActive.compare("0") == 0)
+ {
+ active = 0;
+ }
+ renderJson( PcClasses::getObjPcJson(obj, active) );
+}
+
+void PcClassesController::getPcClassesJson()
+{
+ renderJson( PcClasses::getPcClassesJson() );
+}
+
+void PcClassesController::list_all()
+{
+ QString username = identityKeyOfLoginUser();
+ ItisUser user = ItisUser::getByIdentityKey(username);
+ if (!user.isNull())
+ {
+ auto conti = TActionController::name();
+ auto con = TActionController::activeAction();
+ QString uri = "/" + conti + "/" + con;
+
+ if(ActionRights::isInGroups(user.groups(), "r", uri))
+ {
+ auto pcClassesList = PcClasses::getAll();
+ texport(pcClassesList);
+ render();
+ }
+ else
+ {
+ QString red_msg = " Not authorized to access the page or resource you were trying to reach.";
+ texport(red_msg);
+ render("index");
+ }
+ }
+ else
+ {
+ redirect(QUrl("/account/form"));
+ }
+}
+
+void PcClassesController::index()
+{
+ QString username = identityKeyOfLoginUser();
+ ItisUser user = ItisUser::getByIdentityKey(username);
+ if (!user.isNull())
+ {
+ render();
+ }
+ else
+ {
+ redirect(QUrl("/account/form"));
+ }
+}
+
+void PcClassesController::show(const QString &id)
+{
+ QString username = identityKeyOfLoginUser();
+ ItisUser user = ItisUser::getByIdentityKey(username);
+ if (!user.isNull())
+ {
+ auto conti = TActionController::name();
+ auto con = TActionController::activeAction();
+ QString uri = "/" + conti + "/" + con;
+
+ if(ActionRights::isInGroups(user.groups(), "r_d", uri))
+ {
+ auto pcClasses = PcClasses::get(id.toInt());
+ texport(pcClasses);
+ render();
+ }
+ else
+ {
+ QString red_msg = " Not authorized to access the page or resource you were trying to reach.";
+ texport(red_msg);
+ render("index");
+ }
+ }
+ else
+ {
+ redirect(QUrl("/account/form"));
+ }
+}
+
+void PcClassesController::create()
+{
+ QString username = identityKeyOfLoginUser();
+ ItisUser user = ItisUser::getByIdentityKey(username);
+ if (!user.isNull())
+ {
+ auto conti = TActionController::name();
+ auto con = TActionController::activeAction();
+ QString uri = "/" + conti + "/" + con;
+
+ if(ActionRights::isInGroups(user.groups(), "c", uri))
+ {
+ switch (httpRequest().method()) {
+ case Tf::Get:
+ render();
+ break;
+
+ case Tf::Post: {
+ auto pcClasses = httpRequest().formItems("pcClasses");
+ auto model = PcClasses::create(pcClasses);
+
+ if (!model.isNull()) {
+ QString notice = "Created successfully.";
+ tflash(notice);
+ redirect(urla("show", model.id()));
+ } else {
+ QString error = "Failed to create.";
+ texport(error);
+ texport(pcClasses);
+ render();
+ }
+ break; }
+
+ default:
+ renderErrorResponse(Tf::NotFound);
+ break;
+ }
+ }
+ else
+ {
+ QString red_msg = " Not authorized to access the page or resource you were trying to reach.";
+ texport(red_msg);
+ render("index");
+ }
+ }
+ else
+ {
+ redirect(QUrl("/account/form"));
+ }
+}
+
+void PcClassesController::save(const QString &id)
+{
+ QString username = identityKeyOfLoginUser();
+ ItisUser user = ItisUser::getByIdentityKey(username);
+ if (!user.isNull())
+ {
+ auto conti = TActionController::name();
+ auto con = TActionController::activeAction();
+ QString uri = "/" + conti + "/" + con;
+
+ if(ActionRights::isInGroups(user.groups(), "u", uri))
+ {
+ switch (httpRequest().method()) {
+ case Tf::Get: {
+ auto model = PcClasses::get(id.toInt());
+ if (!model.isNull()) {
+ auto pcClasses = model.toVariantMap();
+ texport(pcClasses);
+ render();
+ }
+ break; }
+
+ case Tf::Post: {
+ QString error;
+ auto model = PcClasses::get(id.toInt());
+
+ if (model.isNull()) {
+ error = "Original data not found. It may have been updated/removed by another transaction.";
+ tflash(error);
+ redirect(urla("save", id));
+ break;
+ }
+
+ auto pcClasses = httpRequest().formItems("pcClasses");
+ model.setProperties(pcClasses);
+ if (model.save()) {
+ QString notice = "Updated successfully.";
+ tflash(notice);
+ redirect(urla("show", model.id()));
+ } else {
+ error = "Failed to update.";
+ texport(error);
+ texport(pcClasses);
+ render();
+ }
+ break; }
+
+ default:
+ renderErrorResponse(Tf::NotFound);
+ break;
+ }
+ }
+ else
+ {
+ QString red_msg = " Not authorized to access the page or resource you were trying to reach.";
+ texport(red_msg);
+ render("index");
+ }
+ }
+ else
+ {
+ redirect(QUrl("/account/form"));
+ }
+}
+
+void PcClassesController::remove(const QString &id)
+{
+ QString username = identityKeyOfLoginUser();
+ ItisUser user = ItisUser::getByIdentityKey(username);
+ if (!user.isNull())
+ {
+ auto conti = TActionController::name();
+ auto con = TActionController::activeAction();
+ QString uri = "/" + conti + "/" + con;
+
+ if(ActionRights::isInGroups(user.groups(), "d", uri))
+ {
+ if (httpRequest().method() != Tf::Post) {
+ renderErrorResponse(Tf::NotFound);
+ return;
+ }
+
+ auto pcClasses = PcClasses::get(id.toInt());
+ pcClasses.remove();
+ redirect(urla("index"));
+ }
+ else
+ {
+ QString red_msg = " Not authorized to access the page or resource you were trying to reach.";
+ texport(red_msg);
+ render("index");
+ }
+ }
+ else
+ {
+ redirect(QUrl("/account/form"));
+ }
+}
+
+
+// Don't remove below this line
+T_DEFINE_CONTROLLER(PcClassesController)
diff --git a/controllers/pcclassescontroller.h b/controllers/pcclassescontroller.h
new file mode 100644
index 0000000..5be985a
--- /dev/null
+++ b/controllers/pcclassescontroller.h
@@ -0,0 +1,26 @@
+#ifndef PCCLASSESCONTROLLER_H
+#define PCCLASSESCONTROLLER_H
+
+#include "applicationcontroller.h"
+
+
+class T_CONTROLLER_EXPORT PcClassesController : public ApplicationController
+{
+ Q_OBJECT
+public:
+ PcClassesController() : ApplicationController() {}
+
+public slots:
+ void index();
+ void list_all();
+
+ void show(const QString &id);
+ void create();
+ void save(const QString &id);
+ void remove(const QString &id);
+
+ void getPcClassesJson();
+ void getObjPcJson();
+};
+
+#endif // PCCLASSESCONTROLLER_H
diff --git a/controllers/portaladmincontroller.cpp b/controllers/portaladmincontroller.cpp
new file mode 100644
index 0000000..f64a793
--- /dev/null
+++ b/controllers/portaladmincontroller.cpp
@@ -0,0 +1,23 @@
+#include "portaladmincontroller.h"
+
+#include "itisuser.h"
+#include "itisgroups.h"
+#include "accountcontroller.h"
+#include "actionrights.h"
+
+void PortalAdminController::index()
+{
+ QString username = identityKeyOfLoginUser();
+ ItisUser user = ItisUser::getByIdentityKey(username);
+ if (!user.isNull())
+ {
+ render();
+ }
+ else
+ {
+ redirect(QUrl("/account/form"));
+ }
+}
+
+// Don't remove below this line
+T_DEFINE_CONTROLLER(PortalAdminController)
diff --git a/controllers/portaladmincontroller.h b/controllers/portaladmincontroller.h
new file mode 100644
index 0000000..320b2db
--- /dev/null
+++ b/controllers/portaladmincontroller.h
@@ -0,0 +1,17 @@
+#ifndef PORTALADMINCONTROLLER_H
+#define PORTALADMINCONTROLLER_H
+
+#include "applicationcontroller.h"
+
+
+class T_CONTROLLER_EXPORT PortalAdminController : public ApplicationController
+{
+ Q_OBJECT
+public:
+ PortalAdminController() : ApplicationController() { }
+
+public slots:
+ void index();
+};
+
+#endif // PORTALADMINCONTROLLER_H
diff --git a/controllers/releasemgmtcontroller.cpp b/controllers/releasemgmtcontroller.cpp
new file mode 100644
index 0000000..083f7fb
--- /dev/null
+++ b/controllers/releasemgmtcontroller.cpp
@@ -0,0 +1,975 @@
+#include "releasemgmtcontroller.h"
+#include "releasemgmt.h"
+
+#include "itisuser.h"
+#include "itisgroups.h"
+#include "accountcontroller.h"
+#include "actionrights.h"
+
+#include "catclasses.h"
+#include "releaseannex.h"
+#include "lenkinfo.h"
+
+
+void ReleaseMgmtController::fileRemove()
+{
+ QString username = identityKeyOfLoginUser();
+ ItisUser user = ItisUser::getByIdentityKey(username);
+ if (!user.isNull())
+ {
+ auto conti = TActionController::name();
+ auto con = TActionController::activeAction();
+ QString uri = "/" + conti + "/" + con;
+
+ if(ActionRights::isInGroups(user.groups(), "u", uri))
+ {
+ QMap stdDataMap;
+
+ stdDataMap["doctype"] = httpRequest().formItemValue("doctype");
+ stdDataMap["docrelease"] = httpRequest().formItemValue("docrelease");
+ stdDataMap["docname"] = httpRequest().formItemValue("docname");
+
+ renderJson( ReleaseMgmt::fileRemove(stdDataMap) );
+ }
+ else
+ {
+ QString red_msg = " Not authorized to access the page or resource you were trying to reach.";
+ texport(red_msg);
+ render("index");
+ }
+ }
+ else
+ {
+ redirect(QUrl("/account/form"));
+ }
+}
+
+void ReleaseMgmtController::writeFile()
+{
+ QString header= R"(
+
+
+
+
+
+
+
+ PDF
+
+
+
+
+
+
+
+
+
+
+
+
+)";
+ QString footer= R"(
+
+
+
+)";
+
+ QJsonObject jsonObj;
+ QMap stdDataMap;
+ stdDataMap["content"] = httpRequest().formItemValue("doccontent");
+ usleep(2000);
+ QString msg = QString::number(stdDataMap["content"].length());
+ tWarn("Länge: " + msg.toUtf8());
+ QString docsize = httpRequest().formItemValue("docsize");
+ QString doctype = httpRequest().formItemValue("doctype");
+ QString doctitle = httpRequest().formItemValue("doctitle");
+ QString docrelease = httpRequest().formItemValue("docrelease");
+ QString lenkinfo = httpRequest().formItemValue("lenkinfo");
+
+ if(docsize.compare(msg))
+ {
+ tError("Länge ungleich");
+
+ jsonObj["ERROR"] = "1";
+ jsonObj["errMsg"] = "Fehler bei der Übertragung";
+ jsonObj["Msg"] = "Länge: " + docsize + " " + QString::number(stdDataMap["content"].length());
+stdDataMap["content"] = httpRequest().formItemValue("doccontent");
+msg = QString::number(stdDataMap["content"].length());
+tWarn("Länge: " + msg.toUtf8());
+ renderJson( jsonObj );
+ }
+ else
+ {
+ doctitle.replace(" ", "_");
+ QString fileContent = header + stdDataMap["content"] + footer;
+
+ QString curentDateTime = QDateTime::currentDateTime().toString("yyyy-MM-dd_HHmmss");
+ QString dev_dir = "/webapp_dez/html/itis/pdf/" + doctype + "/" + docrelease + "/";
+ QString prod_dir = "/webapp/html/itis/pdf/" + doctype + "/" + docrelease + "/";
+
+ QString writeHtmlFile = curentDateTime + "_" + doctitle + "_v" + lenkinfo + "-" + docrelease + ".html";
+ QString htmlFile = "/pdf/" + doctype + "/" + docrelease + "/" + writeHtmlFile;
+ QString pdfFile = curentDateTime + "_" + doctitle + "_v" + lenkinfo + "-" + docrelease + ".pdf";
+
+ QDir devDir(dev_dir);
+ QDir prodDir(prod_dir);
+
+ if(devDir.exists())
+ {
+ writeHtmlFile = dev_dir + writeHtmlFile;
+ pdfFile = dev_dir + pdfFile;
+ htmlFile = "http://localhost:8080" + htmlFile;
+ }
+ else if(prodDir.exists())
+ {
+ writeHtmlFile = prod_dir + writeHtmlFile;
+ pdfFile = prod_dir + pdfFile;
+ htmlFile = "https://itis.hitchhiker.tech/" + htmlFile;
+ }
+
+ QFile file(writeHtmlFile);
+ file.open(QIODevice::WriteOnly);
+
+ QTextStream stream(&file);
+ stream.setAutoDetectUnicode(true);
+ //stream.setCodec("UTF-8");
+
+ stream << fileContent << '\n';
+
+ file.flush();
+ file.close();
+
+ int ret = ReleaseMgmt::crPDF(htmlFile, pdfFile);
+ jsonObj["ERROR"] = QString::number(ret);
+ jsonObj["errMsg"] = doctitle;
+ jsonObj["Msg"] = "Länge: " + docsize + " " + QString::number(stdDataMap["content"].length());
+
+ renderJson( jsonObj );
+ }
+}
+
+void ReleaseMgmtController::ci_update()
+{
+ QString username = identityKeyOfLoginUser();
+ ItisUser user = ItisUser::getByIdentityKey(username);
+ if (!user.isNull())
+ {
+ auto conti = TActionController::name();
+ auto con = TActionController::activeAction();
+ QString uri = "/" + conti + "/" + con;
+
+ if(ActionRights::isInGroups(user.groups(), "u", uri))
+ {
+ QMap stdDataMap;
+
+ stdDataMap["id"] = httpRequest().formItemValue("id");
+ stdDataMap["specVersion"] = httpRequest().formItemValue("specVersion");
+ stdDataMap["relCreator"] = httpRequest().formItemValue("relCreator");
+ stdDataMap["relcreatorDecisdate"] = httpRequest().formItemValue("relcreatorDecisdate");
+
+ renderJson( ReleaseMgmt::ci_update(stdDataMap) );
+ }
+ else
+ {
+ QString red_msg = " Not authorized to access the page or resource you were trying to reach.";
+ texport(red_msg);
+ render("index");
+ }
+ }
+ else
+ {
+ redirect(QUrl("/account/form"));
+ }
+}
+
+void ReleaseMgmtController::listAllAnnexCi()
+{
+ QString username = identityKeyOfLoginUser();
+ ItisUser user = ItisUser::getByIdentityKey(username);
+ if (!user.isNull())
+ {
+ auto conti = TActionController::name();
+ auto con = TActionController::activeAction();
+ QString uri = "/" + conti + "/" + con;
+
+ if(ActionRights::isInGroups(user.groups(), "r", uri))
+ {
+ render();
+ }
+ else
+ {
+ QString red_msg = " Not authorized to access the page or resource you were trying to reach.";
+ texport(red_msg);
+ render("index");
+ }
+ }
+ else
+ {
+ redirect(QUrl("/account/form"));
+ }
+}
+
+void ReleaseMgmtController::list_allAnnexCi()
+{
+ QString username = identityKeyOfLoginUser();
+ ItisUser user = ItisUser::getByIdentityKey(username);
+ if (!user.isNull())
+ {
+ auto conti = TActionController::name();
+ auto con = TActionController::activeAction();
+ QString uri = "/" + conti + "/" + con;
+
+ if(ActionRights::isInGroups(user.groups(), "r", uri))
+ {
+ renderJson( ReleaseMgmt::list_allAnnexCi() );
+ }
+ else
+ {
+ QString red_msg = " Not authorized to access the page or resource you were trying to reach.";
+ texport(red_msg);
+ render("index");
+ }
+ }
+ else
+ {
+ redirect(QUrl("/account/form"));
+ }
+}
+
+void ReleaseMgmtController::listAllAnnexCd()
+{
+ QString username = identityKeyOfLoginUser();
+ ItisUser user = ItisUser::getByIdentityKey(username);
+ if (!user.isNull())
+ {
+ auto conti = TActionController::name();
+ auto con = TActionController::activeAction();
+ QString uri = "/" + conti + "/" + con;
+
+ if(ActionRights::isInGroups(user.groups(), "r", uri))
+ {
+ render();
+ }
+ else
+ {
+ QString red_msg = " Not authorized to access the page or resource you were trying to reach.";
+ texport(red_msg);
+ render("index");
+ }
+ }
+ else
+ {
+ redirect(QUrl("/account/form"));
+ }
+}
+
+void ReleaseMgmtController::list_allAnnexCd()
+{
+ QString username = identityKeyOfLoginUser();
+ ItisUser user = ItisUser::getByIdentityKey(username);
+ if (!user.isNull())
+ {
+ auto conti = TActionController::name();
+ auto con = TActionController::activeAction();
+ QString uri = "/" + conti + "/" + con;
+
+ if(ActionRights::isInGroups(user.groups(), "r", uri))
+ {
+ renderJson( ReleaseMgmt::list_allAnnexCd() );
+ }
+ else
+ {
+ QString red_msg = " Not authorized to access the page or resource you were trying to reach.";
+ texport(red_msg);
+ render("index");
+ }
+ }
+ else
+ {
+ redirect(QUrl("/account/form"));
+ }
+}
+
+void ReleaseMgmtController::listAllStdCi()
+{
+ QString username = identityKeyOfLoginUser();
+ ItisUser user = ItisUser::getByIdentityKey(username);
+ if (!user.isNull())
+ {
+ auto conti = TActionController::name();
+ auto con = TActionController::activeAction();
+ QString uri = "/" + conti + "/" + con;
+
+ if(ActionRights::isInGroups(user.groups(), "r", uri))
+ {
+ render();
+ }
+ else
+ {
+ QString red_msg = " Not authorized to access the page or resource you were trying to reach.";
+ texport(red_msg);
+ render("index");
+ }
+ }
+ else
+ {
+ redirect(QUrl("/account/form"));
+ }
+}
+
+void ReleaseMgmtController::list_allStdCi()
+{
+ QString username = identityKeyOfLoginUser();
+ ItisUser user = ItisUser::getByIdentityKey(username);
+ if (!user.isNull())
+ {
+ auto conti = TActionController::name();
+ auto con = TActionController::activeAction();
+ QString uri = "/" + conti + "/" + con;
+
+ if(ActionRights::isInGroups(user.groups(), "r", uri))
+ {
+ renderJson( ReleaseMgmt::list_allStdCi() );
+ }
+ else
+ {
+ QString red_msg = " Not authorized to access the page or resource you were trying to reach.";
+ texport(red_msg);
+ render("index");
+ }
+ }
+ else
+ {
+ redirect(QUrl("/account/form"));
+ }
+}
+
+void ReleaseMgmtController::listAllStdCd()
+{
+ QString username = identityKeyOfLoginUser();
+ ItisUser user = ItisUser::getByIdentityKey(username);
+ if (!user.isNull())
+ {
+ auto conti = TActionController::name();
+ auto con = TActionController::activeAction();
+ QString uri = "/" + conti + "/" + con;
+
+ if(ActionRights::isInGroups(user.groups(), "r", uri))
+ {
+ render();
+ }
+ else
+ {
+ QString red_msg = " Not authorized to access the page or resource you were trying to reach.";
+ texport(red_msg);
+ render("index");
+ }
+ }
+ else
+ {
+ redirect(QUrl("/account/form"));
+ }
+}
+
+void ReleaseMgmtController::list_allStdCd()
+{
+ QString username = identityKeyOfLoginUser();
+ ItisUser user = ItisUser::getByIdentityKey(username);
+ if (!user.isNull())
+ {
+ auto conti = TActionController::name();
+ auto con = TActionController::activeAction();
+ QString uri = "/" + conti + "/" + con;
+
+ if(ActionRights::isInGroups(user.groups(), "r", uri))
+ {
+ renderJson( ReleaseMgmt::list_allStdCd() );
+ }
+ else
+ {
+ QString red_msg = " Not authorized to access the page or resource you were trying to reach.";
+ texport(red_msg);
+ render("index");
+ }
+ }
+ else
+ {
+ redirect(QUrl("/account/form"));
+ }
+}
+
+void ReleaseMgmtController::list_pdf()
+{
+ QString username = identityKeyOfLoginUser();
+ ItisUser user = ItisUser::getByIdentityKey(username);
+ if (!user.isNull())
+ {
+ auto conti = TActionController::name();
+ auto con = TActionController::activeAction();
+ QString uri = "/" + conti + "/" + con;
+
+ if(ActionRights::isInGroups(user.groups(), "r", uri))
+ {
+ render();
+ }
+ else
+ {
+ QString red_msg = " Not authorized to access the page or resource you were trying to reach.";
+ texport(red_msg);
+ render("index");
+ }
+ }
+ else
+ {
+ redirect(QUrl("/account/form"));
+ }
+}
+
+void ReleaseMgmtController::getStdCiPDFs()
+{
+ QJsonObject jsonObject;
+ QJsonArray jsonArray;
+
+ // PROD:
+ QString pathToImg = "/webapp/html/itis/pdf/standard/pre-release";
+ // DEV: QString pathToImg = "/webapp_dez/html/itis/pdf/annex/pre-release";
+
+ QDir directory(pathToImg);
+ QStringList images = directory.entryList(QStringList() << "*.pdf" << "*.docx" << "*.odt",QDir::Files);
+
+ foreach(QString filename, images)
+ {
+ QFileInfo info(pathToImg + "/" + filename);
+ jsonObject["size"] = info.size() / 1024;
+ jsonObject["uri"] = "/standard/pre-release/" + filename;
+ jsonObject["last_modified"] = info.lastModified().toString("yyyy-MM-dd HH:mm:ss");
+ jsonObject["name"] = filename;
+ jsonArray.append(jsonObject);
+ }
+ renderJson(jsonArray);
+}
+
+void ReleaseMgmtController::getStdCdPDFs()
+{
+ QJsonObject jsonObject;
+ QJsonArray jsonArray;
+
+ // PROD:
+ QString pathToImg = "/webapp/html/itis/pdf/standard/released";
+ // DEV: QString pathToImg = "/webapp_dez/html/itis/pdf/annex/released";
+
+ QDir directory(pathToImg);
+ QStringList images = directory.entryList(QStringList() << "*.pdf" << "*.docx" << "*.odt",QDir::Files);
+
+ foreach(QString filename, images)
+ {
+ QFileInfo info(pathToImg + "/" + filename);
+ jsonObject["size"] = info.size() / 1024;
+ jsonObject["uri"] = "/standard/released/" + filename;
+ jsonObject["last_modified"] = info.lastModified().toString("yyyy-MM-dd HH:mm:ss");
+ jsonObject["name"] = filename;
+ jsonArray.append(jsonObject);
+ }
+ renderJson(jsonArray);
+}
+
+void ReleaseMgmtController::getAnnexCiPDFs()
+{
+ QJsonObject jsonObject;
+ QJsonArray jsonArray;
+
+ // PROD:
+ QString pathToImg = "/webapp/html/itis/pdf/annex/pre-release";
+ // DEV: QString pathToImg = "/webapp_dez/html/itis/pdf/annex/pre-release";
+
+ QDir directory(pathToImg);
+ QStringList images = directory.entryList(QStringList() << "*.pdf" << "*.docx" << "*.odt",QDir::Files);
+
+ foreach(QString filename, images)
+ {
+ QFileInfo info(pathToImg + "/" + filename);
+ jsonObject["size"] = info.size() / 1024;
+ jsonObject["uri"] = "/annex/pre-release/" + filename;
+ jsonObject["last_modified"] = info.lastModified().toString("yyyy-MM-dd HH:mm:ss");
+ jsonObject["name"] = filename;
+ jsonArray.append(jsonObject);
+ }
+ renderJson(jsonArray);
+}
+
+void ReleaseMgmtController::getAnnexCdPDFs()
+{
+ QJsonObject jsonObject;
+ QJsonArray jsonArray;
+
+ // PROD:
+ QString pathToImg = "/webapp/html/itis/pdf/annex/released";
+ // DEV: QString pathToImg = "/webapp_dez/html/itis/pdf/annex/released";
+
+ QDir directory(pathToImg);
+ QStringList images = directory.entryList(QStringList() << "*.pdf" << "*.docx" << "*.odt",QDir::Files);
+
+ foreach(QString filename, images)
+ {
+ QFileInfo info(pathToImg + "/" + filename);
+ jsonObject["size"] = info.size() / 1024;
+ jsonObject["uri"] = "/annex/released/" + filename;
+ jsonObject["last_modified"] = info.lastModified().toString("yyyy-MM-dd HH:mm:ss");
+ jsonObject["name"] = filename;
+ jsonArray.append(jsonObject);
+ }
+ renderJson(jsonArray);
+}
+
+void ReleaseMgmtController::getAnnexToc()
+{
+ QString username = identityKeyOfLoginUser();
+ ItisUser user = ItisUser::getByIdentityKey(username);
+ if (!user.isNull())
+ {
+ QMap stdDataMap;
+
+ stdDataMap["obj_sname"] = httpRequest().formItemValue("obj_sname");
+ stdDataMap["cat_sname_en"] = httpRequest().formItemValue("cat_sname_en");
+ stdDataMap["country"] = httpRequest().formItemValue("country");
+ stdDataMap["lang"] = httpRequest().formItemValue("lang");
+ stdDataMap["spec_active"] = httpRequest().formItemValue("spec_active");
+ stdDataMap["ac_class"] = httpRequest().formItemValue("ac_class");
+ stdDataMap["pc_class"] = httpRequest().formItemValue("pc_class");
+ stdDataMap["spec_release"] = httpRequest().formItemValue("spec_release");
+ stdDataMap["getStdType"] = httpRequest().formItemValue("getStdType");
+
+ /* ####
+ stdDataMap["obj_sname"] = "Annex D";
+ stdDataMap["cat_sname_en"] = "Cabling";
+ stdDataMap["country"] = "WW";
+ stdDataMap["lang"] = "de_DE";
+ stdDataMap["spec_active"] = "1";
+ stdDataMap["ac_class"] = "3";
+ stdDataMap["pc_class"] = "3";
+ stdDataMap["spec_release"] = "draft";
+ stdDataMap["getStdType"] = "show";
+ */
+
+ renderJson( ReleaseAnnex::getAnnexToc(stdDataMap) );
+ }
+ else
+ {
+ redirect(QUrl("/account/form"));
+ }
+}
+
+void ReleaseMgmtController::getAnnexRelease()
+{
+ renderJson( ReleaseAnnex::getAllJson() );
+}
+
+void ReleaseMgmtController::getAnnexSpec()
+{
+ QString username = identityKeyOfLoginUser();
+ ItisUser user = ItisUser::getByIdentityKey(username);
+ if (!user.isNull())
+ {
+ auto conti = TActionController::name();
+ auto con = TActionController::activeAction();
+ QString uri = "/" + conti + "/" + con;
+
+ if(ActionRights::isInGroups(user.groups(), "r", uri))
+ {
+ QString id = httpRequest().queryItemValue("id");
+ int lid = id.toInt();
+ renderJson( ReleaseAnnex::getAnnexSpec(lid) );
+ }
+ else
+ {
+ QString red_msg = " Not authorized to access the page or resource you were trying to reach.";
+ texport(red_msg);
+ render("index");
+ }
+ }
+ else
+ {
+ redirect(QUrl("/account/form"));
+ }
+}
+
+void ReleaseMgmtController::getAnnexList()
+{
+ QString username = identityKeyOfLoginUser();
+ ItisUser user = ItisUser::getByIdentityKey(username);
+ if (!user.isNull())
+ {
+ auto conti = TActionController::name();
+ auto con = TActionController::activeAction();
+ QString uri = "/" + conti + "/" + con;
+
+ if(ActionRights::isInGroups(user.groups(), "r", uri))
+ {
+ QMap stdDataMap;
+
+
+ stdDataMap["obj_sname"] = httpRequest().formItemValue("obj_sname");
+ stdDataMap["cat_sname_en"] = httpRequest().formItemValue("cat_sname_en");
+ stdDataMap["country"] = httpRequest().formItemValue("country");
+ stdDataMap["lang"] = httpRequest().formItemValue("lang");
+ stdDataMap["spec_active"] = httpRequest().formItemValue("spec_active");
+ stdDataMap["ac_class"] = httpRequest().formItemValue("ac_class");
+ stdDataMap["pc_class"] = httpRequest().formItemValue("pc_class");
+ stdDataMap["spec_release"] = httpRequest().formItemValue("spec_release");
+ stdDataMap["getStdType"] = httpRequest().formItemValue("getStdType");
+
+ /*/ ####
+ stdDataMap["obj_sname"] = "Annex B-3";
+ stdDataMap["cat_sname_en"] = "Planning";
+ stdDataMap["country"] = "WW";
+ stdDataMap["lang"] = "de_DE";
+ stdDataMap["spec_active"] = "1";
+ stdDataMap["ac_class"] = "1";
+ stdDataMap["pc_class"] = "1";
+ stdDataMap["spec_release"] = "released";
+ stdDataMap["getStdType"] = "show";
+ */
+
+ renderJson( ReleaseAnnex::getAnnexList(stdDataMap) );
+ }
+ else
+ {
+ QString red_msg = " Not authorized to access the page or resource you were trying to reach.";
+ texport(red_msg);
+ render("index");
+ }
+ }
+ else
+ {
+ redirect(QUrl("/account/form"));
+ }
+}
+
+void ReleaseMgmtController::printCdAnnex()
+{
+
+ //QString strGroups = ItisUser::sqlGroups( user.groups(), "r" );
+ // QJsonArray jsonCategories = CatClasses::getAllJson("1", "category", strGroups);
+ QJsonArray jsonCategories = CatClasses::getAllJson("1", "category");
+ texport(jsonCategories);
+
+ QString obj_sname = httpRequest().formItemValue("obj_sname");
+ texport(obj_sname);
+ QString country = httpRequest().formItemValue("country");
+ texport(country);
+ QString lang = httpRequest().formItemValue("lang");
+ texport(lang);
+ QString ac_class = httpRequest().formItemValue("ac_class");
+ texport(ac_class);
+ QString pc_class = httpRequest().formItemValue("pc_class");
+ texport(pc_class);
+ QString spec_release = "released"; //httpRequest().formItemValue("spec_release");
+ texport(spec_release);
+ QString getStdTyp = "show"; // httpRequest().formItemValue("getStdType");
+ texport(getStdTyp);
+ QString release_id = httpRequest().formItemValue("release_id");
+ texport(release_id);
+
+ /* / ####
+ QString obj_sname = "Annex B-3";
+ texport(obj_sname);
+ QString country = "WW";
+ texport(country);
+ QString lang = "de_DE";
+ texport(lang);
+ QString ac_class = "1";
+ texport(ac_class);
+ QString pc_class = "1";
+ texport(pc_class);
+ QString spec_release = "released";
+ texport(spec_release);
+ QString getStdType = "show";
+ texport(getStdType);
+ QString release_id = "7";
+ texport(release_id);
+ /*/
+
+ render();
+
+}
+
+void ReleaseMgmtController::showCdAnnex()
+{
+ QString username = identityKeyOfLoginUser();
+ ItisUser user = ItisUser::getByIdentityKey(username);
+ if (!user.isNull())
+ {
+ auto conti = TActionController::name();
+ auto con = TActionController::activeAction();
+ QString uri = "/" + conti + "/" + con;
+
+ if(ActionRights::isInGroups(user.groups(), "r", uri))
+ {
+ QString strGroups = ItisUser::sqlGroups( user.groups(), "r" );
+ QJsonArray jsonCategories = CatClasses::getAllJson("1", "category", strGroups);
+ texport(jsonCategories);
+
+ QString obj_sname = httpRequest().formItemValue("obj_sname");
+ texport(obj_sname);
+ QString country = httpRequest().formItemValue("country");
+ texport(country);
+ QString lang = httpRequest().formItemValue("lang");
+ texport(lang);
+ QString ac_class = httpRequest().formItemValue("ac_class");
+ texport(ac_class);
+ QString pc_class = httpRequest().formItemValue("pc_class");
+ texport(pc_class);
+ QString spec_release = "released"; //httpRequest().formItemValue("spec_release");
+ texport(spec_release);
+ QString getStdTyp = "show"; // httpRequest().formItemValue("getStdType");
+ texport(getStdTyp);
+ QString release_id = httpRequest().formItemValue("release_id");
+ texport(release_id);
+
+ /* / ####
+ QString obj_sname = "Annex B-3";
+ texport(obj_sname);
+ QString country = "WW";
+ texport(country);
+ QString lang = "de_DE";
+ texport(lang);
+ QString ac_class = "1";
+ texport(ac_class);
+ QString pc_class = "1";
+ texport(pc_class);
+ QString spec_release = "released";
+ texport(spec_release);
+ QString getStdType = "show";
+ texport(getStdType);
+ QString release_id = "7";
+ texport(release_id);
+ /*/
+
+ render();
+ }
+ else
+ {
+ QString red_msg = " Not authorized to access the page or resource you were trying to reach.";
+ texport(red_msg);
+ render("index");
+ }
+ }
+ else
+ {
+ redirect(QUrl("/account/form"));
+ }
+}
+
+void ReleaseMgmtController::index_ciannex()
+{
+ QString username = identityKeyOfLoginUser();
+ ItisUser user = ItisUser::getByIdentityKey(username);
+ if (!user.isNull())
+ {
+ auto conti = TActionController::name();
+ auto con = TActionController::activeAction();
+ QString uri = "/" + conti + "/" + con;
+
+ if(ActionRights::isInGroups(user.groups(), "r", uri))
+ {
+ render();
+ }
+ else
+ {
+ QString red_msg = " Not authorized to access the page or resource you were trying to reach.";
+ texport(red_msg);
+ render("index");
+ }
+ }
+ else
+ {
+ redirect(QUrl("/account/form"));
+ }
+}
+
+void ReleaseMgmtController::list_all()
+{
+ QString username = identityKeyOfLoginUser();
+ ItisUser user = ItisUser::getByIdentityKey(username);
+ if (!user.isNull())
+ {
+ auto conti = TActionController::name();
+ auto con = TActionController::activeAction();
+ QString uri = "/" + conti + "/" + con;
+
+ if(ActionRights::isInGroups(user.groups(), "r", uri))
+ {
+ auto releaseMgmtList = ReleaseMgmt::getAll();
+ texport(releaseMgmtList);
+ render();
+ }
+ else
+ {
+ QString red_msg = " Not authorized to access the page or resource you were trying to reach.";
+ texport(red_msg);
+ render("index");
+ }
+ }
+ else
+ {
+ redirect(QUrl("/account/form"));
+ }
+}
+
+void ReleaseMgmtController::index()
+{
+ QString username = identityKeyOfLoginUser();
+ ItisUser user = ItisUser::getByIdentityKey(username);
+ if (!user.isNull())
+ {
+ render();
+ }
+ else
+ {
+ redirect(QUrl("/account/form"));
+ }
+}
+
+
+void ReleaseMgmtController::show(const QString &id)
+{
+ auto releaseMgmt = ReleaseMgmt::get(id.toInt());
+ texport(releaseMgmt);
+ render();
+}
+
+void ReleaseMgmtController::create()
+{
+ switch (httpRequest().method()) {
+ case Tf::Get:
+ render();
+ break;
+
+ case Tf::Post: {
+ auto releaseMgmt = httpRequest().formItems("releaseMgmt");
+ auto model = ReleaseMgmt::create(releaseMgmt);
+
+ if (!model.isNull()) {
+ QString notice = "Created successfully.";
+ tflash(notice);
+ redirect(urla("show", model.id()));
+ } else {
+ QString error = "Failed to create.";
+ texport(error);
+ texport(releaseMgmt);
+ render();
+ }
+ break; }
+
+ default:
+ renderErrorResponse(Tf::NotFound);
+ break;
+ }
+}
+
+void ReleaseMgmtController::saveAnnex(const QString &id)
+{
+ switch (httpRequest().method()) {
+ case Tf::Get: {
+ auto model = ReleaseAnnex::get(id.toInt());
+ if (!model.isNull()) {
+ auto releaseAnnex = model.toVariantMap();
+ texport(releaseAnnex);
+ render();
+ }
+ break; }
+
+ case Tf::Post: {
+ QString error;
+ auto model = ReleaseAnnex::get(id.toInt());
+
+ if (model.isNull()) {
+ error = "Original data not found. It may have been updated/removed by another transaction.";
+ tflash(error);
+ redirect(urla("saveAnnex", id));
+ break;
+ }
+
+ auto releaseAnnex = httpRequest().formItems("releaseAnnex");
+ model.setProperties(releaseAnnex);
+
+ if (model.save()) {
+ QString notice = "Updated successfully.";
+ tflash(notice);
+ redirect(urla("saveAnnex", model.id()));
+ } else {
+ error = "Failed to update.";
+ texport(error);
+ texport(releaseAnnex);
+ render();
+ }
+ break; }
+
+ default:
+ renderErrorResponse(Tf::NotFound);
+ break;
+ }
+}
+
+void ReleaseMgmtController::save(const QString &id)
+{
+ switch (httpRequest().method()) {
+ case Tf::Get: {
+ auto model = ReleaseMgmt::get(id.toInt());
+ if (!model.isNull()) {
+ auto releaseMgmt = model.toVariantMap();
+ texport(releaseMgmt);
+
+ // auto lenkinfo = Lenkinfo::model.toVariantMap();
+ // texport(lenkinfo);
+
+ render();
+ }
+ break; }
+
+ case Tf::Post: {
+ QString error;
+ auto model = ReleaseMgmt::get(id.toInt());
+
+ if (model.isNull()) {
+ error = "Original data not found. It may have been updated/removed by another transaction.";
+ tflash(error);
+ redirect(urla("save", id));
+ break;
+ }
+
+ auto releaseMgmt = httpRequest().formItems("releaseMgmt");
+ model.setProperties(releaseMgmt);
+ if (model.save()) {
+ QString notice = "Updated successfully.";
+ tflash(notice);
+ redirect(urla("show", model.id()));
+ } else {
+ error = "Failed to update.";
+ texport(error);
+ texport(releaseMgmt);
+ render();
+ }
+ break; }
+
+ default:
+ renderErrorResponse(Tf::NotFound);
+ break;
+ }
+}
+
+void ReleaseMgmtController::remove(const QString &id)
+{
+ if (httpRequest().method() != Tf::Post) {
+ renderErrorResponse(Tf::NotFound);
+ return;
+ }
+
+ auto releaseMgmt = ReleaseMgmt::get(id.toInt());
+ releaseMgmt.remove();
+ redirect(urla("index"));
+}
+
+
+// Don't remove below this line
+T_DEFINE_CONTROLLER(ReleaseMgmtController)
diff --git a/controllers/releasemgmtcontroller.h b/controllers/releasemgmtcontroller.h
new file mode 100644
index 0000000..b649df4
--- /dev/null
+++ b/controllers/releasemgmtcontroller.h
@@ -0,0 +1,61 @@
+#ifndef RELEASEMGMTCONTROLLER_H
+#define RELEASEMGMTCONTROLLER_H
+
+#include "applicationcontroller.h"
+
+
+class T_CONTROLLER_EXPORT ReleaseMgmtController : public ApplicationController
+{
+ Q_OBJECT
+public:
+ ReleaseMgmtController() : ApplicationController() {}
+
+public slots:
+ void index();
+ void list_all();
+
+ void list_allAnnexCi();
+ void listAllAnnexCi();
+ void list_allAnnexCd();
+ void listAllAnnexCd();
+
+ void list_allStdCi();
+ void listAllStdCi();
+ void list_allStdCd();
+ void listAllStdCd();
+
+ void index_ciannex();
+ void getAnnexRelease();
+
+ void showCdAnnex();
+ void printCdAnnex();
+
+ void getAnnexList();
+ void getAnnexSpec();
+
+ void show(const QString &id);
+ void create();
+ void save(const QString &id);
+ void ci_update();
+
+ void saveAnnex(const QString &id);
+
+ void remove(const QString &id);
+
+ void getAnnexToc();
+
+ void getAnnexCiPDFs();
+ void getAnnexCdPDFs();
+
+ void getStdCiPDFs();
+ void getStdCdPDFs();
+
+ void list_pdf();
+ void fileRemove();
+
+ // Test
+ void writeFile();
+
+};
+
+#endif // RELEASEMGMTCONTROLLER_H
diff --git a/controllers/standardsdatacommentscontroller.cpp b/controllers/standardsdatacommentscontroller.cpp
new file mode 100644
index 0000000..5502c4b
--- /dev/null
+++ b/controllers/standardsdatacommentscontroller.cpp
@@ -0,0 +1,286 @@
+#include "standardsdatacommentscontroller.h"
+#include "standardsdatacomments.h"
+
+#include "itisuser.h"
+#include "itisgroups.h"
+#include "accountcontroller.h"
+#include "actionrights.h"
+
+void StandardsDataCommentsController::getSpecComments(const QString &spec_id)
+{
+ QString username = identityKeyOfLoginUser();
+ ItisUser user = ItisUser::getByIdentityKey(username);
+ if (!user.isNull())
+ {
+ auto conti = TActionController::name();
+ auto con = TActionController::activeAction();
+ QString uri = "/" + conti + "/" + con;
+
+ if(ActionRights::isInGroups(user.groups(), "r", uri))
+ {
+ renderJson( StandardsDataComments::getSpecComments( spec_id.toInt() ) );
+ }
+ else
+ {
+ QString red_msg = " Not authorized to access the page or resource you were trying to reach.";
+ texport(red_msg);
+ render("index");
+ }
+ }
+ else
+ {
+ redirect(QUrl("/account/form"));
+ }
+}
+
+void StandardsDataCommentsController::list_all()
+{
+ QString username = identityKeyOfLoginUser();
+ ItisUser user = ItisUser::getByIdentityKey(username);
+ if (!user.isNull())
+ {
+ auto conti = TActionController::name();
+ auto con = TActionController::activeAction();
+ QString uri = "/" + conti + "/" + con;
+
+ if(ActionRights::isInGroups(user.groups(), "r", uri))
+ {
+ auto standardsDataCommentsList = StandardsDataComments::getAll();
+ texport(standardsDataCommentsList);
+ render();
+ }
+ else
+ {
+ QString red_msg = " Not authorized to access the page or resource you were trying to reach.";
+ texport(red_msg);
+ render("index");
+ }
+ }
+ else
+ {
+ redirect(QUrl("/account/form"));
+ }
+}
+
+void StandardsDataCommentsController::index()
+{
+ QString username = identityKeyOfLoginUser();
+ ItisUser user = ItisUser::getByIdentityKey(username);
+ if (!user.isNull())
+ {
+ auto statistik = StandardsDataComments::getStatistics();
+
+ QString count_id = statistik["count_id"];
+ texport(count_id);
+ QString count_users = statistik["count_users"];
+ texport(count_users);
+
+ render();
+ }
+ else
+ {
+ redirect(QUrl("/account/form"));
+ }
+}
+
+void StandardsDataCommentsController::show(const QString &id)
+{
+ QString username = identityKeyOfLoginUser();
+ ItisUser user = ItisUser::getByIdentityKey(username);
+ if (!user.isNull())
+ {
+ auto conti = TActionController::name();
+ auto con = TActionController::activeAction();
+ QString uri = "/" + conti + "/" + con;
+
+ if(ActionRights::isInGroups(user.groups(), "r_d", uri))
+ {
+ auto standardsDataComments = StandardsDataComments::get(id.toInt());
+ texport(standardsDataComments);
+ render();
+ }
+ else
+ {
+ QString red_msg = " Not authorized to access the page or resource you were trying to reach.";
+ texport(red_msg);
+ render("index");
+ }
+ }
+ else
+ {
+ redirect(QUrl("/account/form"));
+ }
+}
+
+void StandardsDataCommentsController::createComment()
+{
+ QString username = identityKeyOfLoginUser();
+ ItisUser user = ItisUser::getByIdentityKey(username);
+ if (!user.isNull())
+ {
+ QString spec_id = httpRequest().formItemValue("spec_id");
+ QString spec_title = httpRequest().formItemValue("spec_title");
+ QString spec_version = httpRequest().formItemValue("spec_version");
+ QString user_comment = httpRequest().formItemValue("user_comment");
+
+ renderJson( StandardsDataComments::createComment(spec_id.toInt(), spec_title, spec_version, user_comment, user.username()) );
+ }
+ else
+ {
+ redirect(QUrl("/account/form"));
+ }
+}
+
+void StandardsDataCommentsController::create()
+{
+ QString username = identityKeyOfLoginUser();
+ ItisUser user = ItisUser::getByIdentityKey(username);
+ if (!user.isNull())
+ {
+ auto conti = TActionController::name();
+ auto con = TActionController::activeAction();
+ QString uri = "/" + conti + "/" + con;
+
+ if(ActionRights::isInGroups(user.groups(), "c", uri))
+ {
+ switch (httpRequest().method()) {
+ case Tf::Get:
+ render();
+ break;
+
+ case Tf::Post: {
+ auto standardsDataComments = httpRequest().formItems("standardsDataComments");
+ auto model = StandardsDataComments::create(standardsDataComments);
+
+ if (!model.isNull()) {
+ QString notice = "Created successfully.";
+ tflash(notice);
+ redirect(urla("show", model.id()));
+ } else {
+ QString error = "Failed to create.";
+ texport(error);
+ texport(standardsDataComments);
+ render();
+ }
+ break; }
+
+ default:
+ renderErrorResponse(Tf::NotFound);
+ break;
+ }
+ }
+ else
+ {
+ QString red_msg = " Not authorized to access the page or resource you were trying to reach.";
+ texport(red_msg);
+ render("index");
+ }
+ }
+ else
+ {
+ redirect(QUrl("/account/form"));
+ }
+}
+
+void StandardsDataCommentsController::save(const QString &id)
+{
+ QString username = identityKeyOfLoginUser();
+ ItisUser user = ItisUser::getByIdentityKey(username);
+ if (!user.isNull())
+ {
+ auto conti = TActionController::name();
+ auto con = TActionController::activeAction();
+ QString uri = "/" + conti + "/" + con;
+
+ if(ActionRights::isInGroups(user.groups(), "u", uri))
+ {
+ switch (httpRequest().method()) {
+ case Tf::Get: {
+ auto model = StandardsDataComments::get(id.toInt());
+ if (!model.isNull()) {
+ auto standardsDataComments = model.toVariantMap();
+ texport(standardsDataComments);
+ render();
+ }
+ break; }
+
+ case Tf::Post: {
+ QString error;
+ auto model = StandardsDataComments::get(id.toInt());
+
+ if (model.isNull()) {
+ error = "Original data not found. It may have been updated/removed by another transaction.";
+ tflash(error);
+ redirect(urla("save", id));
+ break;
+ }
+
+ auto standardsDataComments = httpRequest().formItems("standardsDataComments");
+ model.setProperties(standardsDataComments);
+ if (model.save()) {
+ QString notice = "Updated successfully.";
+ tflash(notice);
+ redirect(urla("show", model.id()));
+ } else {
+ error = "Failed to update.";
+ texport(error);
+ texport(standardsDataComments);
+ render();
+ }
+ break; }
+
+ default:
+ renderErrorResponse(Tf::NotFound);
+ break;
+ }
+ }
+ else
+ {
+ QString red_msg = " Not authorized to access the page or resource you were trying to reach.";
+ texport(red_msg);
+ render("index");
+ }
+ }
+ else
+ {
+ redirect(QUrl("/account/form"));
+ }
+}
+
+void StandardsDataCommentsController::remove(const QString &id)
+{
+ QString username = identityKeyOfLoginUser();
+ ItisUser user = ItisUser::getByIdentityKey(username);
+ if (!user.isNull())
+ {
+ auto conti = TActionController::name();
+ auto con = TActionController::activeAction();
+ QString uri = "/" + conti + "/" + con;
+
+ if(ActionRights::isInGroups(user.groups(), "d", uri))
+ {
+ if (httpRequest().method() != Tf::Post) {
+ renderErrorResponse(Tf::NotFound);
+ return;
+ }
+
+ auto standardsDataComments = StandardsDataComments::get(id.toInt());
+ standardsDataComments.remove();
+ redirect(urla("index"));
+ }
+ else
+ {
+ QString red_msg = " Not authorized to access the page or resource you were trying to reach.";
+ texport(red_msg);
+ render("index");
+ }
+ }
+ else
+ {
+ redirect(QUrl("/account/form"));
+ }
+}
+
+
+// Don't remove below this line
+T_DEFINE_CONTROLLER(StandardsDataCommentsController)
diff --git a/controllers/standardsdatacommentscontroller.h b/controllers/standardsdatacommentscontroller.h
new file mode 100644
index 0000000..77fa904
--- /dev/null
+++ b/controllers/standardsdatacommentscontroller.h
@@ -0,0 +1,27 @@
+#ifndef STANDARDSDATACOMMENTSCONTROLLER_H
+#define STANDARDSDATACOMMENTSCONTROLLER_H
+
+#include "applicationcontroller.h"
+
+
+class T_CONTROLLER_EXPORT StandardsDataCommentsController : public ApplicationController
+{
+ Q_OBJECT
+public:
+ StandardsDataCommentsController() : ApplicationController() {}
+
+public slots:
+ void index();
+ void list_all();
+
+ void show(const QString &id);
+ void create();
+ void createComment();
+ void save(const QString &id);
+ void remove(const QString &id);
+
+ void getSpecComments(const QString &spec_id);
+
+};
+
+#endif // STANDARDSDATACOMMENTSCONTROLLER_H
diff --git a/controllers/standardsdatacontroller.cpp b/controllers/standardsdatacontroller.cpp
new file mode 100644
index 0000000..1b4f3dc
--- /dev/null
+++ b/controllers/standardsdatacontroller.cpp
@@ -0,0 +1,1107 @@
+#include "standardsdatacontroller.h"
+#include "standardsdata.h"
+
+#include "itisuser.h"
+#include "itisgroups.h"
+#include "accountcontroller.h"
+#include "actionrights.h"
+
+#include "objects.h"
+#include "catclasses.h"
+#include "stdsystem.h"
+#include "acclasses.h"
+#include "pcclasses.h"
+#include "standardsmeta.h"
+#include "standardsdatawaste.h"
+#include "standardsdatacomments.h"
+
+void StandardsDataController::doRecover(const QString &id)
+{
+ QString username = identityKeyOfLoginUser();
+ ItisUser user = ItisUser::getByIdentityKey(username);
+ if (!user.isNull())
+ {
+ auto conti = TActionController::name();
+ auto con = TActionController::activeAction();
+ QString uri = "/" + conti + "/" + con;
+
+ if(ActionRights::isInGroups(user.groups(), "c", uri))
+ {
+ renderJson( StandardsDataWaste::doRecover(id.toInt()) );
+ }
+ else
+ {
+ QString red_msg = " Not authorized to access the page or resource you were trying to reach.";
+ texport(red_msg);
+ render("index");
+ }
+ }
+ else
+ {
+ redirect(QUrl("/account/form"));
+ }
+}
+
+void StandardsDataController::listWaste()
+{
+ QString username = identityKeyOfLoginUser();
+ ItisUser user = ItisUser::getByIdentityKey(username);
+ if (!user.isNull())
+ {
+ auto conti = TActionController::name();
+ auto con = TActionController::activeAction();
+ QString uri = "/" + conti + "/" + con;
+
+ if(ActionRights::isInGroups(user.groups(), "r", uri))
+ {
+ int count = StandardsDataWaste::count();
+ QString counter = QString::number(count);
+ texport(counter);
+
+ // bug in PROD
+ auto standardsDataWasteList = StandardsDataWaste::getAll();
+ //auto standardsDataWasteList = StandardsDataWaste::getAllJson();
+ texport(standardsDataWasteList);
+
+ render();
+ }
+ else
+ {
+ QString red_msg = " Not authorized to access the page or resource you were trying to reach.";
+ texport(red_msg);
+ render("index");
+ }
+ }
+ else
+ {
+ redirect(QUrl("/account/form"));
+ }
+}
+
+void StandardsDataController::getStdToc()
+{
+ QString username = identityKeyOfLoginUser();
+ ItisUser user = ItisUser::getByIdentityKey(username);
+ if (!user.isNull())
+ {
+ QMap stdDataMap;
+
+ stdDataMap["obj_sname"] = httpRequest().formItemValue("obj_sname");
+ stdDataMap["cat_sname_en"] = httpRequest().formItemValue("cat_sname_en");
+ stdDataMap["country"] = httpRequest().formItemValue("country");
+ stdDataMap["lang"] = httpRequest().formItemValue("lang");
+ stdDataMap["spec_active"] = httpRequest().formItemValue("spec_active");
+ stdDataMap["ac_class"] = httpRequest().formItemValue("ac_class");
+ stdDataMap["pc_class"] = httpRequest().formItemValue("pc_class");
+ stdDataMap["spec_release"] = httpRequest().formItemValue("spec_release");
+ stdDataMap["getStdType"] = httpRequest().formItemValue("getStdType");
+
+ /* ####
+ stdDataMap["obj_sname"] = "BD";
+ stdDataMap["cat_sname_en"] = "Construction";
+ stdDataMap["country"] = "WW";
+ stdDataMap["lang"] = "de_DE";
+ stdDataMap["spec_active"] = "1";
+ stdDataMap["ac_class"] = "3";
+ stdDataMap["pc_class"] = "3";
+ stdDataMap["spec_release"] = "draft";
+ stdDataMap["getStdType"] = "show";
+ */
+ renderJson( StandardsData::getStdToc(stdDataMap) );
+ }
+ else
+ {
+ redirect(QUrl("/account/form"));
+ }
+}
+
+/*!
+ * \brief StandardsDataController::getStdList
+ *
+ * param = list | show
+ *
+*/
+void StandardsDataController::getStdList()
+{
+ QString username = identityKeyOfLoginUser();
+ ItisUser user = ItisUser::getByIdentityKey(username);
+ if (!user.isNull())
+ {
+ auto conti = TActionController::name();
+ auto con = TActionController::activeAction();
+ QString uri = "/" + conti + "/" + con;
+
+ if(ActionRights::isInGroups(user.groups(), "r", uri))
+ {
+ QMap stdDataMap;
+
+ stdDataMap["obj_sname"] = httpRequest().formItemValue("obj_sname");
+ stdDataMap["cat_sname_en"] = httpRequest().formItemValue("cat_sname_en");
+ stdDataMap["country"] = httpRequest().formItemValue("country");
+ stdDataMap["lang"] = httpRequest().formItemValue("lang");
+ stdDataMap["spec_active"] = httpRequest().formItemValue("spec_active");
+ stdDataMap["ac_class"] = httpRequest().formItemValue("ac_class");
+ stdDataMap["pc_class"] = httpRequest().formItemValue("pc_class");
+ stdDataMap["spec_release"] = httpRequest().formItemValue("spec_release");
+ stdDataMap["getStdType"] = httpRequest().formItemValue("getStdType");
+
+ /* ####
+ stdDataMap["obj_sname"] = "BD";
+ stdDataMap["cat_sname_en"] = "Construction";
+ stdDataMap["country"] = "WW";
+ stdDataMap["lang"] = "de_DE";
+ stdDataMap["spec_active"] = "1";
+ stdDataMap["ac_class"] = "3";
+ stdDataMap["pc_class"] = "3";
+ stdDataMap["spec_release"] = "draft";
+ stdDataMap["getStdType"] = "show";
+ */
+
+ if(stdDataMap["getStdType"].compare("list") == 0)
+ {
+ renderJson( StandardsData::getStdList(stdDataMap) );
+ }
+ else
+ {
+ renderJson( StandardsData::getStdShow(stdDataMap) );
+ }
+ }
+ else
+ {
+ QString red_msg = " Not authorized to access the page or resource you were trying to reach.";
+ texport(red_msg);
+ render("index");
+ }
+ }
+ else
+ {
+ redirect(QUrl("/account/form"));
+ }
+}
+
+void StandardsDataController::getExistCountries()
+{
+ renderJson( StandardsData::getExistCountries() );
+}
+
+void StandardsDataController::showCiStd()
+{
+ QString username = identityKeyOfLoginUser();
+ ItisUser user = ItisUser::getByIdentityKey(username);
+ if (!user.isNull())
+ {
+ auto conti = TActionController::name();
+ auto con = TActionController::activeAction();
+ QString uri = "/" + conti + "/" + con;
+
+ if(ActionRights::isInGroups(user.groups(), "r", uri))
+ {
+ QString strGroups = ItisUser::sqlGroups( user.groups(), "r" );
+ QJsonArray jsonCategories = CatClasses::getAllJson("1", "category", strGroups);
+ texport(jsonCategories);
+
+ QString obj_sname = httpRequest().formItemValue("obj_sname");
+ texport(obj_sname);
+ QString country = httpRequest().formItemValue("country");
+ texport(country);
+ QString lang = httpRequest().formItemValue("lang");
+ texport(lang);
+ QString ac_class = httpRequest().formItemValue("ac_class");
+ texport(ac_class);
+ QString pc_class = httpRequest().formItemValue("pc_class");
+ texport(pc_class);
+ QString spec_release = httpRequest().formItemValue("spec_release");
+ texport(spec_release);
+ QString getStdTyp = httpRequest().formItemValue("getStdType");
+ texport(getStdTyp);
+ QString release_id = httpRequest().formItemValue("release_id");
+ texport(release_id);
+
+
+ /*/ ####
+ QString obj_sname = "DBA";
+ texport(obj_sname);
+ QString country = "WW";
+ texport(country);
+ QString lang = "de_DE";
+ texport(lang);
+ QString ac_class = "2";
+ texport(ac_class);
+ QString pc_class = "3";
+ texport(pc_class);
+ QString spec_release = "pre-release";
+ texport(spec_release);
+ QString getStdType = "show";
+ texport(getStdType);
+ QString release_id = "19";
+ texport(release_id);
+ */
+
+ render();
+ }
+ else
+ {
+ QString red_msg = " Not authorized to access the page or resource you were trying to reach.";
+ texport(red_msg);
+ render("index");
+ }
+ }
+ else
+ {
+ redirect(QUrl("/account/form"));
+ }
+}
+
+void StandardsDataController::showStd()
+{
+ QString username = identityKeyOfLoginUser();
+ ItisUser user = ItisUser::getByIdentityKey(username);
+ if (!user.isNull())
+ {
+ auto conti = TActionController::name();
+ auto con = TActionController::activeAction();
+ QString uri = "/" + conti + "/" + con;
+
+ if(ActionRights::isInGroups(user.groups(), "r", uri))
+ {
+ QString strGroups = ItisUser::sqlGroups( user.groups(), "r" );
+
+ QJsonArray jsonReleaseTypes = StdSystem::getAllJson("1", "release_types");
+ texport(jsonReleaseTypes);
+
+ QJsonArray jsonLanguages = StdSystem::getAllJson("1", "languages");
+ texport(jsonLanguages);
+
+ //QJsonArray jsonObjects = Objects::getAllJson("1");
+ QJsonArray jsonObjects = Objects::getAllJson( "1", strGroups );
+ texport(jsonObjects);
+
+ //QJsonArray jsonCategories = CatClasses::getAllJson("1", "category");
+ QJsonArray jsonCategories = CatClasses::getAllJson("1", "category", strGroups);
+ texport(jsonCategories);
+
+ QJsonArray jsonExistCountries = StandardsData::getExistCountries();
+ texport(jsonExistCountries);
+
+ render();
+ }
+ else
+ {
+ QString red_msg = " Not authorized to access the page or resource you were trying to reach.";
+ texport(red_msg);
+ render("index");
+ }
+ }
+ else
+ {
+ redirect(QUrl("/account/form"));
+ }
+}
+
+void StandardsDataController::showStdElectron()
+{
+ QString username = identityKeyOfLoginUser();
+ ItisUser user = ItisUser::getByIdentityKey(username);
+ if (!user.isNull())
+ {
+ auto conti = TActionController::name();
+ auto con = TActionController::activeAction();
+ QString uri = "/" + conti + "/" + con;
+
+ if(ActionRights::isInGroups(user.groups(), "r", uri))
+ {
+ QJsonArray jsonReleaseTypes = StdSystem::getAllJson("1", "release_types");
+ texport(jsonReleaseTypes);
+
+ QJsonArray jsonLanguages = StdSystem::getAllJson("1", "languages");
+ texport(jsonLanguages);
+
+ QJsonArray jsonObjects = Objects::getAllJson("1");
+ texport(jsonObjects);
+
+ QJsonArray jsonCategories = CatClasses::getAllJson("1", "category");
+ texport(jsonCategories);
+
+ QJsonArray jsonExistCountries = StandardsData::getExistCountries();
+ texport(jsonExistCountries);
+
+ render();
+ }
+ else
+ {
+ QString red_msg = " Not authorized to access the page or resource you were trying to reach.";
+ texport(red_msg);
+ render("index");
+ }
+ }
+ else
+ {
+ redirect(QUrl("/account/form"));
+ }
+}
+
+void StandardsDataController::getStdSpec()
+{
+ QString username = identityKeyOfLoginUser();
+ ItisUser user = ItisUser::getByIdentityKey(username);
+ if (!user.isNull())
+ {
+ auto conti = TActionController::name();
+ auto con = TActionController::activeAction();
+ QString uri = "/" + conti + "/" + con;
+
+ if(ActionRights::isInGroups(user.groups(), "r", uri))
+ {
+ QString id = httpRequest().queryItemValue("id");
+ int lid = id.toInt();
+ renderJson( StandardsData::getStdSpec(lid) );
+ }
+ else
+ {
+ QString red_msg = " Not authorized to access the page or resource you were trying to reach.";
+ texport(red_msg);
+ render("index");
+ }
+ }
+ else
+ {
+ redirect(QUrl("/account/form"));
+ }
+}
+
+void StandardsDataController::listStd()
+{
+ QString username = identityKeyOfLoginUser();
+ ItisUser user = ItisUser::getByIdentityKey(username);
+ if (!user.isNull())
+ {
+ auto conti = TActionController::name();
+ auto con = TActionController::activeAction();
+ QString uri = "/" + conti + "/" + con;
+
+ if(ActionRights::isInGroups(user.groups(), "r", uri))
+ {
+ QString strGroups = ItisUser::sqlGroups( user.groups(), "r" );
+
+ QJsonArray jsonReleaseTypes = StdSystem::getAllJson("1", "release_types");
+ texport(jsonReleaseTypes);
+
+ QJsonArray jsonLanguages = StdSystem::getAllJson("1", "languages");
+ texport(jsonLanguages);
+
+ //QJsonArray jsonObjects = Objects::getAllJson("1");
+ QJsonArray jsonObjects = Objects::getAllJson( "1", strGroups );
+ texport(jsonObjects);
+
+ //QJsonArray jsonCategories= CatClasses::getAllJson("1", "category");
+ QJsonArray jsonCategories= CatClasses::getAllJson("1", "category", strGroups);
+ texport(jsonCategories);
+
+ QJsonArray jsonExistCountries= StandardsData::getExistCountries();
+ texport(jsonExistCountries);
+
+ render();
+ }
+ else
+ {
+ QString red_msg = " Not authorized to access the page or resource you were trying to reach.";
+ texport(red_msg);
+ render("index");
+ }
+ }
+ else
+ {
+ redirect(QUrl("/account/form"));
+ }
+}
+
+void StandardsDataController::checkLfdnrCat()
+{
+ QString username = identityKeyOfLoginUser();
+ ItisUser user = ItisUser::getByIdentityKey(username);
+ if (!user.isNull())
+ {
+ QString countCheckLfdnrCat = QString::number( StandardsData::countCheckLfdnrCat() );
+ texport(countCheckLfdnrCat);
+
+ render();
+ }
+ else
+ {
+ redirect(QUrl("/account/form"));
+ }
+}
+
+void StandardsDataController::getCheckLfdnrCat()
+{
+ QString username = identityKeyOfLoginUser();
+ ItisUser user = ItisUser::getByIdentityKey(username);
+ if (!user.isNull())
+ {
+ renderJson( StandardsData::getCheckLfdnrCat() );
+ }
+ else
+ {
+ redirect(QUrl("/account/form"));
+ }
+}
+
+void StandardsDataController::uploadImg()
+{
+ QString username = identityKeyOfLoginUser();
+ ItisUser user = ItisUser::getByIdentityKey(username);
+ if (!user.isNull())
+ {
+ QJsonObject textObject;
+
+ TMultipartFormData &formdata = httpRequest().multipartFormData();
+ //QString origname = formdata.originalFileName("picture");
+
+ QString origname = formdata.originalFileName("upload");
+ origname = origname.toLower();
+
+ QString fpath = "/webapp/html/itis/Img/Objspecs/" + origname;
+ formdata.renameUploadedFile("upload", fpath);
+
+ textObject["url"] = "/Objspecs/" + origname;
+ renderJson(textObject);
+ }
+ else
+ {
+ redirect(QUrl("/account/form"));
+ }
+}
+
+void StandardsDataController::getImages()
+{
+ QJsonObject jsonObject;
+ QJsonArray jsonArray;
+ QString pathToImg = "/webapp/html/itis/Img/Objspecs";
+ QDir directory(pathToImg);
+ QStringList images = directory.entryList(QStringList() << "*.jpg" << "*.jpeg" << "*.png" << "*.bmp" << "*.gif",QDir::Files);
+
+ foreach(QString filename, images)
+ {
+ QFileInfo info(pathToImg + "/" + filename);
+ jsonObject["size"] = info.size() / 1024;
+ jsonObject["img"] = "/Objspecs/" + filename;
+ jsonObject["name"] = filename;
+ jsonArray.append(jsonObject);
+ }
+ renderJson(jsonArray);
+}
+
+void StandardsDataController::upReleased()
+{
+ QString username = identityKeyOfLoginUser();
+ ItisUser user = ItisUser::getByIdentityKey(username);
+ if (!user.isNull())
+ {
+ auto conti = TActionController::name();
+ auto con = TActionController::activeAction();
+ QString uri = "/" + conti + "/" + con;
+
+ if(ActionRights::isInGroups(user.groups(), "u", uri))
+ {
+ QString id = httpRequest().formItemValue("id");
+ int lid = id.toInt();
+ renderJson( StandardsData::upReleased(lid) );
+ }
+ else
+ {
+ QString red_msg = " Not authorized to access the page or resource you were trying to reach.";
+ texport(red_msg);
+ render("index");
+ }
+ }
+ else
+ {
+ redirect(QUrl("/account/form"));
+ }
+}
+
+void StandardsDataController::doPreRelease()
+{
+ QString username = identityKeyOfLoginUser();
+ ItisUser user = ItisUser::getByIdentityKey(username);
+ if (!user.isNull())
+ {
+ auto conti = TActionController::name();
+ auto con = TActionController::activeAction();
+ QString uri = "/" + conti + "/" + con;
+
+ if(ActionRights::isInGroups(user.groups(), "u", uri))
+ {
+ QMap stdDataMap;
+
+ stdDataMap["obj_sname"] = httpRequest().formItemValue("obj_sname");
+ stdDataMap["ac_classes"] = httpRequest().formItemValue("ac_classes");
+ stdDataMap["pc_classes"] = httpRequest().formItemValue("pc_classes");
+ stdDataMap["cat_class"] = httpRequest().formItemValue("cat_class");
+ stdDataMap["country"] = httpRequest().formItemValue("country");
+ stdDataMap["lang"] = httpRequest().formItemValue("lang");
+ stdDataMap["doc_type"] = "standard";
+ stdDataMap["rel_requester"] = user.email();
+ stdDataMap["relrequest_date"] = httpRequest().formItemValue("relrequest_date");
+
+ renderJson( StandardsData::doPreRelease(stdDataMap) );
+ }
+ else
+ {
+ QString red_msg = " Not authorized to access the page or resource you were trying to reach.";
+ texport(red_msg);
+ render("index");
+ }
+ }
+ else
+ {
+ redirect(QUrl("/account/form"));
+ }
+}
+
+void StandardsDataController::upPrelease()
+{
+ QString username = identityKeyOfLoginUser();
+ ItisUser user = ItisUser::getByIdentityKey(username);
+ if (!user.isNull())
+ {
+ auto conti = TActionController::name();
+ auto con = TActionController::activeAction();
+ QString uri = "/" + conti + "/" + con;
+
+ if(ActionRights::isInGroups(user.groups(), "u", uri))
+ {
+ QString id = httpRequest().formItemValue("id");
+ int lid = id.toInt();
+ renderJson( StandardsData::upPrelease(lid) );
+ }
+ else
+ {
+ QString red_msg = " Not authorized to access the page or resource you were trying to reach.";
+ texport(red_msg);
+ render("index");
+ }
+ }
+ else
+ {
+ redirect(QUrl("/account/form"));
+ }
+}
+
+void StandardsDataController::updStdData()
+{
+ QString username = identityKeyOfLoginUser();
+ ItisUser user = ItisUser::getByIdentityKey(username);
+ if (!user.isNull())
+ {
+ auto conti = TActionController::name();
+ auto con = TActionController::activeAction();
+ QString uri = "/" + conti + "/" + con;
+
+ if(ActionRights::isInGroups(user.groups(), "u", uri))
+ {
+ QMap stdDataMap;
+
+ stdDataMap["id"] = httpRequest().formItemValue("id");
+ stdDataMap["spec_title"] = httpRequest().formItemValue("spec_title");
+ stdDataMap["spec_desc"] = httpRequest().formItemValue("spec_desc");
+ stdDataMap["obj_sname"] = httpRequest().formItemValue("obj_sname");
+ stdDataMap["cat_class"] = httpRequest().formItemValue("cat_class");
+ stdDataMap["country"] = httpRequest().formItemValue("country");
+ stdDataMap["lang"] = httpRequest().formItemValue("lang");
+ stdDataMap["ac_classes"] = httpRequest().formItemValue("ac_classes");
+ stdDataMap["pc_classes"] = httpRequest().formItemValue("pc_classes");
+ stdDataMap["spec_version"] = httpRequest().formItemValue("spec_version");
+ stdDataMap["spec_version_new"] = httpRequest().formItemValue("spec_version_new");
+ stdDataMap["lfdnr"] = httpRequest().formItemValue("lfdnr");
+ stdDataMap["spec_release"] = httpRequest().formItemValue("spec_release");
+ stdDataMap["last_editor"] = httpRequest().formItemValue("last_editor");
+ stdDataMap["spec_valid_start"] = httpRequest().formItemValue("spec_valid_start");
+ stdDataMap["spec_valid_end"] = httpRequest().formItemValue("spec_valid_end");
+ stdDataMap["spec_active"] = httpRequest().formItemValue("spec_active");
+ stdDataMap["spec_content"] = httpRequest().formItemValue("spec_content");
+ stdDataMap["g_legacy"] = httpRequest().formItemValue("g_legacy");
+ stdDataMap["resp"] = httpRequest().formItemValue("resp");
+ stdDataMap["comment"] = httpRequest().formItemValue("comment");
+ stdDataMap["marker"] = httpRequest().formItemValue("marker");
+
+ renderJson( StandardsData::updStdData(stdDataMap) );
+ }
+ else
+ {
+ QString red_msg = " Not authorized to access the page or resource you were trying to reach.";
+ texport(red_msg);
+ render("index");
+ }
+ }
+ else
+ {
+ redirect(QUrl("/account/form"));
+ }
+}
+
+void StandardsDataController::setStdData()
+{
+ QString username = identityKeyOfLoginUser();
+ ItisUser user = ItisUser::getByIdentityKey(username);
+ if (!user.isNull())
+ {
+ auto conti = TActionController::name();
+ auto con = TActionController::activeAction();
+ QString uri = "/" + conti + "/" + con;
+
+ if(ActionRights::isInGroups(user.groups(), "c", uri))
+ {
+ QMap stdDataMap;
+
+ stdDataMap["spec_title"] = httpRequest().formItemValue("spec_title");
+ stdDataMap["spec_desc"] = httpRequest().formItemValue("spec_desc");
+ stdDataMap["obj_sname"] = httpRequest().formItemValue("obj_sname");
+ stdDataMap["cat_class"] = httpRequest().formItemValue("cat_class");
+ stdDataMap["country"] = httpRequest().formItemValue("country");
+ stdDataMap["lang"] = httpRequest().formItemValue("lang");
+ stdDataMap["ac_classes"] = httpRequest().formItemValue("ac_classes");
+ stdDataMap["pc_classes"] = httpRequest().formItemValue("pc_classes");
+ stdDataMap["spec_version"] = httpRequest().formItemValue("spec_version");
+ stdDataMap["spec_version_new"] = httpRequest().formItemValue("spec_version_new");
+ stdDataMap["lfdnr"] = httpRequest().formItemValue("lfdnr");
+ stdDataMap["spec_release"] = httpRequest().formItemValue("spec_release");
+ stdDataMap["last_editor"] = httpRequest().formItemValue("last_editor");
+ stdDataMap["spec_valid_start"] = httpRequest().formItemValue("spec_valid_start");
+ stdDataMap["spec_valid_end"] = httpRequest().formItemValue("spec_valid_end");
+ stdDataMap["spec_active"] = httpRequest().formItemValue("spec_active");
+ stdDataMap["spec_content"] = httpRequest().formItemValue("spec_content");
+ stdDataMap["g_legacy"] = httpRequest().formItemValue("g_legacy");
+ stdDataMap["resp"] = httpRequest().formItemValue("resp");
+ stdDataMap["comment"] = httpRequest().formItemValue("comment");
+ stdDataMap["marker"] = httpRequest().formItemValue("marker");
+
+ renderJson( StandardsData::setStdData(stdDataMap) );
+ }
+ else
+ {
+ QString red_msg = " Not authorized to access the page or resource you were trying to reach.";
+ texport(red_msg);
+ render("index");
+ }
+ }
+ else
+ {
+ redirect(QUrl("/account/form"));
+ }
+}
+
+void StandardsDataController::getHighestLfdnr(const QString &category)
+{
+ renderJson( StandardsData::getHighestLfdnr(category) );
+}
+
+void StandardsDataController::chkLfdnrEditor()
+{
+ QMap editMap;
+
+ editMap["cat_class"] = httpRequest().queryItemValue("cat");
+ editMap["lfdnr"] = httpRequest().queryItemValue("lfdnr");
+
+ renderJson( StandardsData::chkLfdnrEditor(editMap) );
+}
+
+void StandardsDataController::editor_upd(const QString &id)
+{
+ QString username = identityKeyOfLoginUser();
+ ItisUser user = ItisUser::getByIdentityKey(username);
+ if (!user.isNull())
+ {
+ auto conti = TActionController::name();
+ auto con = TActionController::activeAction();
+ QString uri = "/" + conti + "/" + con;
+
+ if(ActionRights::isInGroups(user.groups(), "u", uri))
+ {
+ QString strGroups = ItisUser::sqlGroups( user.groups(), "u" );
+
+ auto standardsData = StandardsData::get(id.toInt());
+ texport(standardsData);
+
+ auto standardsMeta = StandardsMeta::getBySpecDataId(id.toInt());
+ texport(standardsMeta);
+
+ QJsonArray jsonReleaseTypes = StdSystem::getAllJson("1", "release_types");
+ texport(jsonReleaseTypes);
+ QJsonArray jsonPcClasses = PcClasses::getPcClassesJson();
+ texport(jsonPcClasses);
+ QJsonArray jsonAcClasses = AcClasses::getAcClassesJson();
+ texport(jsonAcClasses);
+ QJsonArray jsonLanguages = StdSystem::getAllJson("1", "languages");
+ texport(jsonLanguages);
+ QJsonArray jsonObjects = Objects::getAllJson( "1", strGroups );
+ //QJsonArray jsonObjects = Objects::getAllJson( "1" );
+ texport(jsonObjects);
+ //QJsonArray jsonCategories= CatClasses::getAllJson("1", "category");
+ QJsonArray jsonCategories= CatClasses::getAllJson("1", "category", strGroups);
+ texport(jsonCategories);
+ QString userMail = user.email();
+ texport(userMail);
+ QString textcomment = QString::number( StandardsDataComments::getSpecsCommentsCount(id.toInt() ));
+ texport(textcomment);
+
+ render();
+ }
+ else
+ {
+ QString red_msg = " Not authorized to access the page or resource you were trying to reach.";
+ texport(red_msg);
+ render("index");
+ }
+ }
+ else
+ {
+ redirect(QUrl("/account/form"));
+ }
+}
+
+void StandardsDataController::editor_add()
+{
+ QString username = identityKeyOfLoginUser();
+ ItisUser user = ItisUser::getByIdentityKey(username);
+ if (!user.isNull())
+ {
+ auto conti = TActionController::name();
+ auto con = TActionController::activeAction();
+ QString uri = "/" + conti + "/" + con;
+
+ if(ActionRights::isInGroups(user.groups(), "c", uri))
+ {
+ QString strGroups = ItisUser::sqlGroups( user.groups(), "c" );
+
+ QJsonArray jsonReleaseTypes = StdSystem::getAllJson("1", "release_types");
+ texport(jsonReleaseTypes);
+ QJsonArray jsonPcClasses = PcClasses::getPcClassesJson();
+ texport(jsonPcClasses);
+ QJsonArray jsonAcClasses = AcClasses::getAcClassesJson();
+ texport(jsonAcClasses);
+ QJsonArray jsonLanguages = StdSystem::getAllJson("1", "languages");
+ texport(jsonLanguages);
+ //QJsonArray jsonObjects = Objects::getAllJson("1");
+ QJsonArray jsonObjects = Objects::getAllJson( "1", strGroups );
+ texport(jsonObjects);
+ //QJsonArray jsonCategories= CatClasses::getAllJson("1", "category");
+ QJsonArray jsonCategories= CatClasses::getAllJson("1", "category", strGroups);
+ texport(jsonCategories);
+ QString userMail = user.email();
+ texport(userMail);
+
+ render();
+ }
+ else
+ {
+ QString red_msg = " Not authorized to access the page or resource you were trying to reach.";
+ texport(red_msg);
+ render("index");
+ }
+ }
+ else
+ {
+ redirect(QUrl("/account/form"));
+ }
+}
+
+void StandardsDataController::getStatistics()
+{
+ renderJson( StandardsData::getStatistics() );
+}
+
+void StandardsDataController::list_all()
+{
+ QString username = identityKeyOfLoginUser();
+ ItisUser user = ItisUser::getByIdentityKey(username);
+ if (!user.isNull())
+ {
+ auto conti = TActionController::name();
+ auto con = TActionController::activeAction();
+ QString uri = "/" + conti + "/" + con;
+
+ if(ActionRights::isInGroups(user.groups(), "r", uri))
+ {
+ auto standardsDataList = StandardsData::getAll();
+ texport(standardsDataList);
+ render();
+ }
+ else
+ {
+ QString red_msg = " Not authorized to access the page or resource you were trying to reach.";
+ texport(red_msg);
+ render("index");
+ }
+ }
+ else
+ {
+ redirect(QUrl("/account/form"));
+ }
+}
+
+void StandardsDataController::index()
+{
+ QString username = identityKeyOfLoginUser();
+ ItisUser user = ItisUser::getByIdentityKey(username);
+ if (!user.isNull())
+ {
+ render();
+ }
+ else
+ {
+ redirect(QUrl("/account/form"));
+ }
+}
+
+void StandardsDataController::show(const QString &id)
+{
+ QString username = identityKeyOfLoginUser();
+ ItisUser user = ItisUser::getByIdentityKey(username);
+ if (!user.isNull())
+ {
+ auto conti = TActionController::name();
+ auto con = TActionController::activeAction();
+ QString uri = "/" + conti + "/" + con;
+
+ if(ActionRights::isInGroups(user.groups(), "r_d", uri))
+ {
+ auto standardsData = StandardsData::get(id.toInt());
+ texport(standardsData);
+ render();
+ }
+ else
+ {
+ QString red_msg = " Not authorized to access the page or resource you were trying to reach.";
+ texport(red_msg);
+ render("index");
+ }
+ }
+ else
+ {
+ redirect(QUrl("/account/form"));
+ }
+}
+
+void StandardsDataController::showWaste(const QString &id)
+{
+ QString username = identityKeyOfLoginUser();
+ ItisUser user = ItisUser::getByIdentityKey(username);
+ if (!user.isNull())
+ {
+ auto conti = TActionController::name();
+ auto con = TActionController::activeAction();
+ QString uri = "/" + conti + "/" + con;
+
+ if(ActionRights::isInGroups(user.groups(), "cr_d", uri))
+ {
+ auto standardsDataWaste = StandardsDataWaste::get(id.toInt());
+ texport(standardsDataWaste);
+ render();
+ }
+ else
+ {
+ QString red_msg = " Not authorized to access the page or resource you were trying to reach.";
+ texport(red_msg);
+ render("index");
+ }
+ }
+ else
+ {
+ redirect(QUrl("/account/form"));
+ }
+}
+
+
+void StandardsDataController::create()
+{
+ QString username = identityKeyOfLoginUser();
+ ItisUser user = ItisUser::getByIdentityKey(username);
+ if (!user.isNull())
+ {
+ auto conti = TActionController::name();
+ auto con = TActionController::activeAction();
+ QString uri = "/" + conti + "/" + con;
+
+ if(ActionRights::isInGroups(user.groups(), "c", uri))
+ {
+ switch (httpRequest().method()) {
+ case Tf::Get:
+ render();
+ break;
+
+ case Tf::Post: {
+ auto standardsData = httpRequest().formItems("standardsData");
+ auto model = StandardsData::create(standardsData);
+
+ if (!model.isNull()) {
+ QString notice = "Created successfully.";
+ tflash(notice);
+ redirect(urla("show", model.id()));
+ } else {
+ QString error = "Failed to create.";
+ texport(error);
+ texport(standardsData);
+ render();
+ }
+ break; }
+
+ default:
+ renderErrorResponse(Tf::NotFound);
+ break;
+ }
+ }
+ else
+ {
+ QString red_msg = " Not authorized to access the page or resource you were trying to reach.";
+ texport(red_msg);
+ render("index");
+ }
+ }
+ else
+ {
+ redirect(QUrl("/account/form"));
+ }
+}
+
+void StandardsDataController::save(const QString &id)
+{
+ QString username = identityKeyOfLoginUser();
+ ItisUser user = ItisUser::getByIdentityKey(username);
+ if (!user.isNull())
+ {
+ auto conti = TActionController::name();
+ auto con = TActionController::activeAction();
+ QString uri = "/" + conti + "/" + con;
+
+ if(ActionRights::isInGroups(user.groups(), "u", uri))
+ {
+ switch (httpRequest().method()) {
+ case Tf::Get: {
+ auto model = StandardsData::get(id.toInt());
+ if (!model.isNull()) {
+ auto standardsData = model.toVariantMap();
+ texport(standardsData);
+ render();
+ }
+ break; }
+
+ case Tf::Post: {
+ QString error;
+ auto model = StandardsData::get(id.toInt());
+
+ if (model.isNull()) {
+ error = "Original data not found. It may have been updated/removed by another transaction.";
+ tflash(error);
+ redirect(urla("save", id));
+ break;
+ }
+
+ // StandardsMeta::saveMeta( id.toInt(), user.username() );
+
+ auto standardsData = httpRequest().formItems("standardsData");
+ model.setProperties(standardsData);
+ if (model.save()) {
+ QString notice = "Updated successfully.";
+ tflash(notice);
+ redirect(urla("show", model.id()));
+ } else {
+ error = "Failed to update.";
+ texport(error);
+ texport(standardsData);
+ render();
+ }
+ break; }
+
+ default:
+ renderErrorResponse(Tf::NotFound);
+ break;
+ }
+ }
+ else
+ {
+ QString red_msg = " Not authorized to access the page or resource you were trying to reach.";
+ texport(red_msg);
+ render("index");
+ }
+ }
+ else
+ {
+ redirect(QUrl("/account/form"));
+ }
+}
+
+void StandardsDataController::remove(const QString &id)
+{
+ QString username = identityKeyOfLoginUser();
+ ItisUser user = ItisUser::getByIdentityKey(username);
+ if (!user.isNull())
+ {
+ auto conti = TActionController::name();
+ auto con = TActionController::activeAction();
+ QString uri = "/" + conti + "/" + con;
+
+ if(ActionRights::isInGroups(user.groups(), "d", uri))
+ {
+ if (httpRequest().method() != Tf::Post) {
+ renderErrorResponse(Tf::NotFound);
+ return;
+ }
+
+ auto standardsData = StandardsData::get(id.toInt());
+ standardsData.remove();
+
+ auto standardsMeta = StandardsMeta::getBySpecDataId(id.toInt());
+ standardsMeta.remove();
+
+ redirect(urla("index"));
+ }
+ else
+ {
+ QString red_msg = " Not authorized to access the page or resource you were trying to reach.";
+ texport(red_msg);
+ render("index");
+ }
+ }
+ else
+ {
+ redirect(QUrl("/account/form"));
+ }
+}
+
+void StandardsDataController::removeWaste(const QString &id)
+{
+ QString username = identityKeyOfLoginUser();
+ ItisUser user = ItisUser::getByIdentityKey(username);
+ if (!user.isNull())
+ {
+ auto conti = TActionController::name();
+ auto con = TActionController::activeAction();
+ QString uri = "/" + conti + "/" + con;
+
+ if(ActionRights::isInGroups(user.groups(), "d", uri))
+ {
+ if (httpRequest().method() != Tf::Post) {
+ renderErrorResponse(Tf::NotFound);
+ return;
+ }
+
+ auto standardsDataWaste = StandardsDataWaste::get(id.toInt());
+ standardsDataWaste.remove();
+ redirect(urla("listWaste"));
+ }
+ else
+ {
+ QString red_msg = " Not authorized to access the page or resource you were trying to reach.";
+ texport(red_msg);
+ render("index");
+ }
+ }
+ else
+ {
+ redirect(QUrl("/account/form"));
+ }
+}
+
+// Don't remove below this line
+T_DEFINE_CONTROLLER(StandardsDataController)
diff --git a/controllers/standardsdatacontroller.h b/controllers/standardsdatacontroller.h
new file mode 100644
index 0000000..90befea
--- /dev/null
+++ b/controllers/standardsdatacontroller.h
@@ -0,0 +1,54 @@
+#ifndef STANDARDSDATACONTROLLER_H
+#define STANDARDSDATACONTROLLER_H
+
+#include "applicationcontroller.h"
+
+class T_CONTROLLER_EXPORT StandardsDataController : public ApplicationController
+{
+ Q_OBJECT
+public:
+ StandardsDataController() : ApplicationController() {}
+
+public slots:
+ void index();
+ void list_all();
+
+ void getStatistics();
+ void getHighestLfdnr(const QString &category);
+ void getImages();
+ void checkLfdnrCat();
+ void getCheckLfdnrCat();
+
+ void listStd();
+ void showStd();
+ void showCiStd();
+ void showStdElectron();
+ void listWaste();
+ void getExistCountries();
+
+ void show(const QString &id);
+ void create();
+ void save(const QString &id);
+ void remove(const QString &id);
+
+ void editor_add();
+ void editor_upd(const QString &id);
+ void chkLfdnrEditor();
+ void setStdData();
+ void updStdData();
+ void upPrelease();
+ void doPreRelease();
+ void upReleased();
+
+ void doRecover(const QString &id);
+ void showWaste(const QString &id);
+ void removeWaste(const QString &id);
+
+ void uploadImg();
+
+ void getStdList();
+ void getStdSpec();
+ void getStdToc();
+};
+
+#endif // STANDARDSDATACONTROLLER_H
diff --git a/controllers/standardsmetacontroller.cpp b/controllers/standardsmetacontroller.cpp
new file mode 100644
index 0000000..7ba19c8
--- /dev/null
+++ b/controllers/standardsmetacontroller.cpp
@@ -0,0 +1,235 @@
+#include "standardsmetacontroller.h"
+#include "standardsmeta.h"
+
+#include "itisuser.h"
+#include "itisgroups.h"
+#include "accountcontroller.h"
+#include "actionrights.h"
+
+void StandardsMetaController::index()
+{
+ QString username = identityKeyOfLoginUser();
+ ItisUser user = ItisUser::getByIdentityKey(username);
+ if (!user.isNull())
+ {
+ auto standardsMetaList = StandardsMeta::getAll();
+ texport(standardsMetaList);
+ render();
+ }
+ else
+ {
+ redirect(QUrl("/account/form"));
+ }
+}
+
+void StandardsMetaController::getBySpecDataId(const QString &spec_data_id)
+{
+ QString username = identityKeyOfLoginUser();
+ ItisUser user = ItisUser::getByIdentityKey(username);
+ if (!user.isNull())
+ {
+ auto conti = TActionController::name();
+ auto con = TActionController::activeAction();
+ QString uri = "/" + conti + "/" + con;
+
+ if(ActionRights::isInGroups(user.groups(), "r", uri))
+ {
+ auto standardsMeta = StandardsMeta::getBySpecDataId(spec_data_id.toInt());
+ texport(standardsMeta);
+ render();
+ }
+ else
+ {
+ QString red_msg = " Not authorized to access the page or resource you were trying to reach.";
+ texport(red_msg);
+ render("index");
+ }
+ }
+ else
+ {
+ redirect(QUrl("/account/form"));
+ }
+}
+
+void StandardsMetaController::show(const QString &id)
+{
+ QString username = identityKeyOfLoginUser();
+ ItisUser user = ItisUser::getByIdentityKey(username);
+ if (!user.isNull())
+ {
+ auto conti = TActionController::name();
+ auto con = TActionController::activeAction();
+ QString uri = "/" + conti + "/" + con;
+
+ if(ActionRights::isInGroups(user.groups(), "r_d", uri))
+ {
+ auto standardsMeta = StandardsMeta::get(id.toInt());
+ texport(standardsMeta);
+ render();
+ }
+ else
+ {
+ QString red_msg = " Not authorized to access the page or resource you were trying to reach.";
+ texport(red_msg);
+ render("index");
+ }
+ }
+ else
+ {
+ redirect(QUrl("/account/form"));
+ }
+}
+
+void StandardsMetaController::create()
+{
+ QString username = identityKeyOfLoginUser();
+ ItisUser user = ItisUser::getByIdentityKey(username);
+ if (!user.isNull())
+ {
+ auto conti = TActionController::name();
+ auto con = TActionController::activeAction();
+ QString uri = "/" + conti + "/" + con;
+
+ if(ActionRights::isInGroups(user.groups(), "c", uri))
+ {
+ switch (httpRequest().method()) {
+ case Tf::Get:
+ render();
+ break;
+
+ case Tf::Post: {
+ auto standardsMeta = httpRequest().formItems("standardsMeta");
+ auto model = StandardsMeta::create(standardsMeta);
+
+ if (!model.isNull()) {
+ QString notice = "Created successfully.";
+ tflash(notice);
+ redirect(urla("show", model.id()));
+ } else {
+ QString error = "Failed to create.";
+ texport(error);
+ texport(standardsMeta);
+ render();
+ }
+ break; }
+
+ default:
+ renderErrorResponse(Tf::NotFound);
+ break;
+ }
+ }
+ else
+ {
+ QString red_msg = " Not authorized to access the page or resource you were trying to reach.";
+ texport(red_msg);
+ render("index");
+ }
+ }
+ else
+ {
+ redirect(QUrl("/account/form"));
+ }
+}
+
+void StandardsMetaController::save(const QString &id)
+{
+ QString username = identityKeyOfLoginUser();
+ ItisUser user = ItisUser::getByIdentityKey(username);
+ if (!user.isNull())
+ {
+ auto conti = TActionController::name();
+ auto con = TActionController::activeAction();
+ QString uri = "/" + conti + "/" + con;
+
+ if(ActionRights::isInGroups(user.groups(), "u", uri))
+ {
+ switch (httpRequest().method()) {
+ case Tf::Get: {
+ auto model = StandardsMeta::get(id.toInt());
+ if (!model.isNull()) {
+ auto standardsMeta = model.toVariantMap();
+ texport(standardsMeta);
+ render();
+ }
+ break; }
+
+ case Tf::Post: {
+ QString error;
+ auto model = StandardsMeta::get(id.toInt());
+
+ if (model.isNull()) {
+ error = "Original data not found. It may have been updated/removed by another transaction.";
+ tflash(error);
+ redirect(urla("save", id));
+ break;
+ }
+
+ auto standardsMeta = httpRequest().formItems("standardsMeta");
+ model.setProperties(standardsMeta);
+ if (model.save()) {
+ QString notice = "Updated successfully.";
+ tflash(notice);
+ redirect(urla("show", model.id()));
+ } else {
+ error = "Failed to update.";
+ texport(error);
+ texport(standardsMeta);
+ render();
+ }
+ break; }
+
+ default:
+ renderErrorResponse(Tf::NotFound);
+ break;
+ }
+ }
+ else
+ {
+ QString red_msg = " Not authorized to access the page or resource you were trying to reach.";
+ texport(red_msg);
+ render("index");
+ }
+ }
+ else
+ {
+ redirect(QUrl("/account/form"));
+ }
+}
+
+void StandardsMetaController::remove(const QString &id)
+{
+ QString username = identityKeyOfLoginUser();
+ ItisUser user = ItisUser::getByIdentityKey(username);
+ if (!user.isNull())
+ {
+ auto conti = TActionController::name();
+ auto con = TActionController::activeAction();
+ QString uri = "/" + conti + "/" + con;
+
+ if(ActionRights::isInGroups(user.groups(), "d", uri))
+ {
+ if (httpRequest().method() != Tf::Post) {
+ renderErrorResponse(Tf::NotFound);
+ return;
+ }
+
+ auto standardsMeta = StandardsMeta::get(id.toInt());
+ standardsMeta.remove();
+ redirect(urla("index"));
+ }
+ else
+ {
+ QString red_msg = " Not authorized to access the page or resource you were trying to reach.";
+ texport(red_msg);
+ render("index");
+ }
+ }
+ else
+ {
+ redirect(QUrl("/account/form"));
+ }
+}
+
+
+// Don't remove below this line
+T_DEFINE_CONTROLLER(StandardsMetaController)
diff --git a/controllers/standardsmetacontroller.h b/controllers/standardsmetacontroller.h
new file mode 100644
index 0000000..9484293
--- /dev/null
+++ b/controllers/standardsmetacontroller.h
@@ -0,0 +1,22 @@
+#ifndef STANDARDSMETACONTROLLER_H
+#define STANDARDSMETACONTROLLER_H
+
+#include "applicationcontroller.h"
+
+
+class T_CONTROLLER_EXPORT StandardsMetaController : public ApplicationController
+{
+ Q_OBJECT
+public:
+ StandardsMetaController() : ApplicationController() {}
+
+public slots:
+ void index();
+ void show(const QString &id);
+ void getBySpecDataId(const QString &spec_data_id);
+ void create();
+ void save(const QString &id);
+ void remove(const QString &id);
+};
+
+#endif // STANDARDSMETACONTROLLER_H
diff --git a/controllers/stdsystemcontroller.cpp b/controllers/stdsystemcontroller.cpp
new file mode 100644
index 0000000..6fa1af8
--- /dev/null
+++ b/controllers/stdsystemcontroller.cpp
@@ -0,0 +1,271 @@
+#include "stdsystemcontroller.h"
+#include "stdsystem.h"
+
+#include "itisuser.h"
+#include "itisgroups.h"
+#include "accountcontroller.h"
+#include "actionrights.h"
+
+void StdSystemController::getAllJson(const QString &active, const QString &std_type)
+{
+ QString username = identityKeyOfLoginUser();
+ ItisUser user = ItisUser::getByIdentityKey(username);
+ if (!user.isNull())
+ {
+ renderJson( StdSystem::getAllJson(active, std_type) );
+ }
+ else
+ {
+ redirect(QUrl("/account/form"));
+ }
+}
+
+void StdSystemController::list_all()
+{
+ QString username = identityKeyOfLoginUser();
+ ItisUser user = ItisUser::getByIdentityKey(username);
+ if (!user.isNull())
+ {
+ auto conti = TActionController::name();
+ auto con = TActionController::activeAction();
+ QString uri = "/" + conti + "/" + con;
+
+ if(ActionRights::isInGroups(user.groups(), "r", uri))
+ {
+ auto stdSystemList = StdSystem::getAll();
+ texport(stdSystemList);
+ render();
+ }
+ else
+ {
+ QString red_msg = " Not authorized to access the page or resource you were trying to reach.";
+ texport(red_msg);
+ render("index");
+ }
+ }
+ else
+ {
+ redirect(QUrl("/account/form"));
+ }
+}
+
+void StdSystemController::imprint()
+{
+ int currYear = QDate::currentDate().year();
+ QString year = QString::number(currYear);
+ texport(year);
+
+ QString appversion = StdSystem::getAppVersion();
+ texport(appversion);
+
+ render();
+}
+
+void StdSystemController::license()
+{
+ int currYear = QDate::currentDate().year();
+ QString year = QString::number(currYear);
+ texport(year);
+
+ QString appversion = StdSystem::getAppVersion();
+ texport(appversion);
+
+ render();
+}
+
+void StdSystemController::index()
+{
+ QString username = identityKeyOfLoginUser();
+ ItisUser user = ItisUser::getByIdentityKey(username);
+ if (!user.isNull())
+ {
+ render();
+ }
+ else
+ {
+ redirect(QUrl("/account/form"));
+ }
+}
+
+void StdSystemController::show(const QString &id)
+{
+ QString username = identityKeyOfLoginUser();
+ ItisUser user = ItisUser::getByIdentityKey(username);
+ if (!user.isNull())
+ {
+ auto conti = TActionController::name();
+ auto con = TActionController::activeAction();
+ QString uri = "/" + conti + "/" + con;
+
+ if(ActionRights::isInGroups(user.groups(), "r_d", uri))
+ {
+ auto stdSystem = StdSystem::get(id.toInt());
+ texport(stdSystem);
+ render();
+ }
+ else
+ {
+ QString red_msg = " Not authorized to access the page or resource you were trying to reach.";
+ texport(red_msg);
+ render("index");
+ }
+ }
+ else
+ {
+ redirect(QUrl("/account/form"));
+ }
+}
+
+void StdSystemController::create()
+{
+ QString username = identityKeyOfLoginUser();
+ ItisUser user = ItisUser::getByIdentityKey(username);
+ if (!user.isNull())
+ {
+ auto conti = TActionController::name();
+ auto con = TActionController::activeAction();
+ QString uri = "/" + conti + "/" + con;
+
+ if(ActionRights::isInGroups(user.groups(), "c", uri))
+ {
+ switch (httpRequest().method()) {
+ case Tf::Get:
+ render();
+ break;
+
+ case Tf::Post: {
+ auto stdSystem = httpRequest().formItems("stdSystem");
+ auto model = StdSystem::create(stdSystem);
+
+ if (!model.isNull()) {
+ QString notice = "Created successfully.";
+ tflash(notice);
+ redirect(urla("show", model.id()));
+ } else {
+ QString error = "Failed to create.";
+ texport(error);
+ texport(stdSystem);
+ render();
+ }
+ break; }
+
+ default:
+ renderErrorResponse(Tf::NotFound);
+ break;
+ }
+ }
+ else
+ {
+ QString red_msg = " Not authorized to access the page or resource you were trying to reach.";
+ texport(red_msg);
+ render("index");
+ }
+ }
+ else
+ {
+ redirect(QUrl("/account/form"));
+ }
+}
+
+void StdSystemController::save(const QString &id)
+{
+ QString username = identityKeyOfLoginUser();
+ ItisUser user = ItisUser::getByIdentityKey(username);
+ if (!user.isNull())
+ {
+ auto conti = TActionController::name();
+ auto con = TActionController::activeAction();
+ QString uri = "/" + conti + "/" + con;
+
+ if(ActionRights::isInGroups(user.groups(), "u", uri))
+ {
+ switch (httpRequest().method()) {
+ case Tf::Get: {
+ auto model = StdSystem::get(id.toInt());
+ if (!model.isNull()) {
+ auto stdSystem = model.toVariantMap();
+ texport(stdSystem);
+ render();
+ }
+ break; }
+
+ case Tf::Post: {
+ QString error;
+ auto model = StdSystem::get(id.toInt());
+
+ if (model.isNull()) {
+ error = "Original data not found. It may have been updated/removed by another transaction.";
+ tflash(error);
+ redirect(urla("save", id));
+ break;
+ }
+
+ auto stdSystem = httpRequest().formItems("stdSystem");
+ model.setProperties(stdSystem);
+ if (model.save()) {
+ QString notice = "Updated successfully.";
+ tflash(notice);
+ redirect(urla("show", model.id()));
+ } else {
+ error = "Failed to update.";
+ texport(error);
+ texport(stdSystem);
+ render();
+ }
+ break; }
+
+ default:
+ renderErrorResponse(Tf::NotFound);
+ break;
+ }
+ }
+ else
+ {
+ QString red_msg = " Not authorized to access the page or resource you were trying to reach.";
+ texport(red_msg);
+ render("index");
+ }
+ }
+ else
+ {
+ redirect(QUrl("/account/form"));
+ }
+}
+
+void StdSystemController::remove(const QString &id)
+{
+ QString username = identityKeyOfLoginUser();
+ ItisUser user = ItisUser::getByIdentityKey(username);
+ if (!user.isNull())
+ {
+ auto conti = TActionController::name();
+ auto con = TActionController::activeAction();
+ QString uri = "/" + conti + "/" + con;
+
+ if(ActionRights::isInGroups(user.groups(), "d", uri))
+ {
+ if (httpRequest().method() != Tf::Post) {
+ renderErrorResponse(Tf::NotFound);
+ return;
+ }
+
+ auto stdSystem = StdSystem::get(id.toInt());
+ stdSystem.remove();
+ redirect(urla("index"));
+ }
+ else
+ {
+ QString red_msg = " Not authorized to access the page or resource you were trying to reach.";
+ texport(red_msg);
+ render("index");
+ }
+ }
+ else
+ {
+ redirect(QUrl("/account/form"));
+ }
+}
+
+
+// Don't remove below this line
+T_DEFINE_CONTROLLER(StdSystemController)
diff --git a/controllers/stdsystemcontroller.h b/controllers/stdsystemcontroller.h
new file mode 100644
index 0000000..298fc50
--- /dev/null
+++ b/controllers/stdsystemcontroller.h
@@ -0,0 +1,27 @@
+#ifndef STDSYSTEMCONTROLLER_H
+#define STDSYSTEMCONTROLLER_H
+
+#include "applicationcontroller.h"
+
+
+class T_CONTROLLER_EXPORT StdSystemController : public ApplicationController
+{
+ Q_OBJECT
+public:
+ StdSystemController() : ApplicationController() {}
+
+public slots:
+ void index();
+ void show(const QString &id);
+ void create();
+ void save(const QString &id);
+ void remove(const QString &id);
+
+ void list_all();
+ void imprint();
+ void license();
+
+ void getAllJson(const QString &active, const QString &std_type);
+};
+
+#endif // STDSYSTEMCONTROLLER_H
diff --git a/controllers/webmenucontroller.cpp b/controllers/webmenucontroller.cpp
new file mode 100644
index 0000000..9d2a2bb
--- /dev/null
+++ b/controllers/webmenucontroller.cpp
@@ -0,0 +1,264 @@
+#include "webmenucontroller.h"
+#include "webmenu.h"
+
+#include "itisuser.h"
+#include "itisgroups.h"
+#include "accountcontroller.h"
+#include "actionrights.h"
+
+void WebmenuController::list_all()
+{
+ QString username = identityKeyOfLoginUser();
+ ItisUser user = ItisUser::getByIdentityKey(username);
+ if (!user.isNull())
+ {
+ auto conti = TActionController::name();
+ auto con = TActionController::activeAction();
+ QString uri = "/" + conti + "/" + con;
+
+ if(ActionRights::isInGroups(user.groups(), "r", uri))
+ {
+ auto webmenuList = Webmenu::getAll();
+ texport(webmenuList);
+ render();
+ }
+ else
+ {
+ QString red_msg = " Not authorized to access the page or resource you were trying to reach.";
+ texport(red_msg);
+ render("index");
+ }
+ }
+ else
+ {
+ redirect(QUrl("/account/form"));
+ }
+}
+
+void WebmenuController::getMnu()
+{
+ QString username = identityKeyOfLoginUser();
+ ItisUser user = ItisUser::getByIdentityKey(username);
+ if (!user.isNull())
+ {
+ //renderJson( Webmenu::getMnu(user.groups()) );
+ renderJson( Webmenu::getMnu( ItisUser::sqlGroups( user.groups() ) ));
+ }
+ else
+ {
+ redirect(QUrl("/account/form"));
+ }
+}
+
+void WebmenuController::getMnuSub()
+{
+ QString username = identityKeyOfLoginUser();
+ ItisUser user = ItisUser::getByIdentityKey(username);
+ if (!user.isNull())
+ {
+ QString mnu = httpRequest().queryItemValue("mnu");
+ //renderJson( Webmenu::getMnuSub(mnu, user.groups()) );
+ renderJson( Webmenu::getMnuSub( mnu, ItisUser::sqlGroups( user.groups() ) ));
+ }
+ else
+ {
+ redirect(QUrl("/account/form"));
+ }
+}
+
+void WebmenuController::index()
+{
+ QString username = identityKeyOfLoginUser();
+ ItisUser user = ItisUser::getByIdentityKey(username);
+ if (!user.isNull())
+ {
+ render();
+ }
+ else
+ {
+ redirect(QUrl("/account/form"));
+ }
+}
+
+void WebmenuController::show(const QString &id)
+{
+ QString username = identityKeyOfLoginUser();
+ ItisUser user = ItisUser::getByIdentityKey(username);
+ if (!user.isNull())
+ {
+ auto conti = TActionController::name();
+ auto con = TActionController::activeAction();
+ QString uri = "/" + conti + "/" + con;
+
+ if(ActionRights::isInGroups(user.groups(), "r_d", uri))
+ {
+ auto webmenu = Webmenu::get(id.toInt());
+ texport(webmenu);
+ render();
+ }
+ else
+ {
+ QString red_msg = " Not authorized to access the page or resource you were trying to reach.";
+ texport(red_msg);
+ render("index");
+ }
+ }
+ else
+ {
+ redirect(QUrl("/account/form"));
+ }
+}
+
+void WebmenuController::create()
+{
+ QString username = identityKeyOfLoginUser();
+ ItisUser user = ItisUser::getByIdentityKey(username);
+ if (!user.isNull())
+ {
+ auto conti = TActionController::name();
+ auto con = TActionController::activeAction();
+ QString uri = "/" + conti + "/" + con;
+
+ if(ActionRights::isInGroups(user.groups(), "c", uri))
+ {
+ switch (httpRequest().method()) {
+ case Tf::Get:
+ render();
+ break;
+
+ case Tf::Post: {
+ auto webmenu = httpRequest().formItems("webmenu");
+ auto model = Webmenu::create(webmenu);
+
+ if (!model.isNull()) {
+ QString notice = "Created successfully.";
+ tflash(notice);
+ redirect(urla("show", model.id()));
+ } else {
+ QString error = "Failed to create.";
+ texport(error);
+ texport(webmenu);
+ render();
+ }
+ break; }
+
+ default:
+ renderErrorResponse(Tf::NotFound);
+ break;
+ }
+ }
+ else
+ {
+ QString red_msg = " Not authorized to access the page or resource you were trying to reach.";
+ texport(red_msg);
+ render("index");
+ }
+ }
+ else
+ {
+ redirect(QUrl("/account/form"));
+ }
+}
+
+void WebmenuController::save(const QString &id)
+{
+ QString username = identityKeyOfLoginUser();
+ ItisUser user = ItisUser::getByIdentityKey(username);
+ if (!user.isNull())
+ {
+ auto conti = TActionController::name();
+ auto con = TActionController::activeAction();
+ QString uri = "/" + conti + "/" + con;
+
+ if(ActionRights::isInGroups(user.groups(), "u", uri))
+ {
+ switch (httpRequest().method()) {
+ case Tf::Get: {
+ auto model = Webmenu::get(id.toInt());
+ if (!model.isNull()) {
+ auto webmenu = model.toVariantMap();
+ texport(webmenu);
+ render();
+ }
+ break; }
+
+ case Tf::Post: {
+ QString error;
+ auto model = Webmenu::get(id.toInt());
+
+ if (model.isNull()) {
+ error = "Original data not found. It may have been updated/removed by another transaction.";
+ tflash(error);
+ redirect(urla("save", id));
+ break;
+ }
+
+ auto webmenu = httpRequest().formItems("webmenu");
+ model.setProperties(webmenu);
+ if (model.save()) {
+ QString notice = "Updated successfully.";
+ tflash(notice);
+ redirect(urla("show", model.id()));
+ } else {
+ error = "Failed to update.";
+ texport(error);
+ texport(webmenu);
+ render();
+ }
+ break; }
+
+ default:
+ renderErrorResponse(Tf::NotFound);
+ break;
+ }
+ }
+ else
+ {
+ QString red_msg = " Not authorized to access the page or resource you were trying to reach.";
+ texport(red_msg);
+ render("index");
+ }
+ }
+ else
+ {
+ redirect(QUrl("/account/form"));
+ }
+}
+
+void WebmenuController::remove(const QString &id)
+{
+ QString username = identityKeyOfLoginUser();
+ ItisUser user = ItisUser::getByIdentityKey(username);
+ if (!user.isNull())
+ {
+ auto conti = TActionController::name();
+ auto con = TActionController::activeAction();
+ QString uri = "/" + conti + "/" + con;
+
+ if(ActionRights::isInGroups(user.groups(), "d", uri))
+ {
+ if (httpRequest().method() != Tf::Post) {
+ renderErrorResponse(Tf::NotFound);
+ return;
+ }
+
+ auto webmenu = Webmenu::get(id.toInt());
+ webmenu.remove();
+ redirect(urla("index"));
+ }
+ else
+ {
+ QString red_msg = " Not authorized to access the page or resource you were trying to reach.";
+ texport(red_msg);
+ render("index");
+ }
+ }
+ else
+ {
+ redirect(QUrl("/account/form"));
+ }
+}
+
+
+// Don't remove below this line
+T_DEFINE_CONTROLLER(WebmenuController)
diff --git a/controllers/webmenucontroller.h b/controllers/webmenucontroller.h
new file mode 100644
index 0000000..b77e100
--- /dev/null
+++ b/controllers/webmenucontroller.h
@@ -0,0 +1,25 @@
+#ifndef WEBMENUCONTROLLER_H
+#define WEBMENUCONTROLLER_H
+
+#include "applicationcontroller.h"
+
+
+class T_CONTROLLER_EXPORT WebmenuController : public ApplicationController
+{
+ Q_OBJECT
+public:
+ WebmenuController() : ApplicationController() {}
+
+public slots:
+ void index();
+ void show(const QString &id);
+ void create();
+ void save(const QString &id);
+ void remove(const QString &id);
+
+ void list_all();
+ void getMnu();
+ void getMnuSub();
+};
+
+#endif // WEBMENUCONTROLLER_H
diff --git a/core b/core
new file mode 100644
index 0000000..b995765
Binary files /dev/null and b/core differ
diff --git a/helpers/CMakeLists.txt b/helpers/CMakeLists.txt
new file mode 100644
index 0000000..d1413d1
--- /dev/null
+++ b/helpers/CMakeLists.txt
@@ -0,0 +1,30 @@
+add_definitions(-DTF_DLL)
+
+find_package(Qt5 COMPONENTS Core REQUIRED)
+
+if (NOT Qt5_FOUND)
+ message(FATAL_ERROR "Qt5 was not found. Consider setting QT5_CMAKE_PATH to the Qt5Config.cmake directory.")
+endif()
+
+file(GLOB helper_srcs ${PROJECT_SOURCE_DIR}/helpers/*.cpp)
+file(GLOB helper_headers ${PROJECT_SOURCE_DIR}/helpers/*.h)
+
+add_library(helper SHARED
+ ${helper_srcs}
+)
+target_include_directories(helper PUBLIC
+ ${Qt5Core_INCLUDE_DIRS}
+ ${TreeFrog_INCLUDE_DIR}
+)
+target_link_libraries(helper
+ Qt5::Core
+ ${TreeFrog_LIB}
+)
+set_target_properties(helper PROPERTIES
+ LIBRARY_OUTPUT_DIRECTORY ${PROJECT_SOURCE_DIR}/lib
+ ARCHIVE_OUTPUT_DIRECTORY_RELEASE ${PROJECT_SOURCE_DIR}/lib
+ ARCHIVE_OUTPUT_DIRECTORY_DEBUG ${PROJECT_SOURCE_DIR}/lib
+ RUNTIME_OUTPUT_DIRECTORY_RELEASE ${PROJECT_SOURCE_DIR}/lib
+ RUNTIME_OUTPUT_DIRECTORY_DEBUG ${PROJECT_SOURCE_DIR}/lib
+ SOVERSION 1.0
+)
diff --git a/helpers/Makefile b/helpers/Makefile
new file mode 100644
index 0000000..95e2c51
--- /dev/null
+++ b/helpers/Makefile
@@ -0,0 +1,406 @@
+#############################################################################
+# Makefile for building: libhelper.so.1.0.0
+# Generated by qmake (3.1) (Qt 5.12.8)
+# Project: helpers.pro
+# Template: lib
+# Command: /usr/lib/qt5/bin/qmake -o Makefile helpers.pro CONFIG+=debug
+#############################################################################
+
+MAKEFILE = Makefile
+
+EQ = =
+
+####### Compiler, tools and options
+
+CC = gcc
+CXX = g++
+DEFINES = -DTF_DLL -DQT_XML_LIB -DQT_QML_LIB -DQT_NETWORK_LIB -DQT_CORE_LIB
+CFLAGS = -pipe -g -Wall -W -D_REENTRANT -fPIC $(DEFINES)
+CXXFLAGS = -pipe -g -std=gnu++1y -Wall -W -D_REENTRANT -fPIC $(DEFINES)
+INCPATH = -I. -isystem /usr/include/treefrog -isystem /usr/include/x86_64-linux-gnu/qt5 -isystem /usr/include/x86_64-linux-gnu/qt5/QtXml -isystem /usr/include/x86_64-linux-gnu/qt5/QtQml -isystem /usr/include/x86_64-linux-gnu/qt5/QtNetwork -isystem /usr/include/x86_64-linux-gnu/qt5/QtCore -I.obj -I/usr/lib/x86_64-linux-gnu/qt5/mkspecs/linux-g++
+QMAKE = /usr/lib/qt5/bin/qmake
+DEL_FILE = rm -f
+CHK_DIR_EXISTS= test -d
+MKDIR = mkdir -p
+COPY = cp -f
+COPY_FILE = cp -f
+COPY_DIR = cp -f -R
+INSTALL_FILE = install -m 644 -p
+INSTALL_PROGRAM = install -m 755 -p
+INSTALL_DIR = cp -f -R
+QINSTALL = /usr/lib/qt5/bin/qmake -install qinstall
+QINSTALL_PROGRAM = /usr/lib/qt5/bin/qmake -install qinstall -exe
+DEL_FILE = rm -f
+SYMLINK = ln -f -s
+DEL_DIR = rmdir
+MOVE = mv -f
+TAR = tar -cf
+COMPRESS = gzip -9f
+DISTNAME = helper1.0.0
+DISTDIR = /webapp_dez/itis_app/helpers/.obj/helper1.0.0
+LINK = g++
+LFLAGS = -shared -Wl,-soname,libhelper.so.1
+LIBS = $(SUBLIBS) -Wl,-rpath,. -Wl,-rpath,/usr/lib -L/usr/lib -ltreefrog -lrt /usr/lib/x86_64-linux-gnu/libQt5Xml.so /usr/lib/x86_64-linux-gnu/libQt5Qml.so /usr/lib/x86_64-linux-gnu/libQt5Network.so /usr/lib/x86_64-linux-gnu/libQt5Core.so -lpthread
+AR = ar cqs
+RANLIB =
+SED = sed
+STRIP = strip
+
+####### Output directory
+
+OBJECTS_DIR = .obj/
+
+####### Files
+
+SOURCES = applicationhelper.cpp
+OBJECTS = .obj/applicationhelper.o
+DIST = /usr/lib/x86_64-linux-gnu/qt5/mkspecs/features/spec_pre.prf \
+ /usr/lib/x86_64-linux-gnu/qt5/mkspecs/common/unix.conf \
+ /usr/lib/x86_64-linux-gnu/qt5/mkspecs/common/linux.conf \
+ /usr/lib/x86_64-linux-gnu/qt5/mkspecs/common/sanitize.conf \
+ /usr/lib/x86_64-linux-gnu/qt5/mkspecs/common/gcc-base.conf \
+ /usr/lib/x86_64-linux-gnu/qt5/mkspecs/common/gcc-base-unix.conf \
+ /usr/lib/x86_64-linux-gnu/qt5/mkspecs/common/g++-base.conf \
+ /usr/lib/x86_64-linux-gnu/qt5/mkspecs/common/g++-unix.conf \
+ /usr/lib/x86_64-linux-gnu/qt5/mkspecs/qconfig.pri \
+ /usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_accessibility_support_private.pri \
+ /usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_bootstrap_private.pri \
+ /usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_concurrent.pri \
+ /usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_concurrent_private.pri \
+ /usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_core.pri \
+ /usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_core_private.pri \
+ /usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_dbus.pri \
+ /usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_dbus_private.pri \
+ /usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_devicediscovery_support_private.pri \
+ /usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_edid_support_private.pri \
+ /usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_egl_support_private.pri \
+ /usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_eglfs_kms_support_private.pri \
+ /usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_eglfsdeviceintegration_private.pri \
+ /usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_eventdispatcher_support_private.pri \
+ /usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_fb_support_private.pri \
+ /usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_fontdatabase_support_private.pri \
+ /usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_glx_support_private.pri \
+ /usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_gui.pri \
+ /usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_gui_private.pri \
+ /usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_input_support_private.pri \
+ /usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_kms_support_private.pri \
+ /usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_linuxaccessibility_support_private.pri \
+ /usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_network.pri \
+ /usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_network_private.pri \
+ /usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_opengl.pri \
+ /usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_opengl_private.pri \
+ /usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_openglextensions.pri \
+ /usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_openglextensions_private.pri \
+ /usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_platformcompositor_support_private.pri \
+ /usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_printsupport.pri \
+ /usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_printsupport_private.pri \
+ /usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_qml.pri \
+ /usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_qmltest.pri \
+ /usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_quick.pri \
+ /usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_quickwidgets.pri \
+ /usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_service_support_private.pri \
+ /usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_sql.pri \
+ /usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_sql_private.pri \
+ /usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_testlib.pri \
+ /usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_testlib_private.pri \
+ /usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_theme_support_private.pri \
+ /usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_vulkan_support_private.pri \
+ /usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_widgets.pri \
+ /usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_widgets_private.pri \
+ /usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_xcb_qpa_lib_private.pri \
+ /usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_xml.pri \
+ /usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_xml_private.pri \
+ /usr/lib/x86_64-linux-gnu/qt5/mkspecs/features/qt_functions.prf \
+ /usr/lib/x86_64-linux-gnu/qt5/mkspecs/features/qt_config.prf \
+ /usr/lib/x86_64-linux-gnu/qt5/mkspecs/linux-g++/qmake.conf \
+ /usr/lib/x86_64-linux-gnu/qt5/mkspecs/features/spec_post.prf \
+ ../.qmake.stash \
+ /usr/lib/x86_64-linux-gnu/qt5/mkspecs/features/exclusive_builds.prf \
+ /usr/lib/x86_64-linux-gnu/qt5/mkspecs/features/toolchain.prf \
+ /usr/lib/x86_64-linux-gnu/qt5/mkspecs/features/default_pre.prf \
+ ../appbase.pri \
+ /usr/lib/x86_64-linux-gnu/qt5/mkspecs/features/resolve_config.prf \
+ /usr/lib/x86_64-linux-gnu/qt5/mkspecs/features/default_post.prf \
+ /usr/lib/x86_64-linux-gnu/qt5/mkspecs/features/warn_on.prf \
+ /usr/lib/x86_64-linux-gnu/qt5/mkspecs/features/qt.prf \
+ /usr/lib/x86_64-linux-gnu/qt5/mkspecs/features/resources.prf \
+ /usr/lib/x86_64-linux-gnu/qt5/mkspecs/features/moc.prf \
+ /usr/lib/x86_64-linux-gnu/qt5/mkspecs/features/unix/thread.prf \
+ /usr/lib/x86_64-linux-gnu/qt5/mkspecs/features/qmake_use.prf \
+ /usr/lib/x86_64-linux-gnu/qt5/mkspecs/features/file_copies.prf \
+ /usr/lib/x86_64-linux-gnu/qt5/mkspecs/features/testcase_targets.prf \
+ /usr/lib/x86_64-linux-gnu/qt5/mkspecs/features/exceptions.prf \
+ /usr/lib/x86_64-linux-gnu/qt5/mkspecs/features/yacc.prf \
+ /usr/lib/x86_64-linux-gnu/qt5/mkspecs/features/lex.prf \
+ helpers.pro applicationhelper.h applicationhelper.cpp
+QMAKE_TARGET = helper
+DESTDIR = ../lib/
+TARGET = libhelper.so.1.0.0
+TARGETA = ../lib/libhelper.a
+TARGET0 = libhelper.so
+TARGETD = libhelper.so.1.0.0
+TARGET1 = libhelper.so.1
+TARGET2 = libhelper.so.1.0
+
+
+first: all
+####### Build rules
+
+../lib/libhelper.so.1.0.0: $(OBJECTS) $(SUBLIBS) $(OBJCOMP)
+ @test -d ../lib/ || mkdir -p ../lib/
+ -$(DEL_FILE) $(TARGET) $(TARGET0) $(TARGET1) $(TARGET2)
+ $(LINK) $(LFLAGS) -o $(TARGET) $(OBJECTS) $(LIBS) $(OBJCOMP)
+ -ln -s $(TARGET) $(TARGET0)
+ -ln -s $(TARGET) $(TARGET1)
+ -ln -s $(TARGET) $(TARGET2)
+ -$(DEL_FILE) ../lib/$(TARGET)
+ -$(MOVE) $(TARGET) ../lib/$(TARGET)
+ -$(DEL_FILE) ../lib/$(TARGET0)
+ -$(DEL_FILE) ../lib/$(TARGET1)
+ -$(DEL_FILE) ../lib/$(TARGET2)
+ -$(MOVE) $(TARGET0) ../lib/$(TARGET0)
+ -$(MOVE) $(TARGET1) ../lib/$(TARGET1)
+ -$(MOVE) $(TARGET2) ../lib/$(TARGET2)
+
+
+
+staticlib: ../lib/libhelper.a
+
+../lib/libhelper.a: $(OBJECTS) $(OBJCOMP)
+ -$(DEL_FILE) $(TARGETA)
+ $(AR) $(TARGETA) $(OBJECTS)
+
+Makefile: helpers.pro /usr/lib/x86_64-linux-gnu/qt5/mkspecs/linux-g++/qmake.conf /usr/lib/x86_64-linux-gnu/qt5/mkspecs/features/spec_pre.prf \
+ /usr/lib/x86_64-linux-gnu/qt5/mkspecs/common/unix.conf \
+ /usr/lib/x86_64-linux-gnu/qt5/mkspecs/common/linux.conf \
+ /usr/lib/x86_64-linux-gnu/qt5/mkspecs/common/sanitize.conf \
+ /usr/lib/x86_64-linux-gnu/qt5/mkspecs/common/gcc-base.conf \
+ /usr/lib/x86_64-linux-gnu/qt5/mkspecs/common/gcc-base-unix.conf \
+ /usr/lib/x86_64-linux-gnu/qt5/mkspecs/common/g++-base.conf \
+ /usr/lib/x86_64-linux-gnu/qt5/mkspecs/common/g++-unix.conf \
+ /usr/lib/x86_64-linux-gnu/qt5/mkspecs/qconfig.pri \
+ /usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_accessibility_support_private.pri \
+ /usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_bootstrap_private.pri \
+ /usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_concurrent.pri \
+ /usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_concurrent_private.pri \
+ /usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_core.pri \
+ /usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_core_private.pri \
+ /usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_dbus.pri \
+ /usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_dbus_private.pri \
+ /usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_devicediscovery_support_private.pri \
+ /usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_edid_support_private.pri \
+ /usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_egl_support_private.pri \
+ /usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_eglfs_kms_support_private.pri \
+ /usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_eglfsdeviceintegration_private.pri \
+ /usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_eventdispatcher_support_private.pri \
+ /usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_fb_support_private.pri \
+ /usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_fontdatabase_support_private.pri \
+ /usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_glx_support_private.pri \
+ /usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_gui.pri \
+ /usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_gui_private.pri \
+ /usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_input_support_private.pri \
+ /usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_kms_support_private.pri \
+ /usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_linuxaccessibility_support_private.pri \
+ /usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_network.pri \
+ /usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_network_private.pri \
+ /usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_opengl.pri \
+ /usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_opengl_private.pri \
+ /usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_openglextensions.pri \
+ /usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_openglextensions_private.pri \
+ /usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_platformcompositor_support_private.pri \
+ /usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_printsupport.pri \
+ /usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_printsupport_private.pri \
+ /usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_qml.pri \
+ /usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_qmltest.pri \
+ /usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_quick.pri \
+ /usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_quickwidgets.pri \
+ /usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_service_support_private.pri \
+ /usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_sql.pri \
+ /usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_sql_private.pri \
+ /usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_testlib.pri \
+ /usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_testlib_private.pri \
+ /usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_theme_support_private.pri \
+ /usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_vulkan_support_private.pri \
+ /usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_widgets.pri \
+ /usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_widgets_private.pri \
+ /usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_xcb_qpa_lib_private.pri \
+ /usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_xml.pri \
+ /usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_xml_private.pri \
+ /usr/lib/x86_64-linux-gnu/qt5/mkspecs/features/qt_functions.prf \
+ /usr/lib/x86_64-linux-gnu/qt5/mkspecs/features/qt_config.prf \
+ /usr/lib/x86_64-linux-gnu/qt5/mkspecs/linux-g++/qmake.conf \
+ /usr/lib/x86_64-linux-gnu/qt5/mkspecs/features/spec_post.prf \
+ ../.qmake.stash \
+ /usr/lib/x86_64-linux-gnu/qt5/mkspecs/features/exclusive_builds.prf \
+ /usr/lib/x86_64-linux-gnu/qt5/mkspecs/features/toolchain.prf \
+ /usr/lib/x86_64-linux-gnu/qt5/mkspecs/features/default_pre.prf \
+ ../appbase.pri \
+ /usr/lib/x86_64-linux-gnu/qt5/mkspecs/features/resolve_config.prf \
+ /usr/lib/x86_64-linux-gnu/qt5/mkspecs/features/default_post.prf \
+ /usr/lib/x86_64-linux-gnu/qt5/mkspecs/features/warn_on.prf \
+ /usr/lib/x86_64-linux-gnu/qt5/mkspecs/features/qt.prf \
+ /usr/lib/x86_64-linux-gnu/qt5/mkspecs/features/resources.prf \
+ /usr/lib/x86_64-linux-gnu/qt5/mkspecs/features/moc.prf \
+ /usr/lib/x86_64-linux-gnu/qt5/mkspecs/features/unix/thread.prf \
+ /usr/lib/x86_64-linux-gnu/qt5/mkspecs/features/qmake_use.prf \
+ /usr/lib/x86_64-linux-gnu/qt5/mkspecs/features/file_copies.prf \
+ /usr/lib/x86_64-linux-gnu/qt5/mkspecs/features/testcase_targets.prf \
+ /usr/lib/x86_64-linux-gnu/qt5/mkspecs/features/exceptions.prf \
+ /usr/lib/x86_64-linux-gnu/qt5/mkspecs/features/yacc.prf \
+ /usr/lib/x86_64-linux-gnu/qt5/mkspecs/features/lex.prf \
+ helpers.pro
+ $(QMAKE) -o Makefile helpers.pro CONFIG+=debug
+/usr/lib/x86_64-linux-gnu/qt5/mkspecs/features/spec_pre.prf:
+/usr/lib/x86_64-linux-gnu/qt5/mkspecs/common/unix.conf:
+/usr/lib/x86_64-linux-gnu/qt5/mkspecs/common/linux.conf:
+/usr/lib/x86_64-linux-gnu/qt5/mkspecs/common/sanitize.conf:
+/usr/lib/x86_64-linux-gnu/qt5/mkspecs/common/gcc-base.conf:
+/usr/lib/x86_64-linux-gnu/qt5/mkspecs/common/gcc-base-unix.conf:
+/usr/lib/x86_64-linux-gnu/qt5/mkspecs/common/g++-base.conf:
+/usr/lib/x86_64-linux-gnu/qt5/mkspecs/common/g++-unix.conf:
+/usr/lib/x86_64-linux-gnu/qt5/mkspecs/qconfig.pri:
+/usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_accessibility_support_private.pri:
+/usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_bootstrap_private.pri:
+/usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_concurrent.pri:
+/usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_concurrent_private.pri:
+/usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_core.pri:
+/usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_core_private.pri:
+/usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_dbus.pri:
+/usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_dbus_private.pri:
+/usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_devicediscovery_support_private.pri:
+/usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_edid_support_private.pri:
+/usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_egl_support_private.pri:
+/usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_eglfs_kms_support_private.pri:
+/usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_eglfsdeviceintegration_private.pri:
+/usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_eventdispatcher_support_private.pri:
+/usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_fb_support_private.pri:
+/usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_fontdatabase_support_private.pri:
+/usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_glx_support_private.pri:
+/usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_gui.pri:
+/usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_gui_private.pri:
+/usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_input_support_private.pri:
+/usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_kms_support_private.pri:
+/usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_linuxaccessibility_support_private.pri:
+/usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_network.pri:
+/usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_network_private.pri:
+/usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_opengl.pri:
+/usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_opengl_private.pri:
+/usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_openglextensions.pri:
+/usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_openglextensions_private.pri:
+/usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_platformcompositor_support_private.pri:
+/usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_printsupport.pri:
+/usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_printsupport_private.pri:
+/usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_qml.pri:
+/usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_qmltest.pri:
+/usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_quick.pri:
+/usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_quickwidgets.pri:
+/usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_service_support_private.pri:
+/usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_sql.pri:
+/usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_sql_private.pri:
+/usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_testlib.pri:
+/usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_testlib_private.pri:
+/usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_theme_support_private.pri:
+/usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_vulkan_support_private.pri:
+/usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_widgets.pri:
+/usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_widgets_private.pri:
+/usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_xcb_qpa_lib_private.pri:
+/usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_xml.pri:
+/usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_xml_private.pri:
+/usr/lib/x86_64-linux-gnu/qt5/mkspecs/features/qt_functions.prf:
+/usr/lib/x86_64-linux-gnu/qt5/mkspecs/features/qt_config.prf:
+/usr/lib/x86_64-linux-gnu/qt5/mkspecs/linux-g++/qmake.conf:
+/usr/lib/x86_64-linux-gnu/qt5/mkspecs/features/spec_post.prf:
+../.qmake.stash:
+/usr/lib/x86_64-linux-gnu/qt5/mkspecs/features/exclusive_builds.prf:
+/usr/lib/x86_64-linux-gnu/qt5/mkspecs/features/toolchain.prf:
+/usr/lib/x86_64-linux-gnu/qt5/mkspecs/features/default_pre.prf:
+../appbase.pri:
+/usr/lib/x86_64-linux-gnu/qt5/mkspecs/features/resolve_config.prf:
+/usr/lib/x86_64-linux-gnu/qt5/mkspecs/features/default_post.prf:
+/usr/lib/x86_64-linux-gnu/qt5/mkspecs/features/warn_on.prf:
+/usr/lib/x86_64-linux-gnu/qt5/mkspecs/features/qt.prf:
+/usr/lib/x86_64-linux-gnu/qt5/mkspecs/features/resources.prf:
+/usr/lib/x86_64-linux-gnu/qt5/mkspecs/features/moc.prf:
+/usr/lib/x86_64-linux-gnu/qt5/mkspecs/features/unix/thread.prf:
+/usr/lib/x86_64-linux-gnu/qt5/mkspecs/features/qmake_use.prf:
+/usr/lib/x86_64-linux-gnu/qt5/mkspecs/features/file_copies.prf:
+/usr/lib/x86_64-linux-gnu/qt5/mkspecs/features/testcase_targets.prf:
+/usr/lib/x86_64-linux-gnu/qt5/mkspecs/features/exceptions.prf:
+/usr/lib/x86_64-linux-gnu/qt5/mkspecs/features/yacc.prf:
+/usr/lib/x86_64-linux-gnu/qt5/mkspecs/features/lex.prf:
+helpers.pro:
+qmake: FORCE
+ @$(QMAKE) -o Makefile helpers.pro CONFIG+=debug
+
+qmake_all: FORCE
+
+
+all: Makefile ../lib/libhelper.so.1.0.0
+
+dist: distdir FORCE
+ (cd `dirname $(DISTDIR)` && $(TAR) $(DISTNAME).tar $(DISTNAME) && $(COMPRESS) $(DISTNAME).tar) && $(MOVE) `dirname $(DISTDIR)`/$(DISTNAME).tar.gz . && $(DEL_FILE) -r $(DISTDIR)
+
+distdir: FORCE
+ @test -d $(DISTDIR) || mkdir -p $(DISTDIR)
+ $(COPY_FILE) --parents $(DIST) $(DISTDIR)/
+ $(COPY_FILE) --parents /usr/lib/x86_64-linux-gnu/qt5/mkspecs/features/data/dummy.cpp $(DISTDIR)/
+ $(COPY_FILE) --parents applicationhelper.h $(DISTDIR)/
+ $(COPY_FILE) --parents applicationhelper.cpp $(DISTDIR)/
+
+
+clean: compiler_clean
+ -$(DEL_FILE) $(OBJECTS)
+ -$(DEL_FILE) *~ core *.core
+
+
+distclean: clean
+ -$(DEL_FILE) ../lib/$(TARGET)
+ -$(DEL_FILE) ../lib/$(TARGET0) ../lib/$(TARGET1) ../lib/$(TARGET2) $(TARGETA)
+ -$(DEL_FILE) Makefile
+
+
+####### Sub-libraries
+
+mocclean: compiler_moc_header_clean compiler_moc_objc_header_clean compiler_moc_source_clean
+
+mocables: compiler_moc_header_make_all compiler_moc_objc_header_make_all compiler_moc_source_make_all
+
+check: first
+
+benchmark: first
+
+compiler_rcc_make_all:
+compiler_rcc_clean:
+compiler_moc_predefs_make_all: .obj/moc_predefs.h
+compiler_moc_predefs_clean:
+ -$(DEL_FILE) .obj/moc_predefs.h
+.obj/moc_predefs.h: /usr/lib/x86_64-linux-gnu/qt5/mkspecs/features/data/dummy.cpp
+ g++ -pipe -g -std=gnu++1y -Wall -W -dM -E -o .obj/moc_predefs.h /usr/lib/x86_64-linux-gnu/qt5/mkspecs/features/data/dummy.cpp
+
+compiler_moc_header_make_all:
+compiler_moc_header_clean:
+compiler_moc_objc_header_make_all:
+compiler_moc_objc_header_clean:
+compiler_moc_source_make_all:
+compiler_moc_source_clean:
+compiler_yacc_decl_make_all:
+compiler_yacc_decl_clean:
+compiler_yacc_impl_make_all:
+compiler_yacc_impl_clean:
+compiler_lex_make_all:
+compiler_lex_clean:
+compiler_clean: compiler_moc_predefs_clean
+
+####### Compile
+
+.obj/applicationhelper.o: applicationhelper.cpp applicationhelper.h
+ $(CXX) -c $(CXXFLAGS) $(INCPATH) -o .obj/applicationhelper.o applicationhelper.cpp
+
+####### Install
+
+install: FORCE
+
+uninstall: FORCE
+
+FORCE:
+
diff --git a/helpers/applicationhelper.cpp b/helpers/applicationhelper.cpp
new file mode 100644
index 0000000..0778329
--- /dev/null
+++ b/helpers/applicationhelper.cpp
@@ -0,0 +1 @@
+#include "applicationhelper.h"
diff --git a/helpers/applicationhelper.h b/helpers/applicationhelper.h
new file mode 100644
index 0000000..6ed0b1b
--- /dev/null
+++ b/helpers/applicationhelper.h
@@ -0,0 +1,8 @@
+#pragma once
+#include
+
+
+class T_HELPER_EXPORT ApplicationHelper
+{
+};
+
diff --git a/helpers/helpers.pro b/helpers/helpers.pro
new file mode 100644
index 0000000..d62274c
--- /dev/null
+++ b/helpers/helpers.pro
@@ -0,0 +1,17 @@
+TARGET = helper
+TEMPLATE = lib
+CONFIG += shared c++14 x86_64
+QT += xml qml
+QT -= gui
+DEFINES += TF_DLL
+DESTDIR = ../lib
+INCLUDEPATH +=
+DEPENDPATH +=
+LIBS +=
+MOC_DIR = .obj/
+OBJECTS_DIR = .obj/
+
+include(../appbase.pri)
+
+HEADERS += applicationhelper.h
+SOURCES += applicationhelper.cpp
diff --git a/itis_app.pro b/itis_app.pro
new file mode 100644
index 0000000..3737a73
--- /dev/null
+++ b/itis_app.pro
@@ -0,0 +1,3 @@
+TEMPLATE = subdirs
+CONFIG += ordered
+SUBDIRS = helpers models views controllers
diff --git a/itis_app.pro.user b/itis_app.pro.user
new file mode 100644
index 0000000..a52d398
--- /dev/null
+++ b/itis_app.pro.user
@@ -0,0 +1,314 @@
+
+
+
+
+
+ EnvironmentId
+ {eaef946f-42ca-4d7e-b054-605ed65ae3c0}
+
+
+ ProjectExplorer.Project.ActiveTarget
+ 0
+
+
+ ProjectExplorer.Project.EditorSettings
+
+ true
+ false
+ true
+
+ Cpp
+
+ CppGlobal
+
+
+
+ QmlJS
+
+ QmlJSGlobal
+
+
+ 2
+ UTF-8
+ false
+ 4
+ false
+ 80
+ true
+ true
+ 1
+ true
+ false
+ 0
+ true
+ true
+ 0
+ 8
+ true
+ 1
+ true
+ true
+ true
+ *.md, *.MD, Makefile
+ false
+ true
+
+
+
+ ProjectExplorer.Project.PluginSettings
+
+
+ true
+ true
+ true
+ true
+ true
+
+
+ 0
+ true
+
+ true
+ Builtin.Questionable
+
+ false
+ true
+ Builtin.DefaultTidyAndClazy
+ 3
+
+
+
+ true
+
+
+
+
+ ProjectExplorer.Project.Target.0
+
+ Desktop
+ Desktop Qt 5.15.1 GCC 64bit
+ Desktop Qt 5.15.1 GCC 64bit
+ qt.qt5.5151.gcc_64_kit
+ 0
+ 0
+ 0
+
+ 0
+ /home/root/webapp_dez/build-itis_app-Desktop_Qt_5_15_1_GCC_64bit-Debug
+ /home/root/webapp_dez/build-itis_app-Desktop_Qt_5_15_1_GCC_64bit-Debug
+
+
+ true
+ QtProjectManager.QMakeBuildStep
+
+ false
+
+
+
+ true
+ Qt4ProjectManager.MakeStep
+
+ 2
+ Erstellen
+ Erstellen
+ ProjectExplorer.BuildSteps.Build
+
+
+
+ true
+ Qt4ProjectManager.MakeStep
+ clean
+
+ 1
+ Bereinigen
+ Bereinigen
+ ProjectExplorer.BuildSteps.Clean
+
+ 2
+ false
+
+
+ Debug
+ Qt4ProjectManager.Qt4BuildConfiguration
+ 2
+
+
+ /home/root/webapp_dez/build-itis_app-Desktop_Qt_5_15_1_GCC_64bit-Release
+ /home/root/webapp_dez/build-itis_app-Desktop_Qt_5_15_1_GCC_64bit-Release
+
+
+ true
+ QtProjectManager.QMakeBuildStep
+
+ false
+
+
+
+ true
+ Qt4ProjectManager.MakeStep
+
+ 2
+ Erstellen
+ Erstellen
+ ProjectExplorer.BuildSteps.Build
+
+
+
+ true
+ Qt4ProjectManager.MakeStep
+ clean
+
+ 1
+ Bereinigen
+ Bereinigen
+ ProjectExplorer.BuildSteps.Clean
+
+ 2
+ false
+
+
+ Release
+ Qt4ProjectManager.Qt4BuildConfiguration
+ 0
+ 0
+
+
+ 0
+ /home/root/webapp_dez/build-itis_app-Desktop_Qt_5_15_1_GCC_64bit-Profile
+ /home/root/webapp_dez/build-itis_app-Desktop_Qt_5_15_1_GCC_64bit-Profile
+
+
+ true
+ QtProjectManager.QMakeBuildStep
+
+ false
+
+
+
+ true
+ Qt4ProjectManager.MakeStep
+
+ 2
+ Erstellen
+ Erstellen
+ ProjectExplorer.BuildSteps.Build
+
+
+
+ true
+ Qt4ProjectManager.MakeStep
+ clean
+
+ 1
+ Bereinigen
+ Bereinigen
+ ProjectExplorer.BuildSteps.Clean
+
+ 2
+ false
+
+
+ Profile
+ Qt4ProjectManager.Qt4BuildConfiguration
+ 0
+ 0
+ 0
+
+ 3
+
+
+ 0
+ Deployment
+ Deployment
+ ProjectExplorer.BuildSteps.Deploy
+
+ 1
+
+ false
+ ProjectExplorer.DefaultDeployConfiguration
+
+ 1
+
+ dwarf
+
+ cpu-cycles
+
+
+ 250
+
+ -e
+ cpu-cycles
+ --call-graph
+ dwarf,4096
+ -F
+ 250
+
+ -F
+ true
+ 4096
+ false
+ false
+ 1000
+
+ true
+
+ false
+ false
+ false
+ false
+ true
+ 0.01
+ 10
+ true
+ kcachegrind
+ 1
+ 25
+
+ 1
+ true
+ false
+ true
+ valgrind
+
+ 0
+ 1
+ 2
+ 3
+ 4
+ 5
+ 6
+ 7
+ 8
+ 9
+ 10
+ 11
+ 12
+ 13
+ 14
+
+
+ 2
+
+ ProjectExplorer.CustomExecutableRunConfiguration
+
+ false
+ true
+ false
+ true
+
+ 1
+
+
+
+ ProjectExplorer.Project.TargetCount
+ 1
+
+
+ ProjectExplorer.Project.Updater.FileVersion
+ 22
+
+
+ Version
+ 22
+
+
diff --git a/itis_routes b/itis_routes
new file mode 100644
index 0000000..8fc2078
Binary files /dev/null and b/itis_routes differ
diff --git a/itis_routes_ b/itis_routes_
new file mode 100644
index 0000000..7940ea4
Binary files /dev/null and b/itis_routes_ differ
diff --git a/itis_routes_prod b/itis_routes_prod
new file mode 100644
index 0000000..5915849
Binary files /dev/null and b/itis_routes_prod differ
diff --git a/lib/libcontroller.so.1.0.0 b/lib/libcontroller.so.1.0.0
new file mode 100644
index 0000000..1dd20f0
Binary files /dev/null and b/lib/libcontroller.so.1.0.0 differ
diff --git a/lib/libhelper.so.1.0.0 b/lib/libhelper.so.1.0.0
new file mode 100644
index 0000000..1e055df
Binary files /dev/null and b/lib/libhelper.so.1.0.0 differ
diff --git a/lib/libmodel.so.1.0.0 b/lib/libmodel.so.1.0.0
new file mode 100644
index 0000000..4972973
Binary files /dev/null and b/lib/libmodel.so.1.0.0 differ
diff --git a/lib/libview.so.1.0.0 b/lib/libview.so.1.0.0
new file mode 100644
index 0000000..57689b6
Binary files /dev/null and b/lib/libview.so.1.0.0 differ
diff --git a/models/CMakeLists.txt b/models/CMakeLists.txt
new file mode 100644
index 0000000..e42df69
--- /dev/null
+++ b/models/CMakeLists.txt
@@ -0,0 +1,49 @@
+add_definitions(-DTF_DLL)
+
+find_package(Qt5 COMPONENTS Core Network Xml Sql Concurrent REQUIRED)
+if (NOT Qt5_FOUND)
+ message(FATAL_ERROR "Qt5 was not found. Consider setting QT5_CMAKE_PATH to the Qt5Config.cmake directory.")
+endif()
+
+file(GLOB model_headers ${PROJECT_SOURCE_DIR}/models/*.h)
+file(GLOB model_srcs ${PROJECT_SOURCE_DIR}/models/*.cpp)
+file(GLOB model_sqlobjects_headers ${PROJECT_SOURCE_DIR}/models/sqlobjects/*.h)
+file(GLOB model_mongoobjects_headers ${PROJECT_SOURCE_DIR}/models/mongoobjects/*.h)
+
+add_library(model SHARED
+ ${model_headers}
+ ${model_srcs}
+ ${model_sqlobjects_headers}
+ ${model_mongoobjects_headers}
+)
+target_include_directories(model PUBLIC
+ ${Qt5Core_INCLUDE_DIRS}
+ ${Qt5Network_INCLUDE_DIRS}
+ ${Qt5Xml_INCLUDE_DIRS}
+ ${Qt5Sql_INCLUDE_DIRS}
+ ${Qt5Concurrent_INCLUDE_DIRS}
+ ${TreeFrog_INCLUDE_DIR}
+ ${PROJECT_SOURCE_DIR}/models
+ ${PROJECT_SOURCE_DIR}/models/sqlobjects
+ ${PROJECT_SOURCE_DIR}/models/mongoobjects
+)
+target_link_libraries(model
+ Qt5::Core
+ Qt5::Network
+ Qt5::Xml
+ Qt5::Sql
+ Qt5::Concurrent
+ ${TreeFrog_LIB}
+ helper
+)
+set_target_properties(model PROPERTIES
+ LIBRARY_OUTPUT_DIRECTORY ${PROJECT_SOURCE_DIR}/lib
+ ARCHIVE_OUTPUT_DIRECTORY_RELEASE ${PROJECT_SOURCE_DIR}/lib
+ ARCHIVE_OUTPUT_DIRECTORY_DEBUG ${PROJECT_SOURCE_DIR}/lib
+ RUNTIME_OUTPUT_DIRECTORY_RELEASE ${PROJECT_SOURCE_DIR}/lib
+ RUNTIME_OUTPUT_DIRECTORY_DEBUG ${PROJECT_SOURCE_DIR}/lib
+ SOVERSION 1.0
+)
+add_dependencies(model
+ helper
+)
diff --git a/models/Makefile b/models/Makefile
new file mode 100644
index 0000000..fa884cf
--- /dev/null
+++ b/models/Makefile
@@ -0,0 +1,881 @@
+#############################################################################
+# Makefile for building: libmodel.so.1.0.0
+# Generated by qmake (3.1) (Qt 5.12.8)
+# Project: models.pro
+# Template: lib
+# Command: /usr/lib/qt5/bin/qmake -o Makefile models.pro CONFIG+=debug
+#############################################################################
+
+MAKEFILE = Makefile
+
+EQ = =
+
+####### Compiler, tools and options
+
+CC = gcc
+CXX = g++
+DEFINES = -DTF_DLL -DQT_SQL_LIB -DQT_QML_LIB -DQT_NETWORK_LIB -DQT_CORE_LIB
+CFLAGS = -pipe -g -Wall -W -D_REENTRANT -fPIC $(DEFINES)
+CXXFLAGS = -pipe -g -std=gnu++1y -Wall -W -D_REENTRANT -fPIC $(DEFINES)
+INCPATH = -I. -I../helpers -isystem /usr/include/treefrog -isystem /usr/include/x86_64-linux-gnu/qt5 -isystem /usr/include/x86_64-linux-gnu/qt5/QtSql -isystem /usr/include/x86_64-linux-gnu/qt5/QtQml -isystem /usr/include/x86_64-linux-gnu/qt5/QtNetwork -isystem /usr/include/x86_64-linux-gnu/qt5/QtCore -I.obj -I/usr/lib/x86_64-linux-gnu/qt5/mkspecs/linux-g++
+QMAKE = /usr/lib/qt5/bin/qmake
+DEL_FILE = rm -f
+CHK_DIR_EXISTS= test -d
+MKDIR = mkdir -p
+COPY = cp -f
+COPY_FILE = cp -f
+COPY_DIR = cp -f -R
+INSTALL_FILE = install -m 644 -p
+INSTALL_PROGRAM = install -m 755 -p
+INSTALL_DIR = cp -f -R
+QINSTALL = /usr/lib/qt5/bin/qmake -install qinstall
+QINSTALL_PROGRAM = /usr/lib/qt5/bin/qmake -install qinstall -exe
+DEL_FILE = rm -f
+SYMLINK = ln -f -s
+DEL_DIR = rmdir
+MOVE = mv -f
+TAR = tar -cf
+COMPRESS = gzip -9f
+DISTNAME = model1.0.0
+DISTDIR = /webapp_dez/itis_app/models/.obj/model1.0.0
+LINK = g++
+LFLAGS = -shared -Wl,-soname,libmodel.so.1
+LIBS = $(SUBLIBS) -L../lib -lhelper -Wl,-rpath,. -Wl,-rpath,/usr/lib -L/usr/lib -ltreefrog -lrt /usr/lib/x86_64-linux-gnu/libQt5Sql.so /usr/lib/x86_64-linux-gnu/libQt5Qml.so /usr/lib/x86_64-linux-gnu/libQt5Network.so /usr/lib/x86_64-linux-gnu/libQt5Core.so -lpthread
+AR = ar cqs
+RANLIB =
+SED = sed
+STRIP = strip
+
+####### Output directory
+
+OBJECTS_DIR = .obj/
+
+####### Files
+
+SOURCES = standardsdata.cpp \
+ standardsmeta.cpp \
+ stdsystem.cpp \
+ webmenu.cpp \
+ itisuser.cpp \
+ objects.cpp \
+ catclasses.cpp \
+ acclasses.cpp \
+ pcclasses.cpp \
+ standardsdatawaste.cpp \
+ standardsmetawaste.cpp \
+ annexdata.cpp \
+ annexmeta.cpp \
+ annexdatawaste.cpp \
+ annexmetawaste.cpp \
+ glossar.cpp \
+ standardsdatacomments.cpp \
+ appvars.cpp \
+ itisnews.cpp \
+ actionrights.cpp \
+ itisgroups.cpp \
+ annexdatacomments.cpp \
+ releasemgmt.cpp \
+ releaseannex.cpp \
+ lenkinfo.cpp .obj/moc_standardsdataobject.cpp \
+ .obj/moc_standardsmetaobject.cpp \
+ .obj/moc_stdsystemobject.cpp \
+ .obj/moc_webmenuobject.cpp \
+ .obj/moc_itisuserobject.cpp \
+ .obj/moc_objectsobject.cpp \
+ .obj/moc_catclassesobject.cpp \
+ .obj/moc_acclassesobject.cpp \
+ .obj/moc_pcclassesobject.cpp \
+ .obj/moc_standardsdatawasteobject.cpp \
+ .obj/moc_standardsmetawasteobject.cpp \
+ .obj/moc_annexdataobject.cpp \
+ .obj/moc_annexmetaobject.cpp \
+ .obj/moc_annexdatawasteobject.cpp \
+ .obj/moc_annexmetawasteobject.cpp \
+ .obj/moc_glossarobject.cpp \
+ .obj/moc_standardsdatacommentsobject.cpp \
+ .obj/moc_appvarsobject.cpp \
+ .obj/moc_itisnewsobject.cpp \
+ .obj/moc_actionrightsobject.cpp \
+ .obj/moc_itisgroupsobject.cpp \
+ .obj/moc_annexdatacommentsobject.cpp \
+ .obj/moc_releasemgmtobject.cpp \
+ .obj/moc_releaseannexobject.cpp \
+ .obj/moc_lenkinfoobject.cpp
+OBJECTS = .obj/standardsdata.o \
+ .obj/standardsmeta.o \
+ .obj/stdsystem.o \
+ .obj/webmenu.o \
+ .obj/itisuser.o \
+ .obj/objects.o \
+ .obj/catclasses.o \
+ .obj/acclasses.o \
+ .obj/pcclasses.o \
+ .obj/standardsdatawaste.o \
+ .obj/standardsmetawaste.o \
+ .obj/annexdata.o \
+ .obj/annexmeta.o \
+ .obj/annexdatawaste.o \
+ .obj/annexmetawaste.o \
+ .obj/glossar.o \
+ .obj/standardsdatacomments.o \
+ .obj/appvars.o \
+ .obj/itisnews.o \
+ .obj/actionrights.o \
+ .obj/itisgroups.o \
+ .obj/annexdatacomments.o \
+ .obj/releasemgmt.o \
+ .obj/releaseannex.o \
+ .obj/lenkinfo.o \
+ .obj/moc_standardsdataobject.o \
+ .obj/moc_standardsmetaobject.o \
+ .obj/moc_stdsystemobject.o \
+ .obj/moc_webmenuobject.o \
+ .obj/moc_itisuserobject.o \
+ .obj/moc_objectsobject.o \
+ .obj/moc_catclassesobject.o \
+ .obj/moc_acclassesobject.o \
+ .obj/moc_pcclassesobject.o \
+ .obj/moc_standardsdatawasteobject.o \
+ .obj/moc_standardsmetawasteobject.o \
+ .obj/moc_annexdataobject.o \
+ .obj/moc_annexmetaobject.o \
+ .obj/moc_annexdatawasteobject.o \
+ .obj/moc_annexmetawasteobject.o \
+ .obj/moc_glossarobject.o \
+ .obj/moc_standardsdatacommentsobject.o \
+ .obj/moc_appvarsobject.o \
+ .obj/moc_itisnewsobject.o \
+ .obj/moc_actionrightsobject.o \
+ .obj/moc_itisgroupsobject.o \
+ .obj/moc_annexdatacommentsobject.o \
+ .obj/moc_releasemgmtobject.o \
+ .obj/moc_releaseannexobject.o \
+ .obj/moc_lenkinfoobject.o
+DIST = /usr/lib/x86_64-linux-gnu/qt5/mkspecs/features/spec_pre.prf \
+ /usr/lib/x86_64-linux-gnu/qt5/mkspecs/common/unix.conf \
+ /usr/lib/x86_64-linux-gnu/qt5/mkspecs/common/linux.conf \
+ /usr/lib/x86_64-linux-gnu/qt5/mkspecs/common/sanitize.conf \
+ /usr/lib/x86_64-linux-gnu/qt5/mkspecs/common/gcc-base.conf \
+ /usr/lib/x86_64-linux-gnu/qt5/mkspecs/common/gcc-base-unix.conf \
+ /usr/lib/x86_64-linux-gnu/qt5/mkspecs/common/g++-base.conf \
+ /usr/lib/x86_64-linux-gnu/qt5/mkspecs/common/g++-unix.conf \
+ /usr/lib/x86_64-linux-gnu/qt5/mkspecs/qconfig.pri \
+ /usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_accessibility_support_private.pri \
+ /usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_bootstrap_private.pri \
+ /usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_concurrent.pri \
+ /usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_concurrent_private.pri \
+ /usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_core.pri \
+ /usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_core_private.pri \
+ /usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_dbus.pri \
+ /usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_dbus_private.pri \
+ /usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_devicediscovery_support_private.pri \
+ /usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_edid_support_private.pri \
+ /usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_egl_support_private.pri \
+ /usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_eglfs_kms_support_private.pri \
+ /usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_eglfsdeviceintegration_private.pri \
+ /usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_eventdispatcher_support_private.pri \
+ /usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_fb_support_private.pri \
+ /usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_fontdatabase_support_private.pri \
+ /usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_glx_support_private.pri \
+ /usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_gui.pri \
+ /usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_gui_private.pri \
+ /usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_input_support_private.pri \
+ /usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_kms_support_private.pri \
+ /usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_linuxaccessibility_support_private.pri \
+ /usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_network.pri \
+ /usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_network_private.pri \
+ /usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_opengl.pri \
+ /usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_opengl_private.pri \
+ /usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_openglextensions.pri \
+ /usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_openglextensions_private.pri \
+ /usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_platformcompositor_support_private.pri \
+ /usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_printsupport.pri \
+ /usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_printsupport_private.pri \
+ /usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_qml.pri \
+ /usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_qmltest.pri \
+ /usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_quick.pri \
+ /usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_quickwidgets.pri \
+ /usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_service_support_private.pri \
+ /usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_sql.pri \
+ /usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_sql_private.pri \
+ /usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_testlib.pri \
+ /usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_testlib_private.pri \
+ /usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_theme_support_private.pri \
+ /usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_vulkan_support_private.pri \
+ /usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_widgets.pri \
+ /usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_widgets_private.pri \
+ /usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_xcb_qpa_lib_private.pri \
+ /usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_xml.pri \
+ /usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_xml_private.pri \
+ /usr/lib/x86_64-linux-gnu/qt5/mkspecs/features/qt_functions.prf \
+ /usr/lib/x86_64-linux-gnu/qt5/mkspecs/features/qt_config.prf \
+ /usr/lib/x86_64-linux-gnu/qt5/mkspecs/linux-g++/qmake.conf \
+ /usr/lib/x86_64-linux-gnu/qt5/mkspecs/features/spec_post.prf \
+ ../.qmake.stash \
+ /usr/lib/x86_64-linux-gnu/qt5/mkspecs/features/exclusive_builds.prf \
+ /usr/lib/x86_64-linux-gnu/qt5/mkspecs/features/toolchain.prf \
+ /usr/lib/x86_64-linux-gnu/qt5/mkspecs/features/default_pre.prf \
+ ../appbase.pri \
+ /usr/lib/x86_64-linux-gnu/qt5/mkspecs/features/resolve_config.prf \
+ /usr/lib/x86_64-linux-gnu/qt5/mkspecs/features/default_post.prf \
+ /usr/lib/x86_64-linux-gnu/qt5/mkspecs/features/warn_on.prf \
+ /usr/lib/x86_64-linux-gnu/qt5/mkspecs/features/qt.prf \
+ /usr/lib/x86_64-linux-gnu/qt5/mkspecs/features/resources.prf \
+ /usr/lib/x86_64-linux-gnu/qt5/mkspecs/features/moc.prf \
+ /usr/lib/x86_64-linux-gnu/qt5/mkspecs/features/unix/thread.prf \
+ /usr/lib/x86_64-linux-gnu/qt5/mkspecs/features/qmake_use.prf \
+ /usr/lib/x86_64-linux-gnu/qt5/mkspecs/features/file_copies.prf \
+ /usr/lib/x86_64-linux-gnu/qt5/mkspecs/features/testcase_targets.prf \
+ /usr/lib/x86_64-linux-gnu/qt5/mkspecs/features/exceptions.prf \
+ /usr/lib/x86_64-linux-gnu/qt5/mkspecs/features/yacc.prf \
+ /usr/lib/x86_64-linux-gnu/qt5/mkspecs/features/lex.prf \
+ models.pro sqlobjects/standardsdataobject.h \
+ standardsdata.h \
+ sqlobjects/standardsmetaobject.h \
+ standardsmeta.h \
+ sqlobjects/stdsystemobject.h \
+ stdsystem.h \
+ sqlobjects/webmenuobject.h \
+ webmenu.h \
+ sqlobjects/itisuserobject.h \
+ itisuser.h \
+ sqlobjects/objectsobject.h \
+ objects.h \
+ sqlobjects/catclassesobject.h \
+ catclasses.h \
+ sqlobjects/acclassesobject.h \
+ acclasses.h \
+ sqlobjects/pcclassesobject.h \
+ pcclasses.h \
+ sqlobjects/standardsdatawasteobject.h \
+ standardsdatawaste.h \
+ sqlobjects/standardsmetawasteobject.h \
+ standardsmetawaste.h \
+ sqlobjects/annexdataobject.h \
+ annexdata.h \
+ sqlobjects/annexmetaobject.h \
+ annexmeta.h \
+ sqlobjects/annexdatawasteobject.h \
+ annexdatawaste.h \
+ sqlobjects/annexmetawasteobject.h \
+ annexmetawaste.h \
+ sqlobjects/glossarobject.h \
+ glossar.h \
+ sqlobjects/standardsdatacommentsobject.h \
+ standardsdatacomments.h \
+ sqlobjects/appvarsobject.h \
+ appvars.h \
+ sqlobjects/itisnewsobject.h \
+ itisnews.h \
+ sqlobjects/actionrightsobject.h \
+ actionrights.h \
+ sqlobjects/itisgroupsobject.h \
+ itisgroups.h \
+ sqlobjects/annexdatacommentsobject.h \
+ annexdatacomments.h \
+ sqlobjects/releasemgmtobject.h \
+ releasemgmt.h \
+ sqlobjects/releaseannexobject.h \
+ releaseannex.h \
+ sqlobjects/lenkinfoobject.h \
+ lenkinfo.h standardsdata.cpp \
+ standardsmeta.cpp \
+ stdsystem.cpp \
+ webmenu.cpp \
+ itisuser.cpp \
+ objects.cpp \
+ catclasses.cpp \
+ acclasses.cpp \
+ pcclasses.cpp \
+ standardsdatawaste.cpp \
+ standardsmetawaste.cpp \
+ annexdata.cpp \
+ annexmeta.cpp \
+ annexdatawaste.cpp \
+ annexmetawaste.cpp \
+ glossar.cpp \
+ standardsdatacomments.cpp \
+ appvars.cpp \
+ itisnews.cpp \
+ actionrights.cpp \
+ itisgroups.cpp \
+ annexdatacomments.cpp \
+ releasemgmt.cpp \
+ releaseannex.cpp \
+ lenkinfo.cpp
+QMAKE_TARGET = model
+DESTDIR = ../lib/
+TARGET = libmodel.so.1.0.0
+TARGETA = ../lib/libmodel.a
+TARGET0 = libmodel.so
+TARGETD = libmodel.so.1.0.0
+TARGET1 = libmodel.so.1
+TARGET2 = libmodel.so.1.0
+
+
+first: all
+####### Build rules
+
+../lib/libmodel.so.1.0.0: $(OBJECTS) $(SUBLIBS) $(OBJCOMP)
+ @test -d ../lib/ || mkdir -p ../lib/
+ -$(DEL_FILE) $(TARGET) $(TARGET0) $(TARGET1) $(TARGET2)
+ $(LINK) $(LFLAGS) -o $(TARGET) $(OBJECTS) $(LIBS) $(OBJCOMP)
+ -ln -s $(TARGET) $(TARGET0)
+ -ln -s $(TARGET) $(TARGET1)
+ -ln -s $(TARGET) $(TARGET2)
+ -$(DEL_FILE) ../lib/$(TARGET)
+ -$(MOVE) $(TARGET) ../lib/$(TARGET)
+ -$(DEL_FILE) ../lib/$(TARGET0)
+ -$(DEL_FILE) ../lib/$(TARGET1)
+ -$(DEL_FILE) ../lib/$(TARGET2)
+ -$(MOVE) $(TARGET0) ../lib/$(TARGET0)
+ -$(MOVE) $(TARGET1) ../lib/$(TARGET1)
+ -$(MOVE) $(TARGET2) ../lib/$(TARGET2)
+
+
+
+staticlib: ../lib/libmodel.a
+
+../lib/libmodel.a: $(OBJECTS) $(OBJCOMP)
+ -$(DEL_FILE) $(TARGETA)
+ $(AR) $(TARGETA) $(OBJECTS)
+
+Makefile: models.pro /usr/lib/x86_64-linux-gnu/qt5/mkspecs/linux-g++/qmake.conf /usr/lib/x86_64-linux-gnu/qt5/mkspecs/features/spec_pre.prf \
+ /usr/lib/x86_64-linux-gnu/qt5/mkspecs/common/unix.conf \
+ /usr/lib/x86_64-linux-gnu/qt5/mkspecs/common/linux.conf \
+ /usr/lib/x86_64-linux-gnu/qt5/mkspecs/common/sanitize.conf \
+ /usr/lib/x86_64-linux-gnu/qt5/mkspecs/common/gcc-base.conf \
+ /usr/lib/x86_64-linux-gnu/qt5/mkspecs/common/gcc-base-unix.conf \
+ /usr/lib/x86_64-linux-gnu/qt5/mkspecs/common/g++-base.conf \
+ /usr/lib/x86_64-linux-gnu/qt5/mkspecs/common/g++-unix.conf \
+ /usr/lib/x86_64-linux-gnu/qt5/mkspecs/qconfig.pri \
+ /usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_accessibility_support_private.pri \
+ /usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_bootstrap_private.pri \
+ /usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_concurrent.pri \
+ /usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_concurrent_private.pri \
+ /usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_core.pri \
+ /usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_core_private.pri \
+ /usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_dbus.pri \
+ /usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_dbus_private.pri \
+ /usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_devicediscovery_support_private.pri \
+ /usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_edid_support_private.pri \
+ /usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_egl_support_private.pri \
+ /usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_eglfs_kms_support_private.pri \
+ /usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_eglfsdeviceintegration_private.pri \
+ /usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_eventdispatcher_support_private.pri \
+ /usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_fb_support_private.pri \
+ /usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_fontdatabase_support_private.pri \
+ /usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_glx_support_private.pri \
+ /usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_gui.pri \
+ /usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_gui_private.pri \
+ /usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_input_support_private.pri \
+ /usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_kms_support_private.pri \
+ /usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_linuxaccessibility_support_private.pri \
+ /usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_network.pri \
+ /usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_network_private.pri \
+ /usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_opengl.pri \
+ /usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_opengl_private.pri \
+ /usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_openglextensions.pri \
+ /usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_openglextensions_private.pri \
+ /usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_platformcompositor_support_private.pri \
+ /usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_printsupport.pri \
+ /usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_printsupport_private.pri \
+ /usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_qml.pri \
+ /usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_qmltest.pri \
+ /usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_quick.pri \
+ /usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_quickwidgets.pri \
+ /usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_service_support_private.pri \
+ /usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_sql.pri \
+ /usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_sql_private.pri \
+ /usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_testlib.pri \
+ /usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_testlib_private.pri \
+ /usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_theme_support_private.pri \
+ /usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_vulkan_support_private.pri \
+ /usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_widgets.pri \
+ /usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_widgets_private.pri \
+ /usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_xcb_qpa_lib_private.pri \
+ /usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_xml.pri \
+ /usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_xml_private.pri \
+ /usr/lib/x86_64-linux-gnu/qt5/mkspecs/features/qt_functions.prf \
+ /usr/lib/x86_64-linux-gnu/qt5/mkspecs/features/qt_config.prf \
+ /usr/lib/x86_64-linux-gnu/qt5/mkspecs/linux-g++/qmake.conf \
+ /usr/lib/x86_64-linux-gnu/qt5/mkspecs/features/spec_post.prf \
+ ../.qmake.stash \
+ /usr/lib/x86_64-linux-gnu/qt5/mkspecs/features/exclusive_builds.prf \
+ /usr/lib/x86_64-linux-gnu/qt5/mkspecs/features/toolchain.prf \
+ /usr/lib/x86_64-linux-gnu/qt5/mkspecs/features/default_pre.prf \
+ ../appbase.pri \
+ /usr/lib/x86_64-linux-gnu/qt5/mkspecs/features/resolve_config.prf \
+ /usr/lib/x86_64-linux-gnu/qt5/mkspecs/features/default_post.prf \
+ /usr/lib/x86_64-linux-gnu/qt5/mkspecs/features/warn_on.prf \
+ /usr/lib/x86_64-linux-gnu/qt5/mkspecs/features/qt.prf \
+ /usr/lib/x86_64-linux-gnu/qt5/mkspecs/features/resources.prf \
+ /usr/lib/x86_64-linux-gnu/qt5/mkspecs/features/moc.prf \
+ /usr/lib/x86_64-linux-gnu/qt5/mkspecs/features/unix/thread.prf \
+ /usr/lib/x86_64-linux-gnu/qt5/mkspecs/features/qmake_use.prf \
+ /usr/lib/x86_64-linux-gnu/qt5/mkspecs/features/file_copies.prf \
+ /usr/lib/x86_64-linux-gnu/qt5/mkspecs/features/testcase_targets.prf \
+ /usr/lib/x86_64-linux-gnu/qt5/mkspecs/features/exceptions.prf \
+ /usr/lib/x86_64-linux-gnu/qt5/mkspecs/features/yacc.prf \
+ /usr/lib/x86_64-linux-gnu/qt5/mkspecs/features/lex.prf \
+ models.pro
+ $(QMAKE) -o Makefile models.pro CONFIG+=debug
+/usr/lib/x86_64-linux-gnu/qt5/mkspecs/features/spec_pre.prf:
+/usr/lib/x86_64-linux-gnu/qt5/mkspecs/common/unix.conf:
+/usr/lib/x86_64-linux-gnu/qt5/mkspecs/common/linux.conf:
+/usr/lib/x86_64-linux-gnu/qt5/mkspecs/common/sanitize.conf:
+/usr/lib/x86_64-linux-gnu/qt5/mkspecs/common/gcc-base.conf:
+/usr/lib/x86_64-linux-gnu/qt5/mkspecs/common/gcc-base-unix.conf:
+/usr/lib/x86_64-linux-gnu/qt5/mkspecs/common/g++-base.conf:
+/usr/lib/x86_64-linux-gnu/qt5/mkspecs/common/g++-unix.conf:
+/usr/lib/x86_64-linux-gnu/qt5/mkspecs/qconfig.pri:
+/usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_accessibility_support_private.pri:
+/usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_bootstrap_private.pri:
+/usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_concurrent.pri:
+/usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_concurrent_private.pri:
+/usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_core.pri:
+/usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_core_private.pri:
+/usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_dbus.pri:
+/usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_dbus_private.pri:
+/usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_devicediscovery_support_private.pri:
+/usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_edid_support_private.pri:
+/usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_egl_support_private.pri:
+/usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_eglfs_kms_support_private.pri:
+/usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_eglfsdeviceintegration_private.pri:
+/usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_eventdispatcher_support_private.pri:
+/usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_fb_support_private.pri:
+/usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_fontdatabase_support_private.pri:
+/usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_glx_support_private.pri:
+/usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_gui.pri:
+/usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_gui_private.pri:
+/usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_input_support_private.pri:
+/usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_kms_support_private.pri:
+/usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_linuxaccessibility_support_private.pri:
+/usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_network.pri:
+/usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_network_private.pri:
+/usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_opengl.pri:
+/usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_opengl_private.pri:
+/usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_openglextensions.pri:
+/usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_openglextensions_private.pri:
+/usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_platformcompositor_support_private.pri:
+/usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_printsupport.pri:
+/usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_printsupport_private.pri:
+/usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_qml.pri:
+/usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_qmltest.pri:
+/usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_quick.pri:
+/usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_quickwidgets.pri:
+/usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_service_support_private.pri:
+/usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_sql.pri:
+/usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_sql_private.pri:
+/usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_testlib.pri:
+/usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_testlib_private.pri:
+/usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_theme_support_private.pri:
+/usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_vulkan_support_private.pri:
+/usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_widgets.pri:
+/usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_widgets_private.pri:
+/usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_xcb_qpa_lib_private.pri:
+/usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_xml.pri:
+/usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_xml_private.pri:
+/usr/lib/x86_64-linux-gnu/qt5/mkspecs/features/qt_functions.prf:
+/usr/lib/x86_64-linux-gnu/qt5/mkspecs/features/qt_config.prf:
+/usr/lib/x86_64-linux-gnu/qt5/mkspecs/linux-g++/qmake.conf:
+/usr/lib/x86_64-linux-gnu/qt5/mkspecs/features/spec_post.prf:
+../.qmake.stash:
+/usr/lib/x86_64-linux-gnu/qt5/mkspecs/features/exclusive_builds.prf:
+/usr/lib/x86_64-linux-gnu/qt5/mkspecs/features/toolchain.prf:
+/usr/lib/x86_64-linux-gnu/qt5/mkspecs/features/default_pre.prf:
+../appbase.pri:
+/usr/lib/x86_64-linux-gnu/qt5/mkspecs/features/resolve_config.prf:
+/usr/lib/x86_64-linux-gnu/qt5/mkspecs/features/default_post.prf:
+/usr/lib/x86_64-linux-gnu/qt5/mkspecs/features/warn_on.prf:
+/usr/lib/x86_64-linux-gnu/qt5/mkspecs/features/qt.prf:
+/usr/lib/x86_64-linux-gnu/qt5/mkspecs/features/resources.prf:
+/usr/lib/x86_64-linux-gnu/qt5/mkspecs/features/moc.prf:
+/usr/lib/x86_64-linux-gnu/qt5/mkspecs/features/unix/thread.prf:
+/usr/lib/x86_64-linux-gnu/qt5/mkspecs/features/qmake_use.prf:
+/usr/lib/x86_64-linux-gnu/qt5/mkspecs/features/file_copies.prf:
+/usr/lib/x86_64-linux-gnu/qt5/mkspecs/features/testcase_targets.prf:
+/usr/lib/x86_64-linux-gnu/qt5/mkspecs/features/exceptions.prf:
+/usr/lib/x86_64-linux-gnu/qt5/mkspecs/features/yacc.prf:
+/usr/lib/x86_64-linux-gnu/qt5/mkspecs/features/lex.prf:
+models.pro:
+qmake: FORCE
+ @$(QMAKE) -o Makefile models.pro CONFIG+=debug
+
+qmake_all: FORCE
+
+
+all: Makefile ../lib/libmodel.so.1.0.0
+
+dist: distdir FORCE
+ (cd `dirname $(DISTDIR)` && $(TAR) $(DISTNAME).tar $(DISTNAME) && $(COMPRESS) $(DISTNAME).tar) && $(MOVE) `dirname $(DISTDIR)`/$(DISTNAME).tar.gz . && $(DEL_FILE) -r $(DISTDIR)
+
+distdir: FORCE
+ @test -d $(DISTDIR) || mkdir -p $(DISTDIR)
+ $(COPY_FILE) --parents $(DIST) $(DISTDIR)/
+ $(COPY_FILE) --parents /usr/lib/x86_64-linux-gnu/qt5/mkspecs/features/data/dummy.cpp $(DISTDIR)/
+ $(COPY_FILE) --parents sqlobjects/standardsdataobject.h standardsdata.h sqlobjects/standardsmetaobject.h standardsmeta.h sqlobjects/stdsystemobject.h stdsystem.h sqlobjects/webmenuobject.h webmenu.h sqlobjects/itisuserobject.h itisuser.h sqlobjects/objectsobject.h objects.h sqlobjects/catclassesobject.h catclasses.h sqlobjects/acclassesobject.h acclasses.h sqlobjects/pcclassesobject.h pcclasses.h sqlobjects/standardsdatawasteobject.h standardsdatawaste.h sqlobjects/standardsmetawasteobject.h standardsmetawaste.h sqlobjects/annexdataobject.h annexdata.h sqlobjects/annexmetaobject.h annexmeta.h sqlobjects/annexdatawasteobject.h annexdatawaste.h sqlobjects/annexmetawasteobject.h annexmetawaste.h sqlobjects/glossarobject.h glossar.h sqlobjects/standardsdatacommentsobject.h standardsdatacomments.h sqlobjects/appvarsobject.h appvars.h sqlobjects/itisnewsobject.h itisnews.h sqlobjects/actionrightsobject.h actionrights.h sqlobjects/itisgroupsobject.h itisgroups.h sqlobjects/annexdatacommentsobject.h annexdatacomments.h sqlobjects/releasemgmtobject.h releasemgmt.h sqlobjects/releaseannexobject.h releaseannex.h sqlobjects/lenkinfoobject.h lenkinfo.h $(DISTDIR)/
+ $(COPY_FILE) --parents standardsdata.cpp standardsmeta.cpp stdsystem.cpp webmenu.cpp itisuser.cpp objects.cpp catclasses.cpp acclasses.cpp pcclasses.cpp standardsdatawaste.cpp standardsmetawaste.cpp annexdata.cpp annexmeta.cpp annexdatawaste.cpp annexmetawaste.cpp glossar.cpp standardsdatacomments.cpp appvars.cpp itisnews.cpp actionrights.cpp itisgroups.cpp annexdatacomments.cpp releasemgmt.cpp releaseannex.cpp lenkinfo.cpp $(DISTDIR)/
+
+
+clean: compiler_clean
+ -$(DEL_FILE) $(OBJECTS)
+ -$(DEL_FILE) *~ core *.core
+
+
+distclean: clean
+ -$(DEL_FILE) ../lib/$(TARGET)
+ -$(DEL_FILE) ../lib/$(TARGET0) ../lib/$(TARGET1) ../lib/$(TARGET2) $(TARGETA)
+ -$(DEL_FILE) Makefile
+
+
+####### Sub-libraries
+
+mocclean: compiler_moc_header_clean compiler_moc_objc_header_clean compiler_moc_source_clean
+
+mocables: compiler_moc_header_make_all compiler_moc_objc_header_make_all compiler_moc_source_make_all
+
+check: first
+
+benchmark: first
+
+compiler_rcc_make_all:
+compiler_rcc_clean:
+compiler_moc_predefs_make_all: .obj/moc_predefs.h
+compiler_moc_predefs_clean:
+ -$(DEL_FILE) .obj/moc_predefs.h
+.obj/moc_predefs.h: /usr/lib/x86_64-linux-gnu/qt5/mkspecs/features/data/dummy.cpp
+ g++ -pipe -g -std=gnu++1y -Wall -W -dM -E -o .obj/moc_predefs.h /usr/lib/x86_64-linux-gnu/qt5/mkspecs/features/data/dummy.cpp
+
+compiler_moc_header_make_all: .obj/moc_standardsdataobject.cpp .obj/moc_standardsmetaobject.cpp .obj/moc_stdsystemobject.cpp .obj/moc_webmenuobject.cpp .obj/moc_itisuserobject.cpp .obj/moc_objectsobject.cpp .obj/moc_catclassesobject.cpp .obj/moc_acclassesobject.cpp .obj/moc_pcclassesobject.cpp .obj/moc_standardsdatawasteobject.cpp .obj/moc_standardsmetawasteobject.cpp .obj/moc_annexdataobject.cpp .obj/moc_annexmetaobject.cpp .obj/moc_annexdatawasteobject.cpp .obj/moc_annexmetawasteobject.cpp .obj/moc_glossarobject.cpp .obj/moc_standardsdatacommentsobject.cpp .obj/moc_appvarsobject.cpp .obj/moc_itisnewsobject.cpp .obj/moc_actionrightsobject.cpp .obj/moc_itisgroupsobject.cpp .obj/moc_annexdatacommentsobject.cpp .obj/moc_releasemgmtobject.cpp .obj/moc_releaseannexobject.cpp .obj/moc_lenkinfoobject.cpp
+compiler_moc_header_clean:
+ -$(DEL_FILE) .obj/moc_standardsdataobject.cpp .obj/moc_standardsmetaobject.cpp .obj/moc_stdsystemobject.cpp .obj/moc_webmenuobject.cpp .obj/moc_itisuserobject.cpp .obj/moc_objectsobject.cpp .obj/moc_catclassesobject.cpp .obj/moc_acclassesobject.cpp .obj/moc_pcclassesobject.cpp .obj/moc_standardsdatawasteobject.cpp .obj/moc_standardsmetawasteobject.cpp .obj/moc_annexdataobject.cpp .obj/moc_annexmetaobject.cpp .obj/moc_annexdatawasteobject.cpp .obj/moc_annexmetawasteobject.cpp .obj/moc_glossarobject.cpp .obj/moc_standardsdatacommentsobject.cpp .obj/moc_appvarsobject.cpp .obj/moc_itisnewsobject.cpp .obj/moc_actionrightsobject.cpp .obj/moc_itisgroupsobject.cpp .obj/moc_annexdatacommentsobject.cpp .obj/moc_releasemgmtobject.cpp .obj/moc_releaseannexobject.cpp .obj/moc_lenkinfoobject.cpp
+.obj/moc_standardsdataobject.cpp: sqlobjects/standardsdataobject.h \
+ .obj/moc_predefs.h \
+ /usr/lib/qt5/bin/moc
+ /usr/lib/qt5/bin/moc $(DEFINES) --include /webapp_dez/itis_app/models/.obj/moc_predefs.h -I/usr/lib/x86_64-linux-gnu/qt5/mkspecs/linux-g++ -I/webapp_dez/itis_app/models -I/webapp_dez/itis_app/helpers -I/usr/include/treefrog -I/usr/include/x86_64-linux-gnu/qt5 -I/usr/include/x86_64-linux-gnu/qt5/QtSql -I/usr/include/x86_64-linux-gnu/qt5/QtQml -I/usr/include/x86_64-linux-gnu/qt5/QtNetwork -I/usr/include/x86_64-linux-gnu/qt5/QtCore -I/usr/include/c++/9 -I/usr/include/x86_64-linux-gnu/c++/9 -I/usr/include/c++/9/backward -I/usr/lib/gcc/x86_64-linux-gnu/9/include -I/usr/local/include -I/usr/include/x86_64-linux-gnu -I/usr/include sqlobjects/standardsdataobject.h -o .obj/moc_standardsdataobject.cpp
+
+.obj/moc_standardsmetaobject.cpp: sqlobjects/standardsmetaobject.h \
+ .obj/moc_predefs.h \
+ /usr/lib/qt5/bin/moc
+ /usr/lib/qt5/bin/moc $(DEFINES) --include /webapp_dez/itis_app/models/.obj/moc_predefs.h -I/usr/lib/x86_64-linux-gnu/qt5/mkspecs/linux-g++ -I/webapp_dez/itis_app/models -I/webapp_dez/itis_app/helpers -I/usr/include/treefrog -I/usr/include/x86_64-linux-gnu/qt5 -I/usr/include/x86_64-linux-gnu/qt5/QtSql -I/usr/include/x86_64-linux-gnu/qt5/QtQml -I/usr/include/x86_64-linux-gnu/qt5/QtNetwork -I/usr/include/x86_64-linux-gnu/qt5/QtCore -I/usr/include/c++/9 -I/usr/include/x86_64-linux-gnu/c++/9 -I/usr/include/c++/9/backward -I/usr/lib/gcc/x86_64-linux-gnu/9/include -I/usr/local/include -I/usr/include/x86_64-linux-gnu -I/usr/include sqlobjects/standardsmetaobject.h -o .obj/moc_standardsmetaobject.cpp
+
+.obj/moc_stdsystemobject.cpp: sqlobjects/stdsystemobject.h \
+ .obj/moc_predefs.h \
+ /usr/lib/qt5/bin/moc
+ /usr/lib/qt5/bin/moc $(DEFINES) --include /webapp_dez/itis_app/models/.obj/moc_predefs.h -I/usr/lib/x86_64-linux-gnu/qt5/mkspecs/linux-g++ -I/webapp_dez/itis_app/models -I/webapp_dez/itis_app/helpers -I/usr/include/treefrog -I/usr/include/x86_64-linux-gnu/qt5 -I/usr/include/x86_64-linux-gnu/qt5/QtSql -I/usr/include/x86_64-linux-gnu/qt5/QtQml -I/usr/include/x86_64-linux-gnu/qt5/QtNetwork -I/usr/include/x86_64-linux-gnu/qt5/QtCore -I/usr/include/c++/9 -I/usr/include/x86_64-linux-gnu/c++/9 -I/usr/include/c++/9/backward -I/usr/lib/gcc/x86_64-linux-gnu/9/include -I/usr/local/include -I/usr/include/x86_64-linux-gnu -I/usr/include sqlobjects/stdsystemobject.h -o .obj/moc_stdsystemobject.cpp
+
+.obj/moc_webmenuobject.cpp: sqlobjects/webmenuobject.h \
+ .obj/moc_predefs.h \
+ /usr/lib/qt5/bin/moc
+ /usr/lib/qt5/bin/moc $(DEFINES) --include /webapp_dez/itis_app/models/.obj/moc_predefs.h -I/usr/lib/x86_64-linux-gnu/qt5/mkspecs/linux-g++ -I/webapp_dez/itis_app/models -I/webapp_dez/itis_app/helpers -I/usr/include/treefrog -I/usr/include/x86_64-linux-gnu/qt5 -I/usr/include/x86_64-linux-gnu/qt5/QtSql -I/usr/include/x86_64-linux-gnu/qt5/QtQml -I/usr/include/x86_64-linux-gnu/qt5/QtNetwork -I/usr/include/x86_64-linux-gnu/qt5/QtCore -I/usr/include/c++/9 -I/usr/include/x86_64-linux-gnu/c++/9 -I/usr/include/c++/9/backward -I/usr/lib/gcc/x86_64-linux-gnu/9/include -I/usr/local/include -I/usr/include/x86_64-linux-gnu -I/usr/include sqlobjects/webmenuobject.h -o .obj/moc_webmenuobject.cpp
+
+.obj/moc_itisuserobject.cpp: sqlobjects/itisuserobject.h \
+ .obj/moc_predefs.h \
+ /usr/lib/qt5/bin/moc
+ /usr/lib/qt5/bin/moc $(DEFINES) --include /webapp_dez/itis_app/models/.obj/moc_predefs.h -I/usr/lib/x86_64-linux-gnu/qt5/mkspecs/linux-g++ -I/webapp_dez/itis_app/models -I/webapp_dez/itis_app/helpers -I/usr/include/treefrog -I/usr/include/x86_64-linux-gnu/qt5 -I/usr/include/x86_64-linux-gnu/qt5/QtSql -I/usr/include/x86_64-linux-gnu/qt5/QtQml -I/usr/include/x86_64-linux-gnu/qt5/QtNetwork -I/usr/include/x86_64-linux-gnu/qt5/QtCore -I/usr/include/c++/9 -I/usr/include/x86_64-linux-gnu/c++/9 -I/usr/include/c++/9/backward -I/usr/lib/gcc/x86_64-linux-gnu/9/include -I/usr/local/include -I/usr/include/x86_64-linux-gnu -I/usr/include sqlobjects/itisuserobject.h -o .obj/moc_itisuserobject.cpp
+
+.obj/moc_objectsobject.cpp: sqlobjects/objectsobject.h \
+ .obj/moc_predefs.h \
+ /usr/lib/qt5/bin/moc
+ /usr/lib/qt5/bin/moc $(DEFINES) --include /webapp_dez/itis_app/models/.obj/moc_predefs.h -I/usr/lib/x86_64-linux-gnu/qt5/mkspecs/linux-g++ -I/webapp_dez/itis_app/models -I/webapp_dez/itis_app/helpers -I/usr/include/treefrog -I/usr/include/x86_64-linux-gnu/qt5 -I/usr/include/x86_64-linux-gnu/qt5/QtSql -I/usr/include/x86_64-linux-gnu/qt5/QtQml -I/usr/include/x86_64-linux-gnu/qt5/QtNetwork -I/usr/include/x86_64-linux-gnu/qt5/QtCore -I/usr/include/c++/9 -I/usr/include/x86_64-linux-gnu/c++/9 -I/usr/include/c++/9/backward -I/usr/lib/gcc/x86_64-linux-gnu/9/include -I/usr/local/include -I/usr/include/x86_64-linux-gnu -I/usr/include sqlobjects/objectsobject.h -o .obj/moc_objectsobject.cpp
+
+.obj/moc_catclassesobject.cpp: sqlobjects/catclassesobject.h \
+ .obj/moc_predefs.h \
+ /usr/lib/qt5/bin/moc
+ /usr/lib/qt5/bin/moc $(DEFINES) --include /webapp_dez/itis_app/models/.obj/moc_predefs.h -I/usr/lib/x86_64-linux-gnu/qt5/mkspecs/linux-g++ -I/webapp_dez/itis_app/models -I/webapp_dez/itis_app/helpers -I/usr/include/treefrog -I/usr/include/x86_64-linux-gnu/qt5 -I/usr/include/x86_64-linux-gnu/qt5/QtSql -I/usr/include/x86_64-linux-gnu/qt5/QtQml -I/usr/include/x86_64-linux-gnu/qt5/QtNetwork -I/usr/include/x86_64-linux-gnu/qt5/QtCore -I/usr/include/c++/9 -I/usr/include/x86_64-linux-gnu/c++/9 -I/usr/include/c++/9/backward -I/usr/lib/gcc/x86_64-linux-gnu/9/include -I/usr/local/include -I/usr/include/x86_64-linux-gnu -I/usr/include sqlobjects/catclassesobject.h -o .obj/moc_catclassesobject.cpp
+
+.obj/moc_acclassesobject.cpp: sqlobjects/acclassesobject.h \
+ .obj/moc_predefs.h \
+ /usr/lib/qt5/bin/moc
+ /usr/lib/qt5/bin/moc $(DEFINES) --include /webapp_dez/itis_app/models/.obj/moc_predefs.h -I/usr/lib/x86_64-linux-gnu/qt5/mkspecs/linux-g++ -I/webapp_dez/itis_app/models -I/webapp_dez/itis_app/helpers -I/usr/include/treefrog -I/usr/include/x86_64-linux-gnu/qt5 -I/usr/include/x86_64-linux-gnu/qt5/QtSql -I/usr/include/x86_64-linux-gnu/qt5/QtQml -I/usr/include/x86_64-linux-gnu/qt5/QtNetwork -I/usr/include/x86_64-linux-gnu/qt5/QtCore -I/usr/include/c++/9 -I/usr/include/x86_64-linux-gnu/c++/9 -I/usr/include/c++/9/backward -I/usr/lib/gcc/x86_64-linux-gnu/9/include -I/usr/local/include -I/usr/include/x86_64-linux-gnu -I/usr/include sqlobjects/acclassesobject.h -o .obj/moc_acclassesobject.cpp
+
+.obj/moc_pcclassesobject.cpp: sqlobjects/pcclassesobject.h \
+ .obj/moc_predefs.h \
+ /usr/lib/qt5/bin/moc
+ /usr/lib/qt5/bin/moc $(DEFINES) --include /webapp_dez/itis_app/models/.obj/moc_predefs.h -I/usr/lib/x86_64-linux-gnu/qt5/mkspecs/linux-g++ -I/webapp_dez/itis_app/models -I/webapp_dez/itis_app/helpers -I/usr/include/treefrog -I/usr/include/x86_64-linux-gnu/qt5 -I/usr/include/x86_64-linux-gnu/qt5/QtSql -I/usr/include/x86_64-linux-gnu/qt5/QtQml -I/usr/include/x86_64-linux-gnu/qt5/QtNetwork -I/usr/include/x86_64-linux-gnu/qt5/QtCore -I/usr/include/c++/9 -I/usr/include/x86_64-linux-gnu/c++/9 -I/usr/include/c++/9/backward -I/usr/lib/gcc/x86_64-linux-gnu/9/include -I/usr/local/include -I/usr/include/x86_64-linux-gnu -I/usr/include sqlobjects/pcclassesobject.h -o .obj/moc_pcclassesobject.cpp
+
+.obj/moc_standardsdatawasteobject.cpp: sqlobjects/standardsdatawasteobject.h \
+ .obj/moc_predefs.h \
+ /usr/lib/qt5/bin/moc
+ /usr/lib/qt5/bin/moc $(DEFINES) --include /webapp_dez/itis_app/models/.obj/moc_predefs.h -I/usr/lib/x86_64-linux-gnu/qt5/mkspecs/linux-g++ -I/webapp_dez/itis_app/models -I/webapp_dez/itis_app/helpers -I/usr/include/treefrog -I/usr/include/x86_64-linux-gnu/qt5 -I/usr/include/x86_64-linux-gnu/qt5/QtSql -I/usr/include/x86_64-linux-gnu/qt5/QtQml -I/usr/include/x86_64-linux-gnu/qt5/QtNetwork -I/usr/include/x86_64-linux-gnu/qt5/QtCore -I/usr/include/c++/9 -I/usr/include/x86_64-linux-gnu/c++/9 -I/usr/include/c++/9/backward -I/usr/lib/gcc/x86_64-linux-gnu/9/include -I/usr/local/include -I/usr/include/x86_64-linux-gnu -I/usr/include sqlobjects/standardsdatawasteobject.h -o .obj/moc_standardsdatawasteobject.cpp
+
+.obj/moc_standardsmetawasteobject.cpp: sqlobjects/standardsmetawasteobject.h \
+ .obj/moc_predefs.h \
+ /usr/lib/qt5/bin/moc
+ /usr/lib/qt5/bin/moc $(DEFINES) --include /webapp_dez/itis_app/models/.obj/moc_predefs.h -I/usr/lib/x86_64-linux-gnu/qt5/mkspecs/linux-g++ -I/webapp_dez/itis_app/models -I/webapp_dez/itis_app/helpers -I/usr/include/treefrog -I/usr/include/x86_64-linux-gnu/qt5 -I/usr/include/x86_64-linux-gnu/qt5/QtSql -I/usr/include/x86_64-linux-gnu/qt5/QtQml -I/usr/include/x86_64-linux-gnu/qt5/QtNetwork -I/usr/include/x86_64-linux-gnu/qt5/QtCore -I/usr/include/c++/9 -I/usr/include/x86_64-linux-gnu/c++/9 -I/usr/include/c++/9/backward -I/usr/lib/gcc/x86_64-linux-gnu/9/include -I/usr/local/include -I/usr/include/x86_64-linux-gnu -I/usr/include sqlobjects/standardsmetawasteobject.h -o .obj/moc_standardsmetawasteobject.cpp
+
+.obj/moc_annexdataobject.cpp: sqlobjects/annexdataobject.h \
+ .obj/moc_predefs.h \
+ /usr/lib/qt5/bin/moc
+ /usr/lib/qt5/bin/moc $(DEFINES) --include /webapp_dez/itis_app/models/.obj/moc_predefs.h -I/usr/lib/x86_64-linux-gnu/qt5/mkspecs/linux-g++ -I/webapp_dez/itis_app/models -I/webapp_dez/itis_app/helpers -I/usr/include/treefrog -I/usr/include/x86_64-linux-gnu/qt5 -I/usr/include/x86_64-linux-gnu/qt5/QtSql -I/usr/include/x86_64-linux-gnu/qt5/QtQml -I/usr/include/x86_64-linux-gnu/qt5/QtNetwork -I/usr/include/x86_64-linux-gnu/qt5/QtCore -I/usr/include/c++/9 -I/usr/include/x86_64-linux-gnu/c++/9 -I/usr/include/c++/9/backward -I/usr/lib/gcc/x86_64-linux-gnu/9/include -I/usr/local/include -I/usr/include/x86_64-linux-gnu -I/usr/include sqlobjects/annexdataobject.h -o .obj/moc_annexdataobject.cpp
+
+.obj/moc_annexmetaobject.cpp: sqlobjects/annexmetaobject.h \
+ .obj/moc_predefs.h \
+ /usr/lib/qt5/bin/moc
+ /usr/lib/qt5/bin/moc $(DEFINES) --include /webapp_dez/itis_app/models/.obj/moc_predefs.h -I/usr/lib/x86_64-linux-gnu/qt5/mkspecs/linux-g++ -I/webapp_dez/itis_app/models -I/webapp_dez/itis_app/helpers -I/usr/include/treefrog -I/usr/include/x86_64-linux-gnu/qt5 -I/usr/include/x86_64-linux-gnu/qt5/QtSql -I/usr/include/x86_64-linux-gnu/qt5/QtQml -I/usr/include/x86_64-linux-gnu/qt5/QtNetwork -I/usr/include/x86_64-linux-gnu/qt5/QtCore -I/usr/include/c++/9 -I/usr/include/x86_64-linux-gnu/c++/9 -I/usr/include/c++/9/backward -I/usr/lib/gcc/x86_64-linux-gnu/9/include -I/usr/local/include -I/usr/include/x86_64-linux-gnu -I/usr/include sqlobjects/annexmetaobject.h -o .obj/moc_annexmetaobject.cpp
+
+.obj/moc_annexdatawasteobject.cpp: sqlobjects/annexdatawasteobject.h \
+ .obj/moc_predefs.h \
+ /usr/lib/qt5/bin/moc
+ /usr/lib/qt5/bin/moc $(DEFINES) --include /webapp_dez/itis_app/models/.obj/moc_predefs.h -I/usr/lib/x86_64-linux-gnu/qt5/mkspecs/linux-g++ -I/webapp_dez/itis_app/models -I/webapp_dez/itis_app/helpers -I/usr/include/treefrog -I/usr/include/x86_64-linux-gnu/qt5 -I/usr/include/x86_64-linux-gnu/qt5/QtSql -I/usr/include/x86_64-linux-gnu/qt5/QtQml -I/usr/include/x86_64-linux-gnu/qt5/QtNetwork -I/usr/include/x86_64-linux-gnu/qt5/QtCore -I/usr/include/c++/9 -I/usr/include/x86_64-linux-gnu/c++/9 -I/usr/include/c++/9/backward -I/usr/lib/gcc/x86_64-linux-gnu/9/include -I/usr/local/include -I/usr/include/x86_64-linux-gnu -I/usr/include sqlobjects/annexdatawasteobject.h -o .obj/moc_annexdatawasteobject.cpp
+
+.obj/moc_annexmetawasteobject.cpp: sqlobjects/annexmetawasteobject.h \
+ .obj/moc_predefs.h \
+ /usr/lib/qt5/bin/moc
+ /usr/lib/qt5/bin/moc $(DEFINES) --include /webapp_dez/itis_app/models/.obj/moc_predefs.h -I/usr/lib/x86_64-linux-gnu/qt5/mkspecs/linux-g++ -I/webapp_dez/itis_app/models -I/webapp_dez/itis_app/helpers -I/usr/include/treefrog -I/usr/include/x86_64-linux-gnu/qt5 -I/usr/include/x86_64-linux-gnu/qt5/QtSql -I/usr/include/x86_64-linux-gnu/qt5/QtQml -I/usr/include/x86_64-linux-gnu/qt5/QtNetwork -I/usr/include/x86_64-linux-gnu/qt5/QtCore -I/usr/include/c++/9 -I/usr/include/x86_64-linux-gnu/c++/9 -I/usr/include/c++/9/backward -I/usr/lib/gcc/x86_64-linux-gnu/9/include -I/usr/local/include -I/usr/include/x86_64-linux-gnu -I/usr/include sqlobjects/annexmetawasteobject.h -o .obj/moc_annexmetawasteobject.cpp
+
+.obj/moc_glossarobject.cpp: sqlobjects/glossarobject.h \
+ .obj/moc_predefs.h \
+ /usr/lib/qt5/bin/moc
+ /usr/lib/qt5/bin/moc $(DEFINES) --include /webapp_dez/itis_app/models/.obj/moc_predefs.h -I/usr/lib/x86_64-linux-gnu/qt5/mkspecs/linux-g++ -I/webapp_dez/itis_app/models -I/webapp_dez/itis_app/helpers -I/usr/include/treefrog -I/usr/include/x86_64-linux-gnu/qt5 -I/usr/include/x86_64-linux-gnu/qt5/QtSql -I/usr/include/x86_64-linux-gnu/qt5/QtQml -I/usr/include/x86_64-linux-gnu/qt5/QtNetwork -I/usr/include/x86_64-linux-gnu/qt5/QtCore -I/usr/include/c++/9 -I/usr/include/x86_64-linux-gnu/c++/9 -I/usr/include/c++/9/backward -I/usr/lib/gcc/x86_64-linux-gnu/9/include -I/usr/local/include -I/usr/include/x86_64-linux-gnu -I/usr/include sqlobjects/glossarobject.h -o .obj/moc_glossarobject.cpp
+
+.obj/moc_standardsdatacommentsobject.cpp: sqlobjects/standardsdatacommentsobject.h \
+ .obj/moc_predefs.h \
+ /usr/lib/qt5/bin/moc
+ /usr/lib/qt5/bin/moc $(DEFINES) --include /webapp_dez/itis_app/models/.obj/moc_predefs.h -I/usr/lib/x86_64-linux-gnu/qt5/mkspecs/linux-g++ -I/webapp_dez/itis_app/models -I/webapp_dez/itis_app/helpers -I/usr/include/treefrog -I/usr/include/x86_64-linux-gnu/qt5 -I/usr/include/x86_64-linux-gnu/qt5/QtSql -I/usr/include/x86_64-linux-gnu/qt5/QtQml -I/usr/include/x86_64-linux-gnu/qt5/QtNetwork -I/usr/include/x86_64-linux-gnu/qt5/QtCore -I/usr/include/c++/9 -I/usr/include/x86_64-linux-gnu/c++/9 -I/usr/include/c++/9/backward -I/usr/lib/gcc/x86_64-linux-gnu/9/include -I/usr/local/include -I/usr/include/x86_64-linux-gnu -I/usr/include sqlobjects/standardsdatacommentsobject.h -o .obj/moc_standardsdatacommentsobject.cpp
+
+.obj/moc_appvarsobject.cpp: sqlobjects/appvarsobject.h \
+ .obj/moc_predefs.h \
+ /usr/lib/qt5/bin/moc
+ /usr/lib/qt5/bin/moc $(DEFINES) --include /webapp_dez/itis_app/models/.obj/moc_predefs.h -I/usr/lib/x86_64-linux-gnu/qt5/mkspecs/linux-g++ -I/webapp_dez/itis_app/models -I/webapp_dez/itis_app/helpers -I/usr/include/treefrog -I/usr/include/x86_64-linux-gnu/qt5 -I/usr/include/x86_64-linux-gnu/qt5/QtSql -I/usr/include/x86_64-linux-gnu/qt5/QtQml -I/usr/include/x86_64-linux-gnu/qt5/QtNetwork -I/usr/include/x86_64-linux-gnu/qt5/QtCore -I/usr/include/c++/9 -I/usr/include/x86_64-linux-gnu/c++/9 -I/usr/include/c++/9/backward -I/usr/lib/gcc/x86_64-linux-gnu/9/include -I/usr/local/include -I/usr/include/x86_64-linux-gnu -I/usr/include sqlobjects/appvarsobject.h -o .obj/moc_appvarsobject.cpp
+
+.obj/moc_itisnewsobject.cpp: sqlobjects/itisnewsobject.h \
+ .obj/moc_predefs.h \
+ /usr/lib/qt5/bin/moc
+ /usr/lib/qt5/bin/moc $(DEFINES) --include /webapp_dez/itis_app/models/.obj/moc_predefs.h -I/usr/lib/x86_64-linux-gnu/qt5/mkspecs/linux-g++ -I/webapp_dez/itis_app/models -I/webapp_dez/itis_app/helpers -I/usr/include/treefrog -I/usr/include/x86_64-linux-gnu/qt5 -I/usr/include/x86_64-linux-gnu/qt5/QtSql -I/usr/include/x86_64-linux-gnu/qt5/QtQml -I/usr/include/x86_64-linux-gnu/qt5/QtNetwork -I/usr/include/x86_64-linux-gnu/qt5/QtCore -I/usr/include/c++/9 -I/usr/include/x86_64-linux-gnu/c++/9 -I/usr/include/c++/9/backward -I/usr/lib/gcc/x86_64-linux-gnu/9/include -I/usr/local/include -I/usr/include/x86_64-linux-gnu -I/usr/include sqlobjects/itisnewsobject.h -o .obj/moc_itisnewsobject.cpp
+
+.obj/moc_actionrightsobject.cpp: sqlobjects/actionrightsobject.h \
+ .obj/moc_predefs.h \
+ /usr/lib/qt5/bin/moc
+ /usr/lib/qt5/bin/moc $(DEFINES) --include /webapp_dez/itis_app/models/.obj/moc_predefs.h -I/usr/lib/x86_64-linux-gnu/qt5/mkspecs/linux-g++ -I/webapp_dez/itis_app/models -I/webapp_dez/itis_app/helpers -I/usr/include/treefrog -I/usr/include/x86_64-linux-gnu/qt5 -I/usr/include/x86_64-linux-gnu/qt5/QtSql -I/usr/include/x86_64-linux-gnu/qt5/QtQml -I/usr/include/x86_64-linux-gnu/qt5/QtNetwork -I/usr/include/x86_64-linux-gnu/qt5/QtCore -I/usr/include/c++/9 -I/usr/include/x86_64-linux-gnu/c++/9 -I/usr/include/c++/9/backward -I/usr/lib/gcc/x86_64-linux-gnu/9/include -I/usr/local/include -I/usr/include/x86_64-linux-gnu -I/usr/include sqlobjects/actionrightsobject.h -o .obj/moc_actionrightsobject.cpp
+
+.obj/moc_itisgroupsobject.cpp: sqlobjects/itisgroupsobject.h \
+ .obj/moc_predefs.h \
+ /usr/lib/qt5/bin/moc
+ /usr/lib/qt5/bin/moc $(DEFINES) --include /webapp_dez/itis_app/models/.obj/moc_predefs.h -I/usr/lib/x86_64-linux-gnu/qt5/mkspecs/linux-g++ -I/webapp_dez/itis_app/models -I/webapp_dez/itis_app/helpers -I/usr/include/treefrog -I/usr/include/x86_64-linux-gnu/qt5 -I/usr/include/x86_64-linux-gnu/qt5/QtSql -I/usr/include/x86_64-linux-gnu/qt5/QtQml -I/usr/include/x86_64-linux-gnu/qt5/QtNetwork -I/usr/include/x86_64-linux-gnu/qt5/QtCore -I/usr/include/c++/9 -I/usr/include/x86_64-linux-gnu/c++/9 -I/usr/include/c++/9/backward -I/usr/lib/gcc/x86_64-linux-gnu/9/include -I/usr/local/include -I/usr/include/x86_64-linux-gnu -I/usr/include sqlobjects/itisgroupsobject.h -o .obj/moc_itisgroupsobject.cpp
+
+.obj/moc_annexdatacommentsobject.cpp: sqlobjects/annexdatacommentsobject.h \
+ .obj/moc_predefs.h \
+ /usr/lib/qt5/bin/moc
+ /usr/lib/qt5/bin/moc $(DEFINES) --include /webapp_dez/itis_app/models/.obj/moc_predefs.h -I/usr/lib/x86_64-linux-gnu/qt5/mkspecs/linux-g++ -I/webapp_dez/itis_app/models -I/webapp_dez/itis_app/helpers -I/usr/include/treefrog -I/usr/include/x86_64-linux-gnu/qt5 -I/usr/include/x86_64-linux-gnu/qt5/QtSql -I/usr/include/x86_64-linux-gnu/qt5/QtQml -I/usr/include/x86_64-linux-gnu/qt5/QtNetwork -I/usr/include/x86_64-linux-gnu/qt5/QtCore -I/usr/include/c++/9 -I/usr/include/x86_64-linux-gnu/c++/9 -I/usr/include/c++/9/backward -I/usr/lib/gcc/x86_64-linux-gnu/9/include -I/usr/local/include -I/usr/include/x86_64-linux-gnu -I/usr/include sqlobjects/annexdatacommentsobject.h -o .obj/moc_annexdatacommentsobject.cpp
+
+.obj/moc_releasemgmtobject.cpp: sqlobjects/releasemgmtobject.h \
+ .obj/moc_predefs.h \
+ /usr/lib/qt5/bin/moc
+ /usr/lib/qt5/bin/moc $(DEFINES) --include /webapp_dez/itis_app/models/.obj/moc_predefs.h -I/usr/lib/x86_64-linux-gnu/qt5/mkspecs/linux-g++ -I/webapp_dez/itis_app/models -I/webapp_dez/itis_app/helpers -I/usr/include/treefrog -I/usr/include/x86_64-linux-gnu/qt5 -I/usr/include/x86_64-linux-gnu/qt5/QtSql -I/usr/include/x86_64-linux-gnu/qt5/QtQml -I/usr/include/x86_64-linux-gnu/qt5/QtNetwork -I/usr/include/x86_64-linux-gnu/qt5/QtCore -I/usr/include/c++/9 -I/usr/include/x86_64-linux-gnu/c++/9 -I/usr/include/c++/9/backward -I/usr/lib/gcc/x86_64-linux-gnu/9/include -I/usr/local/include -I/usr/include/x86_64-linux-gnu -I/usr/include sqlobjects/releasemgmtobject.h -o .obj/moc_releasemgmtobject.cpp
+
+.obj/moc_releaseannexobject.cpp: sqlobjects/releaseannexobject.h \
+ .obj/moc_predefs.h \
+ /usr/lib/qt5/bin/moc
+ /usr/lib/qt5/bin/moc $(DEFINES) --include /webapp_dez/itis_app/models/.obj/moc_predefs.h -I/usr/lib/x86_64-linux-gnu/qt5/mkspecs/linux-g++ -I/webapp_dez/itis_app/models -I/webapp_dez/itis_app/helpers -I/usr/include/treefrog -I/usr/include/x86_64-linux-gnu/qt5 -I/usr/include/x86_64-linux-gnu/qt5/QtSql -I/usr/include/x86_64-linux-gnu/qt5/QtQml -I/usr/include/x86_64-linux-gnu/qt5/QtNetwork -I/usr/include/x86_64-linux-gnu/qt5/QtCore -I/usr/include/c++/9 -I/usr/include/x86_64-linux-gnu/c++/9 -I/usr/include/c++/9/backward -I/usr/lib/gcc/x86_64-linux-gnu/9/include -I/usr/local/include -I/usr/include/x86_64-linux-gnu -I/usr/include sqlobjects/releaseannexobject.h -o .obj/moc_releaseannexobject.cpp
+
+.obj/moc_lenkinfoobject.cpp: sqlobjects/lenkinfoobject.h \
+ .obj/moc_predefs.h \
+ /usr/lib/qt5/bin/moc
+ /usr/lib/qt5/bin/moc $(DEFINES) --include /webapp_dez/itis_app/models/.obj/moc_predefs.h -I/usr/lib/x86_64-linux-gnu/qt5/mkspecs/linux-g++ -I/webapp_dez/itis_app/models -I/webapp_dez/itis_app/helpers -I/usr/include/treefrog -I/usr/include/x86_64-linux-gnu/qt5 -I/usr/include/x86_64-linux-gnu/qt5/QtSql -I/usr/include/x86_64-linux-gnu/qt5/QtQml -I/usr/include/x86_64-linux-gnu/qt5/QtNetwork -I/usr/include/x86_64-linux-gnu/qt5/QtCore -I/usr/include/c++/9 -I/usr/include/x86_64-linux-gnu/c++/9 -I/usr/include/c++/9/backward -I/usr/lib/gcc/x86_64-linux-gnu/9/include -I/usr/local/include -I/usr/include/x86_64-linux-gnu -I/usr/include sqlobjects/lenkinfoobject.h -o .obj/moc_lenkinfoobject.cpp
+
+compiler_moc_objc_header_make_all:
+compiler_moc_objc_header_clean:
+compiler_moc_source_make_all:
+compiler_moc_source_clean:
+compiler_yacc_decl_make_all:
+compiler_yacc_decl_clean:
+compiler_yacc_impl_make_all:
+compiler_yacc_impl_clean:
+compiler_lex_make_all:
+compiler_lex_clean:
+compiler_clean: compiler_moc_predefs_clean compiler_moc_header_clean
+
+####### Compile
+
+.obj/standardsdata.o: standardsdata.cpp standardsdata.h \
+ sqlobjects/standardsdataobject.h \
+ catclasses.h \
+ standardsdatacomments.h
+ $(CXX) -c $(CXXFLAGS) $(INCPATH) -o .obj/standardsdata.o standardsdata.cpp
+
+.obj/standardsmeta.o: standardsmeta.cpp standardsmeta.h \
+ sqlobjects/standardsmetaobject.h
+ $(CXX) -c $(CXXFLAGS) $(INCPATH) -o .obj/standardsmeta.o standardsmeta.cpp
+
+.obj/stdsystem.o: stdsystem.cpp stdsystem.h \
+ sqlobjects/stdsystemobject.h
+ $(CXX) -c $(CXXFLAGS) $(INCPATH) -o .obj/stdsystem.o stdsystem.cpp
+
+.obj/webmenu.o: webmenu.cpp webmenu.h \
+ sqlobjects/webmenuobject.h
+ $(CXX) -c $(CXXFLAGS) $(INCPATH) -o .obj/webmenu.o webmenu.cpp
+
+.obj/itisuser.o: itisuser.cpp itisuser.h \
+ sqlobjects/itisuserobject.h
+ $(CXX) -c $(CXXFLAGS) $(INCPATH) -o .obj/itisuser.o itisuser.cpp
+
+.obj/objects.o: objects.cpp objects.h \
+ sqlobjects/objectsobject.h
+ $(CXX) -c $(CXXFLAGS) $(INCPATH) -o .obj/objects.o objects.cpp
+
+.obj/catclasses.o: catclasses.cpp catclasses.h \
+ sqlobjects/catclassesobject.h
+ $(CXX) -c $(CXXFLAGS) $(INCPATH) -o .obj/catclasses.o catclasses.cpp
+
+.obj/acclasses.o: acclasses.cpp acclasses.h \
+ sqlobjects/acclassesobject.h
+ $(CXX) -c $(CXXFLAGS) $(INCPATH) -o .obj/acclasses.o acclasses.cpp
+
+.obj/pcclasses.o: pcclasses.cpp pcclasses.h \
+ sqlobjects/pcclassesobject.h
+ $(CXX) -c $(CXXFLAGS) $(INCPATH) -o .obj/pcclasses.o pcclasses.cpp
+
+.obj/standardsdatawaste.o: standardsdatawaste.cpp standardsdatawaste.h \
+ sqlobjects/standardsdatawasteobject.h
+ $(CXX) -c $(CXXFLAGS) $(INCPATH) -o .obj/standardsdatawaste.o standardsdatawaste.cpp
+
+.obj/standardsmetawaste.o: standardsmetawaste.cpp standardsmetawaste.h \
+ sqlobjects/standardsmetawasteobject.h
+ $(CXX) -c $(CXXFLAGS) $(INCPATH) -o .obj/standardsmetawaste.o standardsmetawaste.cpp
+
+.obj/annexdata.o: annexdata.cpp annexdata.h \
+ sqlobjects/annexdataobject.h \
+ catclasses.h \
+ annexdatacomments.h
+ $(CXX) -c $(CXXFLAGS) $(INCPATH) -o .obj/annexdata.o annexdata.cpp
+
+.obj/annexmeta.o: annexmeta.cpp annexmeta.h \
+ sqlobjects/annexmetaobject.h
+ $(CXX) -c $(CXXFLAGS) $(INCPATH) -o .obj/annexmeta.o annexmeta.cpp
+
+.obj/annexdatawaste.o: annexdatawaste.cpp annexdatawaste.h \
+ sqlobjects/annexdatawasteobject.h
+ $(CXX) -c $(CXXFLAGS) $(INCPATH) -o .obj/annexdatawaste.o annexdatawaste.cpp
+
+.obj/annexmetawaste.o: annexmetawaste.cpp annexmetawaste.h \
+ sqlobjects/annexmetawasteobject.h
+ $(CXX) -c $(CXXFLAGS) $(INCPATH) -o .obj/annexmetawaste.o annexmetawaste.cpp
+
+.obj/glossar.o: glossar.cpp glossar.h \
+ sqlobjects/glossarobject.h
+ $(CXX) -c $(CXXFLAGS) $(INCPATH) -o .obj/glossar.o glossar.cpp
+
+.obj/standardsdatacomments.o: standardsdatacomments.cpp standardsdatacomments.h \
+ sqlobjects/standardsdatacommentsobject.h
+ $(CXX) -c $(CXXFLAGS) $(INCPATH) -o .obj/standardsdatacomments.o standardsdatacomments.cpp
+
+.obj/appvars.o: appvars.cpp appvars.h \
+ sqlobjects/appvarsobject.h
+ $(CXX) -c $(CXXFLAGS) $(INCPATH) -o .obj/appvars.o appvars.cpp
+
+.obj/itisnews.o: itisnews.cpp itisnews.h \
+ sqlobjects/itisnewsobject.h
+ $(CXX) -c $(CXXFLAGS) $(INCPATH) -o .obj/itisnews.o itisnews.cpp
+
+.obj/actionrights.o: actionrights.cpp actionrights.h \
+ sqlobjects/actionrightsobject.h
+ $(CXX) -c $(CXXFLAGS) $(INCPATH) -o .obj/actionrights.o actionrights.cpp
+
+.obj/itisgroups.o: itisgroups.cpp itisgroups.h \
+ sqlobjects/itisgroupsobject.h
+ $(CXX) -c $(CXXFLAGS) $(INCPATH) -o .obj/itisgroups.o itisgroups.cpp
+
+.obj/annexdatacomments.o: annexdatacomments.cpp annexdatacomments.h \
+ sqlobjects/annexdatacommentsobject.h
+ $(CXX) -c $(CXXFLAGS) $(INCPATH) -o .obj/annexdatacomments.o annexdatacomments.cpp
+
+.obj/releasemgmt.o: releasemgmt.cpp releasemgmt.h \
+ sqlobjects/releasemgmtobject.h \
+ stdsystem.h
+ $(CXX) -c $(CXXFLAGS) $(INCPATH) -o .obj/releasemgmt.o releasemgmt.cpp
+
+.obj/releaseannex.o: releaseannex.cpp releaseannex.h \
+ sqlobjects/releaseannexobject.h \
+ catclasses.h
+ $(CXX) -c $(CXXFLAGS) $(INCPATH) -o .obj/releaseannex.o releaseannex.cpp
+
+.obj/lenkinfo.o: lenkinfo.cpp lenkinfo.h \
+ sqlobjects/lenkinfoobject.h \
+ stdsystem.h
+ $(CXX) -c $(CXXFLAGS) $(INCPATH) -o .obj/lenkinfo.o lenkinfo.cpp
+
+.obj/moc_standardsdataobject.o: .obj/moc_standardsdataobject.cpp
+ $(CXX) -c $(CXXFLAGS) $(INCPATH) -o .obj/moc_standardsdataobject.o .obj/moc_standardsdataobject.cpp
+
+.obj/moc_standardsmetaobject.o: .obj/moc_standardsmetaobject.cpp
+ $(CXX) -c $(CXXFLAGS) $(INCPATH) -o .obj/moc_standardsmetaobject.o .obj/moc_standardsmetaobject.cpp
+
+.obj/moc_stdsystemobject.o: .obj/moc_stdsystemobject.cpp
+ $(CXX) -c $(CXXFLAGS) $(INCPATH) -o .obj/moc_stdsystemobject.o .obj/moc_stdsystemobject.cpp
+
+.obj/moc_webmenuobject.o: .obj/moc_webmenuobject.cpp
+ $(CXX) -c $(CXXFLAGS) $(INCPATH) -o .obj/moc_webmenuobject.o .obj/moc_webmenuobject.cpp
+
+.obj/moc_itisuserobject.o: .obj/moc_itisuserobject.cpp
+ $(CXX) -c $(CXXFLAGS) $(INCPATH) -o .obj/moc_itisuserobject.o .obj/moc_itisuserobject.cpp
+
+.obj/moc_objectsobject.o: .obj/moc_objectsobject.cpp
+ $(CXX) -c $(CXXFLAGS) $(INCPATH) -o .obj/moc_objectsobject.o .obj/moc_objectsobject.cpp
+
+.obj/moc_catclassesobject.o: .obj/moc_catclassesobject.cpp
+ $(CXX) -c $(CXXFLAGS) $(INCPATH) -o .obj/moc_catclassesobject.o .obj/moc_catclassesobject.cpp
+
+.obj/moc_acclassesobject.o: .obj/moc_acclassesobject.cpp
+ $(CXX) -c $(CXXFLAGS) $(INCPATH) -o .obj/moc_acclassesobject.o .obj/moc_acclassesobject.cpp
+
+.obj/moc_pcclassesobject.o: .obj/moc_pcclassesobject.cpp
+ $(CXX) -c $(CXXFLAGS) $(INCPATH) -o .obj/moc_pcclassesobject.o .obj/moc_pcclassesobject.cpp
+
+.obj/moc_standardsdatawasteobject.o: .obj/moc_standardsdatawasteobject.cpp
+ $(CXX) -c $(CXXFLAGS) $(INCPATH) -o .obj/moc_standardsdatawasteobject.o .obj/moc_standardsdatawasteobject.cpp
+
+.obj/moc_standardsmetawasteobject.o: .obj/moc_standardsmetawasteobject.cpp
+ $(CXX) -c $(CXXFLAGS) $(INCPATH) -o .obj/moc_standardsmetawasteobject.o .obj/moc_standardsmetawasteobject.cpp
+
+.obj/moc_annexdataobject.o: .obj/moc_annexdataobject.cpp
+ $(CXX) -c $(CXXFLAGS) $(INCPATH) -o .obj/moc_annexdataobject.o .obj/moc_annexdataobject.cpp
+
+.obj/moc_annexmetaobject.o: .obj/moc_annexmetaobject.cpp
+ $(CXX) -c $(CXXFLAGS) $(INCPATH) -o .obj/moc_annexmetaobject.o .obj/moc_annexmetaobject.cpp
+
+.obj/moc_annexdatawasteobject.o: .obj/moc_annexdatawasteobject.cpp
+ $(CXX) -c $(CXXFLAGS) $(INCPATH) -o .obj/moc_annexdatawasteobject.o .obj/moc_annexdatawasteobject.cpp
+
+.obj/moc_annexmetawasteobject.o: .obj/moc_annexmetawasteobject.cpp
+ $(CXX) -c $(CXXFLAGS) $(INCPATH) -o .obj/moc_annexmetawasteobject.o .obj/moc_annexmetawasteobject.cpp
+
+.obj/moc_glossarobject.o: .obj/moc_glossarobject.cpp
+ $(CXX) -c $(CXXFLAGS) $(INCPATH) -o .obj/moc_glossarobject.o .obj/moc_glossarobject.cpp
+
+.obj/moc_standardsdatacommentsobject.o: .obj/moc_standardsdatacommentsobject.cpp
+ $(CXX) -c $(CXXFLAGS) $(INCPATH) -o .obj/moc_standardsdatacommentsobject.o .obj/moc_standardsdatacommentsobject.cpp
+
+.obj/moc_appvarsobject.o: .obj/moc_appvarsobject.cpp
+ $(CXX) -c $(CXXFLAGS) $(INCPATH) -o .obj/moc_appvarsobject.o .obj/moc_appvarsobject.cpp
+
+.obj/moc_itisnewsobject.o: .obj/moc_itisnewsobject.cpp
+ $(CXX) -c $(CXXFLAGS) $(INCPATH) -o .obj/moc_itisnewsobject.o .obj/moc_itisnewsobject.cpp
+
+.obj/moc_actionrightsobject.o: .obj/moc_actionrightsobject.cpp
+ $(CXX) -c $(CXXFLAGS) $(INCPATH) -o .obj/moc_actionrightsobject.o .obj/moc_actionrightsobject.cpp
+
+.obj/moc_itisgroupsobject.o: .obj/moc_itisgroupsobject.cpp
+ $(CXX) -c $(CXXFLAGS) $(INCPATH) -o .obj/moc_itisgroupsobject.o .obj/moc_itisgroupsobject.cpp
+
+.obj/moc_annexdatacommentsobject.o: .obj/moc_annexdatacommentsobject.cpp
+ $(CXX) -c $(CXXFLAGS) $(INCPATH) -o .obj/moc_annexdatacommentsobject.o .obj/moc_annexdatacommentsobject.cpp
+
+.obj/moc_releasemgmtobject.o: .obj/moc_releasemgmtobject.cpp
+ $(CXX) -c $(CXXFLAGS) $(INCPATH) -o .obj/moc_releasemgmtobject.o .obj/moc_releasemgmtobject.cpp
+
+.obj/moc_releaseannexobject.o: .obj/moc_releaseannexobject.cpp
+ $(CXX) -c $(CXXFLAGS) $(INCPATH) -o .obj/moc_releaseannexobject.o .obj/moc_releaseannexobject.cpp
+
+.obj/moc_lenkinfoobject.o: .obj/moc_lenkinfoobject.cpp
+ $(CXX) -c $(CXXFLAGS) $(INCPATH) -o .obj/moc_lenkinfoobject.o .obj/moc_lenkinfoobject.cpp
+
+####### Install
+
+install: FORCE
+
+uninstall: FORCE
+
+FORCE:
+
diff --git a/models/acclasses.cpp b/models/acclasses.cpp
new file mode 100644
index 0000000..f95c85e
--- /dev/null
+++ b/models/acclasses.cpp
@@ -0,0 +1,221 @@
+#include
+#include "acclasses.h"
+#include "sqlobjects/acclassesobject.h"
+
+AcClasses::AcClasses() :
+ TAbstractModel(),
+ d(new AcClassesObject())
+{
+ // set the initial parameters
+}
+
+AcClasses::AcClasses(const AcClasses &other) :
+ TAbstractModel(),
+ d(other.d)
+{ }
+
+AcClasses::AcClasses(const AcClassesObject &object) :
+ TAbstractModel(),
+ d(new AcClassesObject(object))
+{ }
+
+AcClasses::~AcClasses()
+{
+ // If the reference count becomes 0,
+ // the shared data object 'AcClassesObject' is deleted.
+}
+
+// #####
+
+QJsonArray AcClasses::getObjAcJson(QString &obj, int &active)
+{
+ TSqlQuery query;
+ QJsonObject jsonObject;
+ QJsonArray jsonArray;
+ QString msg;
+
+ query.prepare("SELECT id, obj_sname, ac_class, active FROM public.ac_classes WHERE obj_sname = ? AND active = ? order by ac_class");
+ query.addBindValue(obj);
+ query.addBindValue(active);
+
+ if(!query.exec())
+ {
+ msg = query.lastError().text();
+ jsonObject["errMsg"] = msg;
+ jsonObject["ERROR"] = "1";
+ jsonArray.append(jsonObject);
+ return jsonArray;
+ }
+
+ while (query.next())
+ {
+ jsonObject["id"] = query.value(0).toString();
+ jsonObject["obj_sname"] = query.value(1).toString();
+ jsonObject["ac_class"] = query.value(2).toString();
+ jsonObject["active"] = query.value(3).toString();
+ jsonArray.append(jsonObject);
+ }
+ jsonObject = QJsonObject();
+ jsonObject["ERROR"] = "0";
+ jsonArray.append(jsonObject);
+ return jsonArray;
+}
+
+QJsonArray AcClasses::getAcClassesJson()
+{
+ TSqlQuery query;
+ QJsonObject jsonObject;
+ QJsonArray jsonArray;
+ QString msg;
+
+ query.prepare("SELECT distinct(ac_class) FROM public.ac_classes order by ac_class;");
+
+ if(!query.exec())
+ {
+ msg = query.lastError().text();
+ jsonObject["sys_msg"] = msg;
+ jsonObject["sys_err"] = "1";
+ jsonArray.append(jsonObject);
+ return jsonArray;
+ }
+
+ while (query.next())
+ {
+ jsonObject["ac_class"] = query.value(0).toString();
+ jsonArray.append(jsonObject);
+ }
+
+ return jsonArray;
+}
+
+int AcClasses::id() const
+{
+ return d->id;
+}
+
+QString AcClasses::objSname() const
+{
+ return d->obj_sname;
+}
+
+void AcClasses::setObjSname(const QString &objSname)
+{
+ d->obj_sname = objSname;
+}
+
+int AcClasses::acClass() const
+{
+ return d->ac_class;
+}
+
+void AcClasses::setAcClass(int acClass)
+{
+ d->ac_class = acClass;
+}
+
+QString AcClasses::classType() const
+{
+ return d->class_type;
+}
+
+void AcClasses::setClassType(const QString &classType)
+{
+ d->class_type = classType;
+}
+
+int AcClasses::active() const
+{
+ return d->active;
+}
+
+void AcClasses::setActive(int active)
+{
+ d->active = active;
+}
+
+AcClasses &AcClasses::operator=(const AcClasses &other)
+{
+ d = other.d; // increments the reference count of the data
+ return *this;
+}
+
+AcClasses AcClasses::create(const QString &objSname, int acClass, const QString &classType, int active)
+{
+ AcClassesObject obj;
+ obj.obj_sname = objSname;
+ obj.ac_class = acClass;
+ obj.class_type = classType;
+ obj.active = active;
+ if (!obj.create()) {
+ return AcClasses();
+ }
+ return AcClasses(obj);
+}
+
+AcClasses AcClasses::create(const QVariantMap &values)
+{
+ AcClasses model;
+ model.setProperties(values);
+ if (!model.d->create()) {
+ model.d->clear();
+ }
+ return model;
+}
+
+AcClasses AcClasses::get(int id)
+{
+ TSqlORMapper mapper;
+ return AcClasses(mapper.findByPrimaryKey(id));
+}
+
+int AcClasses::count()
+{
+ TSqlORMapper mapper;
+ return mapper.findCount();
+}
+
+QList AcClasses::getAll()
+{
+ return tfGetModelListByCriteria(TCriteria());
+}
+
+QJsonArray AcClasses::getAllJson()
+{
+ QJsonArray array;
+ TSqlORMapper mapper;
+
+ if (mapper.find() > 0) {
+ for (TSqlORMapperIterator i(mapper); i.hasNext(); ) {
+ array.append(QJsonValue(QJsonObject::fromVariantMap(AcClasses(i.next()).toVariantMap())));
+ }
+ }
+ return array;
+}
+
+TModelObject *AcClasses::modelData()
+{
+ return d.data();
+}
+
+const TModelObject *AcClasses::modelData() const
+{
+ return d.data();
+}
+
+QDataStream &operator<<(QDataStream &ds, const AcClasses &model)
+{
+ auto varmap = model.toVariantMap();
+ ds << varmap;
+ return ds;
+}
+
+QDataStream &operator>>(QDataStream &ds, AcClasses &model)
+{
+ QVariantMap varmap;
+ ds >> varmap;
+ model.setProperties(varmap);
+ return ds;
+}
+
+// Don't remove below this line
+T_REGISTER_STREAM_OPERATORS(AcClasses)
diff --git a/models/acclasses.h b/models/acclasses.h
new file mode 100644
index 0000000..4e32079
--- /dev/null
+++ b/models/acclasses.h
@@ -0,0 +1,62 @@
+#ifndef ACCLASSES_H
+#define ACCLASSES_H
+
+#include
+#include
+#include
+#include
+#include
+#include
+
+class TModelObject;
+class AcClassesObject;
+class QJsonArray;
+
+
+class T_MODEL_EXPORT AcClasses : public TAbstractModel
+{
+public:
+ AcClasses();
+ AcClasses(const AcClasses &other);
+ AcClasses(const AcClassesObject &object);
+ ~AcClasses();
+
+ int id() const;
+ QString objSname() const;
+ void setObjSname(const QString &objSname);
+ int acClass() const;
+ void setAcClass(int acClass);
+ QString classType() const;
+ void setClassType(const QString &classType);
+ int active() const;
+ void setActive(int active);
+ AcClasses &operator=(const AcClasses &other);
+
+ bool create() override { return TAbstractModel::create(); }
+ bool update() override { return TAbstractModel::update(); }
+ bool save() override { return TAbstractModel::save(); }
+ bool remove() override { return TAbstractModel::remove(); }
+
+ static AcClasses create(const QString &objSname, int acClass, const QString &classType, int active);
+ static AcClasses create(const QVariantMap &values);
+ static AcClasses get(int id);
+ static int count();
+
+ static QList getAll();
+ static QJsonArray getAllJson();
+ static QJsonArray getAcClassesJson();
+ static QJsonArray getObjAcJson(QString &obj, int &active);
+
+private:
+ QSharedDataPointer d;
+
+ TModelObject *modelData() override;
+ const TModelObject *modelData() const override;
+ friend QDataStream &operator<<(QDataStream &ds, const AcClasses &model);
+ friend QDataStream &operator>>(QDataStream &ds, AcClasses &model);
+};
+
+Q_DECLARE_METATYPE(AcClasses)
+Q_DECLARE_METATYPE(QList)
+
+#endif // ACCLASSES_H
diff --git a/models/actionrights.cpp b/models/actionrights.cpp
new file mode 100644
index 0000000..a83219d
--- /dev/null
+++ b/models/actionrights.cpp
@@ -0,0 +1,221 @@
+#include
+#include "actionrights.h"
+#include "sqlobjects/actionrightsobject.h"
+
+ActionRights::ActionRights() :
+ TAbstractModel(),
+ d(new ActionRightsObject())
+{
+ // set the initial parameters
+}
+
+ActionRights::ActionRights(const ActionRights &other) :
+ TAbstractModel(),
+ d(other.d)
+{ }
+
+ActionRights::ActionRights(const ActionRightsObject &object) :
+ TAbstractModel(),
+ d(new ActionRightsObject(object))
+{ }
+
+ActionRights::~ActionRights()
+{
+ // If the reference count becomes 0,
+ // the shared data object 'ActionRightsObject' is deleted.
+}
+
+// #####
+
+bool ActionRights::isInGroups(const QString &userGroups, const QString &crud, const QString &uri)
+{
+ TSqlQuery query;
+ QString msg;
+
+ QString user_groups = userGroups;
+ user_groups.replace("{", "").replace("}", "");
+ QStringList usergroups = user_groups.split(",");
+
+ QString andStr;
+
+ int i = 0;
+ do
+ {
+ if(i == 0)
+ {
+ andStr.append("(array_to_string(groups, ',') like '%" + usergroups[i] + ":%" + crud + "%'");
+ }
+ else
+ {
+ //andStr.append(" OR array_to_string(groups, ',') like '" + usergroups[i] + ":%" + crud + "%'");
+ andStr.append(" OR array_to_string(groups, ',') like '%" + usergroups[i] + ":%" + crud + "%'");
+ }
+ i++;
+ }while(i < usergroups.size());
+ andStr.append(")");
+
+ query.prepare("SELECT * FROM public.action_rights WHERE uri = ? AND " + andStr + " AND active = '1'");
+ query.addBindValue(uri.toLower());
+
+ if(!query.exec())
+ {
+ msg = query.lastError().text();
+ //qWarning("ERROR: " + msg.toUtf8());
+ tError("ERROR: " + msg.toUtf8());
+ return false;
+ }
+
+ while (query.next())
+ {
+ //msg = query.value(0).toString();
+ //tInfo("OK: " + msg.toUtf8());
+ return true;
+ }
+
+ return false;
+}
+
+int ActionRights::id() const
+{
+ return d->id;
+}
+
+QString ActionRights::uri() const
+{
+ return d->uri;
+}
+
+void ActionRights::setUri(const QString &uri)
+{
+ d->uri = uri;
+}
+
+QString ActionRights::groups() const
+{
+ return d->groups;
+}
+
+void ActionRights::setGroups(const QString &groups)
+{
+ d->groups = groups;
+}
+
+QString ActionRights::rights() const
+{
+ return d->rights;
+}
+
+void ActionRights::setRights(const QString &rights)
+{
+ d->rights = rights;
+}
+
+int ActionRights::active() const
+{
+ return d->active;
+}
+
+void ActionRights::setActive(int active)
+{
+ d->active = active;
+}
+
+ActionRights &ActionRights::operator=(const ActionRights &other)
+{
+ d = other.d; // increments the reference count of the data
+ return *this;
+}
+
+ActionRights ActionRights::create(const QString &uri, const QString &groups, const QString &rights, int active)
+{
+ ActionRightsObject obj;
+ obj.uri = uri;
+ obj.groups = groups;
+ obj.rights = rights;
+ obj.active = active;
+ if (!obj.create()) {
+ return ActionRights();
+ }
+ return ActionRights(obj);
+}
+
+ActionRights ActionRights::create(const QVariantMap &values)
+{
+ ActionRights model;
+ model.setProperties(values);
+ if (!model.d->create()) {
+ model.d->clear();
+ }
+ return model;
+}
+
+ActionRights ActionRights::get(int id)
+{
+ TSqlORMapper mapper;
+ return ActionRights(mapper.findByPrimaryKey(id));
+}
+
+int ActionRights::count()
+{
+ TSqlORMapper mapper;
+ return mapper.findCount();
+}
+
+QList ActionRights::getAll()
+{
+ TSqlQuery query;
+
+ QProcess p;
+ QString program = "itis_routes";
+ QStringList arguments;
+ arguments << "";
+
+ p.start(program,arguments);
+ p.waitForStarted();
+ p.waitForReadyRead();
+ p.waitForFinished();
+ QString line= p.readAllStandardOutput();
+
+ return tfGetModelListByCriteria(TCriteria());
+}
+
+QJsonArray ActionRights::getAllJson()
+{
+ QJsonArray array;
+ TSqlORMapper mapper;
+
+ if (mapper.find() > 0) {
+ for (TSqlORMapperIterator i(mapper); i.hasNext(); ) {
+ array.append(QJsonValue(QJsonObject::fromVariantMap(ActionRights(i.next()).toVariantMap())));
+ }
+ }
+ return array;
+}
+
+TModelObject *ActionRights::modelData()
+{
+ return d.data();
+}
+
+const TModelObject *ActionRights::modelData() const
+{
+ return d.data();
+}
+
+QDataStream &operator<<(QDataStream &ds, const ActionRights &model)
+{
+ auto varmap = model.toVariantMap();
+ ds << varmap;
+ return ds;
+}
+
+QDataStream &operator>>(QDataStream &ds, ActionRights &model)
+{
+ QVariantMap varmap;
+ ds >> varmap;
+ model.setProperties(varmap);
+ return ds;
+}
+
+// Don't remove below this line
+T_REGISTER_STREAM_OPERATORS(ActionRights)
diff --git a/models/actionrights.h b/models/actionrights.h
new file mode 100644
index 0000000..131e49f
--- /dev/null
+++ b/models/actionrights.h
@@ -0,0 +1,60 @@
+#ifndef ACTIONRIGHTS_H
+#define ACTIONRIGHTS_H
+
+#include
+#include
+#include
+#include
+#include
+#include
+
+class TModelObject;
+class ActionRightsObject;
+class QJsonArray;
+
+
+class T_MODEL_EXPORT ActionRights : public TAbstractModel
+{
+public:
+ ActionRights();
+ ActionRights(const ActionRights &other);
+ ActionRights(const ActionRightsObject &object);
+ ~ActionRights();
+
+ int id() const;
+ QString uri() const;
+ void setUri(const QString &uri);
+ QString groups() const;
+ void setGroups(const QString &groups);
+ QString rights() const;
+ void setRights(const QString &rights);
+ int active() const;
+ void setActive(int active);
+ ActionRights &operator=(const ActionRights &other);
+
+ bool create() override { return TAbstractModel::create(); }
+ bool update() override { return TAbstractModel::update(); }
+ bool save() override { return TAbstractModel::save(); }
+ bool remove() override { return TAbstractModel::remove(); }
+
+ static ActionRights create(const QString &uri, const QString &groups, const QString &rights, int active);
+ static ActionRights create(const QVariantMap &values);
+ static ActionRights get(int id);
+ static int count();
+ static QList getAll();
+ static QJsonArray getAllJson();
+ static bool isInGroups(const QString &usergroups, const QString &crud, const QString &uri);
+
+private:
+ QSharedDataPointer d;
+
+ TModelObject *modelData() override;
+ const TModelObject *modelData() const override;
+ friend QDataStream &operator<<(QDataStream &ds, const ActionRights &model);
+ friend QDataStream &operator>>(QDataStream &ds, ActionRights &model);
+};
+
+Q_DECLARE_METATYPE(ActionRights)
+Q_DECLARE_METATYPE(QList)
+
+#endif // ACTIONRIGHTS_H
diff --git a/models/annexdata.cpp b/models/annexdata.cpp
new file mode 100644
index 0000000..319ad35
--- /dev/null
+++ b/models/annexdata.cpp
@@ -0,0 +1,1683 @@
+#include
+#include "annexdata.h"
+#include "sqlobjects/annexdataobject.h"
+
+#include
+#include
+#include
+
+#include "catclasses.h"
+#include "annexdatacomments.h"
+
+AnnexData::AnnexData() :
+ TAbstractModel(),
+ d(new AnnexDataObject())
+{
+ // set the initial parameters
+}
+
+AnnexData::AnnexData(const AnnexData &other) :
+ TAbstractModel(),
+ d(other.d)
+{ }
+
+AnnexData::AnnexData(const AnnexDataObject &object) :
+ TAbstractModel(),
+ d(new AnnexDataObject(object))
+{ }
+
+AnnexData::~AnnexData()
+{
+ // If the reference count becomes 0,
+ // the shared data object 'AnnexDataObject' is deleted.
+}
+
+// #####
+
+void AnnexData::writeAnnexHtml(QMap &stdDataMap)
+{
+ QJsonValue id, spec_title, lfdnr, spec_version, spec_last_modified, specContent;
+
+
+ QFile file(stdDataMap["htmlFileDir"]);
+ file.open(QIODevice::WriteOnly | QIODevice::Append);
+ QTextStream stream(&file);
+ stream.setAutoDetectUnicode(true);
+
+
+ // ["General","Planning", "Environment", "Construction", "Power", "Cabling", "Safety", "Security","Management","Operations","Appendix"];
+
+ // data = new URLSearchParams([["getStdType", "show"], ["obj_sname", obj_name], ["cat_sname_en", cat], ["country", stdObj.country], ["lang", stdObj.lang], ["spec_active", stdObj.spec_active], ["ac_class", stdObj.ac_class], ["pc_class", stdObj.pc_class], ["spec_release", stdObj.spec_release]]);
+
+
+ foreach (const QJsonValue & value, AnnexData::getAnnexList(stdDataMap))
+ {
+ QJsonObject objclass = value.toObject();
+ id = objclass.value(QString("id"));
+ lfdnr = objclass.value(QString("lfdnr"));
+ spec_title = objclass.value(QString("spec_title"));
+ spec_version = objclass.value(QString("spec_version"));
+ spec_last_modified = objclass.value(QString("spec_last_modified"));
+ stream << spec_title.toString() << '\n';
+ stream << id.toString() << " " << lfdnr.toString() << " " << spec_last_modified.toString() << " " << spec_version.toString() << '\n';
+ stream << "AC: " << objclass.value(QString("ac_classes")).toString() << " PC: " << objclass.value(QString("pc_classes")).toString() << " Country: " << objclass.value(QString("country")).toString() << '\n';
+
+ QString msg = id.toString();
+ int specId = msg.toInt();
+
+ QJsonArray val = AnnexData::getAnnexSpec(specId);
+
+ foreach (const QJsonValue & val, val)
+ {
+ QJsonObject obj = val.toObject();
+ stream << '\n' << obj["spec_content"].toString() << '\n';
+ }
+ }
+ file.flush();
+ file.close();
+}
+void AnnexData::writeAnnex(QMap &stdDataMap)
+{
+ QString header= R"(
+
+
+
+
+
+
+
+ PDF
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+)";
+ QString footer= R"(
+
+
+
+)";
+
+ stdDataMap["curentDateTime"] = QDateTime::currentDateTime().toString("yyyy-MM-dd_HHmmss");
+
+ QString msg, doctitle, htmlFileDir, htmlFileUri;
+ doctitle = stdDataMap["obj_sname"];
+ doctitle.replace(" ", "_");
+
+ QString dev_dir = "/webapp_dez/html/itis/pdf/annex/" + stdDataMap["spec_release"] + "/";
+ QString prod_dir = "/webapp/html/itis/pdf/annex/" + stdDataMap["spec_release"] + "/";
+
+ QString htmlFile = stdDataMap["curentDateTime"] + "_" + doctitle + "_v" + stdDataMap["release_version"] + "-" + stdDataMap["spec_release"] + ".html";
+
+ QDir devDir(dev_dir);
+ QDir prodDir(prod_dir);
+
+ if(devDir.exists())
+ {
+ htmlFileDir = dev_dir + htmlFile;
+ htmlFileUri = "http://localhost:8080" + htmlFile;
+ }
+ else if(prodDir.exists())
+ {
+ htmlFileDir = prod_dir + htmlFile;
+ htmlFileUri = "https://itis.hitchhiker.tech/" + htmlFile;
+ }
+
+ stdDataMap["htmlFileDir"] = htmlFileDir;
+ QMap stdGeneralMap = stdDataMap;
+
+ QFile file(htmlFileDir);
+ file.open(QIODevice::WriteOnly | QIODevice::Append);
+ QTextStream stream(&file);
+ stream.setAutoDetectUnicode(true);
+ stream << header << '\n';
+
+ stream << "" << stdDataMap["obj_sname"] << "" << '\n';
+ stream << "" << stdDataMap["lang"] << "" << '\n';
+
+ file.flush();
+ file.close();
+
+ stdGeneralMap["obj_sname"] = "General";
+ stdGeneralMap["country"] = "WW";
+ stdGeneralMap["lang"] = "de_DE";
+ stdGeneralMap["spec_active"] = "1";
+ stdGeneralMap["ac_class"] = "0";
+ stdGeneralMap["pc_class"] = "0";
+ stdGeneralMap["spec_release"] = "pre-release";
+ stdGeneralMap["getStdType"] = "show";
+ stdGeneralMap["cat_sname_en"] = "General";
+
+ AnnexData::writeAnnexHtml(stdGeneralMap);
+
+ QStringList categories = {"General","Planning", "Environment", "Construction", "Power", "Cabling", "Safety", "Security","Management","Operations","Appendix"};
+
+ for(int i = 0; i < categories.size(); ++i)
+ {
+ stdDataMap["cat_sname_en"] = categories.at(i).toLocal8Bit().constData();
+ msg = stdDataMap["cat_sname_en"];
+ qWarning("TEST: " + msg.toUtf8());
+ AnnexData::writeAnnexHtml(stdDataMap);
+ }
+
+ file.open(QIODevice::WriteOnly | QIODevice::Append);
+ stream.setAutoDetectUnicode(true);
+ stream << footer << '\n';
+ file.flush();
+ file.close();
+}
+
+QJsonArray AnnexData::getAnnexSpec(int &id)
+{
+ TSqlQuery query;
+ QJsonObject jsonObject;
+ QJsonArray jsonArray;
+ QString msg, lang;
+
+ query.prepare("SELECT annex_data.id, lfdnr, spec_title, spec_desc, spec_version, spec_release, obj_sname, ac_classes, pc_classes, cat_class, country, lang, spec_active, spec_created, spec_last_modified, spec_valid_start, spec_valid_end, last_editor, g_legacy, responsibility, spec_comment, spec_marker, groups, spec_content FROM annex_data INNER JOIN annex_meta ON annex_meta.spec_data_id = annex_data.id WHERE annex_data.id = ?");
+ query.addBindValue(id);
+
+ if(!query.exec())
+ {
+ msg = query.lastError().text();
+ jsonObject["errMsg"] = msg;
+ jsonObject["ERROR"] = "1";
+ jsonArray.append(jsonObject);
+
+ return jsonArray;
+ }
+
+ while (query.next())
+ {
+ jsonObject["id"] = query.value(0).toString();
+ jsonObject["lfdnr"] = query.value(1).toString();
+ jsonObject["spec_title"] = query.value(2).toString();
+ jsonObject["spec_desc"] = query.value(3).toString();
+ jsonObject["spec_version"] = query.value(4).toString();
+ jsonObject["spec_release"] = query.value(5).toString();
+ jsonObject["obj_sname"] = query.value(6).toString();
+ jsonObject["ac_classes"] = query.value(7).toString();
+ jsonObject["pc_classes"] = query.value(8).toString();
+ jsonObject["cat_class"] = query.value(9).toString();
+ jsonObject["country"] = query.value(10).toString();
+ jsonObject["lang"] = query.value(11).toString();
+ lang = query.value(11).toString();
+ jsonObject["spec_active"] = query.value(12).toString();
+ jsonObject["spec_created"] = query.value(13).toString();
+ jsonObject["spec_last_modified"] = query.value(14).toString();
+ jsonObject["spec_valid_start"] = query.value(15).toString();
+ jsonObject["spec_valid_end"] = query.value(16).toString();
+ jsonObject["last_editor"] = query.value(17).toString();
+ jsonObject["g_legacy"] = query.value(18).toString();
+ jsonObject["responsibility"] = query.value(19).toString();
+ jsonObject["spec_comment"] = query.value(20).toString();
+ jsonObject["spec_marker"] = query.value(21).toString();
+ jsonObject["groups"] = query.value(22).toString();
+
+ std::string erg = query.value(23).toString().toStdString();
+ findAndReplaceAll(erg, lang, "standard");
+ jsonObject["spec_content"] = erg.c_str();
+
+ std::string line = erg.c_str();
+
+ std::regex reg1("()(.{0,100})(
)", std::regex_constants::icase);
+ std::smatch match1;
+
+ std::regex reg2("()(.{0,100})(
)", std::regex_constants::icase);
+ std::smatch match2;
+
+ std::regex reg3("()(.{0,100})(
)", std::regex_constants::icase);
+ std::smatch match3;
+
+ std::regex reg4("()(.{0,100})(
)", std::regex_constants::icase);
+ std::smatch match4;
+
+ QString toc;
+ std::string ahref1 = ".{0,100})|(.{0,100}
)|(.{0,100}
)|(.{0,100}
))", std::regex_constants::icase);
+ std::regex re("((.{0,100})|(.{0,100})|(.{0,100})|(.{0,100}))", std::regex_constants::icase);
+ std::sregex_iterator next(line.begin(), line.end(), re);
+ std::sregex_iterator end;
+ while (next != end)
+ {
+ std::smatch match = *next;
+ //std::cout << "MATCH: " << match.str() << "\n";
+ std::string item = match.str();
+ if(std::regex_search(item, match1, reg1))
+ {
+ std::string to = match1.str();
+
+ std::regex style_re("( style=\"[a-z]*-?[a-z]*:[a-z]*;\")");
+ to = regex_replace(to, style_re, "");
+
+ std::regex vowel_re("()|(
)");
+ to = regex_replace(to, vowel_re, "");
+ to = ahref1 + query.value(0).toString().toStdString() + class1 + ahref2 + to + ahref3;
+ toc.append(to.c_str());
+ next++;
+ continue;
+ }
+ if(std::regex_search(item, match2, reg2))
+ {
+ std::string to = match2.str();
+
+ std::regex style_re("( style=\"[a-z]*-?[a-z]*:[a-z]*;\")");
+ to = regex_replace(to, style_re, "");
+
+ std::regex vowel_re("()|(
)");
+ to = regex_replace(to, vowel_re, "");
+ to = ahref1 + query.value(0).toString().toStdString() + class2 + ahref2 + to + ahref3;
+ toc.append(to.c_str());
+ next++;
+ continue;
+ }
+ if(std::regex_search(item, match3, reg3))
+ {
+ std::string to = match3.str();
+
+ std::regex style_re("( style=\"[a-z]*-?[a-z]*:[a-z]*;\")");
+ to = regex_replace(to, style_re, "");
+
+ std::regex vowel_re("()|(
)");
+ to = regex_replace(to, vowel_re, "");
+ to = ahref1 + query.value(0).toString().toStdString() + class3 + ahref2 + to + ahref3;
+ toc.append(to.c_str());
+ next++;
+ continue;
+ }
+ if(std::regex_search(item, match4, reg4))
+ {
+ std::string to = match4.str();
+
+ std::regex style_re("( style=\"[a-z]*-?[a-z]*:[a-z]*;\")");
+ to = regex_replace(to, style_re, "");
+
+ std::regex vowel_re("()|(
)");
+ to = regex_replace(to, vowel_re, "");
+ to = ahref1 + query.value(0).toString().toStdString() + class4 + ahref2 + to + ahref3;
+ toc.append(to.c_str());
+ next++;
+ continue;
+ }
+
+ next++;
+ }
+ jsonObject["toc"] = toc;
+ toc = "";
+ }
+ catch (std::regex_error& e)
+ {
+ //std::cout << "Syntax error in the regular expression" << std::endl;
+ }
+
+ jsonArray.append(jsonObject);
+
+ }
+
+ return jsonArray;
+}
+
+void AnnexData::findAndReplaceAll(std::string &data, QString &lang, QString std_type)
+{
+ TSqlQuery query;
+ std::string toSearch, replaceStr;
+
+ std::string year = QDateTime::currentDateTime().toString("yyyy").toStdString();
+ std::string y = "{{YYYY}}";
+ std::string month = QDateTime::currentDateTime().toString("MM").toStdString();
+ std::string m = "{{MM}}";
+
+ size_t pos2 = data.find(y);
+ // Repeat till end is reached
+ while( pos2 != std::string::npos)
+ {
+ // Replace this occurrence of Sub String
+ data.replace(pos2, y.size(), year);
+ // Get the next occurrence from the current position
+ pos2 =data.find(y, pos2 + y.size());
+ }
+ pos2 = data.find(m);
+ // Repeat till end is reached
+ while( pos2 != std::string::npos)
+ {
+ // Replace this occurrence of Sub String
+ data.replace(pos2, m.size(), month);
+ // Get the next occurrence from the current position
+ pos2 =data.find(m, pos2 + m.size());
+ }
+
+ if( lang.compare("de_DE") == 0 )
+ {
+ query.prepare("SELECT std_attr, std_val_de FROM public.app_vars WHERE std_type = ? AND active = 1");
+ }
+ else
+ {
+ query.prepare("SELECT std_attr, std_val_en FROM public.app_vars WHERE std_type = ? AND active = 1");
+ }
+ // SELECT id, std_type, std_attr, std_val_de, std_val_en, active FROM public.app_vars;
+ query.addBindValue(std_type);
+
+ query.exec();
+
+ while (query.next())
+ {
+ toSearch = "{{" + query.value(0).toString().toStdString() + "}}";
+ replaceStr = query.value(1).toString().toStdString();
+
+ // Get the first occurrence
+ size_t pos = data.find(toSearch);
+ // Repeat till end is reached
+ while( pos != std::string::npos)
+ {
+ // Replace this occurrence of Sub String
+ data.replace(pos, toSearch.size(), replaceStr);
+ // Get the next occurrence from the current position
+ pos =data.find(toSearch, pos + replaceStr.size());
+ }
+ }
+}
+
+QJsonArray AnnexData::sqlGet_crObjCatalog(bool doToc, QMap outList)
+{
+ TSqlQuery query;
+ QJsonObject jsonObject;
+ QJsonArray jsonArray;
+ QString msg, id, lang;
+
+ QMapIterator i(outList);
+ while(i.hasNext())
+ {
+ i.next();
+ id = i.value();
+
+ if(doToc == false)
+ {
+ query.prepare("SELECT annex_data.id, lfdnr, spec_title, spec_desc, spec_version, spec_release, obj_sname, ac_classes, pc_classes, cat_class, country, lang, spec_active, spec_created, spec_last_modified, spec_valid_start, spec_valid_end, last_editor, g_legacy, responsibility, spec_comment, spec_marker, groups FROM annex_data INNER JOIN annex_meta ON annex_meta.spec_data_id = annex_data.id WHERE annex_data.id = ?");
+ query.addBindValue(id);
+ }
+ else
+ {
+ query.prepare("SELECT annex_data.id, spec_title, spec_content, cat_class FROM annex_data WHERE annex_data.id = ?");
+ query.addBindValue(id);
+ }
+
+ if(!query.exec())
+ {
+ msg = query.lastError().text();
+ jsonObject["errMsg"] = msg;
+ jsonObject["ERROR"] = "1";
+ jsonArray.append(jsonObject);
+ }
+
+ while (query.next())
+ {
+ if(doToc == false)
+ {
+ jsonObject["id"] = query.value(0).toString();
+ jsonObject["lfdnr"] = query.value(1).toString();
+ jsonObject["spec_title"] = query.value(2).toString();
+ jsonObject["spec_desc"] = query.value(3).toString();
+ jsonObject["spec_version"] = query.value(4).toString();
+ jsonObject["spec_release"] = query.value(5).toString();
+ jsonObject["obj_sname"] = query.value(6).toString();
+ jsonObject["ac_classes"] = query.value(7).toString();
+ jsonObject["pc_classes"] = query.value(8).toString();
+ jsonObject["cat_class"] = query.value(9).toString();
+ jsonObject["country"] = query.value(10).toString();
+ jsonObject["lang"] = query.value(11).toString();
+ lang = query.value(11).toString();
+ jsonObject["spec_active"] = query.value(12).toString();
+ jsonObject["spec_created"] = query.value(13).toString();
+ jsonObject["spec_last_modified"] = query.value(14).toString();
+ jsonObject["spec_valid_start"] = query.value(15).toString();
+ jsonObject["spec_valid_end"] = query.value(16).toString();
+ jsonObject["last_editor"] = query.value(17).toString();
+ jsonObject["g_legacy"] = query.value(18).toString();
+ jsonObject["responsibility"] = query.value(19).toString();
+ jsonObject["spec_comment"] = query.value(20).toString();
+ jsonObject["spec_marker"] = query.value(21).toString();
+ jsonObject["groups"] = query.value(22).toString();
+
+ jsonObject["comments_count"] = QString::number( AnnexDataComments::getSpecsCommentsCount(id.toInt() ));
+
+ jsonArray.append(jsonObject);
+ }
+ else
+ {
+ jsonObject["id"] = query.value(0).toString();
+ jsonObject["spec_title"] = query.value(1).toString();
+ jsonObject["cat_class"] = query.value(3).toString();
+
+ //jsonObject["spec_content"] = query.value(2).toString();
+ std::string erg = query.value(2).toString().toStdString();
+ findAndReplaceAll(erg, lang, "standard");
+ std::string line = erg.c_str();
+
+ std::regex reg1("()(.{0,100})()", std::regex_constants::icase);
+ std::smatch match1;
+
+ std::regex reg2("()(.{0,100})()", std::regex_constants::icase);
+ std::smatch match2;
+
+ std::regex reg3("()(.{0,100})()", std::regex_constants::icase);
+ std::smatch match3;
+
+ std::regex reg4("()(.{0,100})(
)", std::regex_constants::icase);
+ std::smatch match4;
+
+ QString toc;
+ std::string ahref1 = ".{0,100})|(.{0,100})|(.{0,100}))", std::regex_constants::icase);
+ std::sregex_iterator next(line.begin(), line.end(), re);
+ std::sregex_iterator end;
+ while (next != end)
+ {
+ std::smatch match = *next;
+ //std::cout << "MATCH: " << match.str() << "\n";
+ std::string item = match.str();
+
+ if(std::regex_search(item, match1, reg1))
+ {
+ std::string to = match1.str();
+
+ std::regex style_re("( style=\"[a-z]*-?[a-z]*:[a-z]*;\")");
+ to = regex_replace(to, style_re, "");
+
+ std::regex vowel_re("()|(
)");
+ to = regex_replace(to, vowel_re, "");
+ to = ahref1 + query.value(0).toString().toStdString() + class1 + ahref2 + to + ahref3;
+ toc.append(to.c_str());
+ next++;
+ continue;
+ }
+ if(std::regex_search(item, match2, reg2))
+ {
+ std::string to = match2.str();
+
+ std::regex style_re("( style=\"[a-z]*-?[a-z]*:[a-z]*;\")");
+ to = regex_replace(to, style_re, "");
+
+ std::regex vowel_re("()|(
)");
+ to = regex_replace(to, vowel_re, "");
+ to = ahref1 + query.value(0).toString().toStdString() + class2 + ahref2 + to + ahref3;
+ toc.append(to.c_str());
+ next++;
+ continue;
+ }
+ if(std::regex_search(item, match3, reg3))
+ {
+ std::string to = match3.str();
+
+ std::regex style_re("( style=\"[a-z]*-?[a-z]*:[a-z]*;\")");
+ to = regex_replace(to, style_re, "");
+
+ std::regex vowel_re("()|(
)");
+ to = regex_replace(to, vowel_re, "");
+ to = ahref1 + query.value(0).toString().toStdString() + class3 + ahref2 + to + ahref3;
+ toc.append(to.c_str());
+ next++;
+ continue;
+ }
+ if(std::regex_search(item, match4, reg4))
+ {
+ std::string to = match4.str();
+
+ std::regex style_re("( style=\"[a-z]*-?[a-z]*:[a-z]*;\")");
+ to = regex_replace(to, style_re, "");
+
+ std::regex vowel_re("()|(
)");
+ to = regex_replace(to, vowel_re, "");
+ to = ahref1 + query.value(0).toString().toStdString() + class4 + ahref2 + to + ahref3;
+ toc.append(to.c_str());
+ next++;
+ continue;
+ }
+
+ next++;
+ }
+ jsonObject["toc"] = toc;
+ toc = "";
+ }
+ catch (std::regex_error& e)
+ {
+ //std::cout << "Syntax error in the regular expression" << std::endl;
+ }
+
+ jsonArray.append(jsonObject);
+
+ }
+ }
+ }
+ return jsonArray;
+}
+
+QMap AnnexData::checkObjCatalog(QMap wwList, QMap localList)
+{
+ QMapIterator i(localList);
+ while (i.hasNext())
+ {
+ i.next();
+ if(localList.contains(i.key()))
+ {
+ wwList[i.key()] = localList[i.key()];
+ }
+ }
+
+ return wwList;
+}
+
+QMap AnnexData::sqlObjCatalog(QString name, QString ac, QString pc, QString country, QString lang, QString cat, QString spec_active, QString release)
+{
+ TSqlQuery query;
+
+ QString msg, obj_name, ac_classes, pc_classes;
+ QMap inList;
+
+ obj_name = "%" + name + "%";
+ ac_classes = "%" + ac + "%";
+ pc_classes = "%" + pc + "%";
+
+ query.prepare("select lfdnr, id from annex_data where obj_sname LIKE ? and ac_classes LIKE ? and pc_classes LIKE ? and lang = ? and country = ? and cat_class = ? AND spec_active = ? AND (spec_release = ? or spec_release = 'pre-release') order by lfdnr");
+ query.addBindValue(obj_name);
+ query.addBindValue(ac_classes);
+ query.addBindValue(pc_classes);
+ query.addBindValue(lang);
+ query.addBindValue(country);
+ query.addBindValue(cat);
+ query.addBindValue(spec_active);
+ query.addBindValue(release);
+
+ if(!query.exec())
+ {
+ msg = query.lastError().text();
+ qWarning("ERROR: " + msg.toUtf8());
+ //tDebug(msg.toUtf8());
+ }
+
+ while (query.next())
+ {
+ /*msg = "sqlObjCatalog: " + query.value(0).toString() + " " + query.value(1).toString();
+ tDebug(msg.toUtf8()); */
+ inList.insert(query.value(0).toString(),query.value(1).toString());
+ }
+
+ return inList;
+}
+
+QJsonArray AnnexData::listObjCatalog(bool doToc, QMap editMap)
+{
+ QMap localList, wwList, outList;
+ QJsonArray array, tomerge;
+
+ // General
+ if(editMap["obj_sname"].compare("General") == 0)
+ {
+
+ wwList.clear(); localList.clear(); outList.clear();
+ localList= AnnexData::sqlObjCatalog("General", "0", "0", editMap["country"], editMap["lang"], "General", editMap["spec_active"], editMap["spec_release"]);
+ wwList = AnnexData::sqlObjCatalog("General", "0", "0", "WW", editMap["lang"], "General", editMap["spec_active"], editMap["spec_release"]);
+
+ outList = AnnexData::checkObjCatalog(wwList, localList);
+ return AnnexData::sqlGet_crObjCatalog(doToc, outList);
+ }
+
+ if(editMap["cat_sname_en"].compare("General") == 0)
+ {
+ wwList.clear(); localList.clear(); outList.clear();
+ localList= AnnexData::sqlObjCatalog(editMap["obj_sname"], "0", "0", editMap["country"], editMap["lang"], "General", editMap["spec_active"], editMap["spec_release"]);
+ wwList = AnnexData::sqlObjCatalog(editMap["obj_sname"], "0", "0", "WW", editMap["lang"], "General", editMap["spec_active"], editMap["spec_release"]);
+ outList = AnnexData::checkObjCatalog(wwList, localList);
+ array = AnnexData::sqlGet_crObjCatalog(doToc, outList);
+
+ wwList.clear(); localList.clear(); outList.clear();
+ localList= AnnexData::sqlObjCatalog(editMap["obj_sname"], editMap["ac_class"], editMap["pc_class"], editMap["country"], editMap["lang"], "General", editMap["spec_active"], editMap["spec_release"]);
+ wwList = AnnexData::sqlObjCatalog(editMap["obj_sname"], editMap["ac_class"], editMap["pc_class"], "WW", editMap["lang"], "General", editMap["spec_active"], editMap["spec_release"]);
+ outList = AnnexData::checkObjCatalog(wwList, localList);
+ tomerge = AnnexData::sqlGet_crObjCatalog(doToc, outList);
+
+ for(int i = 0; i < tomerge.size(); i++)
+ {
+ array.append(tomerge[i]);
+ }
+ return array;
+ }
+ else
+ {
+ // Cat
+ wwList.clear(); localList.clear(); outList.clear();
+ localList= AnnexData::sqlObjCatalog(editMap["obj_sname"], editMap["ac_class"], editMap["pc_class"], editMap["country"], editMap["lang"], editMap["cat_sname_en"], editMap["spec_active"], editMap["spec_release"]);
+ wwList = AnnexData::sqlObjCatalog(editMap["obj_sname"], editMap["ac_class"], editMap["pc_class"], "WW", editMap["lang"], editMap["cat_sname_en"], editMap["spec_active"], editMap["spec_release"]);
+ outList = AnnexData::checkObjCatalog(wwList, localList);
+ return AnnexData::sqlGet_crObjCatalog(doToc, outList);
+ }
+}
+
+QJsonArray AnnexData::doReleased(QMap editMap)
+{
+ TSqlQuery query;
+ QJsonObject jsonObj;
+ QJsonArray array;
+ QString msg;
+
+ query.prepare("UPDATE public.release_mgmt SET rel_creator = ?, relcreator_decisdate = now(), cd_date = now() WHERE id = ?");
+ query.addBindValue(editMap["rel_creator"]);
+ query.addBindValue(editMap["release_id"].toInt());
+
+ if(!query.exec())
+ {
+ msg = query.lastError().text();
+ jsonObj["ERROR"] = "1";
+ jsonObj["errMsg"] = "doReleased : " + msg;
+ jsonObj["query"] = query.lastQuery();
+ msg = "doRelease : ";
+ msg.append(msg);
+ msg.append(" : ");
+ msg.append(query.lastQuery());
+ tError(msg.toUtf8());
+
+ array.append(jsonObj);
+ return array;
+ }
+ else
+ {
+ jsonObj["ERROR"] = "0";
+ jsonObj["errMsg"] = "Datensatz aktualisiert";
+
+ array.append(jsonObj);
+ }
+
+ return array;
+}
+
+QJsonArray AnnexData::upReleased(int id)
+{
+
+ TSqlQuery query;
+ QJsonObject jsonObj;
+ QJsonArray jsonArr;
+ QString msg;
+
+ query.prepare("SELECT annex_data.id, lfdnr, spec_title, spec_desc, spec_version, obj_sname, ac_classes, pc_classes, cat_class, country, lang, spec_content, spec_created, spec_last_modified, spec_valid_start, spec_valid_end, last_editor, g_legacy, responsibility, spec_comment, spec_marker, groups, spec_active FROM annex_data INNER JOIN annex_meta ON annex_meta.spec_data_id = annex_data.id WHERE annex_data.id = ?");
+ query.addBindValue(id);
+
+ if(!query.exec())
+ {
+ msg = query.lastError().text();
+ jsonObj["ERROR"] = "1";
+ jsonObj["errMsg"] = msg;
+ jsonObj["query"] = query.lastQuery();
+ msg = "upReleased : ";
+ msg.append(msg);
+ msg.append(" : ");
+ msg.append(query.lastQuery());
+ tError(msg.toUtf8());
+
+ jsonArr.append(jsonObj);
+ return jsonArr;
+ }
+
+ query.next();
+
+ QString lfdnr, spec_title, spec_desc, spec_version, spec_release, obj_sname, ac_class, pc_class, cat_class, country, lang, spec_content, spec_created, spec_last_modified, spec_valid_start, spec_valid_end, last_editor, g_legacy, responsibility, spec_comment, spec_marker, groups, spec_active;
+ lfdnr = query.value(1).toString();
+ spec_title = query.value(2).toString();
+ spec_desc = query.value(3).toString();
+ spec_version = query.value(4).toString();
+ obj_sname = query.value(5).toString();
+ ac_class = query.value(6).toString();
+ pc_class = query.value(7).toString();
+ cat_class = query.value(8).toString();
+ country = query.value(9).toString();
+ lang = query.value(10).toString();
+ spec_content = query.value(11).toByteArray();
+ spec_created = query.value(12).toString();
+ spec_last_modified = query.value(13).toString();
+ spec_valid_start = query.value(14).toString();
+ spec_valid_end = query.value(15).toString();
+ last_editor = query.value(16).toString();
+ g_legacy = query.value(17).toString();
+ responsibility = query.value(18).toString();
+ spec_comment = query.value(19).toString();
+ spec_marker = query.value(20).toString();
+ groups = query.value(21).toString();
+ spec_active = "0"; //query.value(22).toString();
+
+ query.prepare("INSERT INTO public.release_annex(lfdnr, spec_title, spec_desc, spec_version, obj_sname, ac_class, pc_class, cat_class, country, lang, spec_content, spec_created, spec_last_modified, spec_valid_start, spec_valid_end, last_editor, g_legacy, responsibility, spec_comment, spec_marker, groups, spec_active, spec_release) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)");
+ query.addBindValue(lfdnr);
+ query.addBindValue(spec_title);
+ query.addBindValue(spec_desc);
+ query.addBindValue(spec_version);
+ query.addBindValue(obj_sname);
+ query.addBindValue(ac_class);
+ query.addBindValue(pc_class);
+ query.addBindValue(cat_class);
+ query.addBindValue(country);
+ query.addBindValue(lang);
+ query.addBindValue(spec_content);
+ query.addBindValue(spec_created);
+ query.addBindValue(spec_last_modified);
+ query.addBindValue(spec_valid_start);
+ query.addBindValue(spec_valid_end);
+ query.addBindValue(last_editor);
+ query.addBindValue(g_legacy);
+ query.addBindValue(responsibility);
+ query.addBindValue(spec_comment);
+ query.addBindValue(spec_marker);
+ query.addBindValue(groups);
+ query.addBindValue(spec_active);
+ query.addBindValue("released");
+
+ if(!query.exec())
+ {
+ msg = query.lastError().text();
+ jsonObj["ERROR"] = "1";
+ jsonObj["errMsg"] = msg;
+ jsonObj["query"] = query.lastQuery();
+ msg = "upReleased : ";
+ msg.append(msg);
+ msg.append(" : ");
+ msg.append(query.lastQuery());
+ tError(msg.toUtf8());
+
+ jsonArr.append(jsonObj);
+ return jsonArr;
+ }
+ else
+ {
+ jsonObj["ERROR"] = "0";
+ jsonObj["errMsg"] = "Datensatz eingefügt";
+ jsonObj["last_data_id"] = query.lastInsertId().toInt();
+ msg = "Released: " + QDateTime::currentDateTime().toString("yyyy-MM-dd");;
+ AnnexData::setDraft(id, msg);
+ }
+
+ jsonArr.append(jsonObj);
+ return jsonArr;
+
+}
+
+void AnnexData::setDraft(int id, QString comment)
+{
+ TSqlQuery query;
+
+ query.prepare("UPDATE public.annex_data SET spec_release='draft' WHERE id=?");
+ query.addBindValue(id);
+ query.exec();
+
+ query.prepare("UPDATE public.annex_meta SET spec_comment=? WHERE spec_data_id=?");
+ query.addBindValue(comment);
+ query.addBindValue(id);
+ query.exec();
+}
+
+QJsonArray AnnexData::doPreRelease(QMap editMap)
+{
+ TSqlQuery query;
+ QJsonObject jsonObj;
+ QJsonArray array;
+ QString msg;
+
+ //obj_sname, spec_version, ac_classes, pc_classes, cat_class, country, lang, doc_type, rel_requester, relrequest_date, rel_creator, relcreator_decisdate, rel_inspector, relinspect_decisdate, rel_approver, relapprov_decisdate, ci_date, cd_date, cdd_date)
+
+ query.prepare("INSERT INTO public.release_mgmt(obj_sname, ac_classes, pc_classes, cat_class, country, lang, doc_type, rel_requester, relrequest_date, ci_date) VALUES (?, ?, ?, ?, ?, ?, ?, ?, now(), now())");
+ query.addBindValue(editMap["obj_sname"]);
+ query.addBindValue(editMap["ac_classes"]);
+ query.addBindValue(editMap["pc_classes"]);
+ query.addBindValue(editMap["cat_class"]);
+ query.addBindValue(editMap["country"]);
+ query.addBindValue(editMap["lang"]);
+ query.addBindValue(editMap["doc_type"]);
+ query.addBindValue(editMap["rel_requester"]);
+ //query.addBindValue(editMap["relrequest_date"]);
+
+ if(!query.exec())
+ {
+ msg = query.lastError().text();
+ jsonObj["ERROR"] = "1";
+ jsonObj["errMsg"] = msg;
+ tError(msg.toUtf8());
+
+ array.append(jsonObj);
+ return array;
+ }
+ else
+ {
+ jsonObj["ERROR"] = "0";
+ jsonObj["errMsg"] = "Pre-Release eingestellt";
+ jsonObj["last_id"] = query.lastInsertId().toInt();
+ }
+
+ array.append(jsonObj);
+ return array;
+}
+
+QJsonArray AnnexData::upPrelease(int id)
+{
+ TSqlQuery query;
+ QJsonObject jsonObj;
+ QJsonArray array;
+ QString msg;
+
+ query.prepare("UPDATE public.annex_data SET spec_release='pre-release' WHERE id = ?");
+ query.addBindValue(id);
+
+ if(!query.exec())
+ {
+ msg = query.lastError().text();
+ jsonObj["ERROR"] = "1";
+ jsonObj["errMsg"] = "upPrelease : " + msg;
+ jsonObj["query"] = query.lastQuery();
+ msg = "upPrelease : ";
+ msg.append(msg);
+ msg.append(" : ");
+ msg.append(query.lastQuery());
+ tError(msg.toUtf8());
+
+ array.append(jsonObj);
+ return array;
+ }
+ else
+ {
+ jsonObj["ERROR"] = "0";
+ jsonObj["errMsg"] = "Datensatz aktualisiert";
+
+ array.append(jsonObj);
+ }
+
+ return array;
+}
+
+QJsonArray AnnexData::updAnnexData(QMap editMap)
+{
+ TSqlQuery query;
+ QJsonObject jsonObj;
+ QJsonArray array;
+ QString msg;
+
+ editMap["country"] = editMap["country"].toUpper();
+
+ if(editMap["lfdnr"].count() < 2)
+ {
+ editMap["lfdnr"] = "00" + editMap["lfdnr"];
+ }
+ else if(editMap["lfdnr"].count() < 3)
+ {
+ editMap["lfdnr"] = "0" + editMap["lfdnr"];
+ }
+
+ //QString searchtxt = "{{page-break}}
";
+ QRegularExpression re("{{page-break}}
");
+ QRegularExpressionMatchIterator i = re.globalMatch(editMap["spec_content"]);
+ while (i.hasNext())
+ {
+ QRegularExpressionMatch match = i.next();
+ editMap["spec_content"].replace(re, "{{page-break}}");
+ }
+
+ query.prepare("UPDATE public.annex_data SET id=?, lfdnr=?, spec_title=?, spec_desc=?, spec_version=?, spec_release=?, obj_sname=?, ac_classes=?, pc_classes=?, cat_class=?, country=?, lang=?, spec_content=?, spec_active=? WHERE id = ?");
+
+ query.addBindValue(editMap["id"]);
+ query.addBindValue(editMap["lfdnr"]);
+ query.addBindValue(editMap["spec_title"]);
+ query.addBindValue(editMap["spec_desc"]);
+ query.addBindValue(editMap["spec_version_new"]);
+ query.addBindValue(editMap["spec_release"]);
+ query.addBindValue(editMap["obj_sname"]);
+ query.addBindValue(editMap["ac_classes"]);
+ query.addBindValue(editMap["pc_classes"]);
+ query.addBindValue(editMap["cat_class"]);
+ query.addBindValue(editMap["country"]);
+ query.addBindValue(editMap["lang"]);
+ query.addBindValue(editMap["spec_content"]);
+ query.addBindValue(editMap["spec_active"]);
+ query.addBindValue(editMap["id"]);
+
+ if(!query.exec())
+ {
+ msg = query.lastError().text();
+ jsonObj["ERROR"] = "1";
+ jsonObj["errMsg"] = msg;
+ jsonObj["query"] = query.lastQuery();
+ msg = "setObjSpecs : ";
+ msg.append(msg);
+ msg.append(" : ");
+ msg.append(query.lastQuery());
+ tError(msg.toUtf8());
+
+ array.append(jsonObj);
+ return array;
+ }
+
+ query.prepare("UPDATE public.annex_meta SET spec_last_modified=?, spec_valid_start=?, spec_valid_end=?, last_editor=?, g_legacy=?, responsibility=?, spec_comment=?, spec_marker=? WHERE spec_data_id = ?");
+
+ query.addBindValue(editMap["spec_valid_start"]);
+ query.addBindValue(editMap["spec_valid_start"]);
+ query.addBindValue(editMap["spec_valid_end"]);
+ query.addBindValue(editMap["last_editor"]);
+ query.addBindValue(editMap["g_legacy"]);
+ query.addBindValue(editMap["resp"]);
+ query.addBindValue(editMap["comment"]);
+ query.addBindValue(editMap["marker"]);
+ query.addBindValue(editMap["id"]);
+
+ if(!query.exec())
+ {
+ msg = query.lastError().text();
+ jsonObj["ERROR"] = "1";
+ jsonObj["errMsg"] = msg;
+ jsonObj["query"] = query.lastQuery();
+ msg = "updStdData : ";
+ msg.append(msg);
+ msg.append(" : ");
+ msg.append(query.lastQuery());
+ tError(msg.toUtf8());
+
+ array.append(jsonObj);
+ return array;
+ }
+ else
+ {
+ jsonObj["ERROR"] = "0";
+ jsonObj["errMsg"] = "Datensatz aktualisiert";
+ jsonObj["data_id"] = editMap["id"];
+ }
+
+ array.append(jsonObj);
+ return array;
+}
+
+QJsonArray AnnexData::setAnnexData(QMap editMap)
+{
+ TSqlQuery query;
+ QJsonObject jsonObj;
+ QJsonArray jsonArr;
+ QString msg;
+
+ editMap["country"] = editMap["country"].toUpper();
+
+ if(editMap["lfdnr"].count() < 2)
+ {
+ editMap["lfdnr"] = "00" + editMap["lfdnr"];
+ }
+ else if(editMap["lfdnr"].count() < 3)
+ {
+ editMap["lfdnr"] = "0" + editMap["lfdnr"];
+ }
+
+ query.prepare("INSERT INTO annex_data(lfdnr, spec_title, spec_desc, spec_version, spec_release, obj_sname, ac_classes, pc_classes, cat_class, country, lang, spec_content, spec_active) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)");
+
+ query.addBindValue(editMap["lfdnr"]);
+ query.addBindValue(editMap["spec_title"]);
+ query.addBindValue(editMap["spec_desc"]);
+ query.addBindValue(editMap["spec_version"]);
+ query.addBindValue(editMap["spec_release"]);
+ query.addBindValue(editMap["obj_sname"]);
+ query.addBindValue(editMap["ac_classes"]);
+ query.addBindValue(editMap["pc_classes"]);
+ query.addBindValue(editMap["cat_class"]);
+ query.addBindValue(editMap["country"]);
+ query.addBindValue(editMap["lang"]);
+ query.addBindValue(editMap["spec_content"]);
+ query.addBindValue(editMap["spec_active"]);
+
+ if(!query.exec())
+ {
+ msg = query.lastError().text();
+ jsonObj["ERROR"] = "1";
+ jsonObj["errMsg"] = msg;
+ jsonObj["query"] = query.lastQuery();
+ msg = "setObjSpecs : ";
+ msg.append(msg);
+ msg.append(" : ");
+ msg.append(query.lastQuery());
+ tError(msg.toUtf8());
+
+ jsonArr.append(jsonObj);
+ return jsonArr;
+ }
+
+ int last_id = query.lastInsertId().toInt();
+
+ query.prepare("INSERT INTO annex_meta(spec_data_id, spec_created, spec_last_modified, spec_valid_start, spec_valid_end, last_editor, g_legacy, responsibility, spec_comment, spec_marker, groups) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)");
+
+ query.addBindValue(last_id);
+ query.addBindValue(editMap["spec_valid_start"]);
+ query.addBindValue(editMap["spec_valid_start"]);
+ query.addBindValue(editMap["spec_valid_start"]);
+ query.addBindValue(editMap["spec_valid_start"]);
+ query.addBindValue(editMap["last_editor"]);
+ query.addBindValue(editMap["g_legacy"]);
+ query.addBindValue(editMap["resp"]);
+ query.addBindValue(editMap["comment"]);
+ query.addBindValue(editMap["marker"]);
+
+ query.addBindValue("{ALL}");
+
+ if(!query.exec())
+ {
+ msg = query.lastError().text();
+ jsonObj["ERROR"] = "1";
+ jsonObj["errMsg"] = msg;
+ jsonObj["query"] = query.lastQuery();
+ msg = "setObjSpecs : ";
+ msg.append(msg);
+ msg.append(" : ");
+ msg.append(query.lastQuery());
+ tError(msg.toUtf8());
+
+ jsonArr.append(jsonObj);
+ return jsonArr;
+ }
+ else
+ {
+ jsonObj["ERROR"] = "0";
+ jsonObj["errMsg"] = "Datensatz eingefügt";
+ jsonObj["last_data_id"] = last_id;
+ jsonObj["last_meta_id"] = query.lastInsertId().toInt();
+ }
+
+ jsonArr.append(jsonObj);
+ return jsonArr;
+}
+
+QJsonArray AnnexData::getAnnexToc(QMap &stdDataMap)
+{
+ QJsonObject jsonObject, jsonObjContent;
+ QJsonValue jsonObjVal;
+ QJsonArray jsonArr;
+
+ QString obj_sname = stdDataMap["obj_sname"];
+
+ stdDataMap["obj_sname"] = "General";
+ foreach (const QJsonValue & value, AnnexData::listObjCatalog(true, stdDataMap) )
+ {
+ jsonObjContent = value.toObject();
+ jsonObject["obj_sname"] = stdDataMap["obj_sname"];
+
+ jsonObjVal = jsonObjContent.value(QString("cat_class"));
+ jsonObject["cat_class"] = jsonObjVal;
+
+ jsonObjVal = jsonObjContent.value(QString("id"));
+ jsonObject["id"] = jsonObjVal;
+
+ jsonObjVal = jsonObjContent.value(QString("spec_title"));
+ jsonObject["spec_title"] = jsonObjVal;
+
+ jsonObjVal = jsonObjContent.value(QString("toc"));
+ jsonObject["toc"] = jsonObjVal;
+
+ jsonArr.append(jsonObject);
+ }
+
+ stdDataMap["obj_sname"] = obj_sname;
+ foreach (const QJsonValue & value, CatClasses::getAllJson("1", "category"))
+ {
+ QJsonObject objclass = value.toObject();
+ QJsonValue obj_class_name = objclass.value(QString("cat_sname_en"));
+ if(obj_class_name.toString().compare("") == 1 )
+ {
+ stdDataMap["cat_sname_en"] = obj_class_name.toString();
+ foreach (const QJsonValue & value, AnnexData::listObjCatalog(true, stdDataMap) )
+ {
+ jsonObjContent = value.toObject();
+ jsonObject["obj_sname"] = stdDataMap["obj_sname"];
+
+ jsonObjVal = jsonObjContent.value(QString("cat_class"));
+ jsonObject["cat_class"] = jsonObjVal;
+
+ jsonObjVal = jsonObjContent.value(QString("id"));
+ jsonObject["id"] = jsonObjVal;
+
+ jsonObjVal = jsonObjContent.value(QString("spec_title"));
+ jsonObject["spec_title"] = jsonObjVal;
+
+ jsonObjVal = jsonObjContent.value(QString("toc"));
+ jsonObject["toc"] = jsonObjVal;
+
+ jsonArr.append(jsonObject);
+ }
+ }
+ }
+
+ //return StandardsData::listObjCatalog(true, stdDataMap);
+ return jsonArr;
+}
+
+QJsonArray AnnexData::getAnnexShow(QMap &stdDataMap)
+{
+ return AnnexData::listObjCatalog(false, stdDataMap);
+}
+
+QJsonArray AnnexData::getAnnexList(QMap &stdDataMap)
+{
+ TSqlQuery query;
+ QJsonObject jsonObject;
+ QJsonArray jsonArray;
+ QString msg, obj_sname, ac_class, pc_class, id;
+
+ obj_sname = "%" + stdDataMap["obj_sname"] + "%";
+ ac_class = "%" + stdDataMap["ac_class"] + "%";
+ pc_class = "%" + stdDataMap["pc_class"] + "%";
+
+ query.prepare("SELECT annex_data.id, lfdnr, spec_title, spec_desc, spec_version, spec_release, obj_sname, ac_classes, pc_classes, cat_class, country, lang, spec_active, spec_created, spec_last_modified, spec_valid_start, spec_valid_end, last_editor, g_legacy, responsibility, spec_comment, spec_marker, groups FROM annex_data INNER JOIN annex_meta ON annex_meta.spec_data_id = annex_data.id WHERE obj_sname like ? AND cat_class = ? AND country = ? AND lang = ? AND spec_active = ? AND ac_classes like ? AND pc_classes like ? AND spec_release = ? order by lfdnr");
+ //query.prepare("SELECT annex_data.id, lfdnr, spec_title, spec_desc, spec_version, spec_release, obj_sname, ac_classes, pc_classes, cat_class, country, lang, spec_active, spec_created, spec_last_modified, spec_valid_start, spec_valid_end, last_editor, g_legacy, responsibility, spec_comment, spec_marker, groups FROM annex_data INNER JOIN annex_meta ON annex_meta.spec_data_id = annex_data.id WHERE obj_sname like '%Annex D%' AND cat_class = 'Cabling' AND country = 'WW' AND lang = 'de_DE' AND spec_active = 1 AND ac_classes like '%2%' AND pc_classes like '%2%' AND spec_release = 'draft'");
+
+ query.addBindValue(obj_sname);
+ query.addBindValue(stdDataMap["cat_sname_en"]);
+ query.addBindValue(stdDataMap["country"]);
+ query.addBindValue(stdDataMap["lang"]);
+ query.addBindValue(stdDataMap["spec_active"]);
+ query.addBindValue(ac_class);
+ query.addBindValue(pc_class);
+ query.addBindValue(stdDataMap["spec_release"]);
+
+ if(!query.exec())
+ {
+ msg = query.lastError().text();
+ jsonObject["errMsg"] = msg;
+ jsonObject["ERROR"] = "1";
+ jsonArray.append(jsonObject);
+
+ return jsonArray;
+ }
+
+ while (query.next())
+ {
+ id = query.value(0).toString();
+ jsonObject["id"] = query.value(0).toString();
+ jsonObject["lfdnr"] = query.value(1).toString();
+ jsonObject["spec_title"] = query.value(2).toString();
+ jsonObject["spec_desc"] = query.value(3).toString();
+ jsonObject["spec_version"] = query.value(4).toString();
+ jsonObject["spec_release"] = query.value(5).toString();
+ jsonObject["obj_sname"] = query.value(6).toString();
+ jsonObject["ac_classes"] = query.value(7).toString();
+ jsonObject["pc_classes"] = query.value(8).toString();
+ jsonObject["cat_class"] = query.value(9).toString();
+ jsonObject["country"] = query.value(10).toString();
+ jsonObject["lang"] = query.value(11).toString();
+ jsonObject["spec_active"] = query.value(12).toString();
+ jsonObject["spec_created"] = query.value(13).toString();
+ jsonObject["spec_last_modified"] = query.value(14).toString();
+ jsonObject["spec_valid_start"] = query.value(15).toString();
+ jsonObject["spec_valid_end"] = query.value(16).toString();
+ jsonObject["last_editor"] = query.value(17).toString();
+ jsonObject["g_legacy"] = query.value(18).toString();
+ jsonObject["responsibility"] = query.value(19).toString();
+ jsonObject["spec_comment"] = query.value(20).toString();
+ jsonObject["spec_marker"] = query.value(21).toString();
+ jsonObject["groups"] = query.value(22).toString();
+
+ jsonArray.append(jsonObject);
+ }
+
+ return jsonArray;
+}
+
+QJsonArray AnnexData::getExistCountries()
+{
+ TSqlQuery query;
+ QJsonObject jsonObject;
+ QJsonArray jsonArray;
+ QString msg;
+
+ query.prepare("SELECT DISTINCT(country) FROM public.annex_data ORDER BY country");
+
+ if(!query.exec())
+ {
+ msg = query.lastError().text();
+ jsonObject["errMsg"] = msg;
+ jsonObject["ERROR"] = "1";
+ jsonArray.append(jsonObject);
+ }
+
+ while (query.next())
+ {
+ jsonObject["country"] = query.value(0).toString();
+ jsonArray.append(jsonObject);
+ }
+ return jsonArray;
+}
+
+QJsonArray AnnexData::getHighestLfdnr(const QString &category)
+{
+ TSqlQuery query;
+ QJsonObject jsonObject;
+ QJsonArray jsonArray;
+ QString msg;
+
+ query.prepare("SELECT MAX(lfdnr) FROM public.annex_data WHERE cat_class = ?");
+ query.addBindValue(category);
+
+ query.exec();
+ query.next();
+
+ jsonObject["lfdnr"] = query.value(0).toString();
+ jsonObject["cat"] = category;
+ jsonArray.append(jsonObject);
+
+ return jsonArray;
+}
+
+int AnnexData::countCheckLfdnrCat()
+{
+ TSqlQuery query;
+ int counter = 0;
+
+ query.prepare("SELECT id, obj_sname, cat_class, lfdnr, country, lang, spec_title FROM public.annex_data a WHERE not Exists ( SELECT lfdnr FROM public.annex_data c WHERE a.lang != c.lang AND a.cat_class = c.cat_class and a.lfdnr = c.lfdnr) order by (cat_class,lfdnr)");
+
+ query.exec();
+
+ while (query.next())
+ {
+ counter++;
+ }
+
+ return counter;
+}
+
+QJsonArray AnnexData::chkLfdnrEditor(QMap editMap)
+{
+ TSqlQuery query;
+ QJsonObject jsonObject;
+ QJsonArray jsonArray;
+ QString msg;
+
+ query.prepare("SELECT id, lfdnr, spec_title, obj_sname, country, lang FROM public.annex_data WHERE cat_class = ? AND lfdnr = ?");
+ query.addBindValue(editMap["cat_class"]);
+ query.addBindValue(editMap["lfdnr"]);
+
+ if(!query.exec())
+ {
+ msg = query.lastError().text();
+ jsonObject["MSG"] = msg;
+ jsonObject["ERROR"] = "1";
+ jsonArray.append(jsonObject);
+ }
+
+ while (query.next())
+ {
+ jsonObject["id"] = query.value(0).toString();
+ jsonObject["lfdnr"] = query.value(1).toString();
+ jsonObject["spec_title"] = query.value(2).toString();
+ jsonObject["obj_sname"] = query.value(3).toString();
+ jsonObject["country"] = query.value(4).toString();
+ jsonObject["lang"] = query.value(5).toString();
+
+ jsonArray.append(jsonObject);
+ }
+
+ return jsonArray;
+}
+
+QJsonArray AnnexData::getStatistics()
+{
+ TSqlQuery query;
+ QJsonObject jsonObject, jsonObjReleaseTypes;
+ QJsonArray jsonArray, jsonArrReleaseTypes;
+ QString msg;
+ QList releaseTypes;
+
+ // count
+ query.prepare("SELECT count(id) FROM annex_data");
+ query.exec();
+ query.next();
+ jsonObject["count_id"] = query.value(0).toString();
+
+ // active
+ query.prepare("select count(id) from annex_data where spec_active = 1");
+ query.exec();
+ query.next();
+ jsonObject["count_active"] = query.value(0).toString();
+
+ // countries
+ query.prepare("select count(distinct country) from annex_data");
+ query.exec();
+ query.next();
+ jsonObject["count_countries"] = query.value(0).toString();
+
+ // languages
+ query.prepare("select count(lang) from annex_data where lang = 'de_DE'");
+ query.exec();
+ query.next();
+ jsonObject["count_language_de"] = query.value(0).toString();
+ query.prepare("select count(lang) from annex_data where lang = 'en_GB'");
+ query.exec();
+ query.next();
+ jsonObject["count_language_en"] = query.value(0).toString();
+
+ // waste
+ query.prepare("select count(id) from annex_data_waste");
+ query.exec();
+ query.next();
+ jsonObject["count_Annexwaste"] = query.value(0).toString();
+
+ // releases
+ query.prepare("SELECT std_attr FROM std_system WHERE std_type = 'release_types' ORDER BY sort");
+ query.exec();
+ while (query.next())
+ {
+ releaseTypes.append(query.value(0).toString());
+ }
+
+ QList::iterator i;
+ for (i = releaseTypes.begin(); i != releaseTypes.end(); ++i)
+ {
+ query.prepare("select count(spec_release) from annex_data where spec_release = ?");
+ query.addBindValue(*i);
+ query.exec();
+ query.next();
+ jsonObjReleaseTypes["release_type"] = *i;
+ jsonObjReleaseTypes["count_release_type"] = query.value(0).toString();
+ jsonArrReleaseTypes.append(jsonObjReleaseTypes);
+ }
+
+ jsonObject["countCheckLfdnrCat"] = QString::number( AnnexData::countCheckLfdnrCat() );
+
+ jsonArray.append(jsonObject);
+ jsonArray.append(jsonArrReleaseTypes);
+
+ return jsonArray;
+}
+
+int AnnexData::id() const
+{
+ return d->id;
+}
+
+QString AnnexData::lfdnr() const
+{
+ return d->lfdnr;
+}
+
+void AnnexData::setLfdnr(const QString &lfdnr)
+{
+ d->lfdnr = lfdnr;
+}
+
+QString AnnexData::specTitle() const
+{
+ return d->spec_title;
+}
+
+void AnnexData::setSpecTitle(const QString &specTitle)
+{
+ d->spec_title = specTitle;
+}
+
+QString AnnexData::specDesc() const
+{
+ return d->spec_desc;
+}
+
+void AnnexData::setSpecDesc(const QString &specDesc)
+{
+ d->spec_desc = specDesc;
+}
+
+QString AnnexData::specVersion() const
+{
+ return d->spec_version;
+}
+
+void AnnexData::setSpecVersion(const QString &specVersion)
+{
+ d->spec_version = specVersion;
+}
+
+QString AnnexData::specRelease() const
+{
+ return d->spec_release;
+}
+
+void AnnexData::setSpecRelease(const QString &specRelease)
+{
+ d->spec_release = specRelease;
+}
+
+QString AnnexData::objSname() const
+{
+ return d->obj_sname;
+}
+
+void AnnexData::setObjSname(const QString &objSname)
+{
+ d->obj_sname = objSname;
+}
+
+QString AnnexData::acClasses() const
+{
+ return d->ac_classes;
+}
+
+void AnnexData::setAcClasses(const QString &acClasses)
+{
+ d->ac_classes = acClasses;
+}
+
+QString AnnexData::pcClasses() const
+{
+ return d->pc_classes;
+}
+
+void AnnexData::setPcClasses(const QString &pcClasses)
+{
+ d->pc_classes = pcClasses;
+}
+
+QString AnnexData::catClass() const
+{
+ return d->cat_class;
+}
+
+void AnnexData::setCatClass(const QString &catClass)
+{
+ d->cat_class = catClass;
+}
+
+QString AnnexData::country() const
+{
+ return d->country;
+}
+
+void AnnexData::setCountry(const QString &country)
+{
+ d->country = country;
+}
+
+QString AnnexData::lang() const
+{
+ return d->lang;
+}
+
+void AnnexData::setLang(const QString &lang)
+{
+ d->lang = lang;
+}
+
+QByteArray AnnexData::specContent() const
+{
+ return d->spec_content;
+}
+
+void AnnexData::setSpecContent(const QByteArray &specContent)
+{
+ d->spec_content = specContent;
+}
+
+int AnnexData::specActive() const
+{
+ return d->spec_active;
+}
+
+void AnnexData::setSpecActive(int specActive)
+{
+ d->spec_active = specActive;
+}
+
+AnnexData &AnnexData::operator=(const AnnexData &other)
+{
+ d = other.d; // increments the reference count of the data
+ return *this;
+}
+
+AnnexData AnnexData::create(const QString &lfdnr, const QString &specTitle, const QString &specDesc, const QString &specVersion, const QString &specRelease, const QString &objSname, const QString &acClasses, const QString &pcClasses, const QString &catClass, const QString &country, const QString &lang, const QByteArray &specContent, int specActive)
+{
+ AnnexDataObject obj;
+ obj.lfdnr = lfdnr;
+ obj.spec_title = specTitle;
+ obj.spec_desc = specDesc;
+ obj.spec_version = specVersion;
+ obj.spec_release = specRelease;
+ obj.obj_sname = objSname;
+ obj.ac_classes = acClasses;
+ obj.pc_classes = pcClasses;
+ obj.cat_class = catClass;
+ obj.country = country;
+ obj.lang = lang;
+ obj.spec_content = specContent;
+ obj.spec_active = specActive;
+ if (!obj.create()) {
+ return AnnexData();
+ }
+ return AnnexData(obj);
+}
+
+AnnexData AnnexData::create(const QVariantMap &values)
+{
+ AnnexData model;
+ model.setProperties(values);
+ if (!model.d->create()) {
+ model.d->clear();
+ }
+ return model;
+}
+
+AnnexData AnnexData::get(int id)
+{
+ TSqlORMapper mapper;
+ return AnnexData(mapper.findByPrimaryKey(id));
+}
+
+int AnnexData::count()
+{
+ TSqlORMapper mapper;
+ return mapper.findCount();
+}
+
+QList AnnexData::getAll()
+{
+ return tfGetModelListByCriteria(TCriteria());
+}
+
+QJsonArray AnnexData::getAllJson()
+{
+ QJsonArray array;
+ TSqlORMapper mapper;
+
+ if (mapper.find() > 0) {
+ for (TSqlORMapperIterator i(mapper); i.hasNext(); ) {
+ array.append(QJsonValue(QJsonObject::fromVariantMap(AnnexData(i.next()).toVariantMap())));
+ }
+ }
+ return array;
+}
+
+QJsonArray AnnexData::getAllJsonCi()
+{
+ TSqlQuery query;
+ QJsonObject jsonObject;
+ QJsonArray jsonArray;
+ QString msg;
+
+ query.prepare("select id, obj_sname, spec_title, cat_class,lfdnr, lang, country FROM public.annex_data WHERE spec_release = 'released' group by (id, obj_sname, spec_title, cat_class, lfdnr, lang, country) order by (obj_sname,lfdnr)");
+
+ if(!query.exec())
+ {
+ msg = query.lastError().text();
+ jsonObject["MSG"] = msg;
+ jsonObject["ERROR"] = "1";
+ jsonArray.append(jsonObject);
+ }
+
+ while (query.next())
+ {
+ jsonObject["id"] = query.value(0).toString();
+ jsonObject["obj_sname"] = query.value(1).toString();
+ jsonObject["spec_title"] = query.value(2).toString();
+ jsonObject["cat_class"] = query.value(3).toString();
+ jsonObject["lfdnr"] = query.value(4).toString();
+ jsonObject["lang"] = query.value(5).toString();
+ jsonObject["country"] = query.value(6).toString();
+
+ jsonArray.append(jsonObject);
+ }
+
+ return jsonArray;
+}
+
+TModelObject *AnnexData::modelData()
+{
+ return d.data();
+}
+
+const TModelObject *AnnexData::modelData() const
+{
+ return d.data();
+}
+
+QDataStream &operator<<(QDataStream &ds, const AnnexData &model)
+{
+ auto varmap = model.toVariantMap();
+ ds << varmap;
+ return ds;
+}
+
+QDataStream &operator>>(QDataStream &ds, AnnexData &model)
+{
+ QVariantMap varmap;
+ ds >> varmap;
+ model.setProperties(varmap);
+ return ds;
+}
+
+// Don't remove below this line
+T_REGISTER_STREAM_OPERATORS(AnnexData)
diff --git a/models/annexdata.cpp_2021-02-13_39 b/models/annexdata.cpp_2021-02-13_39
new file mode 100644
index 0000000..88da519
--- /dev/null
+++ b/models/annexdata.cpp_2021-02-13_39
@@ -0,0 +1,1093 @@
+#include
+#include "annexdata.h"
+#include "sqlobjects/annexdataobject.h"
+
+#include
+#include
+#include
+
+#include "catclasses.h"
+#include "releasemgmt.h"
+
+AnnexData::AnnexData() :
+ TAbstractModel(),
+ d(new AnnexDataObject())
+{
+ // set the initial parameters
+}
+
+AnnexData::AnnexData(const AnnexData &other) :
+ TAbstractModel(),
+ d(other.d)
+{ }
+
+AnnexData::AnnexData(const AnnexDataObject &object) :
+ TAbstractModel(),
+ d(new AnnexDataObject(object))
+{ }
+
+AnnexData::~AnnexData()
+{
+ // If the reference count becomes 0,
+ // the shared data object 'AnnexDataObject' is deleted.
+}
+
+// #####
+
+QJsonArray AnnexData::getAnnexSpec(int &id)
+{
+ TSqlQuery query;
+ QJsonObject jsonObject;
+ QJsonArray jsonArray;
+ QString msg, lang;
+
+ query.prepare("SELECT annex_data.id, lfdnr, spec_title, spec_desc, spec_version, spec_release, obj_sname, ac_classes, pc_classes, cat_class, country, lang, spec_active, spec_created, spec_last_modified, spec_valid_start, spec_valid_end, last_editor, g_legacy, responsibility, spec_comment, spec_marker, groups, spec_content FROM annex_data INNER JOIN annex_meta ON annex_meta.spec_data_id = annex_data.id WHERE annex_data.id = ?");
+ query.addBindValue(id);
+
+ if(!query.exec())
+ {
+ msg = query.lastError().text();
+ jsonObject["errMsg"] = msg;
+ jsonObject["ERROR"] = "1";
+ jsonArray.append(jsonObject);
+
+ return jsonArray;
+ }
+
+ while (query.next())
+ {
+ jsonObject["id"] = query.value(0).toString();
+ jsonObject["lfdnr"] = query.value(1).toString();
+ jsonObject["spec_title"] = query.value(2).toString();
+ jsonObject["spec_desc"] = query.value(3).toString();
+ jsonObject["spec_version"] = query.value(4).toString();
+ jsonObject["spec_release"] = query.value(5).toString();
+ jsonObject["obj_sname"] = query.value(6).toString();
+ jsonObject["ac_classes"] = query.value(7).toString();
+ jsonObject["pc_classes"] = query.value(8).toString();
+ jsonObject["cat_class"] = query.value(9).toString();
+ jsonObject["country"] = query.value(10).toString();
+ jsonObject["lang"] = query.value(11).toString();
+ lang = query.value(11).toString();
+ jsonObject["spec_active"] = query.value(12).toString();
+ jsonObject["spec_created"] = query.value(13).toString();
+ jsonObject["spec_last_modified"] = query.value(14).toString();
+ jsonObject["spec_valid_start"] = query.value(15).toString();
+ jsonObject["spec_valid_end"] = query.value(16).toString();
+ jsonObject["last_editor"] = query.value(17).toString();
+ jsonObject["g_legacy"] = query.value(18).toString();
+ jsonObject["responsibility"] = query.value(19).toString();
+ jsonObject["spec_comment"] = query.value(20).toString();
+ jsonObject["spec_marker"] = query.value(21).toString();
+ jsonObject["groups"] = query.value(22).toString();
+
+ std::string erg = query.value(23).toString().toStdString();
+ findAndReplaceAll(erg, lang, "standard");
+ jsonObject["spec_content"] = erg.c_str();
+
+ std::string line = erg.c_str();
+
+ std::regex reg1("()(.{0,100})(
)", std::regex_constants::icase);
+ std::smatch match1;
+
+ std::regex reg2("()(.{0,100})(
)", std::regex_constants::icase);
+ std::smatch match2;
+
+ std::regex reg3("()(.{0,100})(
)", std::regex_constants::icase);
+ std::smatch match3;
+
+ std::regex reg4("()(.{0,100})(
)", std::regex_constants::icase);
+ std::smatch match4;
+
+ QString toc;
+ std::string ahref1 = ".{0,100})|(.{0,100}
)|(.{0,100}
)|(.{0,100}
))", std::regex_constants::icase);
+ std::sregex_iterator next(line.begin(), line.end(), re);
+ std::sregex_iterator end;
+ while (next != end)
+ {
+ std::smatch match = *next;
+ //std::cout << "MATCH: " << match.str() << "\n";
+ std::string item = match.str();
+ if(std::regex_search(item, match1, reg1))
+ {
+ std::string to = match1.str();
+ std::regex vowel_re("()|(
)");
+ to = regex_replace(to, vowel_re, "");
+ to = ahref1 + query.value(0).toString().toStdString() + class1 + ahref2 + to + ahref3;
+ toc.append(to.c_str());
+ next++;
+ continue;
+ }
+ if(std::regex_search(item, match2, reg2))
+ {
+ std::string to = match2.str();
+ std::regex vowel_re("()|(
)");
+ to = regex_replace(to, vowel_re, "");
+ to = ahref1 + query.value(0).toString().toStdString() + class2 + ahref2 + to + ahref3;
+ toc.append(to.c_str());
+ next++;
+ continue;
+ }
+ if(std::regex_search(item, match3, reg3))
+ {
+ std::string to = match3.str();
+ std::regex vowel_re("()|(
)");
+ to = regex_replace(to, vowel_re, "");
+ to = ahref1 + query.value(0).toString().toStdString() + class3 + ahref2 + to + ahref3;
+ toc.append(to.c_str());
+ next++;
+ continue;
+ }
+ if(std::regex_search(item, match4, reg4))
+ {
+ std::string to = match4.str();
+ std::regex vowel_re("()|(
)");
+ to = regex_replace(to, vowel_re, "");
+ to = ahref1 + query.value(0).toString().toStdString() + class4 + ahref2 + to + ahref3;
+ toc.append(to.c_str());
+ next++;
+ continue;
+ }
+
+ next++;
+ }
+ jsonObject["toc"] = toc;
+ toc = "";
+ }
+ catch (std::regex_error& e)
+ {
+ //std::cout << "Syntax error in the regular expression" << std::endl;
+ }
+
+ jsonArray.append(jsonObject);
+
+ }
+
+ return jsonArray;
+}
+
+void AnnexData::findAndReplaceAll(std::string &data, QString &lang, QString std_type)
+{
+ TSqlQuery query;
+ std::string toSearch, replaceStr;
+
+ std::string year = QDateTime::currentDateTime().toString("yyyy").toStdString();
+ std::string y = "{{YYYY}}";
+ std::string month = QDateTime::currentDateTime().toString("MM").toStdString();
+ std::string m = "{{MM}}";
+
+ size_t pos2 = data.find(y);
+ // Repeat till end is reached
+ while( pos2 != std::string::npos)
+ {
+ // Replace this occurrence of Sub String
+ data.replace(pos2, y.size(), year);
+ // Get the next occurrence from the current position
+ pos2 =data.find(y, pos2 + y.size());
+ }
+ pos2 = data.find(m);
+ // Repeat till end is reached
+ while( pos2 != std::string::npos)
+ {
+ // Replace this occurrence of Sub String
+ data.replace(pos2, m.size(), month);
+ // Get the next occurrence from the current position
+ pos2 =data.find(m, pos2 + m.size());
+ }
+
+ if( lang.compare("de_DE") == 0 )
+ {
+ query.prepare("SELECT std_attr, std_val_de FROM public.app_vars WHERE std_type = ? AND active = 1");
+ }
+ else
+ {
+ query.prepare("SELECT std_attr, std_val_en FROM public.app_vars WHERE std_type = ? AND active = 1");
+ }
+ // SELECT id, std_type, std_attr, std_val_de, std_val_en, active FROM public.app_vars;
+ query.addBindValue(std_type);
+
+ query.exec();
+
+ while (query.next())
+ {
+ toSearch = "{{" + query.value(0).toString().toStdString() + "}}";
+ replaceStr = query.value(1).toString().toStdString();
+
+ // Get the first occurrence
+ size_t pos = data.find(toSearch);
+ // Repeat till end is reached
+ while( pos != std::string::npos)
+ {
+ // Replace this occurrence of Sub String
+ data.replace(pos, toSearch.size(), replaceStr);
+ // Get the next occurrence from the current position
+ pos =data.find(toSearch, pos + replaceStr.size());
+ }
+ }
+}
+
+QJsonArray AnnexData::sqlGet_crObjCatalog(QMap outList)
+{
+ TSqlQuery query;
+ QJsonObject jsonObject;
+ QJsonArray jsonArray;
+ QString msg, id;
+
+ QMapIterator i(outList);
+ while(i.hasNext())
+ {
+ i.next();
+ id = i.value();
+
+
+ query.prepare("SELECT annex_data.id, lfdnr, spec_title, spec_desc, spec_version, spec_release, obj_sname, ac_classes, pc_classes, cat_class, country, lang, spec_active, spec_created, spec_last_modified, spec_valid_start, spec_valid_end, last_editor, g_legacy, responsibility, spec_comment, spec_marker, groups FROM annex_data INNER JOIN annex_meta ON annex_meta.spec_data_id = annex_data.id WHERE annex_data.id = ?");
+ query.addBindValue(id);
+
+ if(!query.exec())
+ {
+ msg = query.lastError().text();
+ jsonObject["errMsg"] = msg;
+ jsonObject["ERROR"] = "1";
+ jsonArray.append(jsonObject);
+ }
+
+ while (query.next())
+ {
+ jsonObject["id"] = query.value(0).toString();
+ jsonObject["lfdnr"] = query.value(1).toString();
+ jsonObject["spec_title"] = query.value(2).toString();
+ jsonObject["spec_desc"] = query.value(3).toString();
+ jsonObject["spec_version"] = query.value(4).toString();
+ jsonObject["spec_release"] = query.value(5).toString();
+ jsonObject["obj_sname"] = query.value(6).toString();
+ jsonObject["ac_classes"] = query.value(7).toString();
+ jsonObject["pc_classes"] = query.value(8).toString();
+ jsonObject["cat_class"] = query.value(9).toString();
+ jsonObject["country"] = query.value(10).toString();
+ jsonObject["lang"] = query.value(11).toString();
+ jsonObject["spec_active"] = query.value(12).toString();
+ jsonObject["spec_created"] = query.value(13).toString();
+ jsonObject["spec_last_modified"] = query.value(14).toString();
+ jsonObject["spec_valid_start"] = query.value(15).toString();
+ jsonObject["spec_valid_end"] = query.value(16).toString();
+ jsonObject["last_editor"] = query.value(17).toString();
+ jsonObject["g_legacy"] = query.value(18).toString();
+ jsonObject["responsibility"] = query.value(19).toString();
+ jsonObject["spec_comment"] = query.value(20).toString();
+ jsonObject["spec_marker"] = query.value(21).toString();
+ jsonObject["groups"] = query.value(22).toString();
+
+ jsonArray.append(jsonObject);
+ }
+ }
+ return jsonArray;
+}
+
+QMap AnnexData::checkObjCatalog(QMap wwList, QMap localList)
+{
+ QMapIterator i(localList);
+ while (i.hasNext())
+ {
+ i.next();
+ if(localList.contains(i.key()))
+ {
+ wwList[i.key()] = localList[i.key()];
+ }
+ }
+
+ return wwList;
+}
+
+QMap AnnexData::sqlObjCatalog(QString name, QString ac, QString pc, QString country, QString lang, QString cat, QString spec_active, QString release)
+{
+ TSqlQuery query;
+
+ QString msg, obj_name, ac_classes, pc_classes;
+ QMap inList;
+
+ obj_name = "%" + name + "%";
+ ac_classes = "%" + ac + "%";
+ pc_classes = "%" + pc + "%";
+
+ query.prepare("select lfdnr, id from annex_data where obj_sname LIKE ? and ac_classes LIKE ? and pc_classes LIKE ? and lang = ? and country = ? and cat_class = ? AND spec_active = ? and spec_release = ? order by lfdnr");
+ query.addBindValue(obj_name);
+ query.addBindValue(ac_classes);
+ query.addBindValue(pc_classes);
+ query.addBindValue(lang);
+ query.addBindValue(country);
+ query.addBindValue(cat);
+ query.addBindValue(spec_active);
+ query.addBindValue(release);
+
+ if(!query.exec())
+ {
+ msg = query.lastError().text();
+ qWarning("ERROR: " + msg.toUtf8());
+ //tDebug(msg.toUtf8());
+ }
+
+ while (query.next())
+ {
+ /*msg = "sqlObjCatalog: " + query.value(0).toString() + " " + query.value(1).toString();
+ tDebug(msg.toUtf8()); */
+ inList.insert(query.value(0).toString(),query.value(1).toString());
+ }
+
+ return inList;
+}
+
+QJsonArray AnnexData::listObjCatalog(QMap editMap)
+{
+ QMap localList, wwList, outList;
+ QJsonArray array, tomerge;
+
+ // General
+ if(editMap["obj_sname"].compare("General") == 0)
+ {
+
+ wwList.clear(); localList.clear(); outList.clear();
+ localList= AnnexData::sqlObjCatalog("General", "0", "0", editMap["country"], editMap["lang"], "General", editMap["spec_active"], editMap["spec_release"]);
+ wwList = AnnexData::sqlObjCatalog("General", "0", "0", "WW", editMap["lang"], "General", editMap["spec_active"], editMap["spec_release"]);
+
+ outList = AnnexData::checkObjCatalog(wwList, localList);
+ return AnnexData::sqlGet_crObjCatalog(outList);
+ }
+
+ if(editMap["cat_sname_en"].compare("General") == 0)
+ {
+ wwList.clear(); localList.clear(); outList.clear();
+ localList= AnnexData::sqlObjCatalog(editMap["obj_sname"], "0", "0", editMap["country"], editMap["lang"], "General", editMap["spec_active"], editMap["spec_release"]);
+ wwList = AnnexData::sqlObjCatalog(editMap["obj_sname"], "0", "0", "WW", editMap["lang"], "General", editMap["spec_active"], editMap["spec_release"]);
+ outList = AnnexData::checkObjCatalog(wwList, localList);
+ array = AnnexData::sqlGet_crObjCatalog(outList);
+
+ wwList.clear(); localList.clear(); outList.clear();
+ localList= AnnexData::sqlObjCatalog(editMap["obj_sname"], editMap["ac_class"], editMap["pc_class"], editMap["country"], editMap["lang"], "General", editMap["spec_active"], editMap["spec_release"]);
+ wwList = AnnexData::sqlObjCatalog(editMap["obj_sname"], editMap["ac_class"], editMap["pc_class"], "WW", editMap["lang"], "General", editMap["spec_active"], editMap["spec_release"]);
+ outList = AnnexData::checkObjCatalog(wwList, localList);
+ tomerge = AnnexData::sqlGet_crObjCatalog(outList);
+
+ for(int i = 0; i < tomerge.size(); i++)
+ {
+ array.append(tomerge[i]);
+ }
+ return array;
+ }
+ else
+ {
+ // Cat
+ wwList.clear(); localList.clear(); outList.clear();
+ localList= AnnexData::sqlObjCatalog(editMap["obj_sname"], editMap["ac_class"], editMap["pc_class"], editMap["country"], editMap["lang"], editMap["cat_sname_en"], editMap["spec_active"], editMap["spec_release"]);
+ wwList = AnnexData::sqlObjCatalog(editMap["obj_sname"], editMap["ac_class"], editMap["pc_class"], "WW", editMap["lang"], editMap["cat_sname_en"], editMap["spec_active"], editMap["spec_release"]);
+ outList = AnnexData::checkObjCatalog(wwList, localList);
+ return AnnexData::sqlGet_crObjCatalog(outList);
+ }
+}
+
+QJsonArray AnnexData::updAnnexData(QMap editMap)
+{
+ TSqlQuery query;
+ QJsonObject jsonObj;
+ QJsonArray array;
+ QString msg;
+
+ editMap["country"] = editMap["country"].toUpper();
+
+ if(editMap["lfdnr"].count() < 2)
+ {
+ editMap["lfdnr"] = "00" + editMap["lfdnr"];
+ }
+ else if(editMap["lfdnr"].count() < 3)
+ {
+ editMap["lfdnr"] = "0" + editMap["lfdnr"];
+ }
+
+ query.prepare("UPDATE public.annex_data SET id=?, lfdnr=?, spec_title=?, spec_desc=?, spec_version=?, spec_release=?, obj_sname=?, ac_classes=?, pc_classes=?, cat_class=?, country=?, lang=?, spec_content=?, spec_active=? WHERE id = ?");
+
+ query.addBindValue(editMap["id"]);
+ query.addBindValue(editMap["lfdnr"]);
+ query.addBindValue(editMap["spec_title"]);
+ query.addBindValue(editMap["spec_desc"]);
+ query.addBindValue(editMap["spec_version_new"]);
+ query.addBindValue(editMap["spec_release"]);
+ query.addBindValue(editMap["obj_sname"]);
+ query.addBindValue(editMap["ac_classes"]);
+ query.addBindValue(editMap["pc_classes"]);
+ query.addBindValue(editMap["cat_class"]);
+ query.addBindValue(editMap["country"]);
+ query.addBindValue(editMap["lang"]);
+ query.addBindValue(editMap["spec_content"]);
+ query.addBindValue(editMap["spec_active"]);
+ query.addBindValue(editMap["id"]);
+
+ if(!query.exec())
+ {
+ msg = query.lastError().text();
+ jsonObj["ERROR"] = "1";
+ jsonObj["errMsg"] = msg;
+ jsonObj["query"] = query.lastQuery();
+ msg = "setObjSpecs : ";
+ msg.append(msg);
+ msg.append(" : ");
+ msg.append(query.lastQuery());
+ tError(msg.toUtf8());
+
+ array.append(jsonObj);
+ return array;
+ }
+
+ query.prepare("UPDATE public.annex_meta SET spec_last_modified=?, spec_valid_start=?, spec_valid_end=?, last_editor=?, g_legacy=?, responsibility=?, spec_comment=?, spec_marker=? WHERE spec_data_id = ?");
+
+ query.addBindValue(editMap["spec_valid_start"]);
+ query.addBindValue(editMap["spec_valid_start"]);
+ query.addBindValue(editMap["spec_valid_end"]);
+ query.addBindValue(editMap["last_editor"]);
+ query.addBindValue(editMap["g_legacy"]);
+ query.addBindValue(editMap["resp"]);
+ query.addBindValue(editMap["comment"]);
+ query.addBindValue(editMap["marker"]);
+ query.addBindValue(editMap["id"]);
+
+ if(!query.exec())
+ {
+ msg = query.lastError().text();
+ jsonObj["ERROR"] = "1";
+ jsonObj["errMsg"] = msg;
+ jsonObj["query"] = query.lastQuery();
+ msg = "updStdData : ";
+ msg.append(msg);
+ msg.append(" : ");
+ msg.append(query.lastQuery());
+ tError(msg.toUtf8());
+
+ array.append(jsonObj);
+ return array;
+ }
+ else
+ {
+ jsonObj["ERROR"] = "0";
+ jsonObj["errMsg"] = "Datensatz aktualisiert";
+ jsonObj["data_id"] = editMap["id"];
+
+ if(editMap["spec_release"].compare("pre-release") == 0)
+ {
+ auto model = ReleaseMgmt::create(editMap["spec_title"], editMap["spec_version_new"], editMap["obj_sname"], editMap["ac_classes"], editMap["pc_classes"], editMap["cat_class"], editMap["country"], editMap["lang"], editMap["comment"], "annex", QDateTime::currentDateTime(), " ", QDateTime::currentDateTime(), editMap["id"].toInt());
+ if (!model.isNull())
+ {
+ msg = "release: " + editMap["spec_release"] + " null";
+ tError(msg.toUtf8());
+ }
+ }
+ }
+
+ array.append(jsonObj);
+ return array;
+}
+
+QJsonArray AnnexData::setAnnexData(QMap editMap)
+{
+ TSqlQuery query;
+ QJsonObject jsonObj;
+ QJsonArray jsonArr;
+ QString msg;
+
+ editMap["country"] = editMap["country"].toUpper();
+
+ if(editMap["lfdnr"].count() < 2)
+ {
+ editMap["lfdnr"] = "00" + editMap["lfdnr"];
+ }
+ else if(editMap["lfdnr"].count() < 3)
+ {
+ editMap["lfdnr"] = "0" + editMap["lfdnr"];
+ }
+
+ query.prepare("INSERT INTO annex_data(lfdnr, spec_title, spec_desc, spec_version, spec_release, obj_sname, ac_classes, pc_classes, cat_class, country, lang, spec_content, spec_active) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)");
+
+ query.addBindValue(editMap["lfdnr"]);
+ query.addBindValue(editMap["spec_title"]);
+ query.addBindValue(editMap["spec_desc"]);
+ query.addBindValue(editMap["spec_version"]);
+ query.addBindValue(editMap["spec_release"]);
+ query.addBindValue(editMap["obj_sname"]);
+ query.addBindValue(editMap["ac_classes"]);
+ query.addBindValue(editMap["pc_classes"]);
+ query.addBindValue(editMap["cat_class"]);
+ query.addBindValue(editMap["country"]);
+ query.addBindValue(editMap["lang"]);
+ query.addBindValue(editMap["spec_content"]);
+ query.addBindValue(editMap["spec_active"]);
+
+ if(!query.exec())
+ {
+ msg = query.lastError().text();
+ jsonObj["ERROR"] = "1";
+ jsonObj["errMsg"] = msg;
+ jsonObj["query"] = query.lastQuery();
+ msg = "setObjSpecs : ";
+ msg.append(msg);
+ msg.append(" : ");
+ msg.append(query.lastQuery());
+ tError(msg.toUtf8());
+
+ jsonArr.append(jsonObj);
+ return jsonArr;
+ }
+
+ int last_id = query.lastInsertId().toInt();
+
+ query.prepare("INSERT INTO annex_meta(spec_data_id, spec_created, spec_last_modified, spec_valid_start, spec_valid_end, last_editor, g_legacy, responsibility, spec_comment, spec_marker, groups) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)");
+
+ query.addBindValue(last_id);
+ query.addBindValue(editMap["spec_valid_start"]);
+ query.addBindValue(editMap["spec_valid_start"]);
+ query.addBindValue(editMap["spec_valid_start"]);
+ query.addBindValue(editMap["spec_valid_start"]);
+ query.addBindValue(editMap["last_editor"]);
+ query.addBindValue(editMap["g_legacy"]);
+ query.addBindValue(editMap["resp"]);
+ query.addBindValue(editMap["comment"]);
+ query.addBindValue(editMap["marker"]);
+
+ query.addBindValue("{ALL}");
+
+ if(!query.exec())
+ {
+ msg = query.lastError().text();
+ jsonObj["ERROR"] = "1";
+ jsonObj["errMsg"] = msg;
+ jsonObj["query"] = query.lastQuery();
+ msg = "setObjSpecs : ";
+ msg.append(msg);
+ msg.append(" : ");
+ msg.append(query.lastQuery());
+ tError(msg.toUtf8());
+
+ jsonArr.append(jsonObj);
+ return jsonArr;
+ }
+ else
+ {
+ jsonObj["ERROR"] = "0";
+ jsonObj["errMsg"] = "Datensatz eingefügt";
+ jsonObj["last_data_id"] = last_id;
+ jsonObj["last_meta_id"] = query.lastInsertId().toInt();
+ }
+
+ jsonArr.append(jsonObj);
+ return jsonArr;
+}
+
+QJsonArray AnnexData::getAnnexShow(QMap &stdDataMap)
+{
+ return AnnexData::listObjCatalog(stdDataMap);
+}
+
+QJsonArray AnnexData::getAnnexList(QMap &stdDataMap)
+{
+ TSqlQuery query;
+ QJsonObject jsonObject;
+ QJsonArray jsonArray;
+ QString msg, obj_sname, ac_class, pc_class, id;
+
+ obj_sname = "%" + stdDataMap["obj_sname"] + "%";
+ ac_class = "%" + stdDataMap["ac_class"] + "%";
+ pc_class = "%" + stdDataMap["pc_class"] + "%";
+
+ query.prepare("SELECT annex_data.id, lfdnr, spec_title, spec_desc, spec_version, spec_release, obj_sname, ac_classes, pc_classes, cat_class, country, lang, spec_active, spec_created, spec_last_modified, spec_valid_start, spec_valid_end, last_editor, g_legacy, responsibility, spec_comment, spec_marker, groups FROM annex_data INNER JOIN annex_meta ON annex_meta.spec_data_id = annex_data.id WHERE obj_sname like ? AND cat_class = ? AND country = ? AND lang = ? AND spec_active = ? AND ac_classes like ? AND pc_classes like ? AND spec_release = ? order by lfdnr");
+ //query.prepare("SELECT annex_data.id, lfdnr, spec_title, spec_desc, spec_version, spec_release, obj_sname, ac_classes, pc_classes, cat_class, country, lang, spec_active, spec_created, spec_last_modified, spec_valid_start, spec_valid_end, last_editor, g_legacy, responsibility, spec_comment, spec_marker, groups FROM annex_data INNER JOIN annex_meta ON annex_meta.spec_data_id = annex_data.id WHERE obj_sname like '%Annex D%' AND cat_class = 'Cabling' AND country = 'WW' AND lang = 'de_DE' AND spec_active = 1 AND ac_classes like '%2%' AND pc_classes like '%2%' AND spec_release = 'draft'");
+
+ query.addBindValue(obj_sname);
+ query.addBindValue(stdDataMap["cat_sname_en"]);
+ query.addBindValue(stdDataMap["country"]);
+ query.addBindValue(stdDataMap["lang"]);
+ query.addBindValue(stdDataMap["spec_active"]);
+ query.addBindValue(ac_class);
+ query.addBindValue(pc_class);
+ query.addBindValue(stdDataMap["spec_release"]);
+
+ if(!query.exec())
+ {
+ msg = query.lastError().text();
+ jsonObject["errMsg"] = msg;
+ jsonObject["ERROR"] = "1";
+ jsonArray.append(jsonObject);
+
+ return jsonArray;
+ }
+
+ while (query.next())
+ {
+ id = query.value(0).toString();
+ jsonObject["id"] = query.value(0).toString();
+ jsonObject["lfdnr"] = query.value(1).toString();
+ jsonObject["spec_title"] = query.value(2).toString();
+ jsonObject["spec_desc"] = query.value(3).toString();
+ jsonObject["spec_version"] = query.value(4).toString();
+ jsonObject["spec_release"] = query.value(5).toString();
+ jsonObject["obj_sname"] = query.value(6).toString();
+ jsonObject["ac_classes"] = query.value(7).toString();
+ jsonObject["pc_classes"] = query.value(8).toString();
+ jsonObject["cat_class"] = query.value(9).toString();
+ jsonObject["country"] = query.value(10).toString();
+ jsonObject["lang"] = query.value(11).toString();
+ jsonObject["spec_active"] = query.value(12).toString();
+ jsonObject["spec_created"] = query.value(13).toString();
+ jsonObject["spec_last_modified"] = query.value(14).toString();
+ jsonObject["spec_valid_start"] = query.value(15).toString();
+ jsonObject["spec_valid_end"] = query.value(16).toString();
+ jsonObject["last_editor"] = query.value(17).toString();
+ jsonObject["g_legacy"] = query.value(18).toString();
+ jsonObject["responsibility"] = query.value(19).toString();
+ jsonObject["spec_comment"] = query.value(20).toString();
+ jsonObject["spec_marker"] = query.value(21).toString();
+ jsonObject["groups"] = query.value(22).toString();
+
+ jsonArray.append(jsonObject);
+ }
+
+ return jsonArray;
+}
+
+QJsonArray AnnexData::getExistCountries()
+{
+ TSqlQuery query;
+ QJsonObject jsonObject;
+ QJsonArray jsonArray;
+ QString msg;
+
+ query.prepare("SELECT DISTINCT(country) FROM public.annex_data ORDER BY country");
+
+ if(!query.exec())
+ {
+ msg = query.lastError().text();
+ jsonObject["errMsg"] = msg;
+ jsonObject["ERROR"] = "1";
+ jsonArray.append(jsonObject);
+ }
+
+ while (query.next())
+ {
+ jsonObject["country"] = query.value(0).toString();
+ jsonArray.append(jsonObject);
+ }
+ return jsonArray;
+}
+
+QJsonArray AnnexData::getHighestLfdnr(const QString &category)
+{
+ TSqlQuery query;
+ QJsonObject jsonObject;
+ QJsonArray jsonArray;
+ QString msg;
+
+ query.prepare("SELECT MAX(lfdnr) FROM public.annex_data WHERE cat_class = ?");
+ query.addBindValue(category);
+
+ query.exec();
+ query.next();
+
+ jsonObject["lfdnr"] = query.value(0).toString();
+ jsonObject["cat"] = category;
+ jsonArray.append(jsonObject);
+
+ return jsonArray;
+}
+
+int AnnexData::countCheckLfdnrCat()
+{
+ TSqlQuery query;
+ int counter = 0;
+
+ query.prepare("SELECT id, obj_sname, cat_class, lfdnr, country, lang, spec_title FROM public.annex_data a WHERE not Exists ( SELECT lfdnr FROM public.annex_data c WHERE a.lang != c.lang AND a.cat_class = c.cat_class and a.lfdnr = c.lfdnr) order by (cat_class,lfdnr)");
+
+ query.exec();
+
+ while (query.next())
+ {
+ counter++;
+ }
+
+ return counter;
+}
+
+QJsonArray AnnexData::chkLfdnrEditor(QMap editMap)
+{
+ TSqlQuery query;
+ QJsonObject jsonObject;
+ QJsonArray jsonArray;
+ QString msg;
+
+ query.prepare("SELECT id, lfdnr, spec_title, obj_sname, country, lang FROM public.annex_data WHERE cat_class = ? AND lfdnr = ?");
+ query.addBindValue(editMap["cat_class"]);
+ query.addBindValue(editMap["lfdnr"]);
+
+ if(!query.exec())
+ {
+ msg = query.lastError().text();
+ jsonObject["MSG"] = msg;
+ jsonObject["ERROR"] = "1";
+ jsonArray.append(jsonObject);
+ }
+
+ while (query.next())
+ {
+ jsonObject["id"] = query.value(0).toString();
+ jsonObject["lfdnr"] = query.value(1).toString();
+ jsonObject["spec_title"] = query.value(2).toString();
+ jsonObject["obj_sname"] = query.value(3).toString();
+ jsonObject["country"] = query.value(4).toString();
+ jsonObject["lang"] = query.value(5).toString();
+
+ jsonArray.append(jsonObject);
+ }
+
+ return jsonArray;
+}
+
+QJsonArray AnnexData::getStatistics()
+{
+ TSqlQuery query;
+ QJsonObject jsonObject, jsonObjReleaseTypes;
+ QJsonArray jsonArray, jsonArrReleaseTypes;
+ QString msg;
+ QList releaseTypes;
+
+ // count
+ query.prepare("SELECT count(id) FROM annex_data");
+ query.exec();
+ query.next();
+ jsonObject["count_id"] = query.value(0).toString();
+
+ // active
+ query.prepare("select count(id) from annex_data where spec_active = 1");
+ query.exec();
+ query.next();
+ jsonObject["count_active"] = query.value(0).toString();
+
+ // countries
+ query.prepare("select count(distinct country) from annex_data");
+ query.exec();
+ query.next();
+ jsonObject["count_countries"] = query.value(0).toString();
+
+ // languages
+ query.prepare("select count(lang) from annex_data where lang = 'de_DE'");
+ query.exec();
+ query.next();
+ jsonObject["count_language_de"] = query.value(0).toString();
+ query.prepare("select count(lang) from annex_data where lang = 'en_GB'");
+ query.exec();
+ query.next();
+ jsonObject["count_language_en"] = query.value(0).toString();
+
+ // waste
+ query.prepare("select count(id) from annex_data_waste");
+ query.exec();
+ query.next();
+ jsonObject["count_Annexwaste"] = query.value(0).toString();
+
+ // releases
+ query.prepare("SELECT std_attr FROM std_system WHERE std_type = 'release_types' ORDER BY sort");
+ query.exec();
+ while (query.next())
+ {
+ releaseTypes.append(query.value(0).toString());
+ }
+
+ QList::iterator i;
+ for (i = releaseTypes.begin(); i != releaseTypes.end(); ++i)
+ {
+ query.prepare("select count(spec_release) from annex_data where spec_release = ?");
+ query.addBindValue(*i);
+ query.exec();
+ query.next();
+ jsonObjReleaseTypes["release_type"] = *i;
+ jsonObjReleaseTypes["count_release_type"] = query.value(0).toString();
+ jsonArrReleaseTypes.append(jsonObjReleaseTypes);
+ }
+
+ jsonObject["countCheckLfdnrCat"] = QString::number( AnnexData::countCheckLfdnrCat() );
+
+ jsonArray.append(jsonObject);
+ jsonArray.append(jsonArrReleaseTypes);
+
+ return jsonArray;
+}
+
+int AnnexData::id() const
+{
+ return d->id;
+}
+
+QString AnnexData::lfdnr() const
+{
+ return d->lfdnr;
+}
+
+void AnnexData::setLfdnr(const QString &lfdnr)
+{
+ d->lfdnr = lfdnr;
+}
+
+QString AnnexData::specTitle() const
+{
+ return d->spec_title;
+}
+
+void AnnexData::setSpecTitle(const QString &specTitle)
+{
+ d->spec_title = specTitle;
+}
+
+QString AnnexData::specDesc() const
+{
+ return d->spec_desc;
+}
+
+void AnnexData::setSpecDesc(const QString &specDesc)
+{
+ d->spec_desc = specDesc;
+}
+
+QString AnnexData::specVersion() const
+{
+ return d->spec_version;
+}
+
+void AnnexData::setSpecVersion(const QString &specVersion)
+{
+ d->spec_version = specVersion;
+}
+
+QString AnnexData::specRelease() const
+{
+ return d->spec_release;
+}
+
+void AnnexData::setSpecRelease(const QString &specRelease)
+{
+ d->spec_release = specRelease;
+}
+
+QString AnnexData::objSname() const
+{
+ return d->obj_sname;
+}
+
+void AnnexData::setObjSname(const QString &objSname)
+{
+ d->obj_sname = objSname;
+}
+
+QString AnnexData::acClasses() const
+{
+ return d->ac_classes;
+}
+
+void AnnexData::setAcClasses(const QString &acClasses)
+{
+ d->ac_classes = acClasses;
+}
+
+QString AnnexData::pcClasses() const
+{
+ return d->pc_classes;
+}
+
+void AnnexData::setPcClasses(const QString &pcClasses)
+{
+ d->pc_classes = pcClasses;
+}
+
+QString AnnexData::catClass() const
+{
+ return d->cat_class;
+}
+
+void AnnexData::setCatClass(const QString &catClass)
+{
+ d->cat_class = catClass;
+}
+
+QString AnnexData::country() const
+{
+ return d->country;
+}
+
+void AnnexData::setCountry(const QString &country)
+{
+ d->country = country;
+}
+
+QString AnnexData::lang() const
+{
+ return d->lang;
+}
+
+void AnnexData::setLang(const QString &lang)
+{
+ d->lang = lang;
+}
+
+QByteArray AnnexData::specContent() const
+{
+ return d->spec_content;
+}
+
+void AnnexData::setSpecContent(const QByteArray &specContent)
+{
+ d->spec_content = specContent;
+}
+
+int AnnexData::specActive() const
+{
+ return d->spec_active;
+}
+
+void AnnexData::setSpecActive(int specActive)
+{
+ d->spec_active = specActive;
+}
+
+AnnexData &AnnexData::operator=(const AnnexData &other)
+{
+ d = other.d; // increments the reference count of the data
+ return *this;
+}
+
+AnnexData AnnexData::create(const QString &lfdnr, const QString &specTitle, const QString &specDesc, const QString &specVersion, const QString &specRelease, const QString &objSname, const QString &acClasses, const QString &pcClasses, const QString &catClass, const QString &country, const QString &lang, const QByteArray &specContent, int specActive)
+{
+ AnnexDataObject obj;
+ obj.lfdnr = lfdnr;
+ obj.spec_title = specTitle;
+ obj.spec_desc = specDesc;
+ obj.spec_version = specVersion;
+ obj.spec_release = specRelease;
+ obj.obj_sname = objSname;
+ obj.ac_classes = acClasses;
+ obj.pc_classes = pcClasses;
+ obj.cat_class = catClass;
+ obj.country = country;
+ obj.lang = lang;
+ obj.spec_content = specContent;
+ obj.spec_active = specActive;
+ if (!obj.create()) {
+ return AnnexData();
+ }
+ return AnnexData(obj);
+}
+
+AnnexData AnnexData::create(const QVariantMap &values)
+{
+ AnnexData model;
+ model.setProperties(values);
+ if (!model.d->create()) {
+ model.d->clear();
+ }
+ return model;
+}
+
+AnnexData AnnexData::get(int id)
+{
+ TSqlORMapper mapper;
+ return AnnexData(mapper.findByPrimaryKey(id));
+}
+
+int AnnexData::count()
+{
+ TSqlORMapper mapper;
+ return mapper.findCount();
+}
+
+QList AnnexData::getAll()
+{
+ return tfGetModelListByCriteria(TCriteria());
+}
+
+QJsonArray AnnexData::getAllJson()
+{
+ QJsonArray array;
+ TSqlORMapper mapper;
+
+ if (mapper.find() > 0) {
+ for (TSqlORMapperIterator i(mapper); i.hasNext(); ) {
+ array.append(QJsonValue(QJsonObject::fromVariantMap(AnnexData(i.next()).toVariantMap())));
+ }
+ }
+ return array;
+}
+
+QJsonArray AnnexData::getAllJsonCi()
+{
+ TSqlQuery query;
+ QJsonObject jsonObject;
+ QJsonArray jsonArray;
+ QString msg;
+
+ query.prepare("select id, obj_sname, spec_title, cat_class,lfdnr, lang, country FROM public.annex_data WHERE spec_release = 'released' group by (id, obj_sname, spec_title, cat_class, lfdnr, lang, country) order by (obj_sname,lfdnr)");
+
+ if(!query.exec())
+ {
+ msg = query.lastError().text();
+ jsonObject["MSG"] = msg;
+ jsonObject["ERROR"] = "1";
+ jsonArray.append(jsonObject);
+ }
+
+ while (query.next())
+ {
+ jsonObject["id"] = query.value(0).toString();
+ jsonObject["obj_sname"] = query.value(1).toString();
+ jsonObject["spec_title"] = query.value(2).toString();
+ jsonObject["cat_class"] = query.value(3).toString();
+ jsonObject["lfdnr"] = query.value(4).toString();
+ jsonObject["lang"] = query.value(5).toString();
+ jsonObject["country"] = query.value(6).toString();
+
+ jsonArray.append(jsonObject);
+ }
+
+ return jsonArray;
+}
+
+TModelObject *AnnexData::modelData()
+{
+ return d.data();
+}
+
+const TModelObject *AnnexData::modelData() const
+{
+ return d.data();
+}
+
+QDataStream &operator<<(QDataStream &ds, const AnnexData &model)
+{
+ auto varmap = model.toVariantMap();
+ ds << varmap;
+ return ds;
+}
+
+QDataStream &operator>>(QDataStream &ds, AnnexData &model)
+{
+ QVariantMap varmap;
+ ds >> varmap;
+ model.setProperties(varmap);
+ return ds;
+}
+
+// Don't remove below this line
+T_REGISTER_STREAM_OPERATORS(AnnexData)
diff --git a/models/annexdata.cpp_2021-04-11_1012 b/models/annexdata.cpp_2021-04-11_1012
new file mode 100644
index 0000000..8daab80
--- /dev/null
+++ b/models/annexdata.cpp_2021-04-11_1012
@@ -0,0 +1,1450 @@
+#include
+#include "annexdata.h"
+#include "sqlobjects/annexdataobject.h"
+
+#include
+#include
+#include
+
+#include "catclasses.h"
+#include "annexdatacomments.h"
+
+AnnexData::AnnexData() :
+ TAbstractModel(),
+ d(new AnnexDataObject())
+{
+ // set the initial parameters
+}
+
+AnnexData::AnnexData(const AnnexData &other) :
+ TAbstractModel(),
+ d(other.d)
+{ }
+
+AnnexData::AnnexData(const AnnexDataObject &object) :
+ TAbstractModel(),
+ d(new AnnexDataObject(object))
+{ }
+
+AnnexData::~AnnexData()
+{
+ // If the reference count becomes 0,
+ // the shared data object 'AnnexDataObject' is deleted.
+}
+
+// #####
+
+QJsonArray AnnexData::getAnnexSpec(int &id)
+{
+ TSqlQuery query;
+ QJsonObject jsonObject;
+ QJsonArray jsonArray;
+ QString msg, lang;
+
+ query.prepare("SELECT annex_data.id, lfdnr, spec_title, spec_desc, spec_version, spec_release, obj_sname, ac_classes, pc_classes, cat_class, country, lang, spec_active, spec_created, spec_last_modified, spec_valid_start, spec_valid_end, last_editor, g_legacy, responsibility, spec_comment, spec_marker, groups, spec_content FROM annex_data INNER JOIN annex_meta ON annex_meta.spec_data_id = annex_data.id WHERE annex_data.id = ?");
+ query.addBindValue(id);
+
+ if(!query.exec())
+ {
+ msg = query.lastError().text();
+ jsonObject["errMsg"] = msg;
+ jsonObject["ERROR"] = "1";
+ jsonArray.append(jsonObject);
+
+ return jsonArray;
+ }
+
+ while (query.next())
+ {
+ jsonObject["id"] = query.value(0).toString();
+ jsonObject["lfdnr"] = query.value(1).toString();
+ jsonObject["spec_title"] = query.value(2).toString();
+ jsonObject["spec_desc"] = query.value(3).toString();
+ jsonObject["spec_version"] = query.value(4).toString();
+ jsonObject["spec_release"] = query.value(5).toString();
+ jsonObject["obj_sname"] = query.value(6).toString();
+ jsonObject["ac_classes"] = query.value(7).toString();
+ jsonObject["pc_classes"] = query.value(8).toString();
+ jsonObject["cat_class"] = query.value(9).toString();
+ jsonObject["country"] = query.value(10).toString();
+ jsonObject["lang"] = query.value(11).toString();
+ lang = query.value(11).toString();
+ jsonObject["spec_active"] = query.value(12).toString();
+ jsonObject["spec_created"] = query.value(13).toString();
+ jsonObject["spec_last_modified"] = query.value(14).toString();
+ jsonObject["spec_valid_start"] = query.value(15).toString();
+ jsonObject["spec_valid_end"] = query.value(16).toString();
+ jsonObject["last_editor"] = query.value(17).toString();
+ jsonObject["g_legacy"] = query.value(18).toString();
+ jsonObject["responsibility"] = query.value(19).toString();
+ jsonObject["spec_comment"] = query.value(20).toString();
+ jsonObject["spec_marker"] = query.value(21).toString();
+ jsonObject["groups"] = query.value(22).toString();
+
+ std::string erg = query.value(23).toString().toStdString();
+ findAndReplaceAll(erg, lang, "standard");
+ jsonObject["spec_content"] = erg.c_str();
+
+ std::string line = erg.c_str();
+
+ std::regex reg1("()(.{0,100})(
)", std::regex_constants::icase);
+ std::smatch match1;
+
+ std::regex reg2("()(.{0,100})(
)", std::regex_constants::icase);
+ std::smatch match2;
+
+ std::regex reg3("()(.{0,100})(
)", std::regex_constants::icase);
+ std::smatch match3;
+
+ std::regex reg4("()(.{0,100})(
)", std::regex_constants::icase);
+ std::smatch match4;
+
+ QString toc;
+ std::string ahref1 = ".{0,100})|(.{0,100}
)|(.{0,100}
)|(.{0,100}
))", std::regex_constants::icase);
+ std::regex re("((.{0,100})|(.{0,100})|(.{0,100})|(.{0,100}))", std::regex_constants::icase);
+ std::sregex_iterator next(line.begin(), line.end(), re);
+ std::sregex_iterator end;
+ while (next != end)
+ {
+ std::smatch match = *next;
+ //std::cout << "MATCH: " << match.str() << "\n";
+ std::string item = match.str();
+ if(std::regex_search(item, match1, reg1))
+ {
+ std::string to = match1.str();
+
+ std::regex style_re("( style=\"[a-z]*-?[a-z]*:[a-z]*;\")");
+ to = regex_replace(to, style_re, "");
+
+ std::regex vowel_re("()|(
)");
+ to = regex_replace(to, vowel_re, "");
+ to = ahref1 + query.value(0).toString().toStdString() + class1 + ahref2 + to + ahref3;
+ toc.append(to.c_str());
+ next++;
+ continue;
+ }
+ if(std::regex_search(item, match2, reg2))
+ {
+ std::string to = match2.str();
+
+ std::regex style_re("( style=\"[a-z]*-?[a-z]*:[a-z]*;\")");
+ to = regex_replace(to, style_re, "");
+
+ std::regex vowel_re("()|(
)");
+ to = regex_replace(to, vowel_re, "");
+ to = ahref1 + query.value(0).toString().toStdString() + class2 + ahref2 + to + ahref3;
+ toc.append(to.c_str());
+ next++;
+ continue;
+ }
+ if(std::regex_search(item, match3, reg3))
+ {
+ std::string to = match3.str();
+
+ std::regex style_re("( style=\"[a-z]*-?[a-z]*:[a-z]*;\")");
+ to = regex_replace(to, style_re, "");
+
+ std::regex vowel_re("()|(
)");
+ to = regex_replace(to, vowel_re, "");
+ to = ahref1 + query.value(0).toString().toStdString() + class3 + ahref2 + to + ahref3;
+ toc.append(to.c_str());
+ next++;
+ continue;
+ }
+ if(std::regex_search(item, match4, reg4))
+ {
+ std::string to = match4.str();
+
+ std::regex style_re("( style=\"[a-z]*-?[a-z]*:[a-z]*;\")");
+ to = regex_replace(to, style_re, "");
+
+ std::regex vowel_re("()|(
)");
+ to = regex_replace(to, vowel_re, "");
+ to = ahref1 + query.value(0).toString().toStdString() + class4 + ahref2 + to + ahref3;
+ toc.append(to.c_str());
+ next++;
+ continue;
+ }
+
+ next++;
+ }
+ jsonObject["toc"] = toc;
+ toc = "";
+ }
+ catch (std::regex_error& e)
+ {
+ //std::cout << "Syntax error in the regular expression" << std::endl;
+ }
+
+ jsonArray.append(jsonObject);
+
+ }
+
+ return jsonArray;
+}
+
+void AnnexData::findAndReplaceAll(std::string &data, QString &lang, QString std_type)
+{
+ TSqlQuery query;
+ std::string toSearch, replaceStr;
+
+ std::string year = QDateTime::currentDateTime().toString("yyyy").toStdString();
+ std::string y = "{{YYYY}}";
+ std::string month = QDateTime::currentDateTime().toString("MM").toStdString();
+ std::string m = "{{MM}}";
+
+ size_t pos2 = data.find(y);
+ // Repeat till end is reached
+ while( pos2 != std::string::npos)
+ {
+ // Replace this occurrence of Sub String
+ data.replace(pos2, y.size(), year);
+ // Get the next occurrence from the current position
+ pos2 =data.find(y, pos2 + y.size());
+ }
+ pos2 = data.find(m);
+ // Repeat till end is reached
+ while( pos2 != std::string::npos)
+ {
+ // Replace this occurrence of Sub String
+ data.replace(pos2, m.size(), month);
+ // Get the next occurrence from the current position
+ pos2 =data.find(m, pos2 + m.size());
+ }
+
+ if( lang.compare("de_DE") == 0 )
+ {
+ query.prepare("SELECT std_attr, std_val_de FROM public.app_vars WHERE std_type = ? AND active = 1");
+ }
+ else
+ {
+ query.prepare("SELECT std_attr, std_val_en FROM public.app_vars WHERE std_type = ? AND active = 1");
+ }
+ // SELECT id, std_type, std_attr, std_val_de, std_val_en, active FROM public.app_vars;
+ query.addBindValue(std_type);
+
+ query.exec();
+
+ while (query.next())
+ {
+ toSearch = "{{" + query.value(0).toString().toStdString() + "}}";
+ replaceStr = query.value(1).toString().toStdString();
+
+ // Get the first occurrence
+ size_t pos = data.find(toSearch);
+ // Repeat till end is reached
+ while( pos != std::string::npos)
+ {
+ // Replace this occurrence of Sub String
+ data.replace(pos, toSearch.size(), replaceStr);
+ // Get the next occurrence from the current position
+ pos =data.find(toSearch, pos + replaceStr.size());
+ }
+ }
+}
+
+QJsonArray AnnexData::sqlGet_crObjCatalog(bool doToc, QMap outList)
+{
+ TSqlQuery query;
+ QJsonObject jsonObject;
+ QJsonArray jsonArray;
+ QString msg, id, lang;
+
+ QMapIterator i(outList);
+ while(i.hasNext())
+ {
+ i.next();
+ id = i.value();
+
+ if(doToc == false)
+ {
+ query.prepare("SELECT annex_data.id, lfdnr, spec_title, spec_desc, spec_version, spec_release, obj_sname, ac_classes, pc_classes, cat_class, country, lang, spec_active, spec_created, spec_last_modified, spec_valid_start, spec_valid_end, last_editor, g_legacy, responsibility, spec_comment, spec_marker, groups FROM annex_data INNER JOIN annex_meta ON annex_meta.spec_data_id = annex_data.id WHERE annex_data.id = ?");
+ query.addBindValue(id);
+ }
+ else
+ {
+ query.prepare("SELECT annex_data.id, spec_title, spec_content, cat_class FROM annex_data WHERE annex_data.id = ?");
+ query.addBindValue(id);
+ }
+
+ if(!query.exec())
+ {
+ msg = query.lastError().text();
+ jsonObject["errMsg"] = msg;
+ jsonObject["ERROR"] = "1";
+ jsonArray.append(jsonObject);
+ }
+
+ while (query.next())
+ {
+ if(doToc == false)
+ {
+ jsonObject["id"] = query.value(0).toString();
+ jsonObject["lfdnr"] = query.value(1).toString();
+ jsonObject["spec_title"] = query.value(2).toString();
+ jsonObject["spec_desc"] = query.value(3).toString();
+ jsonObject["spec_version"] = query.value(4).toString();
+ jsonObject["spec_release"] = query.value(5).toString();
+ jsonObject["obj_sname"] = query.value(6).toString();
+ jsonObject["ac_classes"] = query.value(7).toString();
+ jsonObject["pc_classes"] = query.value(8).toString();
+ jsonObject["cat_class"] = query.value(9).toString();
+ jsonObject["country"] = query.value(10).toString();
+ jsonObject["lang"] = query.value(11).toString();
+ lang = query.value(11).toString();
+ jsonObject["spec_active"] = query.value(12).toString();
+ jsonObject["spec_created"] = query.value(13).toString();
+ jsonObject["spec_last_modified"] = query.value(14).toString();
+ jsonObject["spec_valid_start"] = query.value(15).toString();
+ jsonObject["spec_valid_end"] = query.value(16).toString();
+ jsonObject["last_editor"] = query.value(17).toString();
+ jsonObject["g_legacy"] = query.value(18).toString();
+ jsonObject["responsibility"] = query.value(19).toString();
+ jsonObject["spec_comment"] = query.value(20).toString();
+ jsonObject["spec_marker"] = query.value(21).toString();
+ jsonObject["groups"] = query.value(22).toString();
+
+ jsonObject["comments_count"] = QString::number( AnnexDataComments::getSpecsCommentsCount(id.toInt() ));
+
+ jsonArray.append(jsonObject);
+ }
+ else
+ {
+ jsonObject["id"] = query.value(0).toString();
+ jsonObject["spec_title"] = query.value(1).toString();
+ jsonObject["cat_class"] = query.value(3).toString();
+
+ //jsonObject["spec_content"] = query.value(2).toString();
+ std::string erg = query.value(2).toString().toStdString();
+ findAndReplaceAll(erg, lang, "standard");
+ std::string line = erg.c_str();
+
+ std::regex reg1("()(.{0,100})()", std::regex_constants::icase);
+ std::smatch match1;
+
+ std::regex reg2("()(.{0,100})()", std::regex_constants::icase);
+ std::smatch match2;
+
+ std::regex reg3("()(.{0,100})()", std::regex_constants::icase);
+ std::smatch match3;
+
+ std::regex reg4("()(.{0,100})(
)", std::regex_constants::icase);
+ std::smatch match4;
+
+ QString toc;
+ std::string ahref1 = ".{0,100})|(.{0,100})|(.{0,100}))", std::regex_constants::icase);
+ std::sregex_iterator next(line.begin(), line.end(), re);
+ std::sregex_iterator end;
+ while (next != end)
+ {
+ std::smatch match = *next;
+ //std::cout << "MATCH: " << match.str() << "\n";
+ std::string item = match.str();
+
+ if(std::regex_search(item, match1, reg1))
+ {
+ std::string to = match1.str();
+
+ std::regex style_re("( style=\"[a-z]*-?[a-z]*:[a-z]*;\")");
+ to = regex_replace(to, style_re, "");
+
+ std::regex vowel_re("()|(
)");
+ to = regex_replace(to, vowel_re, "");
+ to = ahref1 + query.value(0).toString().toStdString() + class1 + ahref2 + to + ahref3;
+ toc.append(to.c_str());
+ next++;
+ continue;
+ }
+ if(std::regex_search(item, match2, reg2))
+ {
+ std::string to = match2.str();
+
+ std::regex style_re("( style=\"[a-z]*-?[a-z]*:[a-z]*;\")");
+ to = regex_replace(to, style_re, "");
+
+ std::regex vowel_re("()|(
)");
+ to = regex_replace(to, vowel_re, "");
+ to = ahref1 + query.value(0).toString().toStdString() + class2 + ahref2 + to + ahref3;
+ toc.append(to.c_str());
+ next++;
+ continue;
+ }
+ if(std::regex_search(item, match3, reg3))
+ {
+ std::string to = match3.str();
+
+ std::regex style_re("( style=\"[a-z]*-?[a-z]*:[a-z]*;\")");
+ to = regex_replace(to, style_re, "");
+
+ std::regex vowel_re("()|(
)");
+ to = regex_replace(to, vowel_re, "");
+ to = ahref1 + query.value(0).toString().toStdString() + class3 + ahref2 + to + ahref3;
+ toc.append(to.c_str());
+ next++;
+ continue;
+ }
+ if(std::regex_search(item, match4, reg4))
+ {
+ std::string to = match4.str();
+
+ std::regex style_re("( style=\"[a-z]*-?[a-z]*:[a-z]*;\")");
+ to = regex_replace(to, style_re, "");
+
+ std::regex vowel_re("()|(
)");
+ to = regex_replace(to, vowel_re, "");
+ to = ahref1 + query.value(0).toString().toStdString() + class4 + ahref2 + to + ahref3;
+ toc.append(to.c_str());
+ next++;
+ continue;
+ }
+
+ next++;
+ }
+ jsonObject["toc"] = toc;
+ toc = "";
+ }
+ catch (std::regex_error& e)
+ {
+ //std::cout << "Syntax error in the regular expression" << std::endl;
+ }
+
+ jsonArray.append(jsonObject);
+
+ }
+ }
+ }
+ return jsonArray;
+}
+
+QMap AnnexData::checkObjCatalog(QMap wwList, QMap localList)
+{
+ QMapIterator i(localList);
+ while (i.hasNext())
+ {
+ i.next();
+ if(localList.contains(i.key()))
+ {
+ wwList[i.key()] = localList[i.key()];
+ }
+ }
+
+ return wwList;
+}
+
+QMap AnnexData::sqlObjCatalog(QString name, QString ac, QString pc, QString country, QString lang, QString cat, QString spec_active, QString release)
+{
+ TSqlQuery query;
+
+ QString msg, obj_name, ac_classes, pc_classes;
+ QMap inList;
+
+ obj_name = "%" + name + "%";
+ ac_classes = "%" + ac + "%";
+ pc_classes = "%" + pc + "%";
+
+ query.prepare("select lfdnr, id from annex_data where obj_sname LIKE ? and ac_classes LIKE ? and pc_classes LIKE ? and lang = ? and country = ? and cat_class = ? AND spec_active = ? AND (spec_release = ? or spec_release = 'pre-release') order by lfdnr");
+ query.addBindValue(obj_name);
+ query.addBindValue(ac_classes);
+ query.addBindValue(pc_classes);
+ query.addBindValue(lang);
+ query.addBindValue(country);
+ query.addBindValue(cat);
+ query.addBindValue(spec_active);
+ query.addBindValue(release);
+
+ if(!query.exec())
+ {
+ msg = query.lastError().text();
+ qWarning("ERROR: " + msg.toUtf8());
+ //tDebug(msg.toUtf8());
+ }
+
+ while (query.next())
+ {
+ /*msg = "sqlObjCatalog: " + query.value(0).toString() + " " + query.value(1).toString();
+ tDebug(msg.toUtf8()); */
+ inList.insert(query.value(0).toString(),query.value(1).toString());
+ }
+
+ return inList;
+}
+
+QJsonArray AnnexData::listObjCatalog(bool doToc, QMap editMap)
+{
+ QMap localList, wwList, outList;
+ QJsonArray array, tomerge;
+
+ // General
+ if(editMap["obj_sname"].compare("General") == 0)
+ {
+
+ wwList.clear(); localList.clear(); outList.clear();
+ localList= AnnexData::sqlObjCatalog("General", "0", "0", editMap["country"], editMap["lang"], "General", editMap["spec_active"], editMap["spec_release"]);
+ wwList = AnnexData::sqlObjCatalog("General", "0", "0", "WW", editMap["lang"], "General", editMap["spec_active"], editMap["spec_release"]);
+
+ outList = AnnexData::checkObjCatalog(wwList, localList);
+ return AnnexData::sqlGet_crObjCatalog(doToc, outList);
+ }
+
+ if(editMap["cat_sname_en"].compare("General") == 0)
+ {
+ wwList.clear(); localList.clear(); outList.clear();
+ localList= AnnexData::sqlObjCatalog(editMap["obj_sname"], "0", "0", editMap["country"], editMap["lang"], "General", editMap["spec_active"], editMap["spec_release"]);
+ wwList = AnnexData::sqlObjCatalog(editMap["obj_sname"], "0", "0", "WW", editMap["lang"], "General", editMap["spec_active"], editMap["spec_release"]);
+ outList = AnnexData::checkObjCatalog(wwList, localList);
+ array = AnnexData::sqlGet_crObjCatalog(doToc, outList);
+
+ wwList.clear(); localList.clear(); outList.clear();
+ localList= AnnexData::sqlObjCatalog(editMap["obj_sname"], editMap["ac_class"], editMap["pc_class"], editMap["country"], editMap["lang"], "General", editMap["spec_active"], editMap["spec_release"]);
+ wwList = AnnexData::sqlObjCatalog(editMap["obj_sname"], editMap["ac_class"], editMap["pc_class"], "WW", editMap["lang"], "General", editMap["spec_active"], editMap["spec_release"]);
+ outList = AnnexData::checkObjCatalog(wwList, localList);
+ tomerge = AnnexData::sqlGet_crObjCatalog(doToc, outList);
+
+ for(int i = 0; i < tomerge.size(); i++)
+ {
+ array.append(tomerge[i]);
+ }
+ return array;
+ }
+ else
+ {
+ // Cat
+ wwList.clear(); localList.clear(); outList.clear();
+ localList= AnnexData::sqlObjCatalog(editMap["obj_sname"], editMap["ac_class"], editMap["pc_class"], editMap["country"], editMap["lang"], editMap["cat_sname_en"], editMap["spec_active"], editMap["spec_release"]);
+ wwList = AnnexData::sqlObjCatalog(editMap["obj_sname"], editMap["ac_class"], editMap["pc_class"], "WW", editMap["lang"], editMap["cat_sname_en"], editMap["spec_active"], editMap["spec_release"]);
+ outList = AnnexData::checkObjCatalog(wwList, localList);
+ return AnnexData::sqlGet_crObjCatalog(doToc, outList);
+ }
+}
+
+QJsonArray AnnexData::doReleased(QMap editMap)
+{
+ TSqlQuery query;
+ QJsonObject jsonObj;
+ QJsonArray array;
+ QString msg;
+ int id = editMap["release_id"].toInt();
+
+ //obj_sname, spec_version, ac_classes, pc_classes, cat_class, country, lang, doc_type, rel_requester, relrequest_date, rel_creator, relcreator_decisdate, rel_inspector, relinspect_decisdate, rel_approver, relapprov_decisdate, ci_date, cd_date, cdd_date)
+
+ //query.prepare("INSERT INTO public.release_mgmt(obj_sname, ac_classes, pc_classes, cat_class, country, lang, doc_type, rel_requester, relrequest_date) VALUES (?, ?, ?, ?, ?, ?, ?, ?, now())");
+ query.prepare("UPDATE public.release_mgmt SET rel_creator=?, relcreator_decisdate=now() WHERE id=?");
+ query.addBindValue(editMap["rel_creator"]);
+ query.addBindValue(id);
+
+ if(!query.exec())
+ {
+ msg = query.lastError().text();
+ jsonObj["ERROR"] = "1";
+ jsonObj["errMsg"] = msg;
+ tError(msg.toUtf8());
+
+ array.append(jsonObj);
+ return array;
+ }
+ else
+ {
+ jsonObj["ERROR"] = "0";
+ jsonObj["errMsg"] = "Release eingestellt";
+ jsonObj["last_id"] = query.lastInsertId().toInt();
+ }
+
+ array.append(jsonObj);
+ return array;
+}
+
+QJsonArray AnnexData::upReleased(int id)
+{
+ TSqlQuery query;
+ QJsonObject jsonObj;
+ QJsonArray array;
+ QString msg;
+
+ query.prepare("UPDATE public.annex_data SET spec_release='released' WHERE id = ?");
+ query.addBindValue(id);
+
+ if(!query.exec())
+ {
+ msg = query.lastError().text();
+ jsonObj["ERROR"] = "1";
+ jsonObj["errMsg"] = "upReleased : " + msg;
+ jsonObj["query"] = query.lastQuery();
+ msg = "upReleased : ";
+ msg.append(msg);
+ msg.append(" : ");
+ msg.append(query.lastQuery());
+ tError(msg.toUtf8());
+
+ array.append(jsonObj);
+ return array;
+ }
+ else
+ {
+ jsonObj["ERROR"] = "0";
+ jsonObj["errMsg"] = "Datensatz aktualisiert";
+
+ array.append(jsonObj);
+ }
+
+ return array;
+}
+
+QJsonArray AnnexData::doPreRelease(QMap editMap)
+{
+ TSqlQuery query;
+ QJsonObject jsonObj;
+ QJsonArray array;
+ QString msg;
+
+ //obj_sname, spec_version, ac_classes, pc_classes, cat_class, country, lang, doc_type, rel_requester, relrequest_date, rel_creator, relcreator_decisdate, rel_inspector, relinspect_decisdate, rel_approver, relapprov_decisdate, ci_date, cd_date, cdd_date)
+
+ query.prepare("INSERT INTO public.release_mgmt(obj_sname, ac_classes, pc_classes, cat_class, country, lang, doc_type, rel_requester, relrequest_date) VALUES (?, ?, ?, ?, ?, ?, ?, ?, now())");
+ query.addBindValue(editMap["obj_sname"]);
+ query.addBindValue(editMap["ac_classes"]);
+ query.addBindValue(editMap["pc_classes"]);
+ query.addBindValue(editMap["cat_class"]);
+ query.addBindValue(editMap["country"]);
+ query.addBindValue(editMap["lang"]);
+ query.addBindValue(editMap["doc_type"]);
+ query.addBindValue(editMap["rel_requester"]);
+ //query.addBindValue(editMap["relrequest_date"]);
+
+ if(!query.exec())
+ {
+ msg = query.lastError().text();
+ jsonObj["ERROR"] = "1";
+ jsonObj["errMsg"] = msg;
+ tError(msg.toUtf8());
+
+ array.append(jsonObj);
+ return array;
+ }
+ else
+ {
+ jsonObj["ERROR"] = "0";
+ jsonObj["errMsg"] = "Pre-Release eingestellt";
+ jsonObj["last_id"] = query.lastInsertId().toInt();
+ }
+
+ array.append(jsonObj);
+ return array;
+}
+
+QJsonArray AnnexData::upPrelease(int id)
+{
+ TSqlQuery query;
+ QJsonObject jsonObj;
+ QJsonArray array;
+ QString msg;
+
+ query.prepare("UPDATE public.annex_data SET spec_release='pre-release' WHERE id = ?");
+ query.addBindValue(id);
+
+ if(!query.exec())
+ {
+ msg = query.lastError().text();
+ jsonObj["ERROR"] = "1";
+ jsonObj["errMsg"] = "upPrelease : " + msg;
+ jsonObj["query"] = query.lastQuery();
+ msg = "upPrelease : ";
+ msg.append(msg);
+ msg.append(" : ");
+ msg.append(query.lastQuery());
+ tError(msg.toUtf8());
+
+ array.append(jsonObj);
+ return array;
+ }
+ else
+ {
+ jsonObj["ERROR"] = "0";
+ jsonObj["errMsg"] = "Datensatz aktualisiert";
+
+ array.append(jsonObj);
+ }
+
+ return array;
+}
+
+QJsonArray AnnexData::updAnnexData(QMap editMap)
+{
+ TSqlQuery query;
+ QJsonObject jsonObj;
+ QJsonArray array;
+ QString msg;
+
+ editMap["country"] = editMap["country"].toUpper();
+
+ if(editMap["lfdnr"].count() < 2)
+ {
+ editMap["lfdnr"] = "00" + editMap["lfdnr"];
+ }
+ else if(editMap["lfdnr"].count() < 3)
+ {
+ editMap["lfdnr"] = "0" + editMap["lfdnr"];
+ }
+
+ //QString searchtxt = "{{page-break}}
";
+ QRegularExpression re("{{page-break}}
");
+ QRegularExpressionMatchIterator i = re.globalMatch(editMap["spec_content"]);
+ while (i.hasNext())
+ {
+ QRegularExpressionMatch match = i.next();
+ editMap["spec_content"].replace(re, "{{page-break}}");
+ }
+
+ query.prepare("UPDATE public.annex_data SET id=?, lfdnr=?, spec_title=?, spec_desc=?, spec_version=?, spec_release=?, obj_sname=?, ac_classes=?, pc_classes=?, cat_class=?, country=?, lang=?, spec_content=?, spec_active=? WHERE id = ?");
+
+ query.addBindValue(editMap["id"]);
+ query.addBindValue(editMap["lfdnr"]);
+ query.addBindValue(editMap["spec_title"]);
+ query.addBindValue(editMap["spec_desc"]);
+ query.addBindValue(editMap["spec_version_new"]);
+ query.addBindValue(editMap["spec_release"]);
+ query.addBindValue(editMap["obj_sname"]);
+ query.addBindValue(editMap["ac_classes"]);
+ query.addBindValue(editMap["pc_classes"]);
+ query.addBindValue(editMap["cat_class"]);
+ query.addBindValue(editMap["country"]);
+ query.addBindValue(editMap["lang"]);
+ query.addBindValue(editMap["spec_content"]);
+ query.addBindValue(editMap["spec_active"]);
+ query.addBindValue(editMap["id"]);
+
+ if(!query.exec())
+ {
+ msg = query.lastError().text();
+ jsonObj["ERROR"] = "1";
+ jsonObj["errMsg"] = msg;
+ jsonObj["query"] = query.lastQuery();
+ msg = "setObjSpecs : ";
+ msg.append(msg);
+ msg.append(" : ");
+ msg.append(query.lastQuery());
+ tError(msg.toUtf8());
+
+ array.append(jsonObj);
+ return array;
+ }
+
+ query.prepare("UPDATE public.annex_meta SET spec_last_modified=?, spec_valid_start=?, spec_valid_end=?, last_editor=?, g_legacy=?, responsibility=?, spec_comment=?, spec_marker=? WHERE spec_data_id = ?");
+
+ query.addBindValue(editMap["spec_valid_start"]);
+ query.addBindValue(editMap["spec_valid_start"]);
+ query.addBindValue(editMap["spec_valid_end"]);
+ query.addBindValue(editMap["last_editor"]);
+ query.addBindValue(editMap["g_legacy"]);
+ query.addBindValue(editMap["resp"]);
+ query.addBindValue(editMap["comment"]);
+ query.addBindValue(editMap["marker"]);
+ query.addBindValue(editMap["id"]);
+
+ if(!query.exec())
+ {
+ msg = query.lastError().text();
+ jsonObj["ERROR"] = "1";
+ jsonObj["errMsg"] = msg;
+ jsonObj["query"] = query.lastQuery();
+ msg = "updStdData : ";
+ msg.append(msg);
+ msg.append(" : ");
+ msg.append(query.lastQuery());
+ tError(msg.toUtf8());
+
+ array.append(jsonObj);
+ return array;
+ }
+ else
+ {
+ jsonObj["ERROR"] = "0";
+ jsonObj["errMsg"] = "Datensatz aktualisiert";
+ jsonObj["data_id"] = editMap["id"];
+ }
+
+ array.append(jsonObj);
+ return array;
+}
+
+QJsonArray AnnexData::setAnnexData(QMap editMap)
+{
+ TSqlQuery query;
+ QJsonObject jsonObj;
+ QJsonArray jsonArr;
+ QString msg;
+
+ editMap["country"] = editMap["country"].toUpper();
+
+ if(editMap["lfdnr"].count() < 2)
+ {
+ editMap["lfdnr"] = "00" + editMap["lfdnr"];
+ }
+ else if(editMap["lfdnr"].count() < 3)
+ {
+ editMap["lfdnr"] = "0" + editMap["lfdnr"];
+ }
+
+ query.prepare("INSERT INTO annex_data(lfdnr, spec_title, spec_desc, spec_version, spec_release, obj_sname, ac_classes, pc_classes, cat_class, country, lang, spec_content, spec_active) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)");
+
+ query.addBindValue(editMap["lfdnr"]);
+ query.addBindValue(editMap["spec_title"]);
+ query.addBindValue(editMap["spec_desc"]);
+ query.addBindValue(editMap["spec_version"]);
+ query.addBindValue(editMap["spec_release"]);
+ query.addBindValue(editMap["obj_sname"]);
+ query.addBindValue(editMap["ac_classes"]);
+ query.addBindValue(editMap["pc_classes"]);
+ query.addBindValue(editMap["cat_class"]);
+ query.addBindValue(editMap["country"]);
+ query.addBindValue(editMap["lang"]);
+ query.addBindValue(editMap["spec_content"]);
+ query.addBindValue(editMap["spec_active"]);
+
+ if(!query.exec())
+ {
+ msg = query.lastError().text();
+ jsonObj["ERROR"] = "1";
+ jsonObj["errMsg"] = msg;
+ jsonObj["query"] = query.lastQuery();
+ msg = "setObjSpecs : ";
+ msg.append(msg);
+ msg.append(" : ");
+ msg.append(query.lastQuery());
+ tError(msg.toUtf8());
+
+ jsonArr.append(jsonObj);
+ return jsonArr;
+ }
+
+ int last_id = query.lastInsertId().toInt();
+
+ query.prepare("INSERT INTO annex_meta(spec_data_id, spec_created, spec_last_modified, spec_valid_start, spec_valid_end, last_editor, g_legacy, responsibility, spec_comment, spec_marker, groups) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)");
+
+ query.addBindValue(last_id);
+ query.addBindValue(editMap["spec_valid_start"]);
+ query.addBindValue(editMap["spec_valid_start"]);
+ query.addBindValue(editMap["spec_valid_start"]);
+ query.addBindValue(editMap["spec_valid_start"]);
+ query.addBindValue(editMap["last_editor"]);
+ query.addBindValue(editMap["g_legacy"]);
+ query.addBindValue(editMap["resp"]);
+ query.addBindValue(editMap["comment"]);
+ query.addBindValue(editMap["marker"]);
+
+ query.addBindValue("{ALL}");
+
+ if(!query.exec())
+ {
+ msg = query.lastError().text();
+ jsonObj["ERROR"] = "1";
+ jsonObj["errMsg"] = msg;
+ jsonObj["query"] = query.lastQuery();
+ msg = "setObjSpecs : ";
+ msg.append(msg);
+ msg.append(" : ");
+ msg.append(query.lastQuery());
+ tError(msg.toUtf8());
+
+ jsonArr.append(jsonObj);
+ return jsonArr;
+ }
+ else
+ {
+ jsonObj["ERROR"] = "0";
+ jsonObj["errMsg"] = "Datensatz eingefügt";
+ jsonObj["last_data_id"] = last_id;
+ jsonObj["last_meta_id"] = query.lastInsertId().toInt();
+ }
+
+ jsonArr.append(jsonObj);
+ return jsonArr;
+}
+
+QJsonArray AnnexData::getAnnexToc(QMap &stdDataMap)
+{
+ QJsonObject jsonObject, jsonObjContent;
+ QJsonValue jsonObjVal;
+ QJsonArray jsonArr;
+
+ QString obj_sname = stdDataMap["obj_sname"];
+
+ stdDataMap["obj_sname"] = "General";
+ foreach (const QJsonValue & value, AnnexData::listObjCatalog(true, stdDataMap) )
+ {
+ jsonObjContent = value.toObject();
+ jsonObject["obj_sname"] = stdDataMap["obj_sname"];
+
+ jsonObjVal = jsonObjContent.value(QString("cat_class"));
+ jsonObject["cat_class"] = jsonObjVal;
+
+ jsonObjVal = jsonObjContent.value(QString("id"));
+ jsonObject["id"] = jsonObjVal;
+
+ jsonObjVal = jsonObjContent.value(QString("spec_title"));
+ jsonObject["spec_title"] = jsonObjVal;
+
+ jsonObjVal = jsonObjContent.value(QString("toc"));
+ jsonObject["toc"] = jsonObjVal;
+
+ jsonArr.append(jsonObject);
+ }
+
+ stdDataMap["obj_sname"] = obj_sname;
+ foreach (const QJsonValue & value, CatClasses::getAllJson("1", "category"))
+ {
+ QJsonObject objclass = value.toObject();
+ QJsonValue obj_class_name = objclass.value(QString("cat_sname_en"));
+ if(obj_class_name.toString().compare("") == 1 )
+ {
+ stdDataMap["cat_sname_en"] = obj_class_name.toString();
+ foreach (const QJsonValue & value, AnnexData::listObjCatalog(true, stdDataMap) )
+ {
+ jsonObjContent = value.toObject();
+ jsonObject["obj_sname"] = stdDataMap["obj_sname"];
+
+ jsonObjVal = jsonObjContent.value(QString("cat_class"));
+ jsonObject["cat_class"] = jsonObjVal;
+
+ jsonObjVal = jsonObjContent.value(QString("id"));
+ jsonObject["id"] = jsonObjVal;
+
+ jsonObjVal = jsonObjContent.value(QString("spec_title"));
+ jsonObject["spec_title"] = jsonObjVal;
+
+ jsonObjVal = jsonObjContent.value(QString("toc"));
+ jsonObject["toc"] = jsonObjVal;
+
+ jsonArr.append(jsonObject);
+ }
+ }
+ }
+
+ //return StandardsData::listObjCatalog(true, stdDataMap);
+ return jsonArr;
+}
+
+QJsonArray AnnexData::getAnnexShow(QMap &stdDataMap)
+{
+ return AnnexData::listObjCatalog(false, stdDataMap);
+}
+
+QJsonArray AnnexData::getAnnexList(QMap &stdDataMap)
+{
+ TSqlQuery query;
+ QJsonObject jsonObject;
+ QJsonArray jsonArray;
+ QString msg, obj_sname, ac_class, pc_class, id;
+
+ obj_sname = "%" + stdDataMap["obj_sname"] + "%";
+ ac_class = "%" + stdDataMap["ac_class"] + "%";
+ pc_class = "%" + stdDataMap["pc_class"] + "%";
+
+ query.prepare("SELECT annex_data.id, lfdnr, spec_title, spec_desc, spec_version, spec_release, obj_sname, ac_classes, pc_classes, cat_class, country, lang, spec_active, spec_created, spec_last_modified, spec_valid_start, spec_valid_end, last_editor, g_legacy, responsibility, spec_comment, spec_marker, groups FROM annex_data INNER JOIN annex_meta ON annex_meta.spec_data_id = annex_data.id WHERE obj_sname like ? AND cat_class = ? AND country = ? AND lang = ? AND spec_active = ? AND ac_classes like ? AND pc_classes like ? AND spec_release = ? order by lfdnr");
+ //query.prepare("SELECT annex_data.id, lfdnr, spec_title, spec_desc, spec_version, spec_release, obj_sname, ac_classes, pc_classes, cat_class, country, lang, spec_active, spec_created, spec_last_modified, spec_valid_start, spec_valid_end, last_editor, g_legacy, responsibility, spec_comment, spec_marker, groups FROM annex_data INNER JOIN annex_meta ON annex_meta.spec_data_id = annex_data.id WHERE obj_sname like '%Annex D%' AND cat_class = 'Cabling' AND country = 'WW' AND lang = 'de_DE' AND spec_active = 1 AND ac_classes like '%2%' AND pc_classes like '%2%' AND spec_release = 'draft'");
+
+ query.addBindValue(obj_sname);
+ query.addBindValue(stdDataMap["cat_sname_en"]);
+ query.addBindValue(stdDataMap["country"]);
+ query.addBindValue(stdDataMap["lang"]);
+ query.addBindValue(stdDataMap["spec_active"]);
+ query.addBindValue(ac_class);
+ query.addBindValue(pc_class);
+ query.addBindValue(stdDataMap["spec_release"]);
+
+ if(!query.exec())
+ {
+ msg = query.lastError().text();
+ jsonObject["errMsg"] = msg;
+ jsonObject["ERROR"] = "1";
+ jsonArray.append(jsonObject);
+
+ return jsonArray;
+ }
+
+ while (query.next())
+ {
+ id = query.value(0).toString();
+ jsonObject["id"] = query.value(0).toString();
+ jsonObject["lfdnr"] = query.value(1).toString();
+ jsonObject["spec_title"] = query.value(2).toString();
+ jsonObject["spec_desc"] = query.value(3).toString();
+ jsonObject["spec_version"] = query.value(4).toString();
+ jsonObject["spec_release"] = query.value(5).toString();
+ jsonObject["obj_sname"] = query.value(6).toString();
+ jsonObject["ac_classes"] = query.value(7).toString();
+ jsonObject["pc_classes"] = query.value(8).toString();
+ jsonObject["cat_class"] = query.value(9).toString();
+ jsonObject["country"] = query.value(10).toString();
+ jsonObject["lang"] = query.value(11).toString();
+ jsonObject["spec_active"] = query.value(12).toString();
+ jsonObject["spec_created"] = query.value(13).toString();
+ jsonObject["spec_last_modified"] = query.value(14).toString();
+ jsonObject["spec_valid_start"] = query.value(15).toString();
+ jsonObject["spec_valid_end"] = query.value(16).toString();
+ jsonObject["last_editor"] = query.value(17).toString();
+ jsonObject["g_legacy"] = query.value(18).toString();
+ jsonObject["responsibility"] = query.value(19).toString();
+ jsonObject["spec_comment"] = query.value(20).toString();
+ jsonObject["spec_marker"] = query.value(21).toString();
+ jsonObject["groups"] = query.value(22).toString();
+
+ jsonArray.append(jsonObject);
+ }
+
+ return jsonArray;
+}
+
+QJsonArray AnnexData::getExistCountries()
+{
+ TSqlQuery query;
+ QJsonObject jsonObject;
+ QJsonArray jsonArray;
+ QString msg;
+
+ query.prepare("SELECT DISTINCT(country) FROM public.annex_data ORDER BY country");
+
+ if(!query.exec())
+ {
+ msg = query.lastError().text();
+ jsonObject["errMsg"] = msg;
+ jsonObject["ERROR"] = "1";
+ jsonArray.append(jsonObject);
+ }
+
+ while (query.next())
+ {
+ jsonObject["country"] = query.value(0).toString();
+ jsonArray.append(jsonObject);
+ }
+ return jsonArray;
+}
+
+QJsonArray AnnexData::getHighestLfdnr(const QString &category)
+{
+ TSqlQuery query;
+ QJsonObject jsonObject;
+ QJsonArray jsonArray;
+ QString msg;
+
+ query.prepare("SELECT MAX(lfdnr) FROM public.annex_data WHERE cat_class = ?");
+ query.addBindValue(category);
+
+ query.exec();
+ query.next();
+
+ jsonObject["lfdnr"] = query.value(0).toString();
+ jsonObject["cat"] = category;
+ jsonArray.append(jsonObject);
+
+ return jsonArray;
+}
+
+int AnnexData::countCheckLfdnrCat()
+{
+ TSqlQuery query;
+ int counter = 0;
+
+ query.prepare("SELECT id, obj_sname, cat_class, lfdnr, country, lang, spec_title FROM public.annex_data a WHERE not Exists ( SELECT lfdnr FROM public.annex_data c WHERE a.lang != c.lang AND a.cat_class = c.cat_class and a.lfdnr = c.lfdnr) order by (cat_class,lfdnr)");
+
+ query.exec();
+
+ while (query.next())
+ {
+ counter++;
+ }
+
+ return counter;
+}
+
+QJsonArray AnnexData::chkLfdnrEditor(QMap editMap)
+{
+ TSqlQuery query;
+ QJsonObject jsonObject;
+ QJsonArray jsonArray;
+ QString msg;
+
+ query.prepare("SELECT id, lfdnr, spec_title, obj_sname, country, lang FROM public.annex_data WHERE cat_class = ? AND lfdnr = ?");
+ query.addBindValue(editMap["cat_class"]);
+ query.addBindValue(editMap["lfdnr"]);
+
+ if(!query.exec())
+ {
+ msg = query.lastError().text();
+ jsonObject["MSG"] = msg;
+ jsonObject["ERROR"] = "1";
+ jsonArray.append(jsonObject);
+ }
+
+ while (query.next())
+ {
+ jsonObject["id"] = query.value(0).toString();
+ jsonObject["lfdnr"] = query.value(1).toString();
+ jsonObject["spec_title"] = query.value(2).toString();
+ jsonObject["obj_sname"] = query.value(3).toString();
+ jsonObject["country"] = query.value(4).toString();
+ jsonObject["lang"] = query.value(5).toString();
+
+ jsonArray.append(jsonObject);
+ }
+
+ return jsonArray;
+}
+
+QJsonArray AnnexData::getStatistics()
+{
+ TSqlQuery query;
+ QJsonObject jsonObject, jsonObjReleaseTypes;
+ QJsonArray jsonArray, jsonArrReleaseTypes;
+ QString msg;
+ QList releaseTypes;
+
+ // count
+ query.prepare("SELECT count(id) FROM annex_data");
+ query.exec();
+ query.next();
+ jsonObject["count_id"] = query.value(0).toString();
+
+ // active
+ query.prepare("select count(id) from annex_data where spec_active = 1");
+ query.exec();
+ query.next();
+ jsonObject["count_active"] = query.value(0).toString();
+
+ // countries
+ query.prepare("select count(distinct country) from annex_data");
+ query.exec();
+ query.next();
+ jsonObject["count_countries"] = query.value(0).toString();
+
+ // languages
+ query.prepare("select count(lang) from annex_data where lang = 'de_DE'");
+ query.exec();
+ query.next();
+ jsonObject["count_language_de"] = query.value(0).toString();
+ query.prepare("select count(lang) from annex_data where lang = 'en_GB'");
+ query.exec();
+ query.next();
+ jsonObject["count_language_en"] = query.value(0).toString();
+
+ // waste
+ query.prepare("select count(id) from annex_data_waste");
+ query.exec();
+ query.next();
+ jsonObject["count_Annexwaste"] = query.value(0).toString();
+
+ // releases
+ query.prepare("SELECT std_attr FROM std_system WHERE std_type = 'release_types' ORDER BY sort");
+ query.exec();
+ while (query.next())
+ {
+ releaseTypes.append(query.value(0).toString());
+ }
+
+ QList::iterator i;
+ for (i = releaseTypes.begin(); i != releaseTypes.end(); ++i)
+ {
+ query.prepare("select count(spec_release) from annex_data where spec_release = ?");
+ query.addBindValue(*i);
+ query.exec();
+ query.next();
+ jsonObjReleaseTypes["release_type"] = *i;
+ jsonObjReleaseTypes["count_release_type"] = query.value(0).toString();
+ jsonArrReleaseTypes.append(jsonObjReleaseTypes);
+ }
+
+ jsonObject["countCheckLfdnrCat"] = QString::number( AnnexData::countCheckLfdnrCat() );
+
+ jsonArray.append(jsonObject);
+ jsonArray.append(jsonArrReleaseTypes);
+
+ return jsonArray;
+}
+
+int AnnexData::id() const
+{
+ return d->id;
+}
+
+QString AnnexData::lfdnr() const
+{
+ return d->lfdnr;
+}
+
+void AnnexData::setLfdnr(const QString &lfdnr)
+{
+ d->lfdnr = lfdnr;
+}
+
+QString AnnexData::specTitle() const
+{
+ return d->spec_title;
+}
+
+void AnnexData::setSpecTitle(const QString &specTitle)
+{
+ d->spec_title = specTitle;
+}
+
+QString AnnexData::specDesc() const
+{
+ return d->spec_desc;
+}
+
+void AnnexData::setSpecDesc(const QString &specDesc)
+{
+ d->spec_desc = specDesc;
+}
+
+QString AnnexData::specVersion() const
+{
+ return d->spec_version;
+}
+
+void AnnexData::setSpecVersion(const QString &specVersion)
+{
+ d->spec_version = specVersion;
+}
+
+QString AnnexData::specRelease() const
+{
+ return d->spec_release;
+}
+
+void AnnexData::setSpecRelease(const QString &specRelease)
+{
+ d->spec_release = specRelease;
+}
+
+QString AnnexData::objSname() const
+{
+ return d->obj_sname;
+}
+
+void AnnexData::setObjSname(const QString &objSname)
+{
+ d->obj_sname = objSname;
+}
+
+QString AnnexData::acClasses() const
+{
+ return d->ac_classes;
+}
+
+void AnnexData::setAcClasses(const QString &acClasses)
+{
+ d->ac_classes = acClasses;
+}
+
+QString AnnexData::pcClasses() const
+{
+ return d->pc_classes;
+}
+
+void AnnexData::setPcClasses(const QString &pcClasses)
+{
+ d->pc_classes = pcClasses;
+}
+
+QString AnnexData::catClass() const
+{
+ return d->cat_class;
+}
+
+void AnnexData::setCatClass(const QString &catClass)
+{
+ d->cat_class = catClass;
+}
+
+QString AnnexData::country() const
+{
+ return d->country;
+}
+
+void AnnexData::setCountry(const QString &country)
+{
+ d->country = country;
+}
+
+QString AnnexData::lang() const
+{
+ return d->lang;
+}
+
+void AnnexData::setLang(const QString &lang)
+{
+ d->lang = lang;
+}
+
+QByteArray AnnexData::specContent() const
+{
+ return d->spec_content;
+}
+
+void AnnexData::setSpecContent(const QByteArray &specContent)
+{
+ d->spec_content = specContent;
+}
+
+int AnnexData::specActive() const
+{
+ return d->spec_active;
+}
+
+void AnnexData::setSpecActive(int specActive)
+{
+ d->spec_active = specActive;
+}
+
+AnnexData &AnnexData::operator=(const AnnexData &other)
+{
+ d = other.d; // increments the reference count of the data
+ return *this;
+}
+
+AnnexData AnnexData::create(const QString &lfdnr, const QString &specTitle, const QString &specDesc, const QString &specVersion, const QString &specRelease, const QString &objSname, const QString &acClasses, const QString &pcClasses, const QString &catClass, const QString &country, const QString &lang, const QByteArray &specContent, int specActive)
+{
+ AnnexDataObject obj;
+ obj.lfdnr = lfdnr;
+ obj.spec_title = specTitle;
+ obj.spec_desc = specDesc;
+ obj.spec_version = specVersion;
+ obj.spec_release = specRelease;
+ obj.obj_sname = objSname;
+ obj.ac_classes = acClasses;
+ obj.pc_classes = pcClasses;
+ obj.cat_class = catClass;
+ obj.country = country;
+ obj.lang = lang;
+ obj.spec_content = specContent;
+ obj.spec_active = specActive;
+ if (!obj.create()) {
+ return AnnexData();
+ }
+ return AnnexData(obj);
+}
+
+AnnexData AnnexData::create(const QVariantMap &values)
+{
+ AnnexData model;
+ model.setProperties(values);
+ if (!model.d->create()) {
+ model.d->clear();
+ }
+ return model;
+}
+
+AnnexData AnnexData::get(int id)
+{
+ TSqlORMapper mapper;
+ return AnnexData(mapper.findByPrimaryKey(id));
+}
+
+int AnnexData::count()
+{
+ TSqlORMapper mapper;
+ return mapper.findCount();
+}
+
+QList AnnexData::getAll()
+{
+ return tfGetModelListByCriteria(TCriteria());
+}
+
+QJsonArray AnnexData::getAllJson()
+{
+ QJsonArray array;
+ TSqlORMapper mapper;
+
+ if (mapper.find() > 0) {
+ for (TSqlORMapperIterator i(mapper); i.hasNext(); ) {
+ array.append(QJsonValue(QJsonObject::fromVariantMap(AnnexData(i.next()).toVariantMap())));
+ }
+ }
+ return array;
+}
+
+QJsonArray AnnexData::getAllJsonCi()
+{
+ TSqlQuery query;
+ QJsonObject jsonObject;
+ QJsonArray jsonArray;
+ QString msg;
+
+ query.prepare("select id, obj_sname, spec_title, cat_class,lfdnr, lang, country FROM public.annex_data WHERE spec_release = 'released' group by (id, obj_sname, spec_title, cat_class, lfdnr, lang, country) order by (obj_sname,lfdnr)");
+
+ if(!query.exec())
+ {
+ msg = query.lastError().text();
+ jsonObject["MSG"] = msg;
+ jsonObject["ERROR"] = "1";
+ jsonArray.append(jsonObject);
+ }
+
+ while (query.next())
+ {
+ jsonObject["id"] = query.value(0).toString();
+ jsonObject["obj_sname"] = query.value(1).toString();
+ jsonObject["spec_title"] = query.value(2).toString();
+ jsonObject["cat_class"] = query.value(3).toString();
+ jsonObject["lfdnr"] = query.value(4).toString();
+ jsonObject["lang"] = query.value(5).toString();
+ jsonObject["country"] = query.value(6).toString();
+
+ jsonArray.append(jsonObject);
+ }
+
+ return jsonArray;
+}
+
+TModelObject *AnnexData::modelData()
+{
+ return d.data();
+}
+
+const TModelObject *AnnexData::modelData() const
+{
+ return d.data();
+}
+
+QDataStream &operator<<(QDataStream &ds, const AnnexData &model)
+{
+ auto varmap = model.toVariantMap();
+ ds << varmap;
+ return ds;
+}
+
+QDataStream &operator>>(QDataStream &ds, AnnexData &model)
+{
+ QVariantMap varmap;
+ ds >> varmap;
+ model.setProperties(varmap);
+ return ds;
+}
+
+// Don't remove below this line
+T_REGISTER_STREAM_OPERATORS(AnnexData)
diff --git a/models/annexdata.h b/models/annexdata.h
new file mode 100644
index 0000000..80ef3d6
--- /dev/null
+++ b/models/annexdata.h
@@ -0,0 +1,107 @@
+#ifndef ANNEXDATA_H
+#define ANNEXDATA_H
+
+#include
+#include
+#include
+#include
+#include
+#include
+
+class TModelObject;
+class AnnexDataObject;
+class QJsonArray;
+
+
+class T_MODEL_EXPORT AnnexData : public TAbstractModel
+{
+public:
+ AnnexData();
+ AnnexData(const AnnexData &other);
+ AnnexData(const AnnexDataObject &object);
+ ~AnnexData();
+
+ int id() const;
+ QString lfdnr() const;
+ void setLfdnr(const QString &lfdnr);
+ QString specTitle() const;
+ void setSpecTitle(const QString &specTitle);
+ QString specDesc() const;
+ void setSpecDesc(const QString &specDesc);
+ QString specVersion() const;
+ void setSpecVersion(const QString &specVersion);
+ QString specRelease() const;
+ void setSpecRelease(const QString &specRelease);
+ QString objSname() const;
+ void setObjSname(const QString &objSname);
+ QString acClasses() const;
+ void setAcClasses(const QString &acClasses);
+ QString pcClasses() const;
+ void setPcClasses(const QString &pcClasses);
+ QString catClass() const;
+ void setCatClass(const QString &catClass);
+ QString country() const;
+ void setCountry(const QString &country);
+ QString lang() const;
+ void setLang(const QString &lang);
+ QByteArray specContent() const;
+ void setSpecContent(const QByteArray &specContent);
+ int specActive() const;
+ void setSpecActive(int specActive);
+ AnnexData &operator=(const AnnexData &other);
+
+ bool create() override { return TAbstractModel::create(); }
+ bool update() override { return TAbstractModel::update(); }
+ bool save() override { return TAbstractModel::save(); }
+ bool remove() override { return TAbstractModel::remove(); }
+ static QJsonArray setAnnexData(QMap editMap);
+ static QJsonArray updAnnexData(QMap editMap);
+ static QJsonArray upPrelease(int id);
+ static QJsonArray doPreRelease(QMap editMap);
+ static QJsonArray upReleased(int id);
+ static QJsonArray doReleased(QMap editMap);
+ static void setDraft(int id, QString comment);
+
+ static AnnexData create(const QString &lfdnr, const QString &specTitle, const QString &specDesc, const QString &specVersion, const QString &specRelease, const QString &objSname, const QString &acClasses, const QString &pcClasses, const QString &catClass, const QString &country, const QString &lang, const QByteArray &specContent, int specActive);
+ static AnnexData create(const QVariantMap &values);
+ static AnnexData get(int id);
+ static int count();
+
+ static QList getAll();
+ static QJsonArray getAllJson();
+ static QJsonArray getAllJsonCi();
+ static QJsonArray getStatistics();
+ static QJsonArray getExistCountries();
+ static QJsonArray getAnnexList(QMap &stdDataMap);
+ static QJsonArray getAnnexShow(QMap &stdDataMap);
+ static QJsonArray getAnnexSpec(int &id);
+ static QJsonArray getAnnexToc(QMap &stdDataMap);
+ static void findAndReplaceAll(std::string &data, QString &lang, QString std_type);
+
+ //static QJsonArray listObjCatalog(QMap editMap);
+ static QJsonArray listObjCatalog(bool doToc, QMap editMap);
+ static QMap sqlObjCatalog(QString name, QString ac, QString pc, QString country, QString lang, QString cat, QString spec_active, QString release);
+ static QMap checkObjCatalog(QMap wwList, QMap localList);
+ // static QJsonArray sqlGet_crObjCatalog(QMap outList);
+ static QJsonArray sqlGet_crObjCatalog(bool doToc, QMap outList);
+
+ static int countCheckLfdnrCat();
+ static QJsonArray getHighestLfdnr(const QString &category);
+ static QJsonArray chkLfdnrEditor(QMap editMap);
+
+ static void writeAnnex(QMap &stdDataMap);
+ static void writeAnnexHtml(QMap &stdDataMap);
+
+private:
+ QSharedDataPointer d;
+
+ TModelObject *modelData() override;
+ const TModelObject *modelData() const override;
+ friend QDataStream &operator<<(QDataStream &ds, const AnnexData &model);
+ friend QDataStream &operator>>(QDataStream &ds, AnnexData &model);
+};
+
+Q_DECLARE_METATYPE(AnnexData)
+Q_DECLARE_METATYPE(QList)
+
+#endif // ANNEXDATA_H
diff --git a/models/annexdatacomments.cpp b/models/annexdatacomments.cpp
new file mode 100644
index 0000000..687485d
--- /dev/null
+++ b/models/annexdatacomments.cpp
@@ -0,0 +1,279 @@
+#include
+#include "annexdatacomments.h"
+#include "sqlobjects/annexdatacommentsobject.h"
+
+AnnexDataComments::AnnexDataComments() :
+ TAbstractModel(),
+ d(new AnnexDataCommentsObject())
+{
+ // set the initial parameters
+}
+
+AnnexDataComments::AnnexDataComments(const AnnexDataComments &other) :
+ TAbstractModel(),
+ d(other.d)
+{ }
+
+AnnexDataComments::AnnexDataComments(const AnnexDataCommentsObject &object) :
+ TAbstractModel(),
+ d(new AnnexDataCommentsObject(object))
+{ }
+
+AnnexDataComments::~AnnexDataComments()
+{
+ // If the reference count becomes 0,
+ // the shared data object 'AnnexDataCommentsObject' is deleted.
+}
+
+// #####
+
+int AnnexDataComments::getSpecsCommentsCount(const int &spec_id)
+{
+ TSqlQuery query;
+ QJsonObject jsonObject;
+ QJsonArray jsonArray;
+ QString msg;
+
+ query.prepare("SELECT count(id) FROM public.annex_data_comments WHERE spec_id = ?");
+ query.addBindValue(spec_id);
+
+ query.exec();
+ query.next();
+ return query.value(0).toInt();
+}
+
+QJsonArray AnnexDataComments::getSpecComments(const int &spec_id)
+{
+ TSqlQuery query;
+ QJsonObject jsonObject;
+ QJsonArray jsonArray;
+ QString msg;
+
+ query.prepare("SELECT id, spec_id, user_comment FROM public.annex_data_comments WHERE spec_id = ?");
+ query.addBindValue(spec_id);
+
+ if(!query.exec())
+ {
+ msg = query.lastError().text();
+ jsonObject["errMsg"] = msg;
+ jsonObject["ERROR"] = "1";
+ jsonArray.append(jsonObject);
+ }
+
+ while (query.next())
+ {
+ jsonObject["id"] = query.value(0).toString();
+ jsonObject["spec_id"] = query.value(1).toString();
+ jsonObject["user_comment"] = query.value(2).toString();
+
+ jsonArray.append(jsonObject);
+ }
+
+ return jsonArray;
+}
+
+QMap AnnexDataComments::getStatistics()
+{
+ TSqlQuery query;
+ QMap qmapStatistik;
+
+ // count
+ query.prepare("SELECT count(id) FROM annex_data_comments");
+ query.exec();
+ query.next();
+ qmapStatistik["count_id"] = query.value(0).toString();
+
+ // users
+ query.prepare("SELECT count (distinct username) FROM annex_data_comments");
+ query.exec();
+ query.next();
+ qmapStatistik["count_users"] = query.value(0).toString();
+
+ return qmapStatistik;
+}
+
+int AnnexDataComments::id() const
+{
+ return d->id;
+}
+
+QDateTime AnnexDataComments::commentCreated() const
+{
+ return d->comment_created;
+}
+
+void AnnexDataComments::setCommentCreated(const QDateTime &commentCreated)
+{
+ d->comment_created = commentCreated;
+}
+
+int AnnexDataComments::specId() const
+{
+ return d->spec_id;
+}
+
+void AnnexDataComments::setSpecId(int specId)
+{
+ d->spec_id = specId;
+}
+
+QString AnnexDataComments::specTitle() const
+{
+ return d->spec_title;
+}
+
+void AnnexDataComments::setSpecTitle(const QString &specTitle)
+{
+ d->spec_title = specTitle;
+}
+
+QString AnnexDataComments::specVersion() const
+{
+ return d->spec_version;
+}
+
+void AnnexDataComments::setSpecVersion(const QString &specVersion)
+{
+ d->spec_version = specVersion;
+}
+
+QString AnnexDataComments::userComment() const
+{
+ return d->user_comment;
+}
+
+void AnnexDataComments::setUserComment(const QString &userComment)
+{
+ d->user_comment = userComment;
+}
+
+QString AnnexDataComments::username() const
+{
+ return d->username;
+}
+
+void AnnexDataComments::setUsername(const QString &username)
+{
+ d->username = username;
+}
+
+AnnexDataComments &AnnexDataComments::operator=(const AnnexDataComments &other)
+{
+ d = other.d; // increments the reference count of the data
+ return *this;
+}
+
+QJsonArray AnnexDataComments::createComment(int spec_id, const QString &spec_title, const QString &spec_version, const QString &user_comment, const QString &username)
+{
+ TSqlQuery query;
+ QString msg;
+ QJsonObject jsonObj;
+ QJsonArray jsonArray;
+
+ query.prepare("INSERT INTO public.annex_data_comments(comment_created, spec_id, spec_title, spec_version, user_comment, username) VALUES((:comment_created),(:spec_id),(:spec_title),(:spec_version),(:user_comment),(:username))");
+ query.bindValue(":comment_created", QDateTime::currentDateTime().toString("yyyy-MM-dd HH:mm:ss"));
+ query.bindValue(":spec_id", spec_id);
+ query.bindValue(":spec_title", spec_title);
+ query.bindValue(":spec_version", spec_version);
+ query.bindValue(":user_comment", user_comment);
+ query.bindValue(":username",username);
+
+ if(!query.exec())
+ {
+ msg = query.lastError().text();
+ jsonObj["ERROR"] = "1";
+ jsonObj["errMsg"] = msg;
+ tError("createComment " + msg.toUtf8());
+ }
+ else
+ {
+ jsonObj["ERROR"] = "0";
+ jsonObj["errMsg"] = "Comment added";
+ }
+
+ jsonArray.append(jsonObj);
+ return jsonArray;
+}
+
+AnnexDataComments AnnexDataComments::create(const QDateTime &commentCreated, int specId, const QString &specTitle, const QString &specVersion, const QString &userComment, const QString &username)
+{
+ AnnexDataCommentsObject obj;
+ obj.comment_created = commentCreated;
+ obj.spec_id = specId;
+ obj.spec_title = specTitle;
+ obj.spec_version = specVersion;
+ obj.user_comment = userComment;
+ obj.username = username;
+ if (!obj.create()) {
+ return AnnexDataComments();
+ }
+ return AnnexDataComments(obj);
+}
+
+AnnexDataComments AnnexDataComments::create(const QVariantMap &values)
+{
+ AnnexDataComments model;
+ model.setProperties(values);
+ if (!model.d->create()) {
+ model.d->clear();
+ }
+ return model;
+}
+
+AnnexDataComments AnnexDataComments::get(int id)
+{
+ TSqlORMapper mapper;
+ return AnnexDataComments(mapper.findByPrimaryKey(id));
+}
+
+int AnnexDataComments::count()
+{
+ TSqlORMapper mapper;
+ return mapper.findCount();
+}
+
+QList AnnexDataComments::getAll()
+{
+ return tfGetModelListByCriteria(TCriteria());
+}
+
+QJsonArray AnnexDataComments::getAllJson()
+{
+ QJsonArray array;
+ TSqlORMapper mapper;
+
+ if (mapper.find() > 0) {
+ for (TSqlORMapperIterator i(mapper); i.hasNext(); ) {
+ array.append(QJsonValue(QJsonObject::fromVariantMap(AnnexDataComments(i.next()).toVariantMap())));
+ }
+ }
+ return array;
+}
+
+TModelObject *AnnexDataComments::modelData()
+{
+ return d.data();
+}
+
+const TModelObject *AnnexDataComments::modelData() const
+{
+ return d.data();
+}
+
+QDataStream &operator<<(QDataStream &ds, const AnnexDataComments &model)
+{
+ auto varmap = model.toVariantMap();
+ ds << varmap;
+ return ds;
+}
+
+QDataStream &operator>>(QDataStream &ds, AnnexDataComments &model)
+{
+ QVariantMap varmap;
+ ds >> varmap;
+ model.setProperties(varmap);
+ return ds;
+}
+
+// Don't remove below this line
+T_REGISTER_STREAM_OPERATORS(AnnexDataComments)
diff --git a/models/annexdatacomments.h b/models/annexdatacomments.h
new file mode 100644
index 0000000..a0bd251
--- /dev/null
+++ b/models/annexdatacomments.h
@@ -0,0 +1,67 @@
+#ifndef ANNEXDATACOMMENTS_H
+#define ANNEXDATACOMMENTS_H
+
+#include
+#include
+#include
+#include
+#include
+#include
+
+class TModelObject;
+class AnnexDataCommentsObject;
+class QJsonArray;
+
+
+class T_MODEL_EXPORT AnnexDataComments : public TAbstractModel
+{
+public:
+ AnnexDataComments();
+ AnnexDataComments(const AnnexDataComments &other);
+ AnnexDataComments(const AnnexDataCommentsObject &object);
+ ~AnnexDataComments();
+
+ int id() const;
+ QDateTime commentCreated() const;
+ void setCommentCreated(const QDateTime &commentCreated);
+ int specId() const;
+ void setSpecId(int specId);
+ QString specTitle() const;
+ void setSpecTitle(const QString &specTitle);
+ QString specVersion() const;
+ void setSpecVersion(const QString &specVersion);
+ QString userComment() const;
+ void setUserComment(const QString &userComment);
+ QString username() const;
+ void setUsername(const QString &username);
+ AnnexDataComments &operator=(const AnnexDataComments &other);
+
+ bool create() override { return TAbstractModel::create(); }
+ bool update() override { return TAbstractModel::update(); }
+ bool save() override { return TAbstractModel::save(); }
+ bool remove() override { return TAbstractModel::remove(); }
+
+ static QJsonArray createComment(int spec_id, const QString &spec_title, const QString &spec_version, const QString &user_comment, const QString &username);
+ static AnnexDataComments create(const QDateTime &commentCreated, int specId, const QString &specTitle, const QString &specVersion, const QString &userComment, const QString &username);
+ static AnnexDataComments create(const QVariantMap &values);
+ static AnnexDataComments get(int id);
+ static int count();
+ static QList getAll();
+ static QJsonArray getAllJson();
+ static QMap getStatistics();
+ static int getSpecsCommentsCount(const int &spec_id);
+ static QJsonArray getSpecComments(const int &spec_id);
+
+private:
+ QSharedDataPointer d;
+
+ TModelObject *modelData() override;
+ const TModelObject *modelData() const override;
+ friend QDataStream &operator<<(QDataStream &ds, const AnnexDataComments &model);
+ friend QDataStream &operator>>(QDataStream &ds, AnnexDataComments &model);
+};
+
+Q_DECLARE_METATYPE(AnnexDataComments)
+Q_DECLARE_METATYPE(QList)
+
+#endif // ANNEXDATACOMMENTS_H
diff --git a/models/annexdatawaste.cpp b/models/annexdatawaste.cpp
new file mode 100644
index 0000000..7ff8781
--- /dev/null
+++ b/models/annexdatawaste.cpp
@@ -0,0 +1,403 @@
+#include
+#include "annexdatawaste.h"
+#include "sqlobjects/annexdatawasteobject.h"
+
+AnnexDataWaste::AnnexDataWaste() :
+ TAbstractModel(),
+ d(new AnnexDataWasteObject())
+{
+ // set the initial parameters
+}
+
+AnnexDataWaste::AnnexDataWaste(const AnnexDataWaste &other) :
+ TAbstractModel(),
+ d(other.d)
+{ }
+
+AnnexDataWaste::AnnexDataWaste(const AnnexDataWasteObject &object) :
+ TAbstractModel(),
+ d(new AnnexDataWasteObject(object))
+{ }
+
+AnnexDataWaste::~AnnexDataWaste()
+{
+ // If the reference count becomes 0,
+ // the shared data object 'AnnexDataWasteObject' is deleted.
+}
+
+// #####
+
+QJsonArray AnnexDataWaste::doRecover(int id)
+{
+ TSqlQuery query;
+ QString msg;
+ QString changed_on, id_old, lfdnr, spec_title, spec_desc, spec_version, spec_release, obj_sname, ac_classes, pc_classes, cat_class, country, lang, spec_content, spec_active;
+
+ QJsonObject jsonObj;
+ QJsonArray jsonArr;
+
+ query.prepare("SELECT changed_on, id_old, lfdnr, spec_title, spec_desc, spec_version, spec_release, obj_sname, ac_classes, pc_classes, cat_class, country, lang, spec_content, spec_active FROM public.standards_data_waste where id = ?");
+ query.addBindValue(id);
+ query.exec();
+
+ while (query.next())
+ {
+ changed_on = query.value(0).toString();
+ id_old = query.value(1).toString();
+ lfdnr= query.value(2).toString();
+ spec_title = query.value(3).toString();
+ spec_desc = query.value(4).toString();
+ spec_version = query.value(5).toString();
+ spec_release = query.value(6).toString();
+ obj_sname = query.value(7).toString();
+ ac_classes = query.value(8).toString();
+ pc_classes = query.value(9).toString();
+ cat_class = query.value(10).toString();
+ country = query.value(11).toString();
+ lang = query.value(12).toString();
+ spec_content = query.value(13).toString();
+ spec_active = query.value(14).toString();
+ }
+
+ query.prepare("INSERT INTO public.standards_data (lfdnr, spec_title, spec_desc, spec_version, spec_release, obj_sname, ac_classes, pc_classes, cat_class, country, lang, spec_content, spec_active) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)");
+ query.addBindValue(lfdnr);
+ query.addBindValue(spec_title);
+ query.addBindValue(spec_desc);
+ query.addBindValue(spec_version);
+ query.addBindValue(spec_release);
+ query.addBindValue(obj_sname);
+ query.addBindValue(ac_classes);
+ query.addBindValue(pc_classes);
+ query.addBindValue(cat_class);
+ query.addBindValue(country);
+ query.addBindValue(lang);
+ query.addBindValue(spec_content);
+ query.addBindValue(spec_active);
+
+ if(!query.exec())
+ {
+ msg = query.lastError().text();
+ jsonObj["ERROR"] = "1";
+ jsonObj["errMsg"] = msg;
+ jsonArr.append(jsonObj);
+ return jsonArr;
+ }
+
+ int last_id = query.lastInsertId().toInt();
+ jsonObj["last_data_id"] = QString::number(last_id);
+
+ QString spec_data_id, spec_created, spec_last_modified, spec_valid_start, spec_valid_end, last_editor, g_legacy, responsibility, spec_comment, spec_marker, groups;
+ query.prepare("SELECT changed_on, spec_data_id, spec_created, spec_last_modified, spec_valid_start, spec_valid_end, last_editor, g_legacy, responsibility, spec_comment, spec_marker, groups FROM public.standards_meta_waste WHERE spec_data_id = ?");
+ query.addBindValue(id_old);
+ query.exec();
+
+ while (query.next())
+ {
+ changed_on = query.value(0).toString();
+ spec_data_id = query.value(1).toString();
+ spec_created = query.value(2).toString();
+ spec_last_modified = query.value(3).toString();
+ spec_valid_start = query.value(4).toString();
+ spec_valid_end = query.value(5).toString();
+ last_editor = query.value(6).toString();
+ g_legacy = query.value(7).toString();
+ responsibility = query.value(8).toString();
+ spec_comment = query.value(9).toString();
+ spec_marker = query.value(10).toString();
+ groups = query.value(11).toString();
+ }
+
+ query.prepare("INSERT INTO public.standards_meta (spec_data_id, spec_created, spec_last_modified, spec_valid_start, spec_valid_end, last_editor, g_legacy, responsibility, spec_comment, spec_marker, groups) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)");
+ query.addBindValue(last_id);
+ query.addBindValue(spec_created);
+ query.addBindValue(spec_last_modified);
+ query.addBindValue(spec_valid_start);
+ query.addBindValue(spec_valid_end);
+ query.addBindValue(last_editor);
+ query.addBindValue( g_legacy);
+ query.addBindValue(responsibility);
+ query.addBindValue(spec_comment);
+ query.addBindValue(spec_marker);
+ query.addBindValue(groups);
+
+ if(!query.exec())
+ {
+ msg = query.lastError().text();
+ jsonObj["ERROR"] = "1";
+ jsonObj["errMsg"] = msg;
+ jsonArr.append(jsonObj);
+ return jsonArr;
+ }
+
+ int last_metaid = query.lastInsertId().toInt();
+ jsonObj["last_meta_id"] = QString::number(last_metaid);
+
+ query.prepare("DELETE FROM public.standards_data_waste WHERE id = ?");
+ query.addBindValue(id);
+ query.exec();
+ query.prepare("DELETE FROM public.standards_meta_waste WHERE spec_data_id = ?");
+ query.addBindValue(spec_data_id);
+ query.exec();
+
+ msg = "Recovery successfully.";
+ msg.append("ID: " + QString::number(last_id));
+ msg.append(" Meta-ID: " + QString::number(last_metaid));
+
+ jsonObj["ERROR"] = "0";
+ jsonObj["errMsg"] = msg;
+ jsonArr.append(jsonObj);
+ return jsonArr;
+}
+
+int AnnexDataWaste::id() const
+{
+ return d->id;
+}
+
+QDateTime AnnexDataWaste::changedOn() const
+{
+ return d->changed_on;
+}
+
+void AnnexDataWaste::setChangedOn(const QDateTime &changedOn)
+{
+ d->changed_on = changedOn;
+}
+
+int AnnexDataWaste::idOld() const
+{
+ return d->id_old;
+}
+
+void AnnexDataWaste::setIdOld(int idOld)
+{
+ d->id_old = idOld;
+}
+
+QString AnnexDataWaste::lfdnr() const
+{
+ return d->lfdnr;
+}
+
+void AnnexDataWaste::setLfdnr(const QString &lfdnr)
+{
+ d->lfdnr = lfdnr;
+}
+
+QString AnnexDataWaste::specTitle() const
+{
+ return d->spec_title;
+}
+
+void AnnexDataWaste::setSpecTitle(const QString &specTitle)
+{
+ d->spec_title = specTitle;
+}
+
+QString AnnexDataWaste::specDesc() const
+{
+ return d->spec_desc;
+}
+
+void AnnexDataWaste::setSpecDesc(const QString &specDesc)
+{
+ d->spec_desc = specDesc;
+}
+
+QString AnnexDataWaste::specVersion() const
+{
+ return d->spec_version;
+}
+
+void AnnexDataWaste::setSpecVersion(const QString &specVersion)
+{
+ d->spec_version = specVersion;
+}
+
+QString AnnexDataWaste::specRelease() const
+{
+ return d->spec_release;
+}
+
+void AnnexDataWaste::setSpecRelease(const QString &specRelease)
+{
+ d->spec_release = specRelease;
+}
+
+QString AnnexDataWaste::objSname() const
+{
+ return d->obj_sname;
+}
+
+void AnnexDataWaste::setObjSname(const QString &objSname)
+{
+ d->obj_sname = objSname;
+}
+
+QString AnnexDataWaste::acClasses() const
+{
+ return d->ac_classes;
+}
+
+void AnnexDataWaste::setAcClasses(const QString &acClasses)
+{
+ d->ac_classes = acClasses;
+}
+
+QString AnnexDataWaste::pcClasses() const
+{
+ return d->pc_classes;
+}
+
+void AnnexDataWaste::setPcClasses(const QString &pcClasses)
+{
+ d->pc_classes = pcClasses;
+}
+
+QString AnnexDataWaste::catClass() const
+{
+ return d->cat_class;
+}
+
+void AnnexDataWaste::setCatClass(const QString &catClass)
+{
+ d->cat_class = catClass;
+}
+
+QString AnnexDataWaste::country() const
+{
+ return d->country;
+}
+
+void AnnexDataWaste::setCountry(const QString &country)
+{
+ d->country = country;
+}
+
+QString AnnexDataWaste::lang() const
+{
+ return d->lang;
+}
+
+void AnnexDataWaste::setLang(const QString &lang)
+{
+ d->lang = lang;
+}
+
+QByteArray AnnexDataWaste::specContent() const
+{
+ return d->spec_content;
+}
+
+void AnnexDataWaste::setSpecContent(const QByteArray &specContent)
+{
+ d->spec_content = specContent;
+}
+
+int AnnexDataWaste::specActive() const
+{
+ return d->spec_active;
+}
+
+void AnnexDataWaste::setSpecActive(int specActive)
+{
+ d->spec_active = specActive;
+}
+
+AnnexDataWaste &AnnexDataWaste::operator=(const AnnexDataWaste &other)
+{
+ d = other.d; // increments the reference count of the data
+ return *this;
+}
+
+AnnexDataWaste AnnexDataWaste::create(const QDateTime &changedOn, int idOld, const QString &lfdnr, const QString &specTitle, const QString &specDesc, const QString &specVersion, const QString &specRelease, const QString &objSname, const QString &acClasses, const QString &pcClasses, const QString &catClass, const QString &country, const QString &lang, const QByteArray &specContent, int specActive)
+{
+ AnnexDataWasteObject obj;
+ obj.changed_on = changedOn;
+ obj.id_old = idOld;
+ obj.lfdnr = lfdnr;
+ obj.spec_title = specTitle;
+ obj.spec_desc = specDesc;
+ obj.spec_version = specVersion;
+ obj.spec_release = specRelease;
+ obj.obj_sname = objSname;
+ obj.ac_classes = acClasses;
+ obj.pc_classes = pcClasses;
+ obj.cat_class = catClass;
+ obj.country = country;
+ obj.lang = lang;
+ obj.spec_content = specContent;
+ obj.spec_active = specActive;
+ if (!obj.create()) {
+ return AnnexDataWaste();
+ }
+ return AnnexDataWaste(obj);
+}
+
+AnnexDataWaste AnnexDataWaste::create(const QVariantMap &values)
+{
+ AnnexDataWaste model;
+ model.setProperties(values);
+ if (!model.d->create()) {
+ model.d->clear();
+ }
+ return model;
+}
+
+AnnexDataWaste AnnexDataWaste::get(int id)
+{
+ TSqlORMapper mapper;
+ return AnnexDataWaste(mapper.findByPrimaryKey(id));
+}
+
+int AnnexDataWaste::count()
+{
+ TSqlORMapper mapper;
+ return mapper.findCount();
+}
+
+QList AnnexDataWaste::getAll()
+{
+ return tfGetModelListByCriteria(TCriteria());
+}
+
+QJsonArray AnnexDataWaste::getAllJson()
+{
+ QJsonArray array;
+ TSqlORMapper mapper;
+
+ if (mapper.find() > 0) {
+ for (TSqlORMapperIterator i(mapper); i.hasNext(); ) {
+ array.append(QJsonValue(QJsonObject::fromVariantMap(AnnexDataWaste(i.next()).toVariantMap())));
+ }
+ }
+ return array;
+}
+
+TModelObject *AnnexDataWaste::modelData()
+{
+ return d.data();
+}
+
+const TModelObject *AnnexDataWaste::modelData() const
+{
+ return d.data();
+}
+
+QDataStream &operator<<(QDataStream &ds, const AnnexDataWaste &model)
+{
+ auto varmap = model.toVariantMap();
+ ds << varmap;
+ return ds;
+}
+
+QDataStream &operator>>(QDataStream &ds, AnnexDataWaste &model)
+{
+ QVariantMap varmap;
+ ds >> varmap;
+ model.setProperties(varmap);
+ return ds;
+}
+
+// Don't remove below this line
+T_REGISTER_STREAM_OPERATORS(AnnexDataWaste)
diff --git a/models/annexdatawaste.h b/models/annexdatawaste.h
new file mode 100644
index 0000000..3007679
--- /dev/null
+++ b/models/annexdatawaste.h
@@ -0,0 +1,83 @@
+#ifndef ANNEXDATAWASTE_H
+#define ANNEXDATAWASTE_H
+
+#include
+#include
+#include
+#include
+#include
+#include
+
+class TModelObject;
+class AnnexDataWasteObject;
+class QJsonArray;
+
+
+class T_MODEL_EXPORT AnnexDataWaste : public TAbstractModel
+{
+public:
+ AnnexDataWaste();
+ AnnexDataWaste(const AnnexDataWaste &other);
+ AnnexDataWaste(const AnnexDataWasteObject &object);
+ ~AnnexDataWaste();
+
+ int id() const;
+ QDateTime changedOn() const;
+ void setChangedOn(const QDateTime &changedOn);
+ int idOld() const;
+ void setIdOld(int idOld);
+ QString lfdnr() const;
+ void setLfdnr(const QString &lfdnr);
+ QString specTitle() const;
+ void setSpecTitle(const QString &specTitle);
+ QString specDesc() const;
+ void setSpecDesc(const QString &specDesc);
+ QString specVersion() const;
+ void setSpecVersion(const QString &specVersion);
+ QString specRelease() const;
+ void setSpecRelease(const QString &specRelease);
+ QString objSname() const;
+ void setObjSname(const QString &objSname);
+ QString acClasses() const;
+ void setAcClasses(const QString &acClasses);
+ QString pcClasses() const;
+ void setPcClasses(const QString &pcClasses);
+ QString catClass() const;
+ void setCatClass(const QString &catClass);
+ QString country() const;
+ void setCountry(const QString &country);
+ QString lang() const;
+ void setLang(const QString &lang);
+ QByteArray specContent() const;
+ void setSpecContent(const QByteArray &specContent);
+ int specActive() const;
+ void setSpecActive(int specActive);
+ AnnexDataWaste &operator=(const AnnexDataWaste &other);
+
+ bool create() override { return TAbstractModel::create(); }
+ bool update() override { return TAbstractModel::update(); }
+ bool save() override { return TAbstractModel::save(); }
+ bool remove() override { return TAbstractModel::remove(); }
+
+ static AnnexDataWaste create(const QDateTime &changedOn, int idOld, const QString &lfdnr, const QString &specTitle, const QString &specDesc, const QString &specVersion, const QString &specRelease, const QString &objSname, const QString &acClasses, const QString &pcClasses, const QString &catClass, const QString &country, const QString &lang, const QByteArray &specContent, int specActive);
+ static AnnexDataWaste create(const QVariantMap &values);
+ static AnnexDataWaste get(int id);
+ static int count();
+ static QList getAll();
+ static QJsonArray getAllJson();
+
+ static QJsonArray doRecover(int id);
+
+private:
+ QSharedDataPointer d;
+
+ TModelObject *modelData() override;
+ const TModelObject *modelData() const override;
+ friend QDataStream &operator<<(QDataStream &ds, const AnnexDataWaste &model);
+ friend QDataStream &operator>>(QDataStream &ds, AnnexDataWaste &model);
+};
+
+Q_DECLARE_METATYPE(AnnexDataWaste)
+Q_DECLARE_METATYPE(QList)
+
+#endif // ANNEXDATAWASTE_H
diff --git a/models/annexmeta.cpp b/models/annexmeta.cpp
new file mode 100644
index 0000000..7411fb3
--- /dev/null
+++ b/models/annexmeta.cpp
@@ -0,0 +1,251 @@
+#include
+#include "annexmeta.h"
+#include "sqlobjects/annexmetaobject.h"
+
+AnnexMeta::AnnexMeta() :
+ TAbstractModel(),
+ d(new AnnexMetaObject())
+{
+ // set the initial parameters
+}
+
+AnnexMeta::AnnexMeta(const AnnexMeta &other) :
+ TAbstractModel(),
+ d(other.d)
+{ }
+
+AnnexMeta::AnnexMeta(const AnnexMetaObject &object) :
+ TAbstractModel(),
+ d(new AnnexMetaObject(object))
+{ }
+
+AnnexMeta::~AnnexMeta()
+{
+ // If the reference count becomes 0,
+ // the shared data object 'AnnexMetaObject' is deleted.
+}
+
+// #####
+
+AnnexMeta AnnexMeta::getBySpecDataId(int spec_data_id)
+{
+ TSqlQuery query;
+
+ query.prepare("SELECT id FROM public.annex_meta WHERE spec_data_id = ?");
+ query.addBindValue(spec_data_id);
+
+ query.exec();
+ query.next();
+
+ TSqlORMapper mapper;
+ return AnnexMeta(mapper.findByPrimaryKey(query.value(0).toInt()));
+}
+
+int AnnexMeta::id() const
+{
+ return d->id;
+}
+
+int AnnexMeta::specDataId() const
+{
+ return d->spec_data_id;
+}
+
+void AnnexMeta::setSpecDataId(int specDataId)
+{
+ d->spec_data_id = specDataId;
+}
+
+QDateTime AnnexMeta::specCreated() const
+{
+ return d->spec_created;
+}
+
+void AnnexMeta::setSpecCreated(const QDateTime &specCreated)
+{
+ d->spec_created = specCreated;
+}
+
+QDateTime AnnexMeta::specLastModified() const
+{
+ return d->spec_last_modified;
+}
+
+void AnnexMeta::setSpecLastModified(const QDateTime &specLastModified)
+{
+ d->spec_last_modified = specLastModified;
+}
+
+QDateTime AnnexMeta::specValidStart() const
+{
+ return d->spec_valid_start;
+}
+
+void AnnexMeta::setSpecValidStart(const QDateTime &specValidStart)
+{
+ d->spec_valid_start = specValidStart;
+}
+
+QDateTime AnnexMeta::specValidEnd() const
+{
+ return d->spec_valid_end;
+}
+
+void AnnexMeta::setSpecValidEnd(const QDateTime &specValidEnd)
+{
+ d->spec_valid_end = specValidEnd;
+}
+
+QString AnnexMeta::lastEditor() const
+{
+ return d->last_editor;
+}
+
+void AnnexMeta::setLastEditor(const QString &lastEditor)
+{
+ d->last_editor = lastEditor;
+}
+
+QString AnnexMeta::gLegacy() const
+{
+ return d->g_legacy;
+}
+
+void AnnexMeta::setGLegacy(const QString &gLegacy)
+{
+ d->g_legacy = gLegacy;
+}
+
+QString AnnexMeta::responsibility() const
+{
+ return d->responsibility;
+}
+
+void AnnexMeta::setResponsibility(const QString &responsibility)
+{
+ d->responsibility = responsibility;
+}
+
+QString AnnexMeta::specComment() const
+{
+ return d->spec_comment;
+}
+
+void AnnexMeta::setSpecComment(const QString &specComment)
+{
+ d->spec_comment = specComment;
+}
+
+QString AnnexMeta::specMarker() const
+{
+ return d->spec_marker;
+}
+
+void AnnexMeta::setSpecMarker(const QString &specMarker)
+{
+ d->spec_marker = specMarker;
+}
+
+QString AnnexMeta::groups() const
+{
+ return d->groups;
+}
+
+void AnnexMeta::setGroups(const QString &groups)
+{
+ d->groups = groups;
+}
+
+AnnexMeta &AnnexMeta::operator=(const AnnexMeta &other)
+{
+ d = other.d; // increments the reference count of the data
+ return *this;
+}
+
+AnnexMeta AnnexMeta::create(int specDataId, const QDateTime &specCreated, const QDateTime &specLastModified, const QDateTime &specValidStart, const QDateTime &specValidEnd, const QString &lastEditor, const QString &gLegacy, const QString &responsibility, const QString &specComment, const QString &specMarker, const QString &groups)
+{
+ AnnexMetaObject obj;
+ obj.spec_data_id = specDataId;
+ obj.spec_created = specCreated;
+ obj.spec_last_modified = specLastModified;
+ obj.spec_valid_start = specValidStart;
+ obj.spec_valid_end = specValidEnd;
+ obj.last_editor = lastEditor;
+ obj.g_legacy = gLegacy;
+ obj.responsibility = responsibility;
+ obj.spec_comment = specComment;
+ obj.spec_marker = specMarker;
+ obj.groups = groups;
+ if (!obj.create()) {
+ return AnnexMeta();
+ }
+ return AnnexMeta(obj);
+}
+
+AnnexMeta AnnexMeta::create(const QVariantMap &values)
+{
+ AnnexMeta model;
+ model.setProperties(values);
+ if (!model.d->create()) {
+ model.d->clear();
+ }
+ return model;
+}
+
+AnnexMeta AnnexMeta::get(int id)
+{
+ TSqlORMapper mapper;
+ return AnnexMeta(mapper.findByPrimaryKey(id));
+}
+
+int AnnexMeta::count()
+{
+ TSqlORMapper mapper;
+ return mapper.findCount();
+}
+
+QList AnnexMeta::getAll()
+{
+ return tfGetModelListByCriteria(TCriteria());
+}
+
+QJsonArray AnnexMeta::getAllJson()
+{
+ QJsonArray array;
+ TSqlORMapper mapper;
+
+ if (mapper.find() > 0) {
+ for (TSqlORMapperIterator i(mapper); i.hasNext(); ) {
+ array.append(QJsonValue(QJsonObject::fromVariantMap(AnnexMeta(i.next()).toVariantMap())));
+ }
+ }
+ return array;
+}
+
+TModelObject *AnnexMeta::modelData()
+{
+ return d.data();
+}
+
+const TModelObject *AnnexMeta::modelData() const
+{
+ return d.data();
+}
+
+QDataStream &operator<<(QDataStream &ds, const AnnexMeta &model)
+{
+ auto varmap = model.toVariantMap();
+ ds << varmap;
+ return ds;
+}
+
+QDataStream &operator>>(QDataStream &ds, AnnexMeta &model)
+{
+ QVariantMap varmap;
+ ds >> varmap;
+ model.setProperties(varmap);
+ return ds;
+}
+
+// Don't remove below this line
+T_REGISTER_STREAM_OPERATORS(AnnexMeta)
diff --git a/models/annexmeta.h b/models/annexmeta.h
new file mode 100644
index 0000000..33ca4e8
--- /dev/null
+++ b/models/annexmeta.h
@@ -0,0 +1,74 @@
+#ifndef ANNEXMETA_H
+#define ANNEXMETA_H
+
+#include
+#include
+#include
+#include
+#include
+#include