Skip to content

Commit 707fe6d

Browse files
authored
Merge master into release
2 parents 192ba1f + 4cdcc0e commit 707fe6d

File tree

308 files changed

+81191
-24281
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

308 files changed

+81191
-24281
lines changed

3rd-party/cove/.clang-format

Lines changed: 96 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,96 @@
1+
---
2+
Language: Cpp
3+
# BasedOnStyle: LLVM
4+
AccessModifierOffset: -4
5+
AlignAfterOpenBracket: Align
6+
AlignConsecutiveAssignments: false
7+
AlignConsecutiveDeclarations: false
8+
AlignEscapedNewlinesLeft: true
9+
AlignOperands: true
10+
AlignTrailingComments: true
11+
AllowAllParametersOfDeclarationOnNextLine: false
12+
AllowShortBlocksOnASingleLine: false
13+
AllowShortCaseLabelsOnASingleLine: false
14+
AllowShortFunctionsOnASingleLine: Empty
15+
AllowShortIfStatementsOnASingleLine: true
16+
AllowShortLoopsOnASingleLine: false
17+
AlwaysBreakAfterDefinitionReturnType: None
18+
AlwaysBreakAfterReturnType: None
19+
AlwaysBreakBeforeMultilineStrings: false
20+
AlwaysBreakTemplateDeclarations: false
21+
BinPackArguments: true
22+
BinPackParameters: true
23+
BraceWrapping:
24+
AfterClass: true
25+
AfterControlStatement: true
26+
AfterEnum: true
27+
AfterFunction: true
28+
AfterNamespace: false
29+
AfterObjCDeclaration: true
30+
AfterStruct: true
31+
AfterUnion: true
32+
BeforeCatch: true
33+
BeforeElse: true
34+
IndentBraces: false
35+
BreakBeforeBinaryOperators: None
36+
BreakBeforeBraces: Custom
37+
BreakBeforeTernaryOperators: true
38+
BreakConstructorInitializersBeforeComma: true
39+
BreakAfterJavaFieldAnnotations: false
40+
BreakStringLiterals: true
41+
ColumnLimit: 80
42+
CommentPragmas: '^ IWYU pragma:'
43+
ConstructorInitializerAllOnOneLineOrOnePerLine: false
44+
ConstructorInitializerIndentWidth: 4
45+
ContinuationIndentWidth: 4
46+
Cpp11BracedListStyle: true
47+
DerivePointerAlignment: false
48+
DisableFormat: false
49+
ExperimentalAutoDetectBinPacking: false
50+
ForEachMacros: [ foreach, Q_FOREACH, BOOST_FOREACH ]
51+
IncludeCategories:
52+
- Regex: '^<Q'
53+
Priority: 2
54+
- Regex: '^<(algorithm|any|array|atomic|bitset|cassert|ccomplex|cctype|cerrno|cfenv|cfloat|chrono|cinttypes|ciso646|climits|clocale|cmath|codecvt|complex|complex.h|condition_variable|csetjmp|csignal|cstdalign|cstdarg|cstdbool|cstddef|cstdint|cstdio|cstdlib|cstring|ctgmath|ctime|cuchar|cwchar|cwctype|cxxabi.h|deque|exception|fenv.h|forward_list|fstream|functional|future|initializer_list|iomanip|ios|iosfwd|iostream|istream|iterator|limits|list|locale|map|math.h|memory|mutex|new|numeric|optional|ostream|queue|random|ratio|regex|scoped_allocator|set|shared_mutex|sstream|stack|stdexcept|stdlib.h|streambuf|string|string_view|system_error|tgmath.h|thread|tuple|type_traits|typeindex|typeinfo|unordered_map|unordered_set|utility|valarray|variant|vector)>'
55+
Priority: 1
56+
- Regex: '.*'
57+
Priority: 3
58+
IncludeIsMainRegex: '$'
59+
IndentCaseLabels: false
60+
IndentWidth: 4
61+
IndentWrappedFunctionNames: false
62+
JavaScriptQuotes: Leave
63+
JavaScriptWrapImports: true
64+
KeepEmptyLinesAtTheStartOfBlocks: true
65+
MacroBlockBegin: ''
66+
MacroBlockEnd: ''
67+
MaxEmptyLinesToKeep: 1
68+
NamespaceIndentation: None
69+
ObjCBlockIndentWidth: 2
70+
ObjCSpaceAfterProperty: false
71+
ObjCSpaceBeforeProtocolList: true
72+
PenaltyBreakBeforeFirstCallParameter: 19
73+
PenaltyBreakComment: 300
74+
PenaltyBreakFirstLessLess: 120
75+
PenaltyBreakString: 1000
76+
PenaltyExcessCharacter: 1000000
77+
PenaltyReturnTypeOnItsOwnLine: 60
78+
PointerAlignment: Left
79+
ReflowComments: true
80+
SortIncludes: true
81+
SpaceAfterCStyleCast: false
82+
SpaceAfterTemplateKeyword: true
83+
SpaceBeforeAssignmentOperators: true
84+
SpaceBeforeParens: ControlStatements
85+
SpaceInEmptyParentheses: false
86+
SpacesBeforeTrailingComments: 1
87+
SpacesInAngles: false
88+
SpacesInContainerLiterals: false
89+
SpacesInCStyleCastParentheses: false
90+
SpacesInParentheses: false
91+
SpacesInSquareBrackets: false
92+
Standard: Cpp11
93+
TabWidth: 4
94+
UseTab: Always
95+
...
96+

3rd-party/cove/CMakeLists.txt

Lines changed: 69 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,69 @@
1+
project(Cove)
2+
3+
find_package(Qt5Core ${Qt5Core_VERSION} REQUIRED)
4+
find_package(Qt5Widgets ${Qt5Core_VERSION} REQUIRED)
5+
find_package(Qt5Concurrent ${Qt5Core_VERSION} REQUIRED)
6+
7+
set(CMAKE_CXX_STANDARD 14)
8+
9+
add_library(cove-potrace STATIC
10+
potrace/curve.c
11+
potrace/potracelib.c
12+
potrace/trace.c
13+
)
14+
target_include_directories(cove-potrace INTERFACE "${CMAKE_CURRENT_SOURCE_DIR}")
15+
16+
add_library(cove-vectorizer STATIC
17+
libvectorizer/AlphaGetter.cpp
18+
libvectorizer/Concurrency.cpp
19+
libvectorizer/FIRFilter.cpp
20+
libvectorizer/KohonenMap.cpp
21+
libvectorizer/MapColor.cpp
22+
libvectorizer/Morphology.cpp
23+
libvectorizer/ParallelImageProcessing.cpp
24+
libvectorizer/PatternGetter.cpp
25+
libvectorizer/Polygons.cpp
26+
libvectorizer/ProgressObserver.h
27+
libvectorizer/Vectorizer.cpp
28+
)
29+
target_include_directories(cove-vectorizer
30+
PRIVATE
31+
"${CMAKE_CURRENT_SOURCE_DIR}/libvectorizer"
32+
INTERFACE
33+
"${CMAKE_CURRENT_SOURCE_DIR}"
34+
)
35+
target_link_libraries(cove-vectorizer PRIVATE cove-potrace)
36+
target_link_libraries(cove-vectorizer PUBLIC Qt5::Gui Qt5::Concurrent)
37+
38+
set(Cove_SRCS
39+
app/classificationconfigform.cpp
40+
app/colorseditform.cpp
41+
app/coverunner.cpp
42+
app/mainform.cpp
43+
app/ImageView.cpp
44+
app/PolygonsView.cpp
45+
app/Settings.cpp
46+
app/UIProgressDialog.cpp
47+
app/vectorizationconfigform.cpp
48+
)
49+
50+
add_library(cove STATIC ${Cove_SRCS})
51+
target_compile_definitions(cove INTERFACE WITH_COVE)
52+
target_include_directories(cove
53+
PRIVATE
54+
"${CMAKE_CURRENT_SOURCE_DIR}/app"
55+
"${Mapper_SOURCE_DIR}/src"
56+
INTERFACE
57+
"${CMAKE_CURRENT_SOURCE_DIR}"
58+
)
59+
if(${CMAKE_VERSION} VERSION_LESS 3.8)
60+
target_include_directories(cove PRIVATE "${CMAKE_CURRENT_BINARY_DIR}")
61+
endif()
62+
target_link_libraries(cove cove-vectorizer Qt5::Widgets)
63+
set_target_properties(cove
64+
PROPERTIES
65+
AUTOMOC ON
66+
AUTOUIC ON
67+
)
68+
69+
add_subdirectory("tests")

0 commit comments

Comments
 (0)