Skip to content

Commit 9f8435b

Browse files
authored
feat: create SCM plugin and add line drawing tool (#14)(#15) (#21)
1 parent c632288 commit 9f8435b

File tree

14 files changed

+4359
-129
lines changed

14 files changed

+4359
-129
lines changed

.clang-format

Lines changed: 41 additions & 94 deletions
Original file line numberDiff line numberDiff line change
@@ -1,100 +1,47 @@
11
---
2-
Language: Cpp
3-
AccessModifierOffset: -3
4-
AlignAfterOpenBracket: Align
5-
AlignConsecutiveAssignments: AcrossEmptyLinesAndComments
6-
AlignConsecutiveDeclarations: AcrossEmptyLinesAndComments
7-
AlignEscapedNewlines: Right
8-
AlignOperands: true
9-
AlignTrailingComments: true
10-
AllowAllParametersOfDeclarationOnNextLine: false
11-
AllowShortBlocksOnASingleLine: Empty
12-
AllowShortCaseLabelsOnASingleLine: false
13-
AllowShortFunctionsOnASingleLine: Inline
14-
AllowShortIfStatementsOnASingleLine: Never
15-
AllowShortLoopsOnASingleLine: false
16-
AlwaysBreakAfterReturnType: None
17-
AlwaysBreakBeforeMultilineStrings: false
18-
AlwaysBreakTemplateDeclarations: Yes
19-
BinPackArguments: false
20-
BinPackParameters: false
2+
BasedOnStyle: LLVM
3+
IndentWidth: 8
4+
TabWidth: 8
5+
UseTab: Always
6+
AlignConsecutiveAssignments: false
7+
AlignTrailingComments: false
8+
AllowShortFunctionsOnASingleLine: None
9+
BreakBeforeBraces: Allman
2110
BraceWrapping:
22-
AfterClass: true
23-
AfterControlStatement: Never
24-
AfterEnum: true
25-
AfterFunction: true
26-
AfterNamespace: true
27-
AfterObjCDeclaration: true
28-
AfterStruct: true
29-
AfterUnion: true
30-
BeforeCatch: false
31-
BeforeElse: false
32-
IndentBraces: false
33-
BreakBeforeBinaryOperators: None
34-
BreakBeforeBraces: Custom
35-
BreakBeforeInheritanceComma: true
36-
BreakBeforeTernaryOperators: true
37-
BreakConstructorInitializersBeforeComma: false
38-
BreakConstructorInitializers: BeforeComma
39-
BreakAfterJavaFieldAnnotations: false
40-
BreakStringLiterals: true
41-
ColumnLimit: 120
42-
CommentPragmas: '^ IWYU pragma:'
43-
CompactNamespaces: false
44-
ConstructorInitializerAllOnOneLineOrOnePerLine: false
45-
ConstructorInitializerIndentWidth: 3
46-
ContinuationIndentWidth: 2
47-
Cpp11BracedListStyle: false
48-
DerivePointerAlignment: false
49-
DisableFormat: false
50-
ExperimentalAutoDetectBinPacking: false
51-
FixNamespaceComments: false
52-
ForEachMacros: [ foreach, Q_FOREACH, BOOST_FOREACH ]
53-
IncludeCategories:
54-
- Regex: '^"(llvm|llvm-c|clang|clang-c)/'
55-
Priority: 2
56-
- Regex: '^(<|"(gtest|isl|json)/)'
57-
Priority: 3
58-
- Regex: '.*'
59-
Priority: 1
60-
IncludeIsMainRegex: '$'
11+
AfterClass: true
12+
AfterControlStatement: true
13+
AfterEnum: true
14+
AfterFunction: true
15+
AfterNamespace: true
16+
AfterStruct: true
17+
AfterUnion: true
18+
BeforeCatch: true
19+
BeforeElse: true
20+
IndentBraces: false
6121
IndentCaseLabels: true
62-
IndentWidth: 3
63-
IndentWrappedFunctionNames: false
64-
JavaScriptQuotes: Leave
65-
JavaScriptWrapImports: true
66-
KeepEmptyLinesAtTheStartOfBlocks: true
67-
MacroBlockBegin: ''
68-
MacroBlockEnd: ''
69-
MaxEmptyLinesToKeep: 1
70-
NamespaceIndentation: All
71-
ObjCBlockIndentWidth: 2
72-
ObjCSpaceAfterProperty: true
73-
ObjCSpaceBeforeProtocolList: false
74-
PenaltyBreakAssignment: 2
75-
PenaltyBreakBeforeFirstCallParameter: 19
76-
PenaltyBreakComment: 300
77-
PenaltyBreakFirstLessLess: 120
78-
PenaltyBreakString: 1000
79-
PenaltyExcessCharacter: 1000000
80-
PenaltyReturnTypeOnItsOwnLine: 200
81-
PointerAlignment: Middle
82-
ReflowComments: true
83-
SortIncludes: CaseSensitive
84-
SpaceAfterCStyleCast: false
85-
SpaceAfterTemplateKeyword: false
86-
SpaceBeforeAssignmentOperators: true
22+
AccessModifierOffset: -8
23+
IndentPPDirectives: None
24+
IndentAccessModifiers: false
25+
IndentWrappedFunctionNames: true
26+
ColumnLimit: 120
27+
PointerAlignment: Right
28+
SpacesInParentheses: false
8729
SpaceBeforeParens: ControlStatements
88-
SpaceInEmptyParentheses: false
89-
SpacesBeforeTrailingComments: 1
90-
SpacesInAngles: false
91-
SpacesInContainerLiterals: true
30+
SpaceBeforeRangeBasedForLoopColon: true
31+
SpaceBeforeSquareBrackets: false
32+
SpacesInAngles: false
33+
SpacesInContainerLiterals: false
9234
SpacesInCStyleCastParentheses: false
93-
SpacesInParentheses: false
35+
SpacesBeforeTrailingComments: 2
36+
AllowShortIfStatementsOnASingleLine: false
37+
AllowShortLoopsOnASingleLine: false
38+
AllowShortBlocksOnASingleLine: false
39+
SortIncludes: false
40+
NamespaceIndentation: None
41+
BreakConstructorInitializers: BeforeComma
42+
ConstructorInitializerIndentWidth: 8
9443
SpacesInSquareBrackets: false
95-
Standard: c++11
96-
TabWidth: 3
97-
UseTab: Never
98-
...
99-
100-
44+
SpaceAfterCStyleCast: false
45+
DerivePointerAlignment: false
46+
BinPackParameters: false # Each parameter is placed on its own line.
47+
BinPackArguments: false # Each argument is placed on its own line.

.clang-tidy

Lines changed: 75 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -1,37 +1,77 @@
11
---
2-
Checks: '*,-google-default-arguments,-fuchsia-*,-zircon-*,-abseil-*,-llvmlibc-*'
3-
WarningsAsErrors: ''
4-
HeaderFilterRegex: ''
5-
AnalyzeTemporaryDtors: false
6-
FormatStyle: file
2+
Checks: >
3+
-*,
4+
readability-misleading-indentation,
5+
readability-redundant-declaration,
6+
readability-redundant-member-init,
7+
readability-use-anyofallof,
8+
readability-identifier-naming,
9+
readability-braces-around-statements,
10+
readability-function-cognitive-complexity,
11+
readability-magic-numbers,
12+
readability-else-after-return,
13+
readability-avoid-const-params-in-decls,
14+
readability-container-size-empty,
15+
readability-redundant-string-cstr,
16+
readability-redundant-control-flow,
17+
readability-simplify-boolean-expr,
18+
readability-uppercase-literal-suffix,
19+
readability-static-accessed-through-instance,
20+
readability-named-parameter,
21+
modernize-use-auto,
22+
modernize-use-nullptr,
23+
modernize-use-override,
24+
modernize-deprecated-headers,
25+
modernize-use-using,
26+
modernize-avoid-c-arrays,
27+
modernize-make-unique,
28+
modernize-make-shared,
29+
cppcoreguidelines-avoid-magic-numbers,
30+
cppcoreguidelines-pro-bounds-constant-array-index,
31+
cppcoreguidelines-pro-type-static-cast-downcast,
32+
cppcoreguidelines-pro-type-reinterpret-cast,
33+
cppcoreguidelines-pro-type-cstyle-cast,
34+
cppcoreguidelines-pro-type-member-init,
35+
cppcoreguidelines-pro-bounds-pointer-arithmetic,
36+
cppcoreguidelines-pro-type-vararg,
37+
cppcoreguidelines-no-malloc,
38+
cppcoreguidelines-special-member-functions,
39+
cppcoreguidelines-avoid-non-const-global-variables,
40+
cppcoreguidelines-init-variables,
41+
hicpp-no-array-decay,
42+
hicpp-signed-bitwise,
43+
hicpp-uppercase-literal-suffix,
44+
hicpp-use-auto,
45+
hicpp-use-nullptr,
46+
hicpp-use-override,
47+
hicpp-deprecated-headers,
48+
hicpp-explicit-conversions,
49+
hicpp-multiway-paths-covered,
50+
hicpp-no-malloc,
51+
hicpp-special-member-functions,
52+
hicpp-avoid-goto,
53+
performance-for-range-copy,
54+
performance-implicit-conversion-in-loop,
55+
performance-inefficient-vector-operation,
56+
performance-unnecessary-value-param
57+
WarningsAsErrors: "*"
58+
HeaderFilterRegex: ".*"
59+
AnalyzeTemporaryDtors: true
60+
FormatStyle: file
761
CheckOptions:
8-
- key: cert-dcl16-c.NewSuffixes
9-
value: 'L;LL;LU;LLU'
10-
- key: cppcoreguidelines-non-private-member-variables-in-classes.IgnoreClassesWithAllMemberVariablesBeingPublic
11-
value: '1'
12-
- key: google-readability-braces-around-statements.ShortStatementLines
13-
value: '1'
14-
- key: google-readability-function-size.StatementThreshold
15-
value: '800'
16-
- key: google-readability-namespace-comments.ShortNamespaceLines
17-
value: '10'
18-
- key: google-readability-namespace-comments.SpacesBeforeComments
19-
value: '2'
20-
- key: modernize-loop-convert.MaxCopySize
21-
value: '16'
22-
- key: modernize-loop-convert.MinConfidence
23-
value: reasonable
24-
- key: modernize-loop-convert.NamingStyle
25-
value: CamelCase
26-
- key: modernize-pass-by-value.IncludeStyle
27-
value: llvm
28-
- key: modernize-replace-auto-ptr.IncludeStyle
29-
value: llvm
30-
- key: modernize-use-nullptr.NullMacros
31-
value: 'NULL'
32-
- key: misc-non-private-member-variables-in-classes.IgnoreClassesWithAllMemberVariablesBeingPublic
33-
value: '1'
34-
- key: modernize-use-default-member-init.UseAssignment
35-
value: '1'
36-
...
37-
62+
- key: readability-identifier-naming.ClassCase
63+
value: CamelCase
64+
- key: readability-identifier-naming.MethodCase
65+
value: camelBack
66+
- key: readability-identifier-naming.VariableCase
67+
value: camelBack
68+
- key: readability-identifier-naming.ConstantCase
69+
value: UPPER_CASE
70+
- key: readability-identifier-naming.MacroDefinitionCase
71+
value: UPPER_CASE
72+
- key: readability-identifier-naming.EnumCase
73+
value: CamelCase
74+
- key: readability-identifier-naming.EnumConstantCase
75+
value: CamelCase
76+
- key: readability-braces-around-statements.ShortStatementLines
77+
value: 1

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -75,3 +75,5 @@ qrc_*.cpp
7575
.kdev4
7676
# Ignore Eclipse project files
7777
.project
78+
# Ignore vscode project files
79+
.vscode

BUILDING.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -444,6 +444,7 @@ List of supported parameters (passed as `-DPARAMETER=VALUE`):
444444
| USE_PLUGIN_SATELLITES | bool | ON | Enable building the Satellites plugin
445445
| USE_PLUGIN_SCENERY3D | bool | ON | Enable building the 3D Scenery plugin
446446
| USE_PLUGIN_SIMPLEDRAWLINE | bool | OFF | Enable building the SimpleDrawLine plugin (example of simple graphics plugin)
447+
| USE_PLUGIN_SKYCULTUREMAKER | bool | ON | Enable building the Sky Culture Maker plugin
447448
| USE_PLUGIN_SOLARSYSTEMEDITOR | bool | ON | Enable building the Solar System Editor plugin
448449
| USE_PLUGIN_SUPERNOVAE | bool | ON | Enable building the Historical Supernovae plugin
449450
| USE_PLUGIN_TELESCOPECONTROL | bool | ON | Enable building the Telescope Control plugin

CMakeLists.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -566,6 +566,7 @@ ENDIF()
566566
ADD_PLUGIN(RemoteSync 1)
567567
ADD_PLUGIN(Satellites 1)
568568
ADD_PLUGIN(Scenery3d 1)
569+
ADD_PLUGIN(SkyCultureMaker 1)
569570
ADD_PLUGIN(SolarSystemEditor 1)
570571
ADD_PLUGIN(Supernovae 1)
571572
ADD_PLUGIN(LensDistortionEstimator 1)
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
# This is the cmake config file for the Sky Culture Maker plugin
2+
SET(SCM_VERSION "0.1.0")
3+
4+
ADD_DEFINITIONS(-DSKYCULTUREMAKER_PLUGIN_VERSION="${SCM_VERSION}")
5+
ADD_DEFINITIONS(-DSKYCULTUREMAKER_PLUGIN_LICENSE="GNU GPLv2 or later")
6+
7+
ADD_SUBDIRECTORY( src )

0 commit comments

Comments
 (0)