commit 47cfff10196dd5cffb89c326d2ef8cc66df339d5 Author: peri4 Date: Thu Jun 15 13:15:01 2023 +0300 initial diff --git a/.clang-format b/.clang-format new file mode 100644 index 0000000..ab89af9 --- /dev/null +++ b/.clang-format @@ -0,0 +1,224 @@ +--- +Language: Cpp +AccessModifierOffset: -4 +AlignAfterOpenBracket: Align +AlignArrayOfStructures: Left +AlignConsecutiveAssignments: + Enabled: true + AcrossEmptyLines: true + AcrossComments: true + AlignCompound: false + PadOperators: true +AlignConsecutiveBitFields: + Enabled: true + AcrossEmptyLines: false + AcrossComments: true + AlignCompound: false + PadOperators: true +AlignConsecutiveDeclarations: + Enabled: false + AcrossEmptyLines: false + AcrossComments: false + AlignCompound: false + PadOperators: false +AlignConsecutiveMacros: + Enabled: true + AcrossEmptyLines: true + AcrossComments: true + AlignCompound: false + PadOperators: true +AlignEscapedNewlines: Left +AlignOperands: Align +AlignTrailingComments: true +AllowAllArgumentsOnNextLine: false +AllowAllParametersOfDeclarationOnNextLine: false +AllowShortEnumsOnASingleLine: false +AllowShortBlocksOnASingleLine: Empty +AllowShortCaseLabelsOnASingleLine: true +AllowShortFunctionsOnASingleLine: Inline +AllowShortLambdasOnASingleLine: All +AllowShortIfStatementsOnASingleLine: WithoutElse +AllowShortLoopsOnASingleLine: false +AlwaysBreakAfterDefinitionReturnType: None +AlwaysBreakAfterReturnType: None +AlwaysBreakBeforeMultilineStrings: false +AlwaysBreakTemplateDeclarations: Yes +AttributeMacros: + - __capability +BinPackArguments: false +BinPackParameters: false +BraceWrapping: + AfterCaseLabel: false + AfterClass: false + AfterControlStatement: Never + AfterEnum: false + AfterFunction: false + AfterNamespace: false + AfterObjCDeclaration: false + AfterStruct: false + AfterUnion: false + AfterExternBlock: false + BeforeCatch: false + BeforeElse: false + BeforeLambdaBody: false + BeforeWhile: false + IndentBraces: false + SplitEmptyFunction: false + SplitEmptyRecord: false + SplitEmptyNamespace: true +BreakBeforeBinaryOperators: None +BreakBeforeConceptDeclarations: Always +BreakBeforeBraces: Attach +BreakInheritanceList: BeforeComma +BreakBeforeTernaryOperators: true +BreakConstructorInitializers: BeforeComma +BreakAfterJavaFieldAnnotations: false +BreakStringLiterals: true +ColumnLimit: 140 +CommentPragmas: '^ IWYU pragma:' +QualifierAlignment: Leave +CompactNamespaces: false +ConstructorInitializerIndentWidth: 4 +ContinuationIndentWidth: 4 +Cpp11BracedListStyle: true +DeriveLineEnding: false +DerivePointerAlignment: false +DisableFormat: false +EmptyLineAfterAccessModifier: Never +EmptyLineBeforeAccessModifier: Always +ExperimentalAutoDetectBinPacking: false +PackConstructorInitializers: CurrentLine +BasedOnStyle: '' +ConstructorInitializerAllOnOneLineOrOnePerLine: true +AllowAllConstructorInitializersOnNextLine: true +FixNamespaceComments: true +ForEachMacros: + - foreach + - Q_FOREACH + - BOOST_FOREACH + - piForeach + - piForeachC + - piForeachR + - piForeachRC + - piForeachCR +IfMacros: + - KJ_IF_MAYBE +IncludeBlocks: Regroup +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: false +IndentPPDirectives: AfterHash +IndentExternBlock: NoIndent +IndentRequiresClause: true +IndentWidth: 4 +IndentWrappedFunctionNames: false +InsertBraces: false +InsertTrailingCommas: Wrapped +JavaScriptQuotes: Leave +JavaScriptWrapImports: true +KeepEmptyLinesAtTheStartOfBlocks: false +LambdaBodyIndentation: Signature +MacroBlockBegin: "PRIVATE_DEFINITION_START|STATIC_INITIALIZER_BEGIN" +MacroBlockEnd: "PRIVATE_DEFINITION_END|STATIC_INITIALIZER_END" +MaxEmptyLinesToKeep: 2 +NamespaceIndentation: None +ObjCBinPackProtocolList: Auto +ObjCBlockIndentWidth: 2 +ObjCBreakBeforeNestedBlockParam: true +ObjCSpaceAfterProperty: false +ObjCSpaceBeforeProtocolList: true +PenaltyBreakAssignment: 2 +PenaltyBreakBeforeFirstCallParameter: 19 +PenaltyBreakComment: 300 +PenaltyBreakFirstLessLess: 120 +PenaltyBreakOpenParenthesis: 0 +PenaltyBreakString: 1000 +PenaltyBreakTemplateDeclaration: 10 +PenaltyExcessCharacter: 1000000 +PenaltyReturnTypeOnItsOwnLine: 60 +PenaltyIndentedWhitespace: 0 +PointerAlignment: Middle +PPIndentWidth: 2 +ReferenceAlignment: Middle +ReflowComments: true +RemoveBracesLLVM: false +RequiresClausePosition: OwnLine +SeparateDefinitionBlocks: Leave +ShortNamespaceLines: 1 +SortIncludes: CaseSensitive +SortJavaStaticImport: Before +SortUsingDeclarations: true +SpaceAfterCStyleCast: false +SpaceAfterLogicalNot: false +SpaceAfterTemplateKeyword: false +SpaceBeforeAssignmentOperators: true +SpaceBeforeCaseColon: false +SpaceBeforeCpp11BracedList: false +SpaceBeforeCtorInitializerColon: false +SpaceBeforeInheritanceColon: false +SpaceBeforeParens: ControlStatementsExceptControlMacros +SpaceBeforeParensOptions: + AfterControlStatements: true + AfterForeachMacros: false + AfterFunctionDefinitionName: false + AfterFunctionDeclarationName: false + AfterIfMacros: false + AfterOverloadedOperator: false + AfterRequiresInClause: false + AfterRequiresInExpression: false + BeforeNonEmptyParentheses: false +SpaceAroundPointerQualifiers: Both +SpaceBeforeRangeBasedForLoopColon: false +SpaceInEmptyBlock: false +SpaceInEmptyParentheses: false +SpacesBeforeTrailingComments: 1 +SpacesInAngles: Never +SpacesInConditionalStatement: false +SpacesInContainerLiterals: false +SpacesInCStyleCastParentheses: false +SpacesInLineCommentPrefix: + Minimum: 1 + Maximum: -1 +SpacesInParentheses: false +SpacesInSquareBrackets: false +SpaceBeforeSquareBrackets: false +BitFieldColonSpacing: After +Standard: c++11 +StatementAttributeLikeMacros: + - Q_EMIT + - PIMETA +StatementMacros: + - Q_UNUSED + - QT_REQUIRE_VERSION + - PRIVATE_DECLARATION + - NO_COPY_CLASS + - FOREVER_WAIT + - WAIT_FOREVER +TabWidth: 4 +UseCRLF: false +UseTab: AlignWithSpaces +WhitespaceSensitiveMacros: + - STRINGIZE + - PP_STRINGIZE + - BOOST_PP_STRINGIZE + - NS_SWIFT_NAME + - CF_SWIFT_NAME + - PIMETA +... + diff --git a/.editorconfig b/.editorconfig new file mode 100644 index 0000000..3f43534 --- /dev/null +++ b/.editorconfig @@ -0,0 +1,6 @@ +root = true + +[*.{h,c,cpp}] +charset = utf-8 +indent_style = tab +tab_width = 4 diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..48a9424 --- /dev/null +++ b/.gitignore @@ -0,0 +1,5 @@ +/.svn +CMakeLists.txt.user* +/release +/build +/*_build_* diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt new file mode 100644 index 0000000..0d8d177 --- /dev/null +++ b/src/CMakeLists.txt @@ -0,0 +1,37 @@ +project(your_app) +cmake_minimum_required(VERSION 2.6) +find_package(PIP REQUIRED) +find_package(QAD REQUIRED) +qad_find_qt(Qt5 Core Gui Widgets) +set(TARGET_SUFFIX_Qt5 "") +set(CMAKE_INSTALL_PREFIX ${CMAKE_CURRENT_SOURCE_DIR}/..) +set_version(${PROJECT_NAME} + MAJOR 0 + MINOR 0 + REVISION 1 + BUILD ${BUILD_NUMBER}) +set_deploy_property(${PROJECT_NAME} + LABEL "${PROJECT_NAME}" + FULLNAME "App name" + COMPANY "Company" + INFO "Description") +if(WIN32) + set_deploy_property(${PROJECT_NAME} ICON "icons/logo.ico") +else() + set_deploy_property(${PROJECT_NAME} ICON "icons/logo.png") +endif() +set_lang(${PROJECT_NAME} en ru) +make_rc(${PROJECT_NAME} out_RC) +#pip_code_model(CCM "structs.h" OPTIONS "-ESs") +qad_sources(SRC) +qad_wrap(${SRC} HDRS out_HDR CPPS out_CPP QMS out_QM) +qad_add_executable(${PROJECT_NAME} out_CPP ${out_RC}) # ${CCM} +qad_target_link_libraries(${PROJECT_NAME} PIP QAD::Application) +qad_install(TARGETS ${PROJECT_NAME} DESTINATION ${CMAKE_INSTALL_PREFIX}/bin) +qad_install(LANG out_QM DESTINATION ${CMAKE_INSTALL_PREFIX}/bin/lang) +qad_install_lang(${PROJECT_NAME} DESTINATION ${CMAKE_INSTALL_PREFIX}/bin/lang) +deploy_target(${PROJECT_NAME} + DEPLOY_DIR ${CMAKE_INSTALL_PREFIX}/bin + DESTINATION ${CMAKE_INSTALL_PREFIX}/release + RESOURCES lang/ + OPTIONS --qt-plugins *=::imageformats=* --qt-plugins-dir plugins) diff --git a/src/icons/logo.ico b/src/icons/logo.ico new file mode 100644 index 0000000..082190c Binary files /dev/null and b/src/icons/logo.ico differ diff --git a/src/icons/logo.png b/src/icons/logo.png new file mode 100644 index 0000000..9c8effe Binary files /dev/null and b/src/icons/logo.png differ diff --git a/src/logo.png b/src/logo.png new file mode 100644 index 0000000..9c8effe Binary files /dev/null and b/src/logo.png differ diff --git a/src/main.cpp b/src/main.cpp new file mode 100644 index 0000000..34e69fd --- /dev/null +++ b/src/main.cpp @@ -0,0 +1,19 @@ +//#include "mainwindow.h" + +#include +#include +#include +#include +#include + + +int main(int argc, char * argv[]) { + QApplication a(argc, argv); + a.setWindowIcon(QIcon(":/icons/logo.png")); + QAD_SETUP_APPLICATION + enableHighDPI(); + QAD::loadTranslations(); + //MainWindow w; + //w.show(); + return a.exec(); +}