Compare commits

...

111 commits

Author SHA1 Message Date
Martin Brodbeck ab7b14f12e get rid of fmt 2024-05-22 13:09:44 +02:00
Martin Brodbeck 0c7f071b9d include dir for boost added. 2024-03-05 14:38:02 +01:00
Martin Brodbeck d0c50c9b9a qsingleapplication version bumped 2024-01-23 11:25:07 +01:00
Martin Brodbeck a17cb22e05 2023 → 2024 2024-01-23 11:22:51 +01:00
Martin Brodbeck 205dac5326 nlohmann updateted to 3.11.3 2024-01-23 11:20:39 +01:00
Martin Brodbeck b0d2d6b284 update to version 1.8 2024-01-23 10:46:49 +01:00
Martin Brodbeck 7f11ba4e5d new version 1.8.0 2024-01-23 10:42:04 +01:00
Martin Brodbeck 32d0ec7749 Allow import of multiple sales at once. 2024-01-23 10:39:43 +01:00
Martin Brodbeck 54e5c70447 Changed minimum versions 2024-01-23 10:06:01 +01:00
Martin Brodbeck 379fd4a73c Lib references for Windows updated 2023-09-21 15:00:18 +02:00
Martin Brodbeck 8a94b53379 Push boost version. 2023-05-02 11:07:15 +02:00
Martin Brodbeck d9b13d0e1a README updated. 2023-05-02 11:03:22 +02:00
Martin Brodbeck 6f885dd64e more on metainfo 2023-04-28 10:29:39 +02:00
Martin Brodbeck 1a698a6cd2 metainfo added 2023-04-28 10:12:10 +02:00
Martin Brodbeck ac9ae8b34e Add metainfo 2023-04-28 10:08:02 +02:00
Martin Brodbeck 4385624988 Merge branch 'master' of ssh://git.rustysoft.de/martin/kima2 2023-04-26 12:47:45 +02:00
Martin Brodbeck 4cfd8d5572 2022 → 2023 2023-04-26 12:47:41 +02:00
Martin Brodbeck 528ae1ff31 use QUrl::fromLocalFile 2023-04-26 12:46:35 +02:00
Martin Brodbeck 649c26db4b Updated for Windows installation 2023-04-26 08:53:13 +02:00
Martin Brodbeck 13a1d26d96 description updated 2023-04-26 08:36:03 +02:00
Martin Brodbeck f898844c7c remove obsolete lstdc++fs flag 2023-04-25 16:19:27 +02:00
Martin Brodbeck e6b71a7e4d Get rid of csv-parser 2023-04-25 16:11:34 +02:00
Martin Brodbeck f4b4ccbbea Revert "Remove fmt dependency"
This reverts commit 8efdf7b6fe.
2023-04-25 15:22:06 +02:00
Martin Brodbeck e79a81797c Increase version number 2023-04-21 21:35:46 +02:00
Martin Brodbeck 8efdf7b6fe Remove fmt dependency 2023-04-21 21:33:59 +02:00
Martin Brodbeck a46e8d89c9 remove xlnt stuff 2023-01-18 19:41:53 +01:00
Martin Brodbeck 3e293ba447 updated 2023-01-18 17:08:09 +01:00
Martin Brodbeck 245e41bbf0 Push to new version. 2023-01-18 17:06:02 +01:00
Martin Brodbeck b0444112a8 seller menu simplified. 2023-01-18 17:05:21 +01:00
Martin Brodbeck c4ccd43b45 Push to new version 2023-01-18 16:46:44 +01:00
Martin Brodbeck 16745a248c Update manual 2023-01-18 16:46:30 +01:00
Martin Brodbeck 19ea7f27de Excel stuff removed. 2023-01-18 16:35:28 +01:00
Martin Brodbeck 42bf036f85 Merge branch 'master' of ssh://git.rustysoft.de/martin/kima2 2022-09-27 09:01:55 +02:00
Martin Brodbeck 9d7492c745 Version 1.6.1 2022-09-27 09:01:27 +02:00
Martin Brodbeck 9fcfb8e3ba Loading translation improved. 2022-09-26 20:47:23 +02:00
Martin Brodbeck a23de4dcf0 README updated 2022-09-26 14:04:57 +02:00
Martin Brodbeck 77f45fa55f improved Arch Linux build file 2022-09-26 13:48:48 +02:00
Martin Brodbeck 7299ae7c66 Fix db filename 2022-09-26 12:40:21 +02:00
Martin Brodbeck 1720dbba8b cpack: dependency fix for Windows 2022-09-26 12:29:53 +02:00
Martin Brodbeck 66e2e69c3e LICENSE: 2021 -> 2022 2022-09-26 12:24:45 +02:00
Martin Brodbeck 78aafab63b cpack: dependency fix for Windows 2022-09-26 12:23:50 +02:00
Martin Brodbeck 72e1a69dae prepare for 1.6.0 2022-09-26 12:10:57 +02:00
Martin Brodbeck 7e38da7276 Update DLLs for Qt6 2022-09-26 11:22:11 +02:00
Martin Brodbeck 144f61d6d4 Do not use named locales on Windows. 2022-09-26 11:21:03 +02:00
Martin Brodbeck 85574ff08a replace boost date_time with chrono 2022-09-26 10:14:57 +02:00
Martin Brodbeck c44d8b352a manual updated 2022-09-26 09:09:15 +02:00
Martin Brodbeck be9a7be38d nlohmann_json and singleapplication updated 2022-09-26 09:05:38 +02:00
Martin Brodbeck 104464f781 2022-09-24 20:43:32 +02:00
Martin Brodbeck 3a132e69ae Add one additional seller.
fixes #24
2022-09-24 20:41:15 +02:00
Martin Brodbeck 01577d02a0 Do not ignore seller entries with empty names.
fixes #23
2022-09-24 20:25:33 +02:00
Martin Brodbeck ecd1111391 Externen Link aktualisiert. 2022-09-24 14:56:22 +02:00
Martin Brodbeck 944edc277a ReportDialog: Reduce lines per page
fixes #22
2022-09-24 14:41:14 +02:00
Martin Brodbeck 0427bd4077 move to qt6 2022-07-07 17:16:51 +02:00
Martin Brodbeck 2b6628bdf8 Using fmt for currency 2022-07-07 16:53:44 +02:00
Martin Brodbeck 6944051c31 code formatting 2022-07-07 15:37:33 +02:00
Martin Brodbeck 5f7d91a18e Copyright year updated 2022-07-07 15:32:13 +02:00
Martin Brodbeck 2b7c099f5e Adopt to C++20 2022-07-07 15:31:32 +02:00
Martin Brodbeck acc3095e60 code formatting 2022-07-07 15:21:46 +02:00
Martin Brodbeck d677dfd628 clang-format updated 2022-07-07 15:14:30 +02:00
Martin Brodbeck e0ffd47430 nlohmann_json: update to v3.10.5 2022-07-07 15:07:42 +02:00
Martin Brodbeck 3e6e587df8 member variables renamed 2022-07-07 15:03:39 +02:00
Martin Brodbeck 21571215bc 2022-07-07 15:03:13 +02:00
Martin Brodbeck 52e0f1636e Hide .cache (clangd) 2022-07-07 15:03:04 +02:00
Martin Brodbeck 38b8865cea push to new singleapplication version 2021-09-27 14:53:09 +02:00
Martin Brodbeck 20c7a99578 2021-09-22 07:54:53 +02:00
Martin Brodbeck 3572d22715 2021-09-22 07:53:19 +02:00
Martin Brodbeck 453fd8cdb5 cpack: new Windows dependencies added 2021-09-21 10:49:54 +02:00
Martin Brodbeck 911b05b487 cpack: new Windows dependencies added 2021-09-21 10:36:43 +02:00
Martin Brodbeck 9e511c684d subproject updated 2021-09-20 08:46:51 +02:00
Martin Brodbeck b9bb9f1a8c new version 1.5.3 2021-09-20 08:05:37 +02:00
Martin Brodbeck 329c3a1540 Manual updated 2021-09-20 08:04:39 +02:00
Martin Brodbeck 8feb122c11 subprojects updated 2021-09-20 07:44:22 +02:00
Martin Brodbeck d573aed916 Merge branch 'master' of ssh://brodbeck-online.de:60022/martin/kima2-cpp 2021-09-20 07:40:34 +02:00
Martin Brodbeck 83b6cd1d26 2021-09-20 07:40:05 +02:00
Martin Brodbeck 059ae5ca66 2020 → 2021 2021-09-20 07:39:37 +02:00
Martin Brodbeck edf9cb1a2c Revert "2020 → 2021"
This reverts commit b8b5d8b140.
2021-09-19 19:59:51 +02:00
Martin Brodbeck b8b5d8b140 2021 → 2021 2021-09-19 19:58:49 +02:00
Martin Brodbeck 072af76de1 ... 2021-09-19 19:53:20 +02:00
Martin Brodbeck 92ecc92bf7 Fix umlaut-crash on linux machines 2021-09-19 19:52:32 +02:00
Martin Brodbeck e48fbe82e0 csv-parser updated 2021-09-17 21:16:08 +02:00
Martin Brodbeck 8ef821dcc0 singleapplication updated 2021-09-17 21:13:21 +02:00
Martin Brodbeck c65e7be415 new version 1.5.2 2020-10-19 07:50:30 +02:00
Martin Brodbeck b9f09fcd4c ... 2020-10-15 16:50:37 +02:00
Martin Brodbeck a156c5331a Added warning message when Excel import fails. 2020-10-15 16:43:00 +02:00
Martin Brodbeck 9e6e2eb936 Merge branch 'master' of ssh://brodbeck-online.de:60022/martin/kima2-cpp into master 2020-10-15 15:49:02 +02:00
Martin Brodbeck 8b299bacc3 Set default style on Windows to "Fusion". 2020-10-15 15:47:05 +02:00
Martin Brodbeck eb5434f374 Merge branch 'master' of ssh://brodbeck-online.de:60022/martin/kima2-cpp into master 2020-09-04 09:52:57 +02:00
Martin Brodbeck a547b6f3c3 push csv-parser subproject 2020-08-28 19:10:01 +02:00
Martin Brodbeck 26804ba03e push singleapplication subproject 2020-08-28 19:07:16 +02:00
Martin Brodbeck 305d41f2e1 Added missing dlls to Windows deployment 2020-04-17 10:22:52 +02:00
Martin Brodbeck 8374175087 2019 -> 2020 2020-02-15 09:55:01 +01:00
Martin Brodbeck 01bf3c29a2 [Windows] undefine DELETE macro if defined 2020-02-12 16:13:16 +01:00
Martin Brodbeck ff9dc9b05e Fix cpack for windows (dlls) 2020-02-12 16:12:40 +01:00
Martin Brodbeck e41ce5a117 Push to version 1.5.1 2020-02-12 14:06:59 +01:00
Martin Brodbeck 2d06de9907 Fix Excel import 2020-02-12 14:04:15 +01:00
Martin Brodbeck 77791e142c more on build scripts 2019-10-17 16:03:12 +02:00
Martin Brodbeck a8181729f9 more on meson 2019-10-14 19:32:14 +02:00
Martin Brodbeck 5aa4e3a5f0 typo 2019-10-11 12:49:32 +02:00
Martin Brodbeck 77226f294b rpm builds now 2019-10-11 12:48:54 +02:00
Martin Brodbeck 03f1c7cca5 Initial commit of rpm spec file 2019-10-11 11:09:54 +02:00
Martin Brodbeck b9d4375f5a improved build instructions 2019-10-11 10:01:21 +02:00
Martin Brodbeck f37cd75502 using system json lib if available
(works on Arch Linux)
2019-10-11 09:09:18 +02:00
Martin Brodbeck b016452a06 adjust cmake files to changed filesystem 2019-10-10 15:00:09 +02:00
Martin Brodbeck 7ca04f79ce more on meson 2019-10-10 14:52:00 +02:00
Martin Brodbeck e987692c7a add files to be installed to meson 2019-10-10 14:42:11 +02:00
Martin Brodbeck d13f9d2824 meson is now working ... somehow 2019-10-10 13:36:48 +02:00
Martin Brodbeck 2faa2fa019 3rdparty renamed to subprojects 2019-10-10 13:36:18 +02:00
Martin Brodbeck fc308c644c Merge branch 'master' into meson 2019-10-10 08:13:30 +02:00
Martin Brodbeck e89728846c restructure libs 2019-10-10 08:09:16 +02:00
Martin Brodbeck ad895abd35 initial meson files added 2019-10-09 16:31:29 +02:00
Martin Brodbeck ec0b7cbf0d code cleanup 2019-10-09 10:36:51 +02:00
77 changed files with 1113 additions and 903 deletions

View file

@ -1,27 +1,38 @@
---
Language: Cpp
# BasedOnStyle: LLVM
AccessModifierOffset: -2
AccessModifierOffset: -4
AlignAfterOpenBracket: Align
AlignConsecutiveAssignments: false
AlignConsecutiveDeclarations: false
AlignArrayOfStructures: None
AlignConsecutiveMacros: None
AlignConsecutiveAssignments: None
AlignConsecutiveBitFields: None
AlignConsecutiveDeclarations: None
AlignEscapedNewlines: Right
AlignOperands: true
AlignOperands: Align
AlignTrailingComments: true
AllowAllArgumentsOnNextLine: true
AllowAllConstructorInitializersOnNextLine: true
AllowAllParametersOfDeclarationOnNextLine: true
AllowShortBlocksOnASingleLine: false
AllowShortEnumsOnASingleLine: true
AllowShortBlocksOnASingleLine: Never
AllowShortCaseLabelsOnASingleLine: false
AllowShortFunctionsOnASingleLine: All
AllowShortIfStatementsOnASingleLine: false
AllowShortLambdasOnASingleLine: All
AllowShortIfStatementsOnASingleLine: Never
AllowShortLoopsOnASingleLine: false
AlwaysBreakAfterDefinitionReturnType: None
AlwaysBreakAfterReturnType: None
AlwaysBreakBeforeMultilineStrings: false
AlwaysBreakTemplateDeclarations: false
AlwaysBreakTemplateDeclarations: MultiLine
AttributeMacros:
- __capability
BinPackArguments: true
BinPackParameters: true
BraceWrapping:
AfterClass: true
AfterControlStatement: false
BraceWrapping:
AfterCaseLabel: false
AfterClass: false
AfterControlStatement: Never
AfterEnum: false
AfterFunction: false
AfterNamespace: false
@ -31,13 +42,21 @@ BraceWrapping:
AfterExternBlock: false
BeforeCatch: false
BeforeElse: false
BeforeLambdaBody: false
BeforeWhile: false
IndentBraces: false
SplitEmptyFunction: true
SplitEmptyRecord: true
SplitEmptyNamespace: true
BreakBeforeBinaryOperators: None
BreakBeforeBraces: Linux
BreakBeforeConceptDeclarations: true
BreakBeforeBraces: Custom
BraceWrapping:
AfterClass: true
AfterFunction: true
AfterNamespace: true
BreakBeforeInheritanceComma: false
BreakInheritanceList: BeforeColon
BreakBeforeTernaryOperators: true
BreakConstructorInitializersBeforeComma: false
BreakConstructorInitializers: BeforeColon
@ -50,35 +69,56 @@ ConstructorInitializerAllOnOneLineOrOnePerLine: false
ConstructorInitializerIndentWidth: 4
ContinuationIndentWidth: 4
Cpp11BracedListStyle: true
DeriveLineEnding: true
DerivePointerAlignment: false
DisableFormat: false
EmptyLineAfterAccessModifier: Never
EmptyLineBeforeAccessModifier: LogicalBlock
ExperimentalAutoDetectBinPacking: false
FixNamespaceComments: true
ForEachMacros:
ForEachMacros:
- foreach
- Q_FOREACH
- BOOST_FOREACH
IfMacros:
- KJ_IF_MAYBE
IncludeBlocks: Preserve
IncludeCategories:
IncludeCategories:
- Regex: '^"(llvm|llvm-c|clang|clang-c)/'
Priority: 2
SortPriority: 0
CaseSensitive: false
- Regex: '^(<|"(gtest|gmock|isl|json)/)'
Priority: 3
SortPriority: 0
CaseSensitive: false
- Regex: '.*'
Priority: 1
SortPriority: 0
CaseSensitive: false
IncludeIsMainRegex: '(Test)?$'
IncludeIsMainSourceRegex: ''
IndentAccessModifiers: false
IndentCaseLabels: false
IndentCaseBlocks: false
IndentGotoLabels: true
IndentPPDirectives: None
IndentExternBlock: AfterExternBlock
IndentRequires: false
IndentWidth: 4
IndentWrappedFunctionNames: false
InsertTrailingCommas: None
JavaScriptQuotes: Leave
JavaScriptWrapImports: true
KeepEmptyLinesAtTheStartOfBlocks: true
LambdaBodyIndentation: Signature
MacroBlockBegin: ''
MacroBlockEnd: ''
MaxEmptyLinesToKeep: 1
NamespaceIndentation: None
ObjCBinPackProtocolList: Auto
ObjCBlockIndentWidth: 2
ObjCBreakBeforeNestedBlockParam: true
ObjCSpaceAfterProperty: false
ObjCSpaceBeforeProtocolList: true
PenaltyBreakAssignment: 2
@ -86,24 +126,57 @@ PenaltyBreakBeforeFirstCallParameter: 19
PenaltyBreakComment: 300
PenaltyBreakFirstLessLess: 120
PenaltyBreakString: 1000
PenaltyBreakTemplateDeclaration: 10
PenaltyExcessCharacter: 1000000
PenaltyReturnTypeOnItsOwnLine: 60
PointerAlignment: Left
PenaltyIndentedWhitespace: 0
PointerAlignment: Right
PPIndentWidth: -1
ReferenceAlignment: Pointer
ReflowComments: true
SortIncludes: true
ShortNamespaceLines: 1
SortIncludes: CaseSensitive
SortJavaStaticImport: Before
SortUsingDeclarations: true
SpaceAfterCStyleCast: false
SpaceAfterLogicalNot: false
SpaceAfterTemplateKeyword: true
SpaceBeforeAssignmentOperators: true
SpaceBeforeCaseColon: false
SpaceBeforeCpp11BracedList: false
SpaceBeforeCtorInitializerColon: true
SpaceBeforeInheritanceColon: true
SpaceBeforeParens: ControlStatements
SpaceAroundPointerQualifiers: Default
SpaceBeforeRangeBasedForLoopColon: true
SpaceInEmptyBlock: false
SpaceInEmptyParentheses: false
SpacesBeforeTrailingComments: 1
SpacesInAngles: false
SpacesInAngles: Never
SpacesInConditionalStatement: false
SpacesInContainerLiterals: true
SpacesInCStyleCastParentheses: false
SpacesInLineCommentPrefix:
Minimum: 1
Maximum: -1
SpacesInParentheses: false
SpacesInSquareBrackets: false
Standard: Auto
SpaceBeforeSquareBrackets: false
BitFieldColonSpacing: Both
Standard: Latest
StatementAttributeLikeMacros:
- Q_EMIT
StatementMacros:
- Q_UNUSED
- QT_REQUIRE_VERSION
TabWidth: 8
UseCRLF: false
UseTab: Never
WhitespaceSensitiveMacros:
- STRINGIZE
- PP_STRINGIZE
- BOOST_PP_STRINGIZE
- NS_SWIFT_NAME
- CF_SWIFT_NAME
...

1
.gitignore vendored
View file

@ -1,3 +1,4 @@
build
.vscode/ipch/*
.kdev4
.cache

13
.gitmodules vendored
View file

@ -1,9 +1,6 @@
[submodule "3rdparty/nlohmann_json"]
path = 3rdparty/nlohmann_json
[submodule "subprojects/nlohmann_json"]
path = subprojects/nlohmann_json
url = https://github.com/nlohmann/json.git
[submodule "3rdparty/singleapplication"]
path = 3rdparty/singleapplication
url = https://github.com/itay-grudev/SingleApplication.git
[submodule "3rdparty/csv-parser"]
path = 3rdparty/csv-parser
url = https://github.com/vincentlaucsb/csv-parser.git
[submodule "subprojects/singleapplication"]
path = subprojects/singleapplication/singleapplication.git
url = https://github.com/itay-grudev/SingleApplication.git

3
.vscode/launch.json vendored
View file

@ -21,7 +21,8 @@
"text": "-enable-pretty-printing",
"ignoreFailures": true
}
]
],
"visualizerFile": "/home/brodbemn/.config/Code - OSS/User/workspaceStorage/d64ec049841ecb3d43e402bb3c167cb5/tonka3000.qtvsctools/qt.natvis.xml"
}
]
}

42
.vscode/settings.json vendored
View file

@ -65,9 +65,47 @@
"condition_variable": "cpp",
"mutex": "cpp",
"hash_map": "cpp",
"future": "cpp"
"future": "cpp",
"bit": "cpp",
"compare": "cpp",
"concepts": "cpp",
"forward_list": "cpp",
"map": "cpp",
"set": "cpp",
"string": "cpp",
"unordered_set": "cpp",
"iterator": "cpp",
"memory_resource": "cpp",
"random": "cpp",
"semaphore": "cpp",
"stop_token": "cpp",
"__bit_reference": "cpp",
"__bits": "cpp",
"__config": "cpp",
"__debug": "cpp",
"__errc": "cpp",
"__hash_table": "cpp",
"__locale": "cpp",
"__mutex_base": "cpp",
"__node_handle": "cpp",
"__split_buffer": "cpp",
"__threading_support": "cpp",
"__tree": "cpp",
"__tuple": "cpp",
"__verbose_abort": "cpp",
"format": "cpp",
"ios": "cpp",
"locale": "cpp"
},
"C_Cpp.clang_format_path": "/usr/bin/clang-format",
"cmake.configureOnOpen": true,
"C_Cpp.configurationWarnings": "Disabled"
"C_Cpp.configurationWarnings": "Disabled",
"files.watcherExclude": {
"**/.git/objects/**": true,
"**/.git/subtree-cache/**": true,
"**/node_modules/*/**": true,
"**/.hg/store/**": true,
".flatpak/**": true,
"_build/**": true
}
}

1
3rdparty/csv-parser vendored

@ -1 +0,0 @@
Subproject commit e4a899dcafcfa14e448348e9b3c8c06d7697dbf8

@ -1 +0,0 @@
Subproject commit 53c3eefa2cf790a7130fed3e13a3be35c2f2ace2

@ -1 +0,0 @@
Subproject commit e18babe5598d53a9e51ac9263d5b62ea2c3276e6

View file

@ -1,10 +1,10 @@
cmake_minimum_required(VERSION 3.8)
cmake_minimum_required(VERSION 3.10)
project(kima2 VERSION 1.5.0)
project(kima2 VERSION 1.8.1)
set(CMAKE_MODULE_PATH "${CMAKE_HOME_DIRECTORY}/cmake")
set(CMAKE_CXX_STANDARD 17)
set(CMAKE_CXX_STANDARD 20)
set(CMAKE_CXX_STANDARD_REQUIRED ON)
#include(InstallRequiredSystemLibraries)
@ -17,6 +17,7 @@ else()
endif()
configure_file(config.h.in ${PROJECT_BINARY_DIR}/config.h)
configure_file(de.rustysoft.kima2.metainfo.xml.in ${PROJECT_BINARY_DIR}/de.rustysoft.kima2.metainfo.xml)
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/bin)
set(CMAKE_LIBRARY_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/lib)
@ -28,7 +29,7 @@ if(KIMA2_USE_EXTERNAL_JSON)
find_package(nlohmann_json REQUIRED)
endif()
add_subdirectory(3rdparty)
add_subdirectory(subprojects)
add_subdirectory(src)
#if(NOT CMAKE_BUILD_TYPE OR CMAKE_BUILD_TYPE MATCHES Debug)
@ -79,6 +80,8 @@ else(WIN32 AND NOT UNIX)
DESTINATION share/${PROJECT_NAME})
install(FILES "${CMAKE_SOURCE_DIR}/misc/kima2.svg"
DESTINATION share/icons/hicolor/scalable/apps)
install(FILES de.rustysoft.kima2.metainfo.xml
DESTINATION share/metainfo)
endif (WIN32 AND NOT UNIX)
if( MINGW )
@ -87,18 +90,19 @@ if( MINGW )
set( CMAKE_INSTALL_SYSTEM_RUNTIME_LIBS
${MINGW_PATH}/libstdc++-6.dll
${MINGW_PATH}/libgcc_s_seh-1.dll
${MINGW_PATH}/Qt5Core.dll
${MINGW_PATH}/Qt5Gui.dll
${MINGW_PATH}/Qt5Widgets.dll
${MINGW_PATH}/Qt5PrintSupport.dll
${MINGW_PATH}/Qt6Core.dll
${MINGW_PATH}/Qt6Gui.dll
${MINGW_PATH}/Qt6Widgets.dll
${MINGW_PATH}/Qt6PrintSupport.dll
${MINGW_PATH}/Qt6Network.dll
${MINGW_PATH}/libwinpthread-1.dll
${MINGW_PATH}/libsqlite3-0.dll
${MINGW_PATH}/libusb-1.0.dll
${MINGW_PATH}/libxlnt.dll
${MINGW_PATH}/libicuuc64.dll
${MINGW_PATH}/libicuin64.dll
${MINGW_PATH}/libicudt64.dll
${MINGW_PATH}/libicuuc73.dll
${MINGW_PATH}/libicuin73.dll
${MINGW_PATH}/libicudt73.dll
${MINGW_PATH}/libpcre2-16-0.dll
${MINGW_PATH}/libpcre2-8-0.dll
${MINGW_PATH}/zlib1.dll
${MINGW_PATH}/libharfbuzz-0.dll
${MINGW_PATH}/libpng16-16.dll
@ -108,19 +112,26 @@ if( MINGW )
${MINGW_PATH}/libbz2-1.dll
${MINGW_PATH}/libintl-8.dll
${MINGW_PATH}/libpcre-1.dll
${MINGW_PATH}/libdouble-conversion.dll
${MINGW_PATH}/libzstd.dll
${MINGW_PATH}/libmd4c.dll
${MINGW_PATH}/libbrotlicommon.dll
${MINGW_PATH}/libbrotlidec.dll
#${MINGW_PATH}/libfmt.dll
${MINGW_PATH}/libb2-1.dll
${MINGW_PATH}/libiconv-2.dll)
install(FILES ${MINGW_PATH}/../share/qt5/plugins/platforms/qwindows.dll
${MINGW_PATH}/../share/qt5/plugins/platforms/qminimal.dll
install(FILES ${MINGW_PATH}/../share/qt6/plugins/platforms/qwindows.dll
${MINGW_PATH}/../share/qt6/plugins/platforms/qminimal.dll
DESTINATION bin/platforms)
install(FILES ${MINGW_PATH}/../share/qt5/plugins/printsupport/windowsprintersupport.dll
DESTINATION bin/printsupport)
install(FILES ${MINGW_PATH}/../share/qt5/translations/qtbase_de.qm
${MINGW_PATH}/../share/qt5/translations/qt_de.qm
${MINGW_PATH}/../share/qt5/translations/qt_help_de.qm
${MINGW_PATH}/../share/qt5/translations/qtmultimedia_de.qm
${MINGW_PATH}/../share/qt5/translations/qtquickcontrols_de.qm
${MINGW_PATH}/../share/qt5/translations/qtscript_de.qm
${MINGW_PATH}/../share/qt5/translations/qtxmlpatterns_de.qm
#install(FILES ${MINGW_PATH}/../share/qt6/plugins/printsupport/windowsprintersupport.dll
# DESTINATION bin/printsupport)
install(FILES ${MINGW_PATH}/../share/qt6/translations/qtbase_de.qm
${MINGW_PATH}/../share/qt6/translations/qt_de.qm
${MINGW_PATH}/../share/qt6/translations/qt_help_de.qm
${MINGW_PATH}/../share/qt6/translations/qtmultimedia_de.qm
#${MINGW_PATH}/../share/qt6/translations/qtquickcontrols_de.qm
#${MINGW_PATH}/../share/qt6/translations/qtscript_de.qm
#${MINGW_PATH}/../share/qt6/translations/qtxmlpatterns_de.qm
DESTINATION bin/translations)
endif( MINGW )

View file

@ -1,4 +1,4 @@
Copyright © 2018 Martin Brodbeck
Copyright © 2018-2024 Martin Brodbeck
Hiermit wird unentgeltlich jeder Person, die eine Kopie der Software und der
zugehörigen Dokumentationen (die "Software") erhält, die Erlaubnis erteilt,

View file

@ -13,19 +13,17 @@ Verkaufsdaten nach dem Verkaufsende auszutauschen.
Ebenso können über einen ESC/POS-Drucker Quittungen ausgestellt werden.
## Installation
Auf [rustysoft.de](https://www.rustysoft.de/?01_kima2) werden verschiedene Installationspakete (Arch Linux,
Auf [rustysoft.de](https://www.rustysoft.de/software/kima2/) werden verschiedene Installationspakete (Arch Linux,
Ubuntu, Windows) angeboten. Bitte die Hinweise dort beachten.
### Selbst compilieren
KIMA2 benötigt folgende Libraries:
* Qt5
* boost >= 1.62
* Qt 6
* boost >= 1.80
* libusb-1.0
* xlnt >= 1.3.0
* nlohmann-json (als 3rdparty submodule vorhanden)
Da Features aus C++17 verwendet werden sowie std::filesystem, sollte als Compiler mindestens
GCC 8 verwendet werden.
Da Features aus C++20 verwendet werden, sollte als Compiler mindestens GCC 12 verwendet werden.
Die Installationsschritte unter Linux sind wie folgt:
```
@ -37,4 +35,4 @@ sudo make install
```
Unter Windows muss vorab MinGW eingerichtet werden (z. B. MSYS2). Nach der Compilierung kann mit
`cpack -G NSIS` ein Installationspaket erstellt werden.
`cpack -G NSIS` ein Installationspaket erstellt werden.

View file

@ -0,0 +1,27 @@
<?xml version="1.0" encoding="UTF-8"?>
<component type="desktop-application">
<id>de.rustysoft.kima2</id>
<name>KIMA2</name>
<summary>A small cash point program for childrens stuff markets</summary>
<metadata_license>MIT</metadata_license>
<project_license>GPL-3.0-or-later</project_license>
<releases>
<release version="@PROJECT_VERSION@" type="stable" date="2024-01-23" />
</releases>
<description>
<p>
A small cash point program for children's stuff markets. German language only.
</p>
</description>
<launchable type="desktop-id">de.rustysoft.kima2.desktop</launchable>
<screenshots>
<screenshot type="default">
<image>https://rustysoft.de/images/software/kima2/screenshot.png</image>
</screenshot>
</screenshots>
</component>

Binary file not shown.

Binary file not shown.

33
meson.build Normal file
View file

@ -0,0 +1,33 @@
project('kima2', 'cpp', default_options : ['cpp_std=c++20'], version : '1.8.0')
conf_data = configuration_data()
conf_data.set('PROJECT_VERSION', '"' + meson.project_version() + '"')
configure_file(output : 'config.h',
configuration : conf_data)
configuration_inc = include_directories('.')
#csv = cmake.subproject('csv-parser')
#csv_lib = csv.dependency('csv')
nlohmann_lib = dependency('nlohmann_json', version : '>=3.5.0', required : false)
if not nlohmann_lib.found()
nlohmann_inc = include_directories('subprojects/nlohmann_json/single_include')
nlohmann_lib = declare_dependency(include_directories : nlohmann_inc)
endif
csv_inc = include_directories('subprojects/csv-parser/single_include')
csv_dep = declare_dependency(include_directories : csv_inc)
singleapp_proj = subproject('singleapplication')
singleapp_lib = singleapp_proj.get_variable('singleapp_lib')
singleapp_dep = singleapp_proj.get_variable('singleapp_dep')
subdir('src')
if build_machine.system() == 'linux'
install_data('misc/kima2.svg', install_dir : get_option('datadir') / 'icons/hicolor/scalable/apps')
install_data('misc/kima2.desktop', install_dir : get_option('datadir') / 'applications')
install_data('manual/Benutzerhandbuch.pdf', install_dir : get_option('datadir') / 'kima2')
endif

View file

@ -1,23 +1,29 @@
# Maintainer: Martin Brodbeck <martin at brodbeck-online dot de>
pkgname=kima2
pkgver=1.1.0
pkgver=1.7.1
pkgrel=1
pkgdesc="A small cash point program for children's things markets (German only)"
arch=('i686' 'x86_64')
url="http://www.rustysoft.de/?01_kima2"
url="http://www.rustysoft.de/software/kima2"
license=('custom')
depends=('glibc' 'libusb' 'qt5-base' 'sqlite3' 'xlnt')
depends=('glibc' 'libusb' 'qt6-base' 'sqlite3')
makedepends=('boost>=1.62')
source=($pkgname-$pkgver.tar.gz)
md5sums=('')
source=(git+https://git.rustysoft.de/martin/kima2)
sha256sums=('SKIP')
build() {
if [ ! -d $pkgname/build ]; then
mkdir $pkgname/build
fi
cd $pkgname/build
cd $pkgname
cmake -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=/usr -DKIMA2_USE_EXTERNAL_JSON=ON ..
git checkout v$pkgver
git submodule init
git submodule update
if [ -d build ]; then
rm -rf build
fi
mkdir build && cd build
cmake -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=/usr -DKIMA2_USE_EXTERNAL_JSON=OFF ..
make
}

View file

@ -3,8 +3,8 @@ Type=Application
Name=KIMA2
GenericName=Cash Point Program
GenericName[de]=Kassenprogramm
Comment=A small cash point program
Comment[de]=Ein kleines Kassenprogramm
Comment=A small cash point program for children's stuff markets
Comment[de]=Ein kleines Kassenprogramm für Kindersachenmärkte
Exec=kima2
Icon=kima2
Categories=Office;

43
misc/kima2.spec Normal file
View file

@ -0,0 +1,43 @@
Name: kima2
Version: 1.6.0
Release: 1%{?dist}
Summary: A small cash point program for children's things markets
License: custom
Source0: %{name}-%{version}.tar.gz
BuildRequires: meson
BuildRequires: gcc-c++
#BuildRequires: pkgconfig(nlohmann_json)
BuildRequires: boost-date-time
BuildRequires: sqlite-devel
BuildRequires: libusb-devel
BuildRequires: qt5-qtdeclarative-devel
#BuildRequires: pkgconfig(pthreads)
%description
%prep
%autosetup
%build
%meson
%meson_build
%install
%meson_install
%check
%meson_test
%files
%{_bindir}/kima2
%{_datadir}/applications/kima2.desktop
%{_datadir}/icons/hicolor/scalable/apps/kima2.svg
%{_datadir}/kima2/Benutzerhandbuch.pdf
%changelog
* Fri Oct 11 2019 Martin Brodbeck <infor@rustysoft.de> - dev builds
-

View file

@ -1,14 +1,11 @@
set(Boost_USE_STATIC_LIBS ON)
find_package(Boost 1.62 COMPONENTS date_time REQUIRED)
find_package(Boost 1.78 REQUIRED)
find_package(SQLite3 REQUIRED)
if (MINGW)
find_package(XLNT REQUIRED STATIC)
else (MINGW)
find_package(PkgConfig REQUIRED)
pkg_check_modules(XLNT REQUIRED xlnt>=1.3)
endif (MINGW)
# Because csv-parser needs threads:
find_package(fmt)
set(CORE_SOURCES
database.cpp
@ -19,7 +16,6 @@ set(CORE_SOURCES
article.cpp
sale.cpp
marketplace.cpp
excelreader.cpp
csvreader.cpp
jsonutil.cpp
utils.cpp
@ -27,13 +23,12 @@ set(CORE_SOURCES
add_library(core STATIC ${CORE_SOURCES})
target_include_directories(core PRIVATE ${PROJECT_SOURCE_DIR}/3rdparty/csv-parser/include)
#target_include_directories(core PRIVATE ${PROJECT_SOURCE_DIR}/subprojects/csv-parser/single_include)
if (WIN32)
target_link_libraries(core PRIVATE printer Boost::boost Boost::date_time sqlite3 nlohmann_json::nlohmann_json ${XLNT_LIBRARY} csv)
target_link_libraries(core PRIVATE sqlite3 nlohmann_json::nlohmann_json)
target_link_libraries(core PRIVATE bcrypt)
else()
target_link_libraries(core PRIVATE printer Boost::boost Boost::date_time sqlite3 nlohmann_json::nlohmann_json ${XLNT_LIBRARIES} csv)
target_link_libraries(core PRIVATE sqlite3 nlohmann_json::nlohmann_json)
endif()
#target_include_directories(core PRIVATE ${PROJECT_SOURCE_DIR}/3rdparty/csv-parser)
target_include_directories(core PUBLIC ${CMAKE_CURRENT_SOURCE_DIR})
target_include_directories(core PUBLIC ${CMAKE_CURRENT_SOURCE_DIR}/..)

View file

@ -1,37 +1,38 @@
#include "article.h"
#include "seller.h"
#include "utils.h"
#include <iomanip>
#include <sstream>
Article::Article(int price) : price_(price) {}
Article::Article(int price) : m_price(price) {}
void Article::setArticleNo(int articleNo) { articleNo_ = articleNo; }
void Article::setArticleNo(int articleNo) { m_articleNo = articleNo; }
void Article::setPrice(int price) { price_ = price; }
void Article::setPrice(int price) { m_price = price; }
void Article::setDescription(const std::string& description) { description_ = description; }
void Article::setDescription(const std::string &description) { m_description = description; }
void Article::setSale(Sale* salePtr) { salePtr_ = salePtr; }
void Article::setSale(Sale *salePtr) { m_salePtr = salePtr; }
void Article::setSeller(Seller* sellerPtr) { sellerPtr_ = sellerPtr; }
void Article::setSeller(Seller *sellerPtr) { m_sellerPtr = sellerPtr; }
bool Article::isSold() { return salePtr_ ? true : false; }
bool Article::isSold() { return m_salePtr ? true : false; }
std::string Article::getDescription() { return description_; }
std::string Article::getDescription() { return m_description; }
Seller* Article::getSeller() { return sellerPtr_; }
Sale* Article::getSale() { return salePtr_; }
Seller *Article::getSeller() { return m_sellerPtr; }
Sale *Article::getSale() { return m_salePtr; }
int Article::getPrice() const { return price_; }
int Article::getPrice() const { return m_price; }
std::string Article::getPriceAsString() const { return formatCentAsEuroString(price_); }
std::string Article::getPriceAsString() const { return formatCentAsEuroString(m_price); }
int Article::getArticleNo() const { return articleNo_; }
int Article::getArticleNo() const { return m_articleNo; }
std::string Article::getCompleteArticleNo() const
{
std::stringstream artNoStream;
artNoStream << sourceNo_ << "K" << std::setfill('0') << std::setw(5) << articleNo_;
artNoStream << m_sourceNo << "K" << std::setfill('0') << std::setw(5) << m_articleNo;
return artNoStream.str();
}
}

View file

@ -2,8 +2,6 @@
#define ARTICLE_H
#include "entityuuid.h"
//#include "sale.h"
//#include "seller.h"
#include <memory>
#include <string>
@ -13,33 +11,33 @@ class Sale;
class Article : public EntityUuid
{
public:
public:
Article() = default;
Article(int price);
Article(const Article&) = delete;
Article(const Article &) = delete;
virtual ~Article() = default;
void setArticleNo(int articleNo);
void setPrice(int price);
void setDescription(const std::string& description);
void setDescription(const std::string &description);
bool isSold();
void setSale(Sale* salePtr);
void setSeller(Seller* sellerPtr);
void setSale(Sale *salePtr);
void setSeller(Seller *sellerPtr);
int getArticleNo() const;
std::string getCompleteArticleNo() const;
std::string getDescription();
Seller* getSeller();
Sale* getSale();
Seller *getSeller();
Sale *getSale();
int getPrice() const;
std::string getPriceAsString() const;
private:
Seller* sellerPtr_{};
Sale* salePtr_{};
int articleNo_{};
int price_{};
std::string description_{};
private:
Seller *m_sellerPtr{};
Sale *m_salePtr{};
int m_articleNo{};
int m_price{};
std::string m_description{};
};
#endif

View file

@ -2,58 +2,78 @@
#include "utils.h"
#include <fstream>
#include <csv.hpp>
// #include <csv.hpp>
#include <boost/algorithm/string.hpp>
#ifdef DELETE
#undef DELETE
#endif
namespace fs = std::filesystem;
std::size_t CsvReader::readSellersFromFile(const fs::path& filePath, Marketplace* market)
std::size_t CsvReader::readSellersFromFile(const fs::path &filePath, Marketplace *market)
{
csv::CSVFormat format;
format.delimiter(';');
#if defined(_WIN64) || defined(_WIN32)
// Windows: Somhow this is necessary in order to open file names with umlauts
auto wide = filePath.wstring();
std::string fileName(wide.begin(), wide.end());
csv::CSVReader csvReader(fileName, format);
std::ifstream infile(fileName);
#else
csv::CSVReader csvReader(filePath.string(), format);
// csv::CSVReader csvReader(filePath.string(), format);
std::ifstream infile(filePath.string());
#endif
for (auto& seller : market->getSellers()) {
for (auto &seller : market->getSellers()) {
seller->setState(Seller::State::DELETE);
}
market->storeToDb(true);
int rowCount{};
for (csv::CSVRow &row : csvReader) {
if (!row[0].is_int()) {
++rowCount;
continue;
}
if (row[2].get<std::string>().empty() && row[3].get<std::string>().empty()) {
++rowCount;
continue;
}
std::string line;
while (getline(infile, line)) {
std::vector<std::string> strs;
boost::split(strs, line, boost::is_any_of(";"));
auto seller = std::make_unique<Seller>();
seller->setSellerNo(row[0].get<int>());
if (row[1].is_int()) {
seller->setNumArticlesOffered(row[1].get<int>());
} else {
seller->setNumArticlesOffered(0);
try {
int sellerNo = std::stoi(strs[0]);
seller->setSellerNo(sellerNo);
} catch (std::invalid_argument const &ex) {
continue;
}
std::string firstName = row[2].get<std::string>();
seller->setFirstName(trim(firstName));
std::string lastName = row[3].get<std::string>();
seller->setLastName(trim(lastName));
if (isNumber(strs[1]))
seller->setNumArticlesOffered(std::stoi(strs[1]));
else
seller->setNumArticlesOffered(0);
// If both, first name and last name, are empty, use N. N.
// Else, use the real values.
if (strs[2].empty() && strs[2].empty()) {
seller->setFirstName("N.");
seller->setLastName("N.");
} else {
std::string firstName = strs[2];