Compare commits
233 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| f5d13554ec | |||
| 57e0e6e769 | |||
| 31376b12ad | |||
| c96fe6b32e | |||
| c06f24122b | |||
| 88dc25d151 | |||
| ad7e780a1f | |||
| 4d5135ac4b | |||
| a00268b5ed | |||
| c31af916bc | |||
| 25b39419fd | |||
| 18bdc5c551 | |||
| 3c8404fd09 | |||
| 7f8c5bcd85 | |||
| b2fe784efd | |||
| ddbcc0b3d5 | |||
| 87953bf330 | |||
| 9e267241fe | |||
| 8fe6438ca8 | |||
| 855634a670 | |||
| 194902fb90 | |||
| b221137067 | |||
| 2be012c9c6 | |||
| 3e6f7cfc53 | |||
| 8714208cfb | |||
| 0ddacad17a | |||
| 73af68afc5 | |||
| 365230d313 | |||
| 898a57ca29 | |||
| c2ae76dd77 | |||
| 02d6b1dd51 | |||
| bcdc681755 | |||
| d8ed961e35 | |||
| 73132b3743 | |||
| 6da987a91b | |||
| 7fd0a19ed7 | |||
| 5922dd75bf | |||
| f99c270091 | |||
| 7fcf092632 | |||
| 93db713b0e | |||
| 1571a4817f | |||
| 9fd20de4b8 | |||
| a4d95722e2 | |||
| 59da0af311 | |||
| 7fbae8a314 | |||
| 8913921f5b | |||
| da88c7a6d3 | |||
| 002fcacd57 | |||
| 0c14bcb0d9 | |||
| bfe8b89da1 | |||
| eb4a62f945 | |||
| 40c4f6585b | |||
| 75d970afda | |||
| 655508d68e | |||
| c66e4b4772 | |||
| 2e3d9dadda | |||
| bfe4c724b4 | |||
| ff659b1352 | |||
| b06edfcb97 | |||
| d1d9a17a98 | |||
| 67c24b5749 | |||
| 426ff82c87 | |||
| 22e8085394 | |||
| b522212d71 | |||
| 6146311a94 | |||
| 68b5d8dbca | |||
| 3a424136ff | |||
| 67682e2bb3 | |||
| 65b1048463 | |||
| 6975093d6e | |||
| 2893474ab2 | |||
| 4430a1cce9 | |||
| 75b912b173 | |||
| 01ae4db181 | |||
| 8303a55092 | |||
| 9c7f869e3b | |||
| fdb3dd9de4 | |||
| 014ed4ccc5 | |||
| e51acb490c | |||
| 58c9ed6028 | |||
| bb55fe76db | |||
| 451d95d04a | |||
| c00740aa15 | |||
| 25ea7e41a6 | |||
| 191c95c0ea | |||
| f5096a17e2 | |||
| 130da19292 | |||
| 5df4501ccc | |||
| 919e31ea27 | |||
| 60499ffcd4 | |||
| 8811dc4a48 | |||
| 86686ab7ed | |||
| 55bcd7bf19 | |||
| 264227ae7b | |||
| 67cafa1453 | |||
| a181437a71 | |||
| 390461c581 | |||
| c1b350f117 | |||
| d5404eed47 | |||
| 75186322eb | |||
| 93fe24201a | |||
| 9d729cf114 | |||
| 0d10011b38 | |||
| f81f9e3bab | |||
| 4b092abdb0 | |||
| 341e017960 | |||
| aae0a70bb6 | |||
| ff1e67b44d | |||
| a3e00bd73e | |||
| 28773a081c | |||
| 632ac1521a | |||
| 53977e0220 | |||
| 6ba6463107 | |||
| 9cfbdbe96c | |||
| 7a9a7544ea | |||
| a1d57f9877 | |||
| 5bea268817 | |||
| add9dd377b | |||
| 6fd477d34b | |||
| 3b6a83e1b4 | |||
| 777bafbc1c | |||
| 03ad5fd551 | |||
| 25865955b1 | |||
| a5860ad542 | |||
| ca013f6af7 | |||
| 85c8aeb40c | |||
| 8c376a89f2 | |||
| 39fd2593c1 | |||
| fdeee21237 | |||
| 58a87e1ca4 | |||
| 34e60c6731 | |||
| fc33aed8c1 | |||
| 8ad3fc8ccc | |||
| a64469320c | |||
| 96ea0d266a | |||
| 832100482c | |||
| f9f753e321 | |||
| fb223c2587 | |||
| c98a03ecc6 | |||
| 7f39542a73 | |||
| cc3d165ed8 | |||
| 58d27e220f | |||
| 3b5dd5b852 | |||
| d385cbece7 | |||
| 98897fb356 | |||
| 8b433990ad | |||
| 0e7449aef1 | |||
| feab004970 | |||
| 136eb1d17a | |||
| 50f112eaff | |||
| a7dbbd5f21 | |||
| 89ecdae088 | |||
| 13c4de32f2 | |||
| abc61d3e14 | |||
| 6be3aef0e2 | |||
| 8cd18ce93e | |||
| 7979e8c639 | |||
| e0a8a7f306 | |||
| 233685616d | |||
| 22c971499a | |||
| e2ed278874 | |||
| c97f1afd72 | |||
| 8d5f274d03 | |||
| bd2a9b259d | |||
| c68d109db1 | |||
| c1bea323d2 | |||
| 179329d1ba | |||
| b0e55b69ed | |||
| fc13b150d5 | |||
| 9e3618005e | |||
| fcba255925 | |||
| f6e1aeabe3 | |||
| bbc5ca8a74 | |||
| 0e304cd22b | |||
| cc55bf7d83 | |||
| 9833f3fd99 | |||
| 6cd575600c | |||
| 23f39ad2da | |||
| 3dadeab9e0 | |||
| 1861868428 | |||
| 3ce1ce70c9 | |||
| 6e77b5ae3f | |||
| ebed2d0b33 | |||
| 74bbc3e1db | |||
| 020375256c | |||
| 323acb01cf | |||
| 8bb7cfe780 | |||
| d25478bb35 | |||
| ed94b600ca | |||
| ee78a3c046 | |||
| 6a44d1e8ff | |||
| cc90163850 | |||
| da1e2c22de | |||
| ed7c650f48 | |||
| ad181ce993 | |||
| c91c096235 | |||
| c06f0e9132 | |||
| 5930aac110 | |||
| 1d55d10a51 | |||
| 9a51cd0e34 | |||
| a0e5012ed0 | |||
| ad2c36b351 | |||
| 4c74687a6d | |||
| 0d510a837f | |||
| c219656919 | |||
| bb6ab2d7c2 | |||
| ebb5a2bdc6 | |||
| 7547f6c79b | |||
| f4bf59e000 | |||
| 79df3ea2eb | |||
| d0c9fec938 | |||
| de5e7f35e1 | |||
| a015548a88 | |||
| 8a56db68e7 | |||
| 3f2df77d3f | |||
| bb51742f33 | |||
| d07ca8c3b6 | |||
| 763ba9e149 | |||
| c62f6a7e4c | |||
| 3e375b6528 | |||
| 0a5a1803a5 | |||
| be9218a76a | |||
| e3865d5121 | |||
| 66d6379f7e | |||
| c7c9f630b3 | |||
| 6f0e049638 | |||
| 28f730a81e | |||
| 637472f105 | |||
| bd3d6aa3ed | |||
| bcd43070b3 | |||
| c6ab0be18e | |||
| 668570fc85 | |||
| 3c565e1307 |
+488
@@ -0,0 +1,488 @@
|
||||
---
|
||||
Checks: 'clang-diagnostic-*,clang-analyzer-*,boost-*,bugprone-*,performance-*,readability-*,portability-*,modernize-*,cppcoreguidelines-*,concurrency-*'
|
||||
WarningsAsErrors: ''
|
||||
HeaderFilterRegex: ''
|
||||
AnalyzeTemporaryDtors: false
|
||||
FormatStyle: file
|
||||
User: florians
|
||||
CheckOptions:
|
||||
- key: readability-suspicious-call-argument.PrefixSimilarAbove
|
||||
value: '30'
|
||||
- key: cppcoreguidelines-no-malloc.Reallocations
|
||||
value: '::realloc'
|
||||
- key: cppcoreguidelines-owning-memory.LegacyResourceConsumers
|
||||
value: '::free;::realloc;::freopen;::fclose'
|
||||
- key: bugprone-reserved-identifier.Invert
|
||||
value: 'false'
|
||||
- key: bugprone-narrowing-conversions.PedanticMode
|
||||
value: 'false'
|
||||
- key: bugprone-unused-return-value.CheckedFunctions
|
||||
value: '::std::async;::std::launder;::std::remove;::std::remove_if;::std::unique;::std::unique_ptr::release;::std::basic_string::empty;::std::vector::empty;::std::back_inserter;::std::distance;::std::find;::std::find_if;::std::inserter;::std::lower_bound;::std::make_pair;::std::map::count;::std::map::find;::std::map::lower_bound;::std::multimap::equal_range;::std::multimap::upper_bound;::std::set::count;::std::set::find;::std::setfill;::std::setprecision;::std::setw;::std::upper_bound;::std::vector::at;::bsearch;::ferror;::feof;::isalnum;::isalpha;::isblank;::iscntrl;::isdigit;::isgraph;::islower;::isprint;::ispunct;::isspace;::isupper;::iswalnum;::iswprint;::iswspace;::isxdigit;::memchr;::memcmp;::strcmp;::strcoll;::strncmp;::strpbrk;::strrchr;::strspn;::strstr;::wcscmp;::access;::bind;::connect;::difftime;::dlsym;::fnmatch;::getaddrinfo;::getopt;::htonl;::htons;::iconv_open;::inet_addr;::isascii;::isatty;::mmap;::newlocale;::openat;::pathconf;::pthread_equal;::pthread_getspecific;::pthread_mutex_trylock;::readdir;::readlink;::recvmsg;::regexec;::scandir;::semget;::setjmp;::shm_open;::shmget;::sigismember;::strcasecmp;::strsignal;::ttyname'
|
||||
- key: modernize-use-auto.MinTypeNameLength
|
||||
value: '5'
|
||||
- key: cppcoreguidelines-macro-usage.CheckCapsOnly
|
||||
value: 'false'
|
||||
- key: readability-inconsistent-declaration-parameter-name.Strict
|
||||
value: 'false'
|
||||
- key: readability-suspicious-call-argument.DiceDissimilarBelow
|
||||
value: '60'
|
||||
- key: bugprone-assert-side-effect.IgnoredFunctions
|
||||
value: __builtin_expect
|
||||
- key: readability-suspicious-call-argument.Equality
|
||||
value: 'true'
|
||||
- key: bugprone-easily-swappable-parameters.QualifiersMix
|
||||
value: 'false'
|
||||
- key: bugprone-suspicious-string-compare.WarnOnImplicitComparison
|
||||
value: 'true'
|
||||
- key: bugprone-argument-comment.CommentNullPtrs
|
||||
value: '0'
|
||||
- key: cppcoreguidelines-narrowing-conversions.WarnOnFloatingPointNarrowingConversion
|
||||
value: 'true'
|
||||
- key: cppcoreguidelines-init-variables.IncludeStyle
|
||||
value: llvm
|
||||
- key: modernize-use-nodiscard.ReplacementString
|
||||
value: '[[nodiscard]]'
|
||||
- key: modernize-loop-convert.MakeReverseRangeHeader
|
||||
value: ''
|
||||
- key: readability-suspicious-call-argument.SuffixSimilarAbove
|
||||
value: '30'
|
||||
- key: cppcoreguidelines-narrowing-conversions.WarnOnIntegerNarrowingConversion
|
||||
value: 'true'
|
||||
- key: bugprone-easily-swappable-parameters.IgnoredParameterNames
|
||||
value: '"";iterator;Iterator;begin;Begin;end;End;first;First;last;Last;lhs;LHS;rhs;RHS'
|
||||
- key: modernize-loop-convert.UseCxx20ReverseRanges
|
||||
value: 'true'
|
||||
- key: cppcoreguidelines-prefer-member-initializer.UseAssignment
|
||||
value: 'false'
|
||||
- key: performance-type-promotion-in-math-fn.IncludeStyle
|
||||
value: llvm
|
||||
- key: readability-function-cognitive-complexity.DescribeBasicIncrements
|
||||
value: 'true'
|
||||
- key: bugprone-suspicious-include.ImplementationFileExtensions
|
||||
value: 'c;cc;cpp;cxx'
|
||||
- key: modernize-loop-convert.MakeReverseRangeFunction
|
||||
value: ''
|
||||
- key: readability-inconsistent-declaration-parameter-name.IgnoreMacros
|
||||
value: 'true'
|
||||
- key: bugprone-suspicious-missing-comma.SizeThreshold
|
||||
value: '5'
|
||||
- key: readability-identifier-naming.IgnoreFailedSplit
|
||||
value: 'false'
|
||||
- key: readability-qualified-auto.AddConstToQualified
|
||||
value: 'true'
|
||||
- key: bugprone-sizeof-expression.WarnOnSizeOfThis
|
||||
value: 'true'
|
||||
- key: bugprone-string-constructor.WarnOnLargeLength
|
||||
value: 'true'
|
||||
- key: cppcoreguidelines-explicit-virtual-functions.OverrideSpelling
|
||||
value: override
|
||||
- key: readability-uppercase-literal-suffix.IgnoreMacros
|
||||
value: 'true'
|
||||
- key: modernize-make-shared.IgnoreMacros
|
||||
value: 'true'
|
||||
- key: bugprone-dynamic-static-initializers.HeaderFileExtensions
|
||||
value: ';h;hh;hpp;hxx'
|
||||
- key: bugprone-suspicious-enum-usage.StrictMode
|
||||
value: 'false'
|
||||
- key: performance-unnecessary-copy-initialization.AllowedTypes
|
||||
value: ''
|
||||
- key: bugprone-suspicious-missing-comma.MaxConcatenatedTokens
|
||||
value: '5'
|
||||
- key: modernize-use-transparent-functors.SafeMode
|
||||
value: 'false'
|
||||
- key: readability-suspicious-call-argument.Levenshtein
|
||||
value: 'true'
|
||||
- key: bugprone-not-null-terminated-result.WantToUseSafeFunctions
|
||||
value: 'true'
|
||||
- key: bugprone-string-constructor.LargeLengthThreshold
|
||||
value: '8388608'
|
||||
- key: readability-simplify-boolean-expr.ChainedConditionalAssignment
|
||||
value: 'false'
|
||||
- key: cppcoreguidelines-avoid-magic-numbers.IgnoreAllFloatingPointValues
|
||||
value: 'false'
|
||||
- key: cert-oop54-cpp.WarnOnlyIfThisHasSuspiciousField
|
||||
value: 'false'
|
||||
- key: bugprone-exception-escape.FunctionsThatShouldNotThrow
|
||||
value: ''
|
||||
- key: performance-inefficient-vector-operation.EnableProto
|
||||
value: 'false'
|
||||
- key: modernize-make-shared.MakeSmartPtrFunction
|
||||
value: 'std::make_shared'
|
||||
- key: modernize-loop-convert.MaxCopySize
|
||||
value: '16'
|
||||
- key: readability-suspicious-call-argument.PrefixDissimilarBelow
|
||||
value: '25'
|
||||
- key: readability-function-size.LineThreshold
|
||||
value: '4294967295'
|
||||
- key: bugprone-easily-swappable-parameters.MinimumLength
|
||||
value: '2'
|
||||
- key: portability-simd-intrinsics.Suggest
|
||||
value: 'false'
|
||||
- key: cppcoreguidelines-pro-bounds-constant-array-index.GslHeader
|
||||
value: ''
|
||||
- key: modernize-use-override.IgnoreDestructors
|
||||
value: 'false'
|
||||
- key: modernize-make-shared.MakeSmartPtrFunctionHeader
|
||||
value: '<memory>'
|
||||
- key: bugprone-sizeof-expression.WarnOnSizeOfConstant
|
||||
value: 'true'
|
||||
- key: readability-redundant-string-init.StringNames
|
||||
value: '::std::basic_string_view;::std::basic_string'
|
||||
- key: modernize-make-unique.IgnoreDefaultInitialization
|
||||
value: 'true'
|
||||
- key: modernize-use-emplace.ContainersWithPushBack
|
||||
value: '::std::vector;::std::list;::std::deque'
|
||||
- key: readability-magic-numbers.IgnoreBitFieldsWidths
|
||||
value: 'true'
|
||||
- key: modernize-make-unique.IncludeStyle
|
||||
value: llvm
|
||||
- key: modernize-use-override.OverrideSpelling
|
||||
value: override
|
||||
- key: readability-suspicious-call-argument.LevenshteinDissimilarBelow
|
||||
value: '50'
|
||||
- key: bugprone-argument-comment.CommentStringLiterals
|
||||
value: '0'
|
||||
- key: concurrency-mt-unsafe.FunctionSet
|
||||
value: any
|
||||
- key: readability-identifier-length.IgnoredExceptionVariableNames
|
||||
value: '^[e]$'
|
||||
- key: google-readability-braces-around-statements.ShortStatementLines
|
||||
value: '1'
|
||||
- key: bugprone-reserved-identifier.AllowedIdentifiers
|
||||
value: ''
|
||||
- key: cppcoreguidelines-pro-type-member-init.IgnoreArrays
|
||||
value: 'false'
|
||||
- key: readability-else-after-return.WarnOnUnfixable
|
||||
value: 'true'
|
||||
- key: cppcoreguidelines-avoid-magic-numbers.IgnoredFloatingPointValues
|
||||
value: '1.0;100.0;'
|
||||
- key: modernize-use-emplace.IgnoreImplicitConstructors
|
||||
value: 'false'
|
||||
- key: cppcoreguidelines-macro-usage.IgnoreCommandLineMacros
|
||||
value: 'true'
|
||||
- key: readability-suspicious-call-argument.Substring
|
||||
value: 'true'
|
||||
- key: modernize-use-equals-delete.IgnoreMacros
|
||||
value: 'true'
|
||||
- key: readability-identifier-length.IgnoredVariableNames
|
||||
value: ''
|
||||
- key: readability-magic-numbers.IgnoreAllFloatingPointValues
|
||||
value: 'false'
|
||||
- key: cppcoreguidelines-pro-bounds-constant-array-index.IncludeStyle
|
||||
value: llvm
|
||||
- key: readability-suspicious-call-argument.Abbreviations
|
||||
value: 'arr=array;cnt=count;idx=index;src=source;stmt=statement;cpy=copy;dest=destination;dist=distancedst=distance;ptr=pointer;wdth=width;str=string;ln=line;srv=server;attr=attribute;ref=reference;buf=buffer;col=column;nr=number;vec=vector;len=length;elem=element;val=value;i=index;var=variable;hght=height;cl=client;num=number;pos=position;lst=list;addr=address'
|
||||
- key: bugprone-misplaced-widening-cast.CheckImplicitCasts
|
||||
value: 'false'
|
||||
- key: readability-uppercase-literal-suffix.NewSuffixes
|
||||
value: ''
|
||||
- key: modernize-loop-convert.MinConfidence
|
||||
value: reasonable
|
||||
- key: performance-unnecessary-value-param.AllowedTypes
|
||||
value: ''
|
||||
- key: readability-uniqueptr-delete-release.PreferResetCall
|
||||
value: 'false'
|
||||
- key: readability-identifier-length.MinimumExceptionNameLength
|
||||
value: '2'
|
||||
- key: cppcoreguidelines-avoid-magic-numbers.IgnorePowersOf2IntegerValues
|
||||
value: 'false'
|
||||
- key: google-readability-namespace-comments.SpacesBeforeComments
|
||||
value: '2'
|
||||
- key: cppcoreguidelines-avoid-magic-numbers.IgnoreBitFieldsWidths
|
||||
value: 'true'
|
||||
- key: cppcoreguidelines-avoid-magic-numbers.IgnoredIntegerValues
|
||||
value: '1;2;3;4;'
|
||||
- key: cppcoreguidelines-no-malloc.Allocations
|
||||
value: '::malloc;::calloc'
|
||||
- key: bugprone-narrowing-conversions.IgnoreConversionFromTypes
|
||||
value: ''
|
||||
- key: readability-function-size.BranchThreshold
|
||||
value: '4294967295'
|
||||
- key: bugprone-suspicious-missing-comma.RatioThreshold
|
||||
value: '0.200000'
|
||||
- key: readability-implicit-bool-conversion.AllowIntegerConditions
|
||||
value: 'false'
|
||||
- key: readability-identifier-length.IgnoredParameterNames
|
||||
value: '^[n]$'
|
||||
- key: readability-function-size.StatementThreshold
|
||||
value: '800'
|
||||
- key: readability-identifier-naming.IgnoreMainLikeFunctions
|
||||
value: 'false'
|
||||
- key: cppcoreguidelines-init-variables.MathHeader
|
||||
value: '<math.h>'
|
||||
- key: google-readability-function-size.StatementThreshold
|
||||
value: '800'
|
||||
- key: bugprone-reserved-identifier.AggressiveDependentMemberLookup
|
||||
value: 'false'
|
||||
- key: readability-suspicious-call-argument.DiceSimilarAbove
|
||||
value: '70'
|
||||
- key: modernize-use-equals-default.IgnoreMacros
|
||||
value: 'true'
|
||||
- key: readability-suspicious-call-argument.Abbreviation
|
||||
value: 'true'
|
||||
- key: cppcoreguidelines-special-member-functions.AllowSoleDefaultDtor
|
||||
value: 'false'
|
||||
- key: readability-identifier-length.MinimumLoopCounterNameLength
|
||||
value: '2'
|
||||
- key: modernize-use-emplace.SmartPointers
|
||||
value: '::std::shared_ptr;::std::unique_ptr;::std::auto_ptr;::std::weak_ptr'
|
||||
- key: cppcoreguidelines-no-malloc.Deallocations
|
||||
value: '::free'
|
||||
- key: bugprone-dangling-handle.HandleClasses
|
||||
value: 'std::basic_string_view;std::experimental::basic_string_view'
|
||||
- key: readability-magic-numbers.IgnorePowersOf2IntegerValues
|
||||
value: 'false'
|
||||
- key: readability-suspicious-call-argument.JaroWinklerSimilarAbove
|
||||
value: '85'
|
||||
- key: readability-simplify-subscript-expr.Types
|
||||
value: '::std::basic_string;::std::basic_string_view;::std::vector;::std::array'
|
||||
- key: performance-unnecessary-copy-initialization.ExcludedContainerTypes
|
||||
value: ''
|
||||
- key: modernize-replace-auto-ptr.IncludeStyle
|
||||
value: llvm
|
||||
- key: performance-move-const-arg.CheckTriviallyCopyableMove
|
||||
value: 'true'
|
||||
- key: readability-static-accessed-through-instance.NameSpecifierNestingThreshold
|
||||
value: '3'
|
||||
- key: readability-function-size.VariableThreshold
|
||||
value: '4294967295'
|
||||
- key: cert-dcl16-c.NewSuffixes
|
||||
value: 'L;LL;LU;LLU'
|
||||
- key: bugprone-narrowing-conversions.WarnOnFloatingPointNarrowingConversion
|
||||
value: 'true'
|
||||
- key: readability-identifier-naming.GetConfigPerFile
|
||||
value: 'true'
|
||||
- key: modernize-use-default-member-init.UseAssignment
|
||||
value: 'false'
|
||||
- key: readability-function-size.NestingThreshold
|
||||
value: '4294967295'
|
||||
- key: modernize-use-override.AllowOverrideAndFinal
|
||||
value: 'false'
|
||||
- key: cppcoreguidelines-narrowing-conversions.IgnoreConversionFromTypes
|
||||
value: ''
|
||||
- key: readability-function-size.ParameterThreshold
|
||||
value: '4294967295'
|
||||
- key: modernize-pass-by-value.ValuesOnly
|
||||
value: 'false'
|
||||
- key: readability-function-cognitive-complexity.IgnoreMacros
|
||||
value: 'false'
|
||||
- key: modernize-loop-convert.IncludeStyle
|
||||
value: llvm
|
||||
- key: cert-str34-c.DiagnoseSignedUnsignedCharComparisons
|
||||
value: 'false'
|
||||
- key: bugprone-narrowing-conversions.WarnWithinTemplateInstantiation
|
||||
value: 'false'
|
||||
- key: cert-err33-c.CheckedFunctions
|
||||
value: '::aligned_alloc;::asctime_s;::at_quick_exit;::atexit;::bsearch;::bsearch_s;::btowc;::c16rtomb;::c32rtomb;::calloc;::clock;::cnd_broadcast;::cnd_init;::cnd_signal;::cnd_timedwait;::cnd_wait;::ctime_s;::fclose;::fflush;::fgetc;::fgetpos;::fgets;::fgetwc;::fopen;::fopen_s;::fprintf;::fprintf_s;::fputc;::fputs;::fputwc;::fputws;::fread;::freopen;::freopen_s;::fscanf;::fscanf_s;::fseek;::fsetpos;::ftell;::fwprintf;::fwprintf_s;::fwrite;::fwscanf;::fwscanf_s;::getc;::getchar;::getenv;::getenv_s;::gets_s;::getwc;::getwchar;::gmtime;::gmtime_s;::localtime;::localtime_s;::malloc;::mbrtoc16;::mbrtoc32;::mbsrtowcs;::mbsrtowcs_s;::mbstowcs;::mbstowcs_s;::memchr;::mktime;::mtx_init;::mtx_lock;::mtx_timedlock;::mtx_trylock;::mtx_unlock;::printf_s;::putc;::putwc;::raise;::realloc;::remove;::rename;::scanf;::scanf_s;::setlocale;::setvbuf;::signal;::snprintf;::snprintf_s;::sprintf;::sprintf_s;::sscanf;::sscanf_s;::strchr;::strerror_s;::strftime;::strpbrk;::strrchr;::strstr;::strtod;::strtof;::strtoimax;::strtok;::strtok_s;::strtol;::strtold;::strtoll;::strtoul;::strtoull;::strtoumax;::strxfrm;::swprintf;::swprintf_s;::swscanf;::swscanf_s;::thrd_create;::thrd_detach;::thrd_join;::thrd_sleep;::time;::timespec_get;::tmpfile;::tmpfile_s;::tmpnam;::tmpnam_s;::tss_create;::tss_get;::tss_set;::ungetc;::ungetwc;::vfprintf;::vfprintf_s;::vfscanf;::vfscanf_s;::vfwprintf;::vfwprintf_s;::vfwscanf;::vfwscanf_s;::vprintf_s;::vscanf;::vscanf_s;::vsnprintf;::vsnprintf_s;::vsprintf;::vsprintf_s;::vsscanf;::vsscanf_s;::vswprintf;::vswprintf_s;::vswscanf;::vswscanf_s;::vwprintf_s;::vwscanf;::vwscanf_s;::wcrtomb;::wcschr;::wcsftime;::wcspbrk;::wcsrchr;::wcsrtombs;::wcsrtombs_s;::wcsstr;::wcstod;::wcstof;::wcstoimax;::wcstok;::wcstok_s;::wcstol;::wcstold;::wcstoll;::wcstombs;::wcstombs_s;::wcstoul;::wcstoull;::wcstoumax;::wcsxfrm;::wctob;::wctrans;::wctype;::wmemchr;::wprintf_s;::wscanf;::wscanf_s;'
|
||||
- key: bugprone-suspicious-string-compare.WarnOnLogicalNotComparison
|
||||
value: 'false'
|
||||
- key: readability-redundant-smartptr-get.IgnoreMacros
|
||||
value: 'true'
|
||||
- key: cppcoreguidelines-explicit-virtual-functions.AllowOverrideAndFinal
|
||||
value: 'false'
|
||||
- key: readability-identifier-naming.AggressiveDependentMemberLookup
|
||||
value: 'false'
|
||||
- key: readability-identifier-length.MinimumParameterNameLength
|
||||
value: '3'
|
||||
- key: modernize-use-emplace.TupleTypes
|
||||
value: '::std::pair;::std::tuple'
|
||||
- key: modernize-use-emplace.TupleMakeFunctions
|
||||
value: '::std::make_pair;::std::make_tuple'
|
||||
- key: bugprone-narrowing-conversions.WarnOnIntegerToFloatingPointNarrowingConversion
|
||||
value: 'true'
|
||||
- key: cppcoreguidelines-owning-memory.LegacyResourceProducers
|
||||
value: '::malloc;::aligned_alloc;::realloc;::calloc;::fopen;::freopen;::tmpfile'
|
||||
- key: bugprone-easily-swappable-parameters.SuppressParametersUsedTogether
|
||||
value: 'true'
|
||||
- key: bugprone-argument-comment.StrictMode
|
||||
value: '0'
|
||||
- key: modernize-replace-random-shuffle.IncludeStyle
|
||||
value: llvm
|
||||
- key: modernize-use-bool-literals.IgnoreMacros
|
||||
value: 'true'
|
||||
- key: bugprone-unhandled-self-assignment.WarnOnlyIfThisHasSuspiciousField
|
||||
value: 'true'
|
||||
- key: google-readability-namespace-comments.ShortNamespaceLines
|
||||
value: '10'
|
||||
- key: bugprone-suspicious-string-compare.StringCompareLikeFunctions
|
||||
value: ''
|
||||
- key: modernize-avoid-bind.PermissiveParameterList
|
||||
value: 'false'
|
||||
- key: bugprone-easily-swappable-parameters.NamePrefixSuffixSilenceDissimilarityTreshold
|
||||
value: '1'
|
||||
- key: readability-suspicious-call-argument.Suffix
|
||||
value: 'true'
|
||||
- key: readability-suspicious-call-argument.JaroWinklerDissimilarBelow
|
||||
value: '75'
|
||||
- key: modernize-use-noexcept.ReplacementString
|
||||
value: ''
|
||||
- key: modernize-use-override.FinalSpelling
|
||||
value: final
|
||||
- key: modernize-use-using.IgnoreMacros
|
||||
value: 'true'
|
||||
- key: cppcoreguidelines-explicit-virtual-functions.FinalSpelling
|
||||
value: final
|
||||
- key: readability-suspicious-call-argument.MinimumIdentifierNameLength
|
||||
value: '3'
|
||||
- key: bugprone-narrowing-conversions.WarnOnIntegerNarrowingConversion
|
||||
value: 'true'
|
||||
- key: modernize-loop-convert.NamingStyle
|
||||
value: CamelCase
|
||||
- key: cppcoreguidelines-pro-type-member-init.UseAssignment
|
||||
value: 'false'
|
||||
- key: bugprone-suspicious-include.HeaderFileExtensions
|
||||
value: ';h;hh;hpp;hxx'
|
||||
- key: performance-no-automatic-move.AllowedTypes
|
||||
value: ''
|
||||
- key: readability-suspicious-call-argument.SubstringDissimilarBelow
|
||||
value: '40'
|
||||
- key: bugprone-argument-comment.CommentIntegerLiterals
|
||||
value: '0'
|
||||
- key: bugprone-stringview-nullptr.IncludeStyle
|
||||
value: llvm
|
||||
- key: performance-for-range-copy.WarnOnAllAutoCopies
|
||||
value: 'false'
|
||||
- key: modernize-pass-by-value.IncludeStyle
|
||||
value: llvm
|
||||
- key: bugprone-argument-comment.CommentFloatLiterals
|
||||
value: '0'
|
||||
- key: bugprone-too-small-loop-variable.MagnitudeBitsUpperLimit
|
||||
value: '16'
|
||||
- key: readability-simplify-boolean-expr.ChainedConditionalReturn
|
||||
value: 'false'
|
||||
- key: readability-else-after-return.WarnOnConditionVariables
|
||||
value: 'true'
|
||||
- key: modernize-use-nullptr.NullMacros
|
||||
value: 'NULL'
|
||||
- key: readability-suspicious-call-argument.SuffixDissimilarBelow
|
||||
value: '25'
|
||||
- key: bugprone-argument-comment.CommentCharacterLiterals
|
||||
value: '0'
|
||||
- key: cppcoreguidelines-macro-usage.AllowedRegexp
|
||||
value: '^DEBUG_*'
|
||||
- key: readability-suspicious-call-argument.LevenshteinSimilarAbove
|
||||
value: '66'
|
||||
- key: cppcoreguidelines-narrowing-conversions.PedanticMode
|
||||
value: 'false'
|
||||
- key: modernize-make-shared.IgnoreDefaultInitialization
|
||||
value: 'true'
|
||||
- key: readability-suspicious-call-argument.JaroWinkler
|
||||
value: 'true'
|
||||
- key: bugprone-implicit-widening-of-multiplication-result.UseCXXHeadersInCppSources
|
||||
value: 'true'
|
||||
- key: modernize-make-shared.IncludeStyle
|
||||
value: llvm
|
||||
- key: readability-suspicious-call-argument.Prefix
|
||||
value: 'true'
|
||||
- key: cppcoreguidelines-special-member-functions.AllowMissingMoveFunctions
|
||||
value: 'false'
|
||||
- key: bugprone-implicit-widening-of-multiplication-result.UseCXXStaticCastsInCppSources
|
||||
value: 'true'
|
||||
- key: bugprone-signed-char-misuse.CharTypdefsToIgnore
|
||||
value: ''
|
||||
- key: cppcoreguidelines-explicit-virtual-functions.IgnoreDestructors
|
||||
value: 'false'
|
||||
- key: modernize-make-unique.IgnoreMacros
|
||||
value: 'true'
|
||||
- key: performance-for-range-copy.AllowedTypes
|
||||
value: ''
|
||||
- key: bugprone-argument-comment.CommentBoolLiterals
|
||||
value: '0'
|
||||
- key: readability-braces-around-statements.ShortStatementLines
|
||||
value: '0'
|
||||
- key: bugprone-argument-comment.CommentUserDefinedLiterals
|
||||
value: '0'
|
||||
- key: readability-magic-numbers.IgnoredFloatingPointValues
|
||||
value: '1.0;100.0;'
|
||||
- key: performance-inefficient-string-concatenation.StrictMode
|
||||
value: 'false'
|
||||
- key: readability-redundant-declaration.IgnoreMacros
|
||||
value: 'true'
|
||||
- key: bugprone-easily-swappable-parameters.IgnoredParameterTypeSuffixes
|
||||
value: 'bool;Bool;_Bool;it;It;iterator;Iterator;inputit;InputIt;forwardit;ForwardIt;bidirit;BidirIt;constiterator;const_iterator;Const_Iterator;Constiterator;ConstIterator;RandomIt;randomit;random_iterator;ReverseIt;reverse_iterator;reverse_const_iterator;ConstReverseIterator;Const_Reverse_Iterator;const_reverse_iterator;Constreverseiterator;constreverseiterator'
|
||||
- key: modernize-make-unique.MakeSmartPtrFunction
|
||||
value: 'std::make_unique'
|
||||
- key: portability-restrict-system-includes.Includes
|
||||
value: '*'
|
||||
- key: readability-implicit-bool-conversion.AllowPointerConditions
|
||||
value: 'false'
|
||||
- key: modernize-make-unique.MakeSmartPtrFunctionHeader
|
||||
value: '<memory>'
|
||||
- key: bugprone-signal-handler.AsyncSafeFunctionSet
|
||||
value: POSIX
|
||||
- key: bugprone-easily-swappable-parameters.ModelImplicitConversions
|
||||
value: 'true'
|
||||
- key: readability-suspicious-call-argument.SubstringSimilarAbove
|
||||
value: '50'
|
||||
- key: cppcoreguidelines-narrowing-conversions.WarnWithinTemplateInstantiation
|
||||
value: 'false'
|
||||
- key: readability-identifier-length.MinimumVariableNameLength
|
||||
value: '3'
|
||||
- key: cppcoreguidelines-narrowing-conversions.WarnOnEquivalentBitWidth
|
||||
value: 'true'
|
||||
- key: cppcoreguidelines-non-private-member-variables-in-classes.IgnorePublicMemberVariables
|
||||
value: 'false'
|
||||
- key: cppcoreguidelines-special-member-functions.AllowMissingMoveFunctionsWhenCopyIsDeleted
|
||||
value: 'false'
|
||||
- key: modernize-use-noexcept.UseNoexceptFalse
|
||||
value: 'true'
|
||||
- key: readability-function-cognitive-complexity.Threshold
|
||||
value: '25'
|
||||
- key: cppcoreguidelines-non-private-member-variables-in-classes.IgnoreClassesWithAllMemberVariablesBeingPublic
|
||||
value: 'true'
|
||||
- key: bugprone-argument-comment.IgnoreSingleArgument
|
||||
value: '0'
|
||||
- key: bugprone-narrowing-conversions.WarnOnEquivalentBitWidth
|
||||
value: 'true'
|
||||
- key: bugprone-sizeof-expression.WarnOnSizeOfIntegerExpression
|
||||
value: 'false'
|
||||
- key: performance-faster-string-find.StringLikeClasses
|
||||
value: '::std::basic_string;::std::basic_string_view'
|
||||
- key: cppcoreguidelines-narrowing-conversions.WarnOnIntegerToFloatingPointNarrowingConversion
|
||||
value: 'true'
|
||||
- key: bugprone-assert-side-effect.CheckFunctionCalls
|
||||
value: 'false'
|
||||
- key: bugprone-string-constructor.StringNames
|
||||
value: '::std::basic_string;::std::basic_string_view'
|
||||
- key: bugprone-assert-side-effect.AssertMacros
|
||||
value: assert,NSAssert,NSCAssert
|
||||
- key: bugprone-exception-escape.IgnoredExceptions
|
||||
value: ''
|
||||
- key: bugprone-signed-char-misuse.DiagnoseSignedUnsignedCharComparisons
|
||||
value: 'true'
|
||||
- key: modernize-use-default-member-init.IgnoreMacros
|
||||
value: 'true'
|
||||
- key: llvm-qualified-auto.AddConstToQualified
|
||||
value: 'false'
|
||||
- key: llvm-else-after-return.WarnOnConditionVariables
|
||||
value: 'false'
|
||||
- key: bugprone-sizeof-expression.WarnOnSizeOfCompareToConstant
|
||||
value: 'true'
|
||||
- key: modernize-raw-string-literal.DelimiterStem
|
||||
value: lit
|
||||
- key: readability-suspicious-call-argument.Dice
|
||||
value: 'true'
|
||||
- key: readability-identifier-length.IgnoredLoopCounterNames
|
||||
value: '^[ijk_]$'
|
||||
- key: modernize-raw-string-literal.ReplaceShorterLiterals
|
||||
value: 'false'
|
||||
- key: readability-magic-numbers.IgnoredIntegerValues
|
||||
value: '1;2;3;4;'
|
||||
- key: performance-inefficient-vector-operation.VectorLikeClasses
|
||||
value: '::std::vector'
|
||||
- key: modernize-use-auto.RemoveStars
|
||||
value: 'false'
|
||||
- key: bugprone-implicit-widening-of-multiplication-result.IncludeStyle
|
||||
value: llvm
|
||||
- key: portability-simd-intrinsics.Std
|
||||
value: ''
|
||||
- key: performance-unnecessary-value-param.IncludeStyle
|
||||
value: llvm
|
||||
- key: readability-redundant-member-init.IgnoreBaseInCopyConstructors
|
||||
value: 'false'
|
||||
- key: modernize-replace-disallow-copy-and-assign-macro.MacroName
|
||||
value: DISALLOW_COPY_AND_ASSIGN
|
||||
- key: llvm-else-after-return.WarnOnUnfixable
|
||||
value: 'false'
|
||||
...
|
||||
|
||||
@@ -0,0 +1,15 @@
|
||||
{
|
||||
"problemMatcher": [
|
||||
{
|
||||
"owner": "black-warning",
|
||||
"severity": "warning",
|
||||
"pattern": [
|
||||
{
|
||||
"regexp": "^(would reformat (.*))$",
|
||||
"file": 2,
|
||||
"message": 1
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
@@ -0,0 +1,17 @@
|
||||
{
|
||||
"problemMatcher": [
|
||||
{
|
||||
"owner": "clang",
|
||||
"pattern": [
|
||||
{
|
||||
"regexp": "^(.+):([0-9]+):([0-9]+): (error|warning|note): (.+)$",
|
||||
"file": 1,
|
||||
"line": 2,
|
||||
"column": 3,
|
||||
"severity": 4,
|
||||
"message": 5
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
@@ -0,0 +1,16 @@
|
||||
{
|
||||
"problemMatcher": [
|
||||
{
|
||||
"owner": "codespell-matcher",
|
||||
"severity": "warning",
|
||||
"pattern": [
|
||||
{
|
||||
"regexp": "^(.+):(\\d+):\\s+(.+)$",
|
||||
"file": 1,
|
||||
"line": 2,
|
||||
"message": 3
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
@@ -0,0 +1,16 @@
|
||||
{
|
||||
"problemMatcher": [
|
||||
{
|
||||
"owner": "cpplint",
|
||||
"severity": "warning",
|
||||
"pattern": [
|
||||
{
|
||||
"regexp": "^(.+):([0-9]+): (.+)$",
|
||||
"file": 1,
|
||||
"line": 2,
|
||||
"message": 3
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
@@ -0,0 +1,16 @@
|
||||
{
|
||||
"problemMatcher": [
|
||||
{
|
||||
"owner": "grepMatcher-warning",
|
||||
"severity": "warning",
|
||||
"pattern": [
|
||||
{
|
||||
"regexp": "^(.+):([0-9]+):(.+)$",
|
||||
"file": 1,
|
||||
"line": 2,
|
||||
"message": 3
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
@@ -0,0 +1,18 @@
|
||||
{
|
||||
"problemMatcher": [
|
||||
{
|
||||
"owner": "pylint-error",
|
||||
"severity": "error",
|
||||
"pattern": [
|
||||
{
|
||||
"regexp": "^(.+?):([0-9]+):([0-9]+): ([([E|F][0-9]+): (.*)$",
|
||||
"file": 1,
|
||||
"line": 2,
|
||||
"column": 3,
|
||||
"code": 4,
|
||||
"message": 5
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
@@ -0,0 +1,18 @@
|
||||
{
|
||||
"problemMatcher": [
|
||||
{
|
||||
"owner": "pylint-warning",
|
||||
"severity": "warning",
|
||||
"pattern": [
|
||||
{
|
||||
"regexp": "^(.+?):([0-9]+):([0-9]+): ([^E|F][0-9]+): (.*)$",
|
||||
"file": 1,
|
||||
"line": 2,
|
||||
"column": 3,
|
||||
"code": 4,
|
||||
"message": 5
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
File diff suppressed because it is too large
Load Diff
@@ -1,31 +0,0 @@
|
||||
# GitHub Action to automate the identification of common misspellings in text files.
|
||||
# https://github.com/codespell-project/actions-codespell
|
||||
# https://github.com/codespell-project/codespell
|
||||
|
||||
name: Codespell
|
||||
on:
|
||||
pull_request:
|
||||
|
||||
jobs:
|
||||
codespell:
|
||||
name: Check for spelling errors
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
|
||||
- name: Get changed files
|
||||
id: changed-files
|
||||
uses: tj-actions/changed-files@v12.2
|
||||
|
||||
- name: List all changed files
|
||||
run: |
|
||||
for file in ${{ steps.changed-files.outputs.all_changed_files }}; do
|
||||
echo "$file was changed"
|
||||
done
|
||||
|
||||
- uses: codespell-project/actions-codespell@master
|
||||
with:
|
||||
check_filenames: true
|
||||
ignore_words_file: .github/codespellignore
|
||||
skip: ./.git,*.po,*.ts,*.svg,./ChangeLog.txt,./src/3rdParty,./src/Mod/Assembly/App/opendcm,./src/CXX,./src/zipios++,./src/Base/swig*,./src/Mod/Robot/App/kdl_cp,./src/Mod/Import/App/SCL,./src/WindowsInstaller,./src/Doc/FreeCAD.uml,./build/
|
||||
path: ${{ steps.changed-files.outputs.all_changed_files }}
|
||||
+7
-4
@@ -1,5 +1,11 @@
|
||||
# file types to ignore
|
||||
|
||||
.*
|
||||
!/.gitignore
|
||||
!/.travis/
|
||||
!/.travis.yml
|
||||
!/.clang-format
|
||||
!/.git-blame-ignore-revs
|
||||
!/.gitattributes
|
||||
*.DS_Store
|
||||
*.pyc
|
||||
*.obj
|
||||
@@ -34,10 +40,7 @@ install_manifest.txt
|
||||
/src/Tools/offlinedoc/localwiki/
|
||||
/src/Tools/offlinedoc/*.txt
|
||||
OpenSCAD_rc.py
|
||||
/\.idea/
|
||||
.tags
|
||||
tags
|
||||
/\.vscode/
|
||||
|
||||
# crowdin file
|
||||
src/Tools/freecad.zip
|
||||
|
||||
@@ -0,0 +1,614 @@
|
||||
[MAIN]
|
||||
|
||||
# Analyse import fallback blocks. This can be used to support both Python 2 and
|
||||
# 3 compatible code, which means that the block might have code that exists
|
||||
# only in one or another interpreter, leading to false positives when analysed.
|
||||
analyse-fallback-blocks=no
|
||||
|
||||
# Load and enable all available extensions. Use --list-extensions to see a list
|
||||
# all available extensions.
|
||||
#enable-all-extensions=
|
||||
|
||||
# In error mode, messages with a category besides ERROR or FATAL are
|
||||
# suppressed, and no reports are done by default. Error mode is compatible with
|
||||
# disabling specific errors.
|
||||
#errors-only=
|
||||
|
||||
# Always return a 0 (non-error) status code, even if lint errors are found.
|
||||
# This is primarily useful in continuous integration scripts.
|
||||
#exit-zero=
|
||||
|
||||
# A comma-separated list of package or module names from where C extensions may
|
||||
# be loaded. Extensions are loading into the active Python interpreter and may
|
||||
# run arbitrary code.
|
||||
extension-pkg-allow-list=
|
||||
|
||||
# A comma-separated list of package or module names from where C extensions may
|
||||
# be loaded. Extensions are loading into the active Python interpreter and may
|
||||
# run arbitrary code. (This is an alternative name to extension-pkg-allow-list
|
||||
# for backward compatibility.)
|
||||
extension-pkg-whitelist=
|
||||
|
||||
# Return non-zero exit code if any of these messages/categories are detected,
|
||||
# even if score is above --fail-under value. Syntax same as enable. Messages
|
||||
# specified are enabled, while categories only check already-enabled messages.
|
||||
fail-on=
|
||||
|
||||
# Specify a score threshold to be exceeded before program exits with error.
|
||||
fail-under=10
|
||||
|
||||
# Interpret the stdin as a python script, whose filename needs to be passed as
|
||||
# the module_or_package argument.
|
||||
#from-stdin=
|
||||
|
||||
# Files or directories to be skipped. They should be base names, not paths.
|
||||
ignore=CVS
|
||||
|
||||
# Add files or directories matching the regex patterns to the ignore-list. The
|
||||
# regex matches against paths and can be in Posix or Windows format.
|
||||
ignore-paths=
|
||||
|
||||
# Files or directories matching the regex patterns are skipped. The regex
|
||||
# matches against base names, not paths. The default value ignores Emacs file
|
||||
# locks
|
||||
ignore-patterns=^\.#
|
||||
|
||||
# List of module names for which member attributes should not be checked
|
||||
# (useful for modules/projects where namespaces are manipulated during runtime
|
||||
# and thus existing member attributes cannot be deduced by static analysis). It
|
||||
# supports qualified module names, as well as Unix pattern matching.
|
||||
ignored-modules=
|
||||
|
||||
# Python code to execute, usually for sys.path manipulation such as
|
||||
# pygtk.require().
|
||||
#init-hook=
|
||||
|
||||
# Use multiple processes to speed up Pylint. Specifying 0 will auto-detect the
|
||||
# number of processors available to use, and will cap the count on Windows to
|
||||
# avoid hangs.
|
||||
jobs=1
|
||||
|
||||
# Control the amount of potential inferred values when inferring a single
|
||||
# object. This can help the performance when dealing with large functions or
|
||||
# complex, nested conditions.
|
||||
limit-inference-results=100
|
||||
|
||||
# List of plugins (as comma separated values of python module names) to load,
|
||||
# usually to register additional checkers.
|
||||
load-plugins=
|
||||
|
||||
# Pickle collected data for later comparisons.
|
||||
persistent=yes
|
||||
|
||||
# Minimum Python version to use for version dependent checks. Will default to
|
||||
# the version used to run pylint.
|
||||
py-version=3.10
|
||||
|
||||
# Discover python modules and packages in the file system subtree.
|
||||
recursive=no
|
||||
|
||||
# When enabled, pylint would attempt to guess common misconfiguration and emit
|
||||
# user-friendly hints instead of false-positive error messages.
|
||||
suggestion-mode=yes
|
||||
|
||||
# Allow loading of arbitrary C extensions. Extensions are imported into the
|
||||
# active Python interpreter and may run arbitrary code.
|
||||
unsafe-load-any-extension=no
|
||||
|
||||
# In verbose mode, extra non-checker-related info will be displayed.
|
||||
#verbose=
|
||||
|
||||
|
||||
[REPORTS]
|
||||
|
||||
# Python expression which should return a score less than or equal to 10. You
|
||||
# have access to the variables 'fatal', 'error', 'warning', 'refactor',
|
||||
# 'convention', and 'info' which contain the number of messages in each
|
||||
# category, as well as 'statement' which is the total number of statements
|
||||
# analyzed. This score is used by the global evaluation report (RP0004).
|
||||
evaluation=max(0, 0 if fatal else 10.0 - ((float(5 * error + warning + refactor + convention) / statement) * 10))
|
||||
|
||||
# Template used to display messages. This is a python new-style format string
|
||||
# used to format the message information. See doc for all details.
|
||||
msg-template=
|
||||
|
||||
# Set the output format. Available formats are text, parseable, colorized, json
|
||||
# and msvs (visual studio). You can also give a reporter class, e.g.
|
||||
# mypackage.mymodule.MyReporterClass.
|
||||
#output-format=
|
||||
|
||||
# Tells whether to display a full report or only the messages.
|
||||
reports=yes
|
||||
|
||||
# Activate the evaluation score.
|
||||
score=yes
|
||||
|
||||
|
||||
[MESSAGES CONTROL]
|
||||
|
||||
# Only show warnings with the listed confidence levels. Leave empty to show
|
||||
# all. Valid levels: HIGH, CONTROL_FLOW, INFERENCE, INFERENCE_FAILURE,
|
||||
# UNDEFINED.
|
||||
confidence=HIGH,
|
||||
CONTROL_FLOW,
|
||||
INFERENCE,
|
||||
INFERENCE_FAILURE,
|
||||
UNDEFINED
|
||||
|
||||
# Disable the message, report, category or checker with the given id(s). You
|
||||
# can either give multiple identifiers separated by comma (,) or put this
|
||||
# option multiple times (only on the command line, not in the configuration
|
||||
# file where it should appear only once). You can also use "--disable=all" to
|
||||
# disable everything first and then re-enable specific checks. For example, if
|
||||
# you want to run only the similarities checker, you can use "--disable=all
|
||||
# --enable=similarities". If you want to run only the classes checker, but have
|
||||
# no Warning level messages displayed, use "--disable=all --enable=classes
|
||||
# --disable=W".
|
||||
disable=raw-checker-failed,
|
||||
bad-inline-option,
|
||||
locally-disabled,
|
||||
file-ignored,
|
||||
suppressed-message,
|
||||
useless-suppression,
|
||||
deprecated-pragma,
|
||||
use-symbolic-message-instead,
|
||||
invalid-name,
|
||||
wrong-import-order,
|
||||
import-error,
|
||||
undefined-variable
|
||||
|
||||
# Enable the message, report, category or checker with the given id(s). You can
|
||||
# either give multiple identifier separated by comma (,) or put this option
|
||||
# multiple time (only on the command line, not in the configuration file where
|
||||
# it should appear only once). See also the "--disable" option for examples.
|
||||
enable=c-extension-no-member
|
||||
|
||||
|
||||
[BASIC]
|
||||
|
||||
# Naming style matching correct argument names.
|
||||
argument-naming-style=snake_case
|
||||
|
||||
# Regular expression matching correct argument names. Overrides argument-
|
||||
# naming-style. If left empty, argument names will be checked with the set
|
||||
# naming style.
|
||||
#argument-rgx=
|
||||
|
||||
# Naming style matching correct attribute names.
|
||||
attr-naming-style=snake_case
|
||||
|
||||
# Regular expression matching correct attribute names. Overrides attr-naming-
|
||||
# style. If left empty, attribute names will be checked with the set naming
|
||||
# style.
|
||||
#attr-rgx=
|
||||
|
||||
# Bad variable names which should always be refused, separated by a comma.
|
||||
bad-names=foo,
|
||||
bar,
|
||||
baz,
|
||||
toto,
|
||||
tutu,
|
||||
tata
|
||||
|
||||
# Bad variable names regexes, separated by a comma. If names match any regex,
|
||||
# they will always be refused
|
||||
bad-names-rgxs=
|
||||
|
||||
# Naming style matching correct class attribute names.
|
||||
class-attribute-naming-style=any
|
||||
|
||||
# Regular expression matching correct class attribute names. Overrides class-
|
||||
# attribute-naming-style. If left empty, class attribute names will be checked
|
||||
# with the set naming style.
|
||||
#class-attribute-rgx=
|
||||
|
||||
# Naming style matching correct class constant names.
|
||||
class-const-naming-style=UPPER_CASE
|
||||
|
||||
# Regular expression matching correct class constant names. Overrides class-
|
||||
# const-naming-style. If left empty, class constant names will be checked with
|
||||
# the set naming style.
|
||||
#class-const-rgx=
|
||||
|
||||
# Naming style matching correct class names.
|
||||
class-naming-style=PascalCase
|
||||
|
||||
# Regular expression matching correct class names. Overrides class-naming-
|
||||
# style. If left empty, class names will be checked with the set naming style.
|
||||
#class-rgx=
|
||||
|
||||
# Naming style matching correct constant names.
|
||||
const-naming-style=UPPER_CASE
|
||||
|
||||
# Regular expression matching correct constant names. Overrides const-naming-
|
||||
# style. If left empty, constant names will be checked with the set naming
|
||||
# style.
|
||||
#const-rgx=
|
||||
|
||||
# Minimum line length for functions/classes that require docstrings, shorter
|
||||
# ones are exempt.
|
||||
docstring-min-length=-1
|
||||
|
||||
# Naming style matching correct function names.
|
||||
function-naming-style=snake_case
|
||||
|
||||
# Regular expression matching correct function names. Overrides function-
|
||||
# naming-style. If left empty, function names will be checked with the set
|
||||
# naming style.
|
||||
#function-rgx=
|
||||
|
||||
# Good variable names which should always be accepted, separated by a comma.
|
||||
good-names=i,
|
||||
j,
|
||||
k,
|
||||
ex,
|
||||
Run,
|
||||
_
|
||||
|
||||
# Good variable names regexes, separated by a comma. If names match any regex,
|
||||
# they will always be accepted
|
||||
good-names-rgxs=
|
||||
|
||||
# Include a hint for the correct naming format with invalid-name.
|
||||
include-naming-hint=no
|
||||
|
||||
# Naming style matching correct inline iteration names.
|
||||
inlinevar-naming-style=any
|
||||
|
||||
# Regular expression matching correct inline iteration names. Overrides
|
||||
# inlinevar-naming-style. If left empty, inline iteration names will be checked
|
||||
# with the set naming style.
|
||||
#inlinevar-rgx=
|
||||
|
||||
# Naming style matching correct method names.
|
||||
method-naming-style=snake_case
|
||||
|
||||
# Regular expression matching correct method names. Overrides method-naming-
|
||||
# style. If left empty, method names will be checked with the set naming style.
|
||||
#method-rgx=
|
||||
|
||||
# Naming style matching correct module names.
|
||||
module-naming-style=snake_case
|
||||
|
||||
# Regular expression matching correct module names. Overrides module-naming-
|
||||
# style. If left empty, module names will be checked with the set naming style.
|
||||
#module-rgx=
|
||||
|
||||
# Colon-delimited sets of names that determine each other's naming style when
|
||||
# the name regexes allow several styles.
|
||||
name-group=
|
||||
|
||||
# Regular expression which should only match function or class names that do
|
||||
# not require a docstring.
|
||||
no-docstring-rgx=^_
|
||||
|
||||
# List of decorators that produce properties, such as abc.abstractproperty. Add
|
||||
# to this list to register other decorators that produce valid properties.
|
||||
# These decorators are taken in consideration only for invalid-name.
|
||||
property-classes=abc.abstractproperty
|
||||
|
||||
# Regular expression matching correct type variable names. If left empty, type
|
||||
# variable names will be checked with the set naming style.
|
||||
#typevar-rgx=
|
||||
|
||||
# Naming style matching correct variable names.
|
||||
variable-naming-style=snake_case
|
||||
|
||||
# Regular expression matching correct variable names. Overrides variable-
|
||||
# naming-style. If left empty, variable names will be checked with the set
|
||||
# naming style.
|
||||
#variable-rgx=
|
||||
|
||||
|
||||
[CLASSES]
|
||||
|
||||
# Warn about protected attribute access inside special methods
|
||||
check-protected-access-in-special-methods=no
|
||||
|
||||
# List of method names used to declare (i.e. assign) instance attributes.
|
||||
defining-attr-methods=__init__,
|
||||
__new__,
|
||||
setUp,
|
||||
__post_init__
|
||||
|
||||
# List of member names, which should be excluded from the protected access
|
||||
# warning.
|
||||
exclude-protected=_asdict,
|
||||
_fields,
|
||||
_replace,
|
||||
_source,
|
||||
_make
|
||||
|
||||
# List of valid names for the first argument in a class method.
|
||||
valid-classmethod-first-arg=cls
|
||||
|
||||
# List of valid names for the first argument in a metaclass class method.
|
||||
valid-metaclass-classmethod-first-arg=cls
|
||||
|
||||
|
||||
[REFACTORING]
|
||||
|
||||
# Maximum number of nested blocks for function / method body
|
||||
max-nested-blocks=5
|
||||
|
||||
# Complete name of functions that never returns. When checking for
|
||||
# inconsistent-return-statements if a never returning function is called then
|
||||
# it will be considered as an explicit return statement and no message will be
|
||||
# printed.
|
||||
never-returning-functions=sys.exit,argparse.parse_error
|
||||
|
||||
|
||||
[DESIGN]
|
||||
|
||||
# List of regular expressions of class ancestor names to ignore when counting
|
||||
# public methods (see R0903)
|
||||
exclude-too-few-public-methods=
|
||||
|
||||
# List of qualified class names to ignore when counting class parents (see
|
||||
# R0901)
|
||||
ignored-parents=
|
||||
|
||||
# Maximum number of arguments for function / method.
|
||||
max-args=5
|
||||
|
||||
# Maximum number of attributes for a class (see R0902).
|
||||
max-attributes=7
|
||||
|
||||
# Maximum number of boolean expressions in an if statement (see R0916).
|
||||
max-bool-expr=5
|
||||
|
||||
# Maximum number of branch for function / method body.
|
||||
max-branches=12
|
||||
|
||||
# Maximum number of locals for function / method body.
|
||||
max-locals=15
|
||||
|
||||
# Maximum number of parents for a class (see R0901).
|
||||
max-parents=7
|
||||
|
||||
# Maximum number of public methods for a class (see R0904).
|
||||
max-public-methods=20
|
||||
|
||||
# Maximum number of return / yield for function / method body.
|
||||
max-returns=6
|
||||
|
||||
# Maximum number of statements in function / method body.
|
||||
max-statements=50
|
||||
|
||||
# Minimum number of public methods for a class (see R0903).
|
||||
min-public-methods=2
|
||||
|
||||
|
||||
[EXCEPTIONS]
|
||||
|
||||
# Exceptions that will emit a warning when caught.
|
||||
overgeneral-exceptions=BaseException,
|
||||
Exception
|
||||
|
||||
|
||||
[FORMAT]
|
||||
|
||||
# Expected format of line ending, e.g. empty (any line ending), LF or CRLF.
|
||||
expected-line-ending-format=
|
||||
|
||||
# Regexp for a line that is allowed to be longer than the limit.
|
||||
ignore-long-lines=^\s*(# )?<?https?://\S+>?$
|
||||
|
||||
# Number of spaces of indent required inside a hanging or continued line.
|
||||
indent-after-paren=4
|
||||
|
||||
# String used as indentation unit. This is usually " " (4 spaces) or "\t" (1
|
||||
# tab).
|
||||
indent-string=' '
|
||||
|
||||
# Maximum number of characters on a single line.
|
||||
max-line-length=100
|
||||
|
||||
# Maximum number of lines in a module.
|
||||
max-module-lines=1000
|
||||
|
||||
# Allow the body of a class to be on the same line as the declaration if body
|
||||
# contains single statement.
|
||||
single-line-class-stmt=no
|
||||
|
||||
# Allow the body of an if to be on the same line as the test if there is no
|
||||
# else.
|
||||
single-line-if-stmt=no
|
||||
|
||||
|
||||
[IMPORTS]
|
||||
|
||||
# List of modules that can be imported at any level, not just the top level
|
||||
# one.
|
||||
allow-any-import-level=
|
||||
|
||||
# Allow wildcard imports from modules that define __all__.
|
||||
allow-wildcard-with-all=no
|
||||
|
||||
# Deprecated modules which should not be used, separated by a comma.
|
||||
deprecated-modules=
|
||||
|
||||
# Output a graph (.gv or any supported image format) of external dependencies
|
||||
# to the given file (report RP0402 must not be disabled).
|
||||
ext-import-graph=
|
||||
|
||||
# Output a graph (.gv or any supported image format) of all (i.e. internal and
|
||||
# external) dependencies to the given file (report RP0402 must not be
|
||||
# disabled).
|
||||
import-graph=
|
||||
|
||||
# Output a graph (.gv or any supported image format) of internal dependencies
|
||||
# to the given file (report RP0402 must not be disabled).
|
||||
int-import-graph=
|
||||
|
||||
# Force import order to recognize a module as part of the standard
|
||||
# compatibility libraries.
|
||||
known-standard-library=
|
||||
|
||||
# Force import order to recognize a module as part of a third party library.
|
||||
known-third-party=enchant
|
||||
|
||||
# Couples of modules and preferred modules, separated by a comma.
|
||||
preferred-modules=
|
||||
|
||||
|
||||
[LOGGING]
|
||||
|
||||
# The type of string formatting that logging methods do. `old` means using %
|
||||
# formatting, `new` is for `{}` formatting.
|
||||
logging-format-style=old
|
||||
|
||||
# Logging modules to check that the string format arguments are in logging
|
||||
# function parameter format.
|
||||
logging-modules=logging
|
||||
|
||||
|
||||
[MISCELLANEOUS]
|
||||
|
||||
# List of note tags to take in consideration, separated by a comma.
|
||||
notes=FIXME,
|
||||
XXX,
|
||||
TODO
|
||||
|
||||
# Regular expression of note tags to take in consideration.
|
||||
notes-rgx=
|
||||
|
||||
|
||||
[SIMILARITIES]
|
||||
|
||||
# Comments are removed from the similarity computation
|
||||
ignore-comments=yes
|
||||
|
||||
# Docstrings are removed from the similarity computation
|
||||
ignore-docstrings=yes
|
||||
|
||||
# Imports are removed from the similarity computation
|
||||
ignore-imports=yes
|
||||
|
||||
# Signatures are removed from the similarity computation
|
||||
ignore-signatures=yes
|
||||
|
||||
# Minimum lines number of a similarity.
|
||||
min-similarity-lines=4
|
||||
|
||||
|
||||
[SPELLING]
|
||||
|
||||
# Limits count of emitted suggestions for spelling mistakes.
|
||||
max-spelling-suggestions=4
|
||||
|
||||
# Spelling dictionary name. Available dictionaries: none. To make it work,
|
||||
# install the 'python-enchant' package.
|
||||
spelling-dict=
|
||||
|
||||
# List of comma separated words that should be considered directives if they
|
||||
# appear at the beginning of a comment and should not be checked.
|
||||
spelling-ignore-comment-directives=fmt: on,fmt: off,noqa:,noqa,nosec,isort:skip,mypy:
|
||||
|
||||
# List of comma separated words that should not be checked.
|
||||
spelling-ignore-words=
|
||||
|
||||
# A path to a file that contains the private dictionary; one word per line.
|
||||
spelling-private-dict-file=
|
||||
|
||||
# Tells whether to store unknown words to the private dictionary (see the
|
||||
# --spelling-private-dict-file option) instead of raising a message.
|
||||
spelling-store-unknown-words=no
|
||||
|
||||
|
||||
[STRING]
|
||||
|
||||
# This flag controls whether inconsistent-quotes generates a warning when the
|
||||
# character used as a quote delimiter is used inconsistently within a module.
|
||||
check-quote-consistency=no
|
||||
|
||||
# This flag controls whether the implicit-str-concat should generate a warning
|
||||
# on implicit string concatenation in sequences defined over several lines.
|
||||
check-str-concat-over-line-jumps=no
|
||||
|
||||
|
||||
[TYPECHECK]
|
||||
|
||||
# List of decorators that produce context managers, such as
|
||||
# contextlib.contextmanager. Add to this list to register other decorators that
|
||||
# produce valid context managers.
|
||||
contextmanager-decorators=contextlib.contextmanager
|
||||
|
||||
# List of members which are set dynamically and missed by pylint inference
|
||||
# system, and so shouldn't trigger E1101 when accessed. Python regular
|
||||
# expressions are accepted.
|
||||
generated-members=
|
||||
|
||||
# Tells whether to warn about missing members when the owner of the attribute
|
||||
# is inferred to be None.
|
||||
ignore-none=yes
|
||||
|
||||
# This flag controls whether pylint should warn about no-member and similar
|
||||
# checks whenever an opaque object is returned when inferring. The inference
|
||||
# can return multiple potential results while evaluating a Python object, but
|
||||
# some branches might not be evaluated, which results in partial inference. In
|
||||
# that case, it might be useful to still emit no-member and other checks for
|
||||
# the rest of the inferred objects.
|
||||
ignore-on-opaque-inference=yes
|
||||
|
||||
# List of symbolic message names to ignore for Mixin members.
|
||||
ignored-checks-for-mixins=no-member,
|
||||
not-async-context-manager,
|
||||
not-context-manager,
|
||||
attribute-defined-outside-init
|
||||
|
||||
# List of class names for which member attributes should not be checked (useful
|
||||
# for classes with dynamically set attributes). This supports the use of
|
||||
# qualified names.
|
||||
ignored-classes=optparse.Values,thread._local,_thread._local,argparse.Namespace
|
||||
|
||||
# Show a hint with possible names when a member name was not found. The aspect
|
||||
# of finding the hint is based on edit distance.
|
||||
missing-member-hint=yes
|
||||
|
||||
# The minimum edit distance a name should have in order to be considered a
|
||||
# similar match for a missing member name.
|
||||
missing-member-hint-distance=1
|
||||
|
||||
# The total number of similar names that should be taken in consideration when
|
||||
# showing a hint for a missing member.
|
||||
missing-member-max-choices=1
|
||||
|
||||
# Regex pattern to define which classes are considered mixins.
|
||||
mixin-class-rgx=.*[Mm]ixin
|
||||
|
||||
# List of decorators that change the signature of a decorated function.
|
||||
signature-mutators=
|
||||
|
||||
|
||||
[VARIABLES]
|
||||
|
||||
# List of additional names supposed to be defined in builtins. Remember that
|
||||
# you should avoid defining new builtins when possible.
|
||||
additional-builtins=
|
||||
|
||||
# Tells whether unused global variables should be treated as a violation.
|
||||
allow-global-unused-variables=yes
|
||||
|
||||
# List of names allowed to shadow builtins
|
||||
allowed-redefined-builtins=
|
||||
|
||||
# List of strings which can identify a callback function by name. A callback
|
||||
# name must start or end with one of those strings.
|
||||
callbacks=cb_,
|
||||
_cb
|
||||
|
||||
# A regular expression matching the name of dummy variables (i.e. expected to
|
||||
# not be used).
|
||||
dummy-variables-rgx=_+$|(_[a-zA-Z0-9_]*[a-zA-Z0-9]+?$)|dummy|^ignored_|^unused_
|
||||
|
||||
# Argument names that match this expression will be ignored. Default to name
|
||||
# with leading underscore.
|
||||
ignored-argument-names=_.*|^ignored_|^unused_
|
||||
|
||||
# Tells whether we should check for unused import in __init__ files.
|
||||
init-import=no
|
||||
|
||||
# List of qualified module names which can have objects that can redefine
|
||||
# builtins.
|
||||
redefining-builtins-modules=six.moves,past.builtins,future.builtins,builtins,io
|
||||
+3
-3
@@ -18,9 +18,9 @@ project(FreeCAD)
|
||||
set(PACKAGE_VERSION_NAME "Vulcan")
|
||||
set(PACKAGE_VERSION_MAJOR "0")
|
||||
set(PACKAGE_VERSION_MINOR "20")
|
||||
set(PACKAGE_VERSION_PATCH "0")
|
||||
set(PACKAGE_VERSION_SUFFIX "dev") # either "dev" for development snapshot or "" (empty string)
|
||||
set(FREECAD_VERSION_PATCH "0") # number of patch release (e.g. "4" for the 0.18.4 release)
|
||||
set(PACKAGE_VERSION_PATCH "1")
|
||||
set(PACKAGE_VERSION_SUFFIX "") # either "dev" for development snapshot or "" (empty string)
|
||||
set(FREECAD_VERSION_PATCH "1") # number of patch release (e.g. "4" for the 0.18.4 release)
|
||||
|
||||
set(FREECAD_VERSION "${PACKAGE_VERSION_MAJOR}.${PACKAGE_VERSION_MINOR}")
|
||||
set(PACKAGE_VERSION "${PACKAGE_VERSION_MAJOR}.${PACKAGE_VERSION_MINOR}.${PACKAGE_VERSION_PATCH}")
|
||||
|
||||
@@ -11,7 +11,7 @@
|
||||
|
||||
[](https://github.com/freecad/freecad/releases/latest) [![Master][freecad-master-status]][gitlab-branch-master] [](https://crowdin.com/project/freecad) [](https://gitter.im/freecad/freecad?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge) [](https://lgtm.com/projects/g/FreeCAD/FreeCAD/context:python) [](https://lgtm.com/projects/g/FreeCAD/FreeCAD/context:cpp) [](https://liberapay.com/FreeCAD)
|
||||
|
||||

|
||||
<img src="https://user-images.githubusercontent.com/1828501/174066870-1692005b-f8d7-43fb-a289-6d2f07f73d7f.png" width="800"/>
|
||||
|
||||
Overview
|
||||
--------
|
||||
@@ -55,13 +55,13 @@ Other options are described at the [wiki Download page](https://wiki.freecadweb.
|
||||
Build Status
|
||||
------------
|
||||
|
||||
| Master | 0.19 | Translation |
|
||||
| Master | 0.20 | Translation |
|
||||
|:------:|:----:|:-----------:|
|
||||
|[![Master][freecad-master-status]][gitlab-branch-master]|[![0.19][freecad-0.19-status]][gitlab-branch-0.19]|[](https://crowdin.com/project/freecad)|
|
||||
|[![Master][freecad-master-status]][gitlab-branch-master]|[![0.20][freecad-0.20-status]][gitlab-branch-0.20]|[](https://crowdin.com/project/freecad)|
|
||||
|
||||
[freecad-0.19-status]: https://gitlab.com/freecad/FreeCAD-CI/badges/releases/FreeCAD-0-19/pipeline.svg
|
||||
[freecad-0.20-status]: https://gitlab.com/freecad/FreeCAD-CI/badges/releases/FreeCAD-0-20/pipeline.svg
|
||||
[freecad-master-status]: https://gitlab.com/freecad/FreeCAD-CI/badges/master/pipeline.svg
|
||||
[gitlab-branch-0.19]: https://gitlab.com/freecad/FreeCAD-CI/-/commits/releases/FreeCAD-0-19
|
||||
[gitlab-branch-0.20]: https://gitlab.com/freecad/FreeCAD-CI/-/commits/releases/FreeCAD-0-20
|
||||
[gitlab-branch-master]: https://gitlab.com/freecad/FreeCAD-CI/-/commits/master
|
||||
[travis-builds]: https://travis-ci.org/FreeCAD/FreeCAD/builds
|
||||
|
||||
@@ -99,7 +99,7 @@ To report an issue please:
|
||||
For more detail see:
|
||||
- [Wiki Page about the Bug Tracker](https://wiki.freecadweb.org/Tracker)
|
||||
- [Bug Tracker](https://tracker.freecadweb.org)
|
||||
- [Help Forum](http://forum.freecadweb.org/viewforum.php?f=3)
|
||||
- [Help Forum](https://forum.freecadweb.org/viewforum.php?f=3)
|
||||
|
||||
|
||||
Usage & Getting help
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
macro(SetupOpenCasCade)
|
||||
# -------------------------------- OpenCasCade --------------------------------
|
||||
|
||||
find_package(OpenCasCade)
|
||||
find_package(OCC)
|
||||
if(NOT OCC_FOUND)
|
||||
message(FATAL_ERROR "================================================================\n"
|
||||
"Neither OpenCASCADE Community Edition nor OpenCASCADE was found!\n"
|
||||
|
||||
@@ -125,9 +125,7 @@ macro(SetupShibokenAndPyside)
|
||||
"PySide2 Python module not found.\n"
|
||||
"================================\n")
|
||||
else()
|
||||
message(STATUS "===============================================\n"
|
||||
"PySide2 Python module found at ${PRINT_OUTPUT}.\n"
|
||||
"===============================================\n")
|
||||
message(STATUS "PySide2 Python module found at ${PRINT_OUTPUT}.\n")
|
||||
endif()
|
||||
|
||||
endmacro(SetupShibokenAndPyside)
|
||||
|
||||
@@ -12,6 +12,7 @@ path_classifiers:
|
||||
- "src/CXX/"
|
||||
template:
|
||||
- "src/Tools/examplePy2wiki.py"
|
||||
- "src/Tools/wiki2qhelp.py"
|
||||
- "src/Mode/TemplatePyMod/"
|
||||
unmaintained:
|
||||
- "src/Mod/Robot/"
|
||||
|
||||
+11
-3
@@ -2441,10 +2441,14 @@ void Application::initConfig(int argc, char ** argv)
|
||||
// We only set these keys if not yet defined. Therefore it suffices to search
|
||||
// only for 'BuildVersionMajor'.
|
||||
if (App::Application::Config().find("BuildVersionMajor") == App::Application::Config().end()) {
|
||||
std::stringstream str; str << FCVersionMajor << "." << FCVersionMinor;
|
||||
std::stringstream str;
|
||||
str << FCVersionMajor
|
||||
<< "." << FCVersionMinor
|
||||
<< "." << FCVersionPoint;
|
||||
App::Application::Config()["ExeVersion" ] = str.str();
|
||||
App::Application::Config()["BuildVersionMajor" ] = FCVersionMajor;
|
||||
App::Application::Config()["BuildVersionMinor" ] = FCVersionMinor;
|
||||
App::Application::Config()["BuildVersionPoint" ] = FCVersionPoint;
|
||||
App::Application::Config()["BuildRevision" ] = FCRevision;
|
||||
App::Application::Config()["BuildRepositoryURL" ] = FCRepositoryURL;
|
||||
App::Application::Config()["BuildRevisionDate" ] = FCRevisionDate;
|
||||
@@ -2524,17 +2528,21 @@ void Application::initConfig(int argc, char ** argv)
|
||||
// Remove banner if FreeCAD is invoked via the -c command as regular
|
||||
// Python interpreter
|
||||
if (!(mConfig["Verbose"] == "Strict"))
|
||||
Console().Message("%s %s, Libs: %s.%sR%s\n%s",mConfig["ExeName"].c_str(),
|
||||
Console().Message("%s %s, Libs: %s.%s.%sR%s\n%s",
|
||||
mConfig["ExeName"].c_str(),
|
||||
mConfig["ExeVersion"].c_str(),
|
||||
mConfig["BuildVersionMajor"].c_str(),
|
||||
mConfig["BuildVersionMinor"].c_str(),
|
||||
mConfig["BuildVersionPoint"].c_str(),
|
||||
mConfig["BuildRevision"].c_str(),
|
||||
mConfig["CopyrightInfo"].c_str());
|
||||
else
|
||||
Console().Message("%s %s, Libs: %s.%sB%s\n",mConfig["ExeName"].c_str(),
|
||||
Console().Message("%s %s, Libs: %s.%s.%sB%s\n",
|
||||
mConfig["ExeName"].c_str(),
|
||||
mConfig["ExeVersion"].c_str(),
|
||||
mConfig["BuildVersionMajor"].c_str(),
|
||||
mConfig["BuildVersionMinor"].c_str(),
|
||||
mConfig["BuildVersionPoint"].c_str(),
|
||||
mConfig["BuildRevision"].c_str());
|
||||
}
|
||||
LoadParameters();
|
||||
|
||||
@@ -104,9 +104,9 @@ PyMethodDef Application::Methods[] = {
|
||||
"* If no module is given it will be determined by the file extension.\n"
|
||||
"* If more than one module can load a file the first one will be taken.\n"
|
||||
"* If no module exists to load the file an exception will be raised."},
|
||||
{"open", reinterpret_cast<PyCFunction>(reinterpret_cast<void (*) (void)>( Application::sOpenDocument )), METH_VARARGS|METH_KEYWORDS,
|
||||
{"open", reinterpret_cast<PyCFunction>(reinterpret_cast<void (*) ()>( Application::sOpenDocument )), METH_VARARGS|METH_KEYWORDS,
|
||||
"See openDocument(string)"},
|
||||
{"openDocument", reinterpret_cast<PyCFunction>(reinterpret_cast<void (*) (void)>( Application::sOpenDocument )), METH_VARARGS|METH_KEYWORDS,
|
||||
{"openDocument", reinterpret_cast<PyCFunction>(reinterpret_cast<void (*) ()>( Application::sOpenDocument )), METH_VARARGS|METH_KEYWORDS,
|
||||
"openDocument(filepath,hidden=False) -> object\n"
|
||||
"Create a document and load the project file into the document.\n\n"
|
||||
"filepath: file path to an existing file. If the file doesn't exist\n"
|
||||
@@ -116,7 +116,7 @@ PyMethodDef Application::Methods[] = {
|
||||
// {"saveDocument", (PyCFunction) Application::sSaveDocument, METH_VARARGS,
|
||||
// "saveDocument(string) -- Save the document to a file."},
|
||||
// {"saveDocumentAs", (PyCFunction) Application::sSaveDocumentAs, METH_VARARGS},
|
||||
{"newDocument", reinterpret_cast<PyCFunction>(reinterpret_cast<void (*) (void)>( Application::sNewDocument )), METH_VARARGS|METH_KEYWORDS,
|
||||
{"newDocument", reinterpret_cast<PyCFunction>(reinterpret_cast<void (*) ()>( Application::sNewDocument )), METH_VARARGS|METH_KEYWORDS,
|
||||
"newDocument(name, label=None, hidden=False, temp=False) -> object\n"
|
||||
"Create a new document with a given name.\n\n"
|
||||
"name: unique document name which is checked automatically.\n"
|
||||
@@ -492,6 +492,9 @@ PyObject* Application::sGetVersion(PyObject * /*self*/, PyObject *args)
|
||||
it = cfg.find("BuildVersionMinor");
|
||||
list.append(Py::String(it != cfg.end() ? it->second : ""));
|
||||
|
||||
it = cfg.find("BuildVersionPoint");
|
||||
list.append(Py::String(it != cfg.end() ? it->second : ""));
|
||||
|
||||
it = cfg.find("BuildRevision");
|
||||
list.append(Py::String(it != cfg.end() ? it->second : ""));
|
||||
|
||||
|
||||
+18
-11
@@ -2614,23 +2614,30 @@ bool Document::saveToFile(const char* filename) const
|
||||
bool policy = App::GetApplication().GetParameterGroupByPath
|
||||
("User parameter:BaseApp/Preferences/Document")->GetBool("BackupPolicy",true);
|
||||
|
||||
//realpath is canonical filename i.e. without symlink
|
||||
#ifdef FC_OS_WIN32
|
||||
QString utf8Name = QString::fromUtf8(filename);
|
||||
auto realpath = fs::weakly_canonical(fs::absolute(fs::path(utf8Name.toStdWString())));
|
||||
std::string nativePath = QString::fromStdWString(realpath.native()).toStdString();
|
||||
#else
|
||||
auto realpath = fs::weakly_canonical(fs::absolute(fs::path(filename)));
|
||||
std::string nativePath = realpath.native();
|
||||
#endif
|
||||
|
||||
// make a tmp. file where to save the project data first and then rename to
|
||||
// the actual file name. This may be useful if overwriting an existing file
|
||||
// fails so that the data of the work up to now isn't lost.
|
||||
std::string uuid = Base::Uuid::createUuid();
|
||||
std::string fn = filename;
|
||||
std::string fn = nativePath;
|
||||
if (policy) {
|
||||
fn += ".";
|
||||
fn += uuid;
|
||||
}
|
||||
Base::FileInfo tmp(fn);
|
||||
|
||||
|
||||
// In case some folders in the path do not exist
|
||||
#ifdef FC_OS_WIN32
|
||||
QString utf8Name = QString::fromUtf8(filename);
|
||||
auto parentPath = fs::absolute(fs::path(utf8Name.toStdWString())).parent_path();
|
||||
#else
|
||||
auto parentPath = fs::absolute(fs::path(filename)).parent_path();
|
||||
#endif
|
||||
auto parentPath = realpath.parent_path();
|
||||
fs::create_directories(parentPath);
|
||||
|
||||
// open extra scope to close ZipWriter properly
|
||||
@@ -2677,9 +2684,9 @@ bool Document::saveToFile(const char* filename) const
|
||||
count_bak = -1;
|
||||
}
|
||||
bool useFCBakExtension = App::GetApplication().GetParameterGroupByPath
|
||||
("User parameter:BaseApp/Preferences/Document")->GetBool("UseFCBakExtension",false);
|
||||
std::string saveBackupDateFormat = App::GetApplication().GetParameterGroupByPath
|
||||
("User parameter:BaseApp/Preferences/Document")->GetASCII("SaveBackupDateFormat","%Y%m%d-%H%M%S");
|
||||
("User parameter:BaseApp/Preferences/Document")->GetBool("UseFCBakExtension",false);
|
||||
std::string saveBackupDateFormat = App::GetApplication().GetParameterGroupByPath
|
||||
("User parameter:BaseApp/Preferences/Document")->GetASCII("SaveBackupDateFormat","%Y%m%d-%H%M%S");
|
||||
|
||||
BackupPolicy policy;
|
||||
if (useFCBakExtension) {
|
||||
@@ -2691,7 +2698,7 @@ bool Document::saveToFile(const char* filename) const
|
||||
policy.setPolicy(BackupPolicy::Standard);
|
||||
}
|
||||
policy.setNumberOfFiles(count_bak);
|
||||
policy.apply(fn, filename);
|
||||
policy.apply(fn, nativePath);
|
||||
}
|
||||
|
||||
signalFinishSave(*this, filename);
|
||||
|
||||
+20
-20
@@ -112,7 +112,7 @@ public:
|
||||
boost::signals2::signal<void (const App::DocumentObject&, const App::Property&)> signalChanged;
|
||||
|
||||
/// returns the type name of the ViewProvider
|
||||
virtual const char* getViewProviderName(void) const {
|
||||
virtual const char* getViewProviderName() const {
|
||||
return "";
|
||||
}
|
||||
/**
|
||||
@@ -129,11 +129,11 @@ public:
|
||||
}
|
||||
|
||||
/// Constructor
|
||||
DocumentObject(void);
|
||||
DocumentObject();
|
||||
virtual ~DocumentObject();
|
||||
|
||||
/// returns the name which is set in the document for this object (not the name property!)
|
||||
const char *getNameInDocument(void) const;
|
||||
const char *getNameInDocument() const;
|
||||
/// Return the object ID that is unique within its owner document
|
||||
long getID() const {return _Id;}
|
||||
/// returns the name that is safe to be exported to other document
|
||||
@@ -143,7 +143,7 @@ public:
|
||||
virtual bool isAttachedToDocument() const override;
|
||||
virtual const char* detachFromDocument() override;
|
||||
/// gets the document in which this Object is handled
|
||||
App::Document *getDocument(void) const;
|
||||
App::Document *getDocument() const;
|
||||
|
||||
/** Set the property touched -> changed, cause recomputation in Update()
|
||||
*/
|
||||
@@ -151,22 +151,22 @@ public:
|
||||
/// set this document object touched (cause recomputation on dependent features)
|
||||
void touch(bool noRecompute=false);
|
||||
/// test if this document object is touched
|
||||
bool isTouched(void) const;
|
||||
bool isTouched() const;
|
||||
/// Enforce this document object to be recomputed
|
||||
void enforceRecompute();
|
||||
/// Test if this document object must be recomputed
|
||||
bool mustRecompute(void) const;
|
||||
bool mustRecompute() const;
|
||||
/// reset this document object touched
|
||||
void purgeTouched(void) {
|
||||
void purgeTouched() {
|
||||
StatusBits.reset(ObjectStatus::Touch);
|
||||
StatusBits.reset(ObjectStatus::Enforce);
|
||||
setPropertyStatus(0,false);
|
||||
}
|
||||
/// set this feature to error
|
||||
bool isError(void) const {return StatusBits.test(ObjectStatus::Error);}
|
||||
bool isValid(void) const {return !StatusBits.test(ObjectStatus::Error);}
|
||||
bool isError() const {return StatusBits.test(ObjectStatus::Error);}
|
||||
bool isValid() const {return !StatusBits.test(ObjectStatus::Error);}
|
||||
/// remove the error from the object
|
||||
void purgeError(void){StatusBits.reset(ObjectStatus::Error);}
|
||||
void purgeError(){StatusBits.reset(ObjectStatus::Error);}
|
||||
/// returns true if this objects is currently recomputing
|
||||
bool isRecomputing() const {return StatusBits.test(ObjectStatus::Recompute);}
|
||||
/// returns true if this objects is currently restoring from file
|
||||
@@ -228,7 +228,7 @@ public:
|
||||
/// returns a list of objects linked by the property
|
||||
std::vector<App::DocumentObject*> getOutListOfProperty(App::Property*) const;
|
||||
/// returns a list of objects this object is pointing to by Links and all further descended
|
||||
std::vector<App::DocumentObject*> getOutListRecursive(void) const;
|
||||
std::vector<App::DocumentObject*> getOutListRecursive() const;
|
||||
/// clear internal out list cache
|
||||
void clearOutListCache() const;
|
||||
/// get all possible paths from this to another object following the OutList
|
||||
@@ -237,10 +237,10 @@ public:
|
||||
/// get all objects link to this object
|
||||
std::vector<App::DocumentObject*> getInList(void) const
|
||||
#else
|
||||
const std::vector<App::DocumentObject*> &getInList(void) const;
|
||||
const std::vector<App::DocumentObject*> &getInList() const;
|
||||
#endif
|
||||
/// get all objects link directly or indirectly to this object
|
||||
std::vector<App::DocumentObject*> getInListRecursive(void) const;
|
||||
std::vector<App::DocumentObject*> getInListRecursive() const;
|
||||
/** Get a set of all objects linking to this object, including possible external parent objects
|
||||
*
|
||||
* @param inSet [out]: a set containing all objects linking to this object.
|
||||
@@ -299,7 +299,7 @@ public:
|
||||
* necessarily mean that it will be recomputed. It only means that all
|
||||
* objects that link it (i.e. its InList) will be recomputed.
|
||||
*/
|
||||
virtual short mustExecute(void) const;
|
||||
virtual short mustExecute() const;
|
||||
|
||||
/** Recompute only this feature
|
||||
*
|
||||
@@ -308,7 +308,7 @@ public:
|
||||
bool recomputeFeature(bool recursive=false);
|
||||
|
||||
/// get the status Message
|
||||
const char *getStatusString(void) const;
|
||||
const char *getStatusString() const;
|
||||
|
||||
/** Called in case of losing a link
|
||||
* Get called by the document when a object got deleted a link property of this
|
||||
@@ -317,7 +317,7 @@ public:
|
||||
* additional or different behavior.
|
||||
*/
|
||||
virtual void onLostLinkToObject(DocumentObject*);
|
||||
virtual PyObject *getPyObject(void) override;
|
||||
virtual PyObject *getPyObject() override;
|
||||
|
||||
/** Get the sub element/object by name
|
||||
*
|
||||
@@ -561,7 +561,7 @@ public:
|
||||
|
||||
protected:
|
||||
/// recompute only this object
|
||||
virtual App::DocumentObjectExecReturn *recompute(void);
|
||||
virtual App::DocumentObjectExecReturn *recompute();
|
||||
/** get called by the document to recompute this feature
|
||||
* Normally this method get called in the processing of
|
||||
* Document::recompute().
|
||||
@@ -569,7 +569,7 @@ protected:
|
||||
* with the data from linked objects and objects own
|
||||
* properties.
|
||||
*/
|
||||
virtual App::DocumentObjectExecReturn *execute(void);
|
||||
virtual App::DocumentObjectExecReturn *execute();
|
||||
|
||||
/**
|
||||
* Executes the extensions of a document object.
|
||||
@@ -592,8 +592,8 @@ protected:
|
||||
*/
|
||||
std::bitset<32> StatusBits;
|
||||
|
||||
void setError(void){StatusBits.set(ObjectStatus::Error);}
|
||||
void resetError(void){StatusBits.reset(ObjectStatus::Error);}
|
||||
void setError(){StatusBits.set(ObjectStatus::Error);}
|
||||
void resetError(){StatusBits.reset(ObjectStatus::Error);}
|
||||
void setDocument(App::Document* doc);
|
||||
|
||||
/// get called before the value is changed
|
||||
|
||||
@@ -3193,7 +3193,7 @@ static int column;
|
||||
|
||||
// show the parser the lexer method
|
||||
#define yylex ExpressionParserlex
|
||||
int ExpressionParserlex(void);
|
||||
int ExpressionParserlex();
|
||||
|
||||
// Parser, defined in ExpressionParser.y
|
||||
# define YYTOKENTYPE
|
||||
|
||||
+8
-8
@@ -148,7 +148,7 @@ void LinkParams::removeCopyOnChangeApplyToAll() {
|
||||
|
||||
EXTENSION_PROPERTY_SOURCE(App::LinkBaseExtension, App::DocumentObjectExtension)
|
||||
|
||||
LinkBaseExtension::LinkBaseExtension(void)
|
||||
LinkBaseExtension::LinkBaseExtension()
|
||||
:enableLabelCache(false),hasOldSubElement(false),hasCopyOnChange(true)
|
||||
{
|
||||
initExtensionType(LinkBaseExtension::getExtensionClassTypeId());
|
||||
@@ -166,7 +166,7 @@ LinkBaseExtension::~LinkBaseExtension()
|
||||
{
|
||||
}
|
||||
|
||||
PyObject* LinkBaseExtension::getExtensionPyObject(void) {
|
||||
PyObject* LinkBaseExtension::getExtensionPyObject() {
|
||||
if (ExtensionPythonObject.is(Py::_None())){
|
||||
// ref counter is set to 1
|
||||
ExtensionPythonObject = Py::Object(new LinkBaseExtensionPy(this),true);
|
||||
@@ -293,7 +293,7 @@ void LinkBaseExtension::setProperty(int idx, Property *prop) {
|
||||
|
||||
static const char _GroupPrefix[] = "Configuration (";
|
||||
|
||||
App::DocumentObjectExecReturn *LinkBaseExtension::extensionExecute(void) {
|
||||
App::DocumentObjectExecReturn *LinkBaseExtension::extensionExecute() {
|
||||
// The actual value of LinkTouched is not important, just to notify view
|
||||
// provider that the link (in fact, its dependents, i.e. linked ones) have
|
||||
// recomputed.
|
||||
@@ -398,7 +398,7 @@ App::DocumentObjectExecReturn *LinkBaseExtension::extensionExecute(void) {
|
||||
return inherited::extensionExecute();
|
||||
}
|
||||
|
||||
short LinkBaseExtension::extensionMustExecute(void) {
|
||||
short LinkBaseExtension::extensionMustExecute() {
|
||||
auto link = getLink();
|
||||
if(!link)
|
||||
return 0;
|
||||
@@ -2226,7 +2226,7 @@ template class AppExport ExtensionPythonT<LinkBaseExtension>;
|
||||
|
||||
EXTENSION_PROPERTY_SOURCE(App::LinkExtension, App::LinkBaseExtension)
|
||||
|
||||
LinkExtension::LinkExtension(void)
|
||||
LinkExtension::LinkExtension()
|
||||
{
|
||||
initExtensionType(LinkExtension::getExtensionClassTypeId());
|
||||
|
||||
@@ -2266,7 +2266,7 @@ bool Link::canLinkProperties() const {
|
||||
|
||||
namespace App {
|
||||
PROPERTY_SOURCE_TEMPLATE(App::LinkPython, App::Link)
|
||||
template<> const char* App::LinkPython::getViewProviderName(void) const {
|
||||
template<> const char* App::LinkPython::getViewProviderName() const {
|
||||
return "Gui::ViewProviderLinkPython";
|
||||
}
|
||||
template class AppExport FeaturePythonT<App::Link>;
|
||||
@@ -2293,7 +2293,7 @@ bool LinkElement::canDelete() const {
|
||||
|
||||
namespace App {
|
||||
PROPERTY_SOURCE_TEMPLATE(App::LinkElementPython, App::LinkElement)
|
||||
template<> const char* App::LinkElementPython::getViewProviderName(void) const {
|
||||
template<> const char* App::LinkElementPython::getViewProviderName() const {
|
||||
return "Gui::ViewProviderLinkPython";
|
||||
}
|
||||
template class AppExport FeaturePythonT<App::LinkElement>;
|
||||
@@ -2312,7 +2312,7 @@ LinkGroup::LinkGroup() {
|
||||
|
||||
namespace App {
|
||||
PROPERTY_SOURCE_TEMPLATE(App::LinkGroupPython, App::LinkGroup)
|
||||
template<> const char* App::LinkGroupPython::getViewProviderName(void) const {
|
||||
template<> const char* App::LinkGroupPython::getViewProviderName() const {
|
||||
return "Gui::ViewProviderLinkPython";
|
||||
}
|
||||
template class AppExport FeaturePythonT<App::LinkGroup>;
|
||||
|
||||
+7
-7
@@ -286,8 +286,8 @@ public:
|
||||
bool extensionGetLinkedObject(DocumentObject *&ret,
|
||||
bool recurse, Base::Matrix4D *mat, bool transform, int depth) const override;
|
||||
|
||||
virtual App::DocumentObjectExecReturn *extensionExecute(void) override;
|
||||
virtual short extensionMustExecute(void) override;
|
||||
virtual App::DocumentObjectExecReturn *extensionExecute() override;
|
||||
virtual short extensionMustExecute() override;
|
||||
virtual void extensionOnChanged(const Property* p) override;
|
||||
virtual void onExtendedUnsetupObject () override;
|
||||
virtual void onExtendedDocumentRestored() override;
|
||||
@@ -296,7 +296,7 @@ public:
|
||||
virtual int extensionIsElementVisible(const char *) override;
|
||||
virtual bool extensionHasChildElement() const override;
|
||||
|
||||
virtual PyObject* getExtensionPyObject(void) override;
|
||||
virtual PyObject* getExtensionPyObject() override;
|
||||
|
||||
virtual Property *extensionGetPropertyByName(const char* name) const override;
|
||||
|
||||
@@ -536,9 +536,9 @@ public:
|
||||
|
||||
LINK_PROPS_DEFINE(LINK_PARAMS_LINK)
|
||||
|
||||
Link(void);
|
||||
Link();
|
||||
|
||||
const char* getViewProviderName(void) const override{
|
||||
const char* getViewProviderName() const override{
|
||||
return "Gui::ViewProviderLink";
|
||||
}
|
||||
|
||||
@@ -581,7 +581,7 @@ public:
|
||||
LINK_PROPS_DEFINE(LINK_PARAMS_ELEMENT)
|
||||
|
||||
LinkElement();
|
||||
const char* getViewProviderName(void) const override{
|
||||
const char* getViewProviderName() const override{
|
||||
return "Gui::ViewProviderLink";
|
||||
}
|
||||
|
||||
@@ -620,7 +620,7 @@ public:
|
||||
|
||||
LinkGroup();
|
||||
|
||||
const char* getViewProviderName(void) const override{
|
||||
const char* getViewProviderName() const override{
|
||||
return "Gui::ViewProviderLink";
|
||||
}
|
||||
|
||||
|
||||
@@ -98,7 +98,11 @@ Metadata::Metadata(const fs::path& metadataFile)
|
||||
auto errHandler = std::make_unique<MetadataInternal::XMLErrorHandler>();
|
||||
_parser->setErrorHandler(errHandler.get());
|
||||
|
||||
#if defined (FC_OS_WIN32)
|
||||
_parser->parse(reinterpret_cast<const XMLCh*>(metadataFile.wstring().c_str()));
|
||||
#else
|
||||
_parser->parse(metadataFile.string().c_str());
|
||||
#endif
|
||||
|
||||
auto doc = _parser->getDocument();
|
||||
_dom = doc->getDocumentElement();
|
||||
@@ -448,6 +452,7 @@ bool Metadata::satisfies(const Meta::Dependency& dep)
|
||||
std::map<std::string, std::string>& config = App::Application::Config();
|
||||
replacements.insert(std::make_pair("$BuildVersionMajor", config["BuildVersionMajor"]));
|
||||
replacements.insert(std::make_pair("$BuildVersionMinor", config["BuildVersionMinor"]));
|
||||
replacements.insert(std::make_pair("$BuildVersionMinor", config["BuildVersionPoint"]));
|
||||
replacements.insert(std::make_pair("$BuildRevision", config["BuildRevision"]));
|
||||
for (const auto& replacement : replacements) {
|
||||
auto pos = injectedString.find(replacement.first);
|
||||
@@ -492,7 +497,10 @@ bool App::Metadata::supportsCurrentFreeCAD() const
|
||||
if (fcVersion == Meta::Version()) {
|
||||
std::map<std::string, std::string>& config = App::Application::Config();
|
||||
std::stringstream ss;
|
||||
ss << config["BuildVersionMajor"] << "." << config["BuildVersionMinor"] << "." << (config["BuildRevision"].empty() ? "0" : config["BuildRevision"]);
|
||||
ss << config["BuildVersionMajor"]
|
||||
<< "." << config["BuildVersionMinor"]
|
||||
<< "." << config["BuildVersionPoint"]
|
||||
<< "." << (config["BuildRevision"].empty() ? "0" : config["BuildRevision"]);
|
||||
fcVersion = Meta::Version(ss.str());
|
||||
}
|
||||
|
||||
|
||||
@@ -23,6 +23,7 @@
|
||||
#include "PreCompiled.h"
|
||||
|
||||
#include "Metadata.h"
|
||||
#include <Base/FileInfo.h>
|
||||
|
||||
// inclusion of the generated files (generated out of MetadataPy.xml)
|
||||
#include "MetadataPy.h"
|
||||
@@ -64,10 +65,13 @@ int MetadataPy::PyInit(PyObject* args, PyObject* /*kwd*/)
|
||||
|
||||
// Main class constructor -- takes a file path, loads the metadata from it
|
||||
PyErr_Clear();
|
||||
const char* filename;
|
||||
if (PyArg_ParseTuple(args, "s", &filename)) {
|
||||
char* filename;
|
||||
if (PyArg_ParseTuple(args, "et", "utf-8", &filename)) {
|
||||
try {
|
||||
auto md = new Metadata(filename);
|
||||
std::string utf8Name = std::string(filename);
|
||||
PyMem_Free(filename);
|
||||
|
||||
auto md = new Metadata(Base::FileInfo::stringToPath(utf8Name));
|
||||
setTwinPointer(md);
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -179,7 +179,7 @@ private:
|
||||
typedef boost::adjacency_list< boost::listS, boost::vecS, boost::directedS > DiGraph;
|
||||
typedef std::pair<int, int> Edge;
|
||||
// Note: use std::map instead of unordered_map to keep the binding order stable
|
||||
#ifdef FC_OS_MACOSX
|
||||
#if defined(FC_OS_MACOSX) || defined(FC_OS_BSD)
|
||||
typedef std::map<App::ObjectIdentifier, ExpressionInfo> ExpressionMap;
|
||||
#else
|
||||
typedef std::map<const App::ObjectIdentifier, ExpressionInfo> ExpressionMap;
|
||||
|
||||
@@ -179,7 +179,7 @@ Rotate around Z axis.
|
||||
angle : float\n Angle in radians.</UserDocu>
|
||||
</Documentation>
|
||||
</Methode>
|
||||
<Methode Name="multiply">
|
||||
<Methode Name="multiply" Const="true">
|
||||
<Documentation>
|
||||
<UserDocu>multiply(matrix) -> Base.Matrix
|
||||
multiply(vector) -> Base.Vector\n
|
||||
@@ -202,7 +202,7 @@ vector : Base.Vector</UserDocu>
|
||||
Compute the inverse matrix in-place, if possible.</UserDocu>
|
||||
</Documentation>
|
||||
</Methode>
|
||||
<Methode Name="inverse">
|
||||
<Methode Name="inverse" Const="true">
|
||||
<Documentation><UserDocu>inverse() -> Base.Matrix\n
|
||||
Compute the inverse matrix, if possible.</UserDocu>
|
||||
</Documentation>
|
||||
@@ -219,13 +219,13 @@ Transpose the matrix in-place.</UserDocu>
|
||||
Returns a transposed copy of this matrix.</UserDocu>
|
||||
</Documentation>
|
||||
</Methode>
|
||||
<Methode Name="determinant">
|
||||
<Methode Name="determinant" Const="true">
|
||||
<Documentation>
|
||||
<UserDocu>determinant() -> float\n
|
||||
Compute the determinant of the matrix.</UserDocu>
|
||||
</Documentation>
|
||||
</Methode>
|
||||
<Methode Name="isOrthogonal">
|
||||
<Methode Name="isOrthogonal" Const="true">
|
||||
<Documentation>
|
||||
<UserDocu>isOrthogonal(tol=1e-6) -> float\n
|
||||
Checks if the matrix is orthogonal, i.e. M * M^T = k*I and returns
|
||||
@@ -233,7 +233,7 @@ the multiple of the identity matrix. If it's not orthogonal 0 is returned.\n
|
||||
tol : float\n Tolerance used to check orthogonality.</UserDocu>
|
||||
</Documentation>
|
||||
</Methode>
|
||||
<Methode Name="submatrix">
|
||||
<Methode Name="submatrix" Const="true">
|
||||
<Documentation>
|
||||
<UserDocu>submatrix(dim) -> Base.Matrix\n
|
||||
Get the leading principal submatrix of the given dimension.
|
||||
@@ -242,7 +242,7 @@ corresponding identity matrix.\n
|
||||
dim : int\n Dimension parameter must be in the range [1,4].</UserDocu>
|
||||
</Documentation>
|
||||
</Methode>
|
||||
<Methode Name="analyze">
|
||||
<Methode Name="analyze" Const="true">
|
||||
<Documentation>
|
||||
<UserDocu>analyze() -> str\n
|
||||
Analyzes the type of transformation.</UserDocu>
|
||||
|
||||
@@ -103,7 +103,7 @@ static void
|
||||
PyBaseProxy_dealloc(PyObject* self)
|
||||
{
|
||||
/* Clear weakrefs first before calling any destructors */
|
||||
if (reinterpret_cast<PyBaseProxy*>(self)->weakreflist != nullptr)
|
||||
if (reinterpret_cast<PyBaseProxy*>(self)->weakreflist)
|
||||
PyObject_ClearWeakRefs(self);
|
||||
Py_TYPE(self)->tp_free(self);
|
||||
}
|
||||
@@ -349,7 +349,7 @@ int PyObjectBase::__setattro(PyObject *obj, PyObject *attro, PyObject *value)
|
||||
|
||||
//Hint: In general we don't allow to delete attributes (i.e. value=0). However, if we want to allow
|
||||
//we must check then in _setattr() of all subclasses whether value is 0.
|
||||
if ( value==nullptr ) {
|
||||
if (!value) {
|
||||
PyErr_Format(PyExc_AttributeError, "Cannot delete attribute: '%s'", attr);
|
||||
return -1;
|
||||
}
|
||||
@@ -409,7 +409,7 @@ PyObject *PyObjectBase::_getattr(const char *attr)
|
||||
// As fallback solution use Python's default method to get generic attributes
|
||||
PyObject *w, *res;
|
||||
w = PyUnicode_InternFromString(attr);
|
||||
if (w != nullptr) {
|
||||
if (w) {
|
||||
res = PyObject_GenericGetAttr(this, w);
|
||||
Py_XDECREF(w);
|
||||
return res;
|
||||
@@ -429,7 +429,7 @@ int PyObjectBase::_setattr(const char *attr, PyObject *value)
|
||||
PyObject *w;
|
||||
// As fallback solution use Python's default method to get generic attributes
|
||||
w = PyUnicode_InternFromString(attr); // new reference
|
||||
if (w != nullptr) {
|
||||
if (w) {
|
||||
// call methods from tp_getset if defined
|
||||
int res = PyObject_GenericSetAttr(this, w, value);
|
||||
Py_DECREF(w);
|
||||
|
||||
@@ -47,6 +47,7 @@
|
||||
#endif
|
||||
#define slots
|
||||
#include <bitset>
|
||||
#include <cstring>
|
||||
|
||||
#include "Exception.h"
|
||||
#ifndef PYCXX_PYTHON_2TO3
|
||||
@@ -122,6 +123,10 @@ inline void Assert(int expr, char *msg) // C++ assert
|
||||
};
|
||||
}
|
||||
|
||||
inline bool asBoolean(PyObject *obj) {
|
||||
return PyObject_IsTrue(obj) != 0;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
/*------------------------------
|
||||
|
||||
@@ -341,6 +341,7 @@ Rotation Rotation::inverse() const
|
||||
rot._axis[0] = -this->_axis[0];
|
||||
rot._axis[1] = -this->_axis[1];
|
||||
rot._axis[2] = -this->_axis[2];
|
||||
rot._angle = this->_angle;
|
||||
return rot;
|
||||
}
|
||||
|
||||
|
||||
@@ -40,7 +40,7 @@ angle2 : float
|
||||
angle3 : float\n
|
||||
Rotation(seq, angle1, angle2, angle3)
|
||||
Define from one string and three floats (Euler angles) as Euler rotation
|
||||
of a given type. Call toEulerSequence() for supported sequence types.
|
||||
of a given type. Call toEulerAngles() for supported sequence types.
|
||||
seq : str
|
||||
angle1 : float
|
||||
angle2 : float
|
||||
|
||||
+20
-21
@@ -264,7 +264,7 @@ inline Vector2d& Vector2d::operator-= (const Vector2d &v)
|
||||
|
||||
inline Vector2d Vector2d::operator* (double c) const
|
||||
{
|
||||
return Vector2d(c*x, c*y);
|
||||
return Vector2d(c * x, c * y);
|
||||
}
|
||||
|
||||
inline Vector2d& Vector2d::operator*= (double c)
|
||||
@@ -276,17 +276,17 @@ inline Vector2d& Vector2d::operator*= (double c)
|
||||
|
||||
inline double Vector2d::operator* (const Vector2d &v) const
|
||||
{
|
||||
return x*v.x + y*v.y;
|
||||
return x * v.x + y * v.y;
|
||||
}
|
||||
|
||||
inline Vector2d operator* (double c, const Vector2d &v)
|
||||
{
|
||||
return Vector2d(c*v.x, c*v.y);
|
||||
return Vector2d(c * v.x, c * v.y);
|
||||
}
|
||||
|
||||
inline Vector2d Vector2d::operator/ (double c) const
|
||||
{
|
||||
return Vector2d(x/c, y/c);
|
||||
return Vector2d(x / c, y / c);
|
||||
}
|
||||
|
||||
inline Vector2d& Vector2d::operator/= (double c)
|
||||
@@ -298,12 +298,12 @@ inline Vector2d& Vector2d::operator/= (double c)
|
||||
|
||||
inline bool Vector2d::IsNull(double tolerance) const
|
||||
{
|
||||
return x*x + y*y <= tolerance*tolerance;
|
||||
return x * x + y * y <= tolerance * tolerance;
|
||||
}
|
||||
|
||||
inline double Vector2d::Length() const
|
||||
{
|
||||
return sqrt(x*x + y*y);
|
||||
return sqrt(x * x + y * y);
|
||||
}
|
||||
|
||||
inline double Vector2d::Angle() const
|
||||
@@ -313,7 +313,7 @@ inline double Vector2d::Angle() const
|
||||
|
||||
inline double Vector2d::Sqr() const
|
||||
{
|
||||
return x*x + y*y;
|
||||
return x * x + y * y;
|
||||
}
|
||||
|
||||
inline Vector2d& Vector2d::Set(double x, double y)
|
||||
@@ -339,8 +339,9 @@ inline Vector2d& Vector2d::Scale(double factor)
|
||||
|
||||
inline Vector2d& Vector2d::Rotate(double angle)
|
||||
{
|
||||
x = x*cos(angle) - y*sin(angle);
|
||||
y = x*sin(angle) + y*cos(angle);
|
||||
auto tmp_x = x;
|
||||
x = x * cos(angle) - y * sin(angle);
|
||||
y = tmp_x * sin(angle) + y * cos(angle);
|
||||
return *this;
|
||||
}
|
||||
|
||||
@@ -363,7 +364,7 @@ inline Vector2d Vector2d::Perpendicular(bool clockwise) const
|
||||
|
||||
inline Vector2d Vector2d::FromPolar(double r, double fi)
|
||||
{
|
||||
return Vector2d(r*cos(fi), r*sin(fi));
|
||||
return Vector2d(r * cos(fi), r * sin(fi));
|
||||
}
|
||||
|
||||
inline double Vector2d::Distance(const Vector2d& v) const
|
||||
@@ -371,7 +372,7 @@ inline double Vector2d::Distance(const Vector2d& v) const
|
||||
double dx = (x - v.x);
|
||||
double dy = (y - v.y);
|
||||
|
||||
return sqrt(dx*dx + dy*dy);
|
||||
return sqrt(dx * dx + dy * dy);
|
||||
}
|
||||
|
||||
inline bool Vector2d::IsEqual(const Vector2d& v, double tolerance) const
|
||||
@@ -414,7 +415,7 @@ inline bool Polygon2d::Delete (size_t ulNdx)
|
||||
{
|
||||
std::vector<Vector2d>::iterator it = _aclVct.begin();
|
||||
std::advance(it, ulNdx);
|
||||
_aclVct.erase ( it );
|
||||
_aclVct.erase(it);
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -491,10 +492,10 @@ inline BoundBox2d::BoundBox2d (const BoundBox2d &rclBB)
|
||||
|
||||
inline BoundBox2d::BoundBox2d (double fX1, double fY1, double fX2, double fY2)
|
||||
{
|
||||
MinX = std::min<double>( fX1, fX2 );
|
||||
MaxX = std::max<double>( fX1, fX2 );
|
||||
MinY = std::min<double>( fY1, fY2 );
|
||||
MaxY = std::max<double>( fY1, fY2 );
|
||||
MinX = std::min<double>(fX1, fX2);
|
||||
MaxX = std::max<double>(fX1, fX2);
|
||||
MinY = std::min<double>(fY1, fY2);
|
||||
MaxY = std::max<double>(fY1, fY2);
|
||||
}
|
||||
|
||||
inline bool BoundBox2d::IsValid ()
|
||||
@@ -504,8 +505,8 @@ inline bool BoundBox2d::IsValid ()
|
||||
|
||||
inline bool BoundBox2d::IsEqual(const BoundBox2d& b, double tolerance) const
|
||||
{
|
||||
return Vector2d(MinX,MinY).IsEqual(Vector2d(b.MinX,b.MinY), tolerance) &&
|
||||
Vector2d(MaxX,MaxY).IsEqual(Vector2d(b.MaxX,b.MaxY), tolerance);
|
||||
return Vector2d(MinX, MinY).IsEqual(Vector2d(b.MinX, b.MinY), tolerance) &&
|
||||
Vector2d(MaxX, MaxY).IsEqual(Vector2d(b.MaxX, b.MaxY), tolerance);
|
||||
}
|
||||
|
||||
inline BoundBox2d& BoundBox2d::operator= (const BoundBox2d& rclBB)
|
||||
@@ -549,7 +550,7 @@ inline bool BoundBox2d::Contains(const Vector2d &v, double tolerance) const
|
||||
|
||||
inline Vector2d BoundBox2d::GetCenter() const
|
||||
{
|
||||
return Vector2d((MinX + MaxX)*0.5, (MinY + MaxY)*0.5);
|
||||
return Vector2d((MinX + MaxX) * 0.5, (MinY + MaxY) * 0.5);
|
||||
}
|
||||
|
||||
inline void BoundBox2d::SetVoid()
|
||||
@@ -569,5 +570,3 @@ inline void BoundBox2d::Add(const Vector2d &v)
|
||||
} // namespace Base
|
||||
|
||||
#endif // BASE_TOOLS2D_H
|
||||
|
||||
|
||||
|
||||
@@ -2,6 +2,7 @@
|
||||
// Version Number
|
||||
#define FCVersionMajor "${PACKAGE_VERSION_MAJOR}"
|
||||
#define FCVersionMinor "${PACKAGE_VERSION_MINOR}"
|
||||
#define FCVersionPoint "${FREECAD_VERSION_PATCH}"
|
||||
#define FCVersionName "${PACKAGE_VERSION_NAME}"
|
||||
// test: $Format:Hash (%H), Date: %ci$
|
||||
#define FCRevision "${PACKAGE_WCREF}" //Highest committed revision number
|
||||
|
||||
@@ -10,7 +10,8 @@ if (WIN32)
|
||||
REALPATH BASE_DIR "${CMAKE_INSTALL_PREFIX}")
|
||||
set( ${CMAKE_INSTALL_BINDIR})
|
||||
else()
|
||||
set(FREECAD_LIBRARY_INSTALL_DIR ${CMAKE_INSTALL_LIBDIR})
|
||||
get_filename_component(FREECAD_LIBRARY_INSTALL_DIR "${CMAKE_INSTALL_LIBDIR}"
|
||||
REALPATH BASE_DIR "${CMAKE_INSTALL_PREFIX}")
|
||||
endif()
|
||||
|
||||
configure_file(__init__.py.template ${NAMESPACE_INIT})
|
||||
|
||||
+2
-1
@@ -33,6 +33,7 @@
|
||||
# include <QTimer>
|
||||
# include <QToolBar>
|
||||
# include <QToolButton>
|
||||
# include <QToolTip>
|
||||
#endif
|
||||
|
||||
#include <Base/Exception.h>
|
||||
@@ -381,7 +382,7 @@ void ActionGroup::onActivated (QAction* a)
|
||||
|
||||
void ActionGroup::onHovered (QAction *a)
|
||||
{
|
||||
Gui::ToolTip::showText(QCursor::pos(), a->toolTip());
|
||||
QToolTip::showText(QCursor::pos(), a->toolTip());
|
||||
}
|
||||
|
||||
|
||||
|
||||
+17
-16
@@ -1017,7 +1017,7 @@ bool Application::sendHasMsgToFocusView(const char* pMsg)
|
||||
return false;
|
||||
}
|
||||
|
||||
Gui::MDIView* Application::activeView(void) const
|
||||
Gui::MDIView* Application::activeView() const
|
||||
{
|
||||
if (activeDocument())
|
||||
return activeDocument()->getActiveView();
|
||||
@@ -1049,12 +1049,12 @@ void Application::activateView(const Base::Type& type, bool create)
|
||||
}
|
||||
|
||||
/// Getter for the active view
|
||||
Gui::Document* Application::activeDocument(void) const
|
||||
Gui::Document* Application::activeDocument() const
|
||||
{
|
||||
return d->activeDocument;
|
||||
}
|
||||
|
||||
Gui::Document* Application::editDocument(void) const
|
||||
Gui::Document* Application::editDocument() const
|
||||
{
|
||||
return d->editDocument;
|
||||
}
|
||||
@@ -1188,7 +1188,7 @@ void Application::detachView(Gui::BaseView* pcView)
|
||||
d->passive.remove(pcView);
|
||||
}
|
||||
|
||||
void Application::onUpdate(void)
|
||||
void Application::onUpdate()
|
||||
{
|
||||
// update all documents
|
||||
std::map<const App::Document*, Gui::Document*>::iterator It;
|
||||
@@ -1218,7 +1218,7 @@ void Application::viewActivated(MDIView* pcView)
|
||||
}
|
||||
|
||||
|
||||
void Application::updateActive(void)
|
||||
void Application::updateActive()
|
||||
{
|
||||
activeDocument()->onUpdate();
|
||||
}
|
||||
@@ -1569,7 +1569,7 @@ QString Application::workbenchMenuText(const QString& wb) const
|
||||
return QString();
|
||||
}
|
||||
|
||||
QStringList Application::workbenches(void) const
|
||||
QStringList Application::workbenches() const
|
||||
{
|
||||
// If neither 'HiddenWorkbench' nor 'ExtraWorkbench' is set then all workbenches are returned.
|
||||
const std::map<std::string,std::string>& config = App::Application::Config();
|
||||
@@ -1659,22 +1659,22 @@ void Application::setupContextMenu(const char* recipient, MenuItem* items) const
|
||||
}
|
||||
}
|
||||
|
||||
bool Application::isClosing(void)
|
||||
bool Application::isClosing()
|
||||
{
|
||||
return d->isClosing;
|
||||
}
|
||||
|
||||
MacroManager *Application::macroManager(void)
|
||||
MacroManager *Application::macroManager()
|
||||
{
|
||||
return d->macroMngr;
|
||||
}
|
||||
|
||||
CommandManager &Application::commandManager(void)
|
||||
CommandManager &Application::commandManager()
|
||||
{
|
||||
return d->commandManager;
|
||||
}
|
||||
|
||||
Gui::PreferencePackManager* Application::prefPackManager(void)
|
||||
Gui::PreferencePackManager* Application::prefPackManager()
|
||||
{
|
||||
return d->prefPackManager;
|
||||
}
|
||||
@@ -1756,7 +1756,7 @@ static void init_resources()
|
||||
Q_INIT_RESOURCE(translation);
|
||||
}
|
||||
|
||||
void Application::initApplication(void)
|
||||
void Application::initApplication()
|
||||
{
|
||||
static bool init = false;
|
||||
if (init) {
|
||||
@@ -1778,7 +1778,7 @@ void Application::initApplication(void)
|
||||
}
|
||||
}
|
||||
|
||||
void Application::initTypes(void)
|
||||
void Application::initTypes()
|
||||
{
|
||||
// views
|
||||
Gui::BaseView ::init();
|
||||
@@ -1848,7 +1848,7 @@ void Application::initTypes(void)
|
||||
(ViewProviderDocumentObject::getClassTypeId());
|
||||
}
|
||||
|
||||
void Application::initOpenInventor(void)
|
||||
void Application::initOpenInventor()
|
||||
{
|
||||
// init the Inventor subsystem
|
||||
SoDB::init();
|
||||
@@ -1856,12 +1856,12 @@ void Application::initOpenInventor(void)
|
||||
SoFCDB::init();
|
||||
}
|
||||
|
||||
void Application::runInitGuiScript(void)
|
||||
void Application::runInitGuiScript()
|
||||
{
|
||||
Base::Interpreter().runString(Base::ScriptFactory().ProduceScript("FreeCADGuiInit"));
|
||||
}
|
||||
|
||||
void Application::runApplication(void)
|
||||
void Application::runApplication()
|
||||
{
|
||||
const std::map<std::string,std::string>& cfg = App::Application::Config();
|
||||
std::map<std::string,std::string>::const_iterator it;
|
||||
@@ -2038,7 +2038,8 @@ void Application::runApplication(void)
|
||||
std::map<std::string, std::string>& config = App::Application::Config();
|
||||
QString major = QString::fromLatin1(config["BuildVersionMajor"].c_str());
|
||||
QString minor = QString::fromLatin1(config["BuildVersionMinor"].c_str());
|
||||
QString title = QString::fromLatin1("%1 %2.%3").arg(mainApp.applicationName(), major, minor);
|
||||
QString point = QString::fromLatin1(config["BuildVersionPoint"].c_str());
|
||||
QString title = QString::fromLatin1("%1 %2.%3.%4").arg(mainApp.applicationName(), major, minor, point);
|
||||
mw.setWindowTitle(title);
|
||||
} else {
|
||||
mw.setWindowTitle(mainApp.applicationName());
|
||||
|
||||
+15
-15
@@ -89,9 +89,9 @@ public:
|
||||
/// get called if a view gets activated, this manage the whole activation scheme
|
||||
void viewActivated(Gui::MDIView* pcView);
|
||||
/// call update to all documents and all views (costly!)
|
||||
void onUpdate(void);
|
||||
void onUpdate();
|
||||
/// call update to all views of the active document
|
||||
void updateActive(void);
|
||||
void updateActive();
|
||||
/// call update to all command actions
|
||||
void updateActions(bool delay = false);
|
||||
//@}
|
||||
@@ -160,11 +160,11 @@ public:
|
||||
/// message when a GuiDocument is about to vanish
|
||||
void onLastWindowClosed(Gui::Document* pcDoc);
|
||||
/// Getter for the active document
|
||||
Gui::Document* activeDocument(void) const;
|
||||
Gui::Document* activeDocument() const;
|
||||
/// Set the active document
|
||||
void setActiveDocument(Gui::Document* pcDocument);
|
||||
/// Getter for the editing document
|
||||
Gui::Document* editDocument(void) const;
|
||||
Gui::Document* editDocument() const;
|
||||
Gui::MDIView* editViewOfNode(SoNode *node) const;
|
||||
/// Set editing document, which will reset editing of all other document
|
||||
void setEditDocument(Gui::Document* pcDocument);
|
||||
@@ -177,7 +177,7 @@ public:
|
||||
*/
|
||||
Gui::Document* getDocument(const App::Document* pDoc) const;
|
||||
/// Getter for the active view of the active document or null
|
||||
Gui::MDIView* activeView(void) const;
|
||||
Gui::MDIView* activeView() const;
|
||||
/// Activate a view of the given type of the active document
|
||||
void activateView(const Base::Type&, bool create=false);
|
||||
/// Shows the associated view provider of the given object
|
||||
@@ -189,7 +189,7 @@ public:
|
||||
//@}
|
||||
|
||||
/// true when the application shutting down
|
||||
bool isClosing(void);
|
||||
bool isClosing();
|
||||
void checkForPreviousCrashes();
|
||||
|
||||
/** @name workbench handling */
|
||||
@@ -199,7 +199,7 @@ public:
|
||||
QPixmap workbenchIcon(const QString&) const;
|
||||
QString workbenchToolTip(const QString&) const;
|
||||
QString workbenchMenuText(const QString&) const;
|
||||
QStringList workbenches(void) const;
|
||||
QStringList workbenches() const;
|
||||
void setupContextMenu(const char* recipient, MenuItem*) const;
|
||||
//@}
|
||||
|
||||
@@ -212,24 +212,24 @@ public:
|
||||
/** @name User Commands */
|
||||
//@{
|
||||
/// Get macro manager
|
||||
Gui::MacroManager *macroManager(void);
|
||||
Gui::MacroManager *macroManager();
|
||||
/// Reference to the command manager
|
||||
Gui::CommandManager &commandManager(void);
|
||||
Gui::CommandManager &commandManager();
|
||||
/// helper which create the commands
|
||||
void createStandardOperations();
|
||||
//@}
|
||||
|
||||
Gui::PreferencePackManager* prefPackManager(void);
|
||||
Gui::PreferencePackManager* prefPackManager();
|
||||
|
||||
/** @name Init, Destruct an Access methods */
|
||||
//@{
|
||||
/// some kind of singleton
|
||||
static Application* Instance;
|
||||
static void initApplication(void);
|
||||
static void initTypes(void);
|
||||
static void initOpenInventor(void);
|
||||
static void runInitGuiScript(void);
|
||||
static void runApplication(void);
|
||||
static void initApplication();
|
||||
static void initTypes();
|
||||
static void initOpenInventor();
|
||||
static void runInitGuiScript();
|
||||
static void runApplication();
|
||||
void tryClose( QCloseEvent * e );
|
||||
//@}
|
||||
|
||||
|
||||
@@ -360,7 +360,7 @@ private:
|
||||
|
||||
}
|
||||
|
||||
void RecoveryWriter::writeFiles(void)
|
||||
void RecoveryWriter::writeFiles()
|
||||
{
|
||||
#if 0
|
||||
FileWriter::writeFiles();
|
||||
|
||||
+1
-1
@@ -110,7 +110,7 @@ public:
|
||||
always returns true.
|
||||
*/
|
||||
virtual bool shouldWrite(const std::string&, const Base::Persistence *) const;
|
||||
virtual void writeFiles(void);
|
||||
virtual void writeFiles();
|
||||
|
||||
private:
|
||||
AutoSaveProperty& saver;
|
||||
|
||||
@@ -45,7 +45,7 @@ int AxisOriginPy::PyInit(PyObject* /*args*/, PyObject* /*kwd*/)
|
||||
|
||||
|
||||
// returns a string which represent the object e.g. when printed in python
|
||||
std::string AxisOriginPy::representation(void) const
|
||||
std::string AxisOriginPy::representation() const
|
||||
{
|
||||
return "<AxisOrigin>";
|
||||
}
|
||||
@@ -175,7 +175,7 @@ void AxisOriginPy::setLabels(Py::Dict dict)
|
||||
getAxisOriginPtr()->setLabels(labels);
|
||||
}
|
||||
|
||||
Py::Object AxisOriginPy::getNode(void) const
|
||||
Py::Object AxisOriginPy::getNode() const
|
||||
{
|
||||
SoGroup* node = getAxisOriginPtr()->getNode();
|
||||
PyObject* Ptr = Base::Interpreter().createSWIGPointerObj("pivy.coin","SoGroup *", node, 1);
|
||||
|
||||
@@ -88,7 +88,7 @@ public:
|
||||
|
||||
BitmapFactoryInst* BitmapFactoryInst::_pcSingleton = nullptr;
|
||||
|
||||
BitmapFactoryInst& BitmapFactoryInst::instance(void)
|
||||
BitmapFactoryInst& BitmapFactoryInst::instance()
|
||||
{
|
||||
if (_pcSingleton == nullptr)
|
||||
{
|
||||
@@ -112,7 +112,7 @@ BitmapFactoryInst& BitmapFactoryInst::instance(void)
|
||||
return *_pcSingleton;
|
||||
}
|
||||
|
||||
void BitmapFactoryInst::destruct (void)
|
||||
void BitmapFactoryInst::destruct ()
|
||||
{
|
||||
if (_pcSingleton != nullptr)
|
||||
delete _pcSingleton;
|
||||
|
||||
@@ -52,8 +52,8 @@ public:
|
||||
BottomRight /**< Place to the bottom right corner */
|
||||
};
|
||||
|
||||
static BitmapFactoryInst& instance(void);
|
||||
static void destruct (void);
|
||||
static BitmapFactoryInst& instance();
|
||||
static void destruct ();
|
||||
|
||||
/// Adds a path where pixmaps can be found
|
||||
void addPath(const QString& path);
|
||||
@@ -149,7 +149,7 @@ private:
|
||||
};
|
||||
|
||||
/// Get the global instance
|
||||
inline BitmapFactoryInst& BitmapFactory(void)
|
||||
inline BitmapFactoryInst& BitmapFactory()
|
||||
{
|
||||
return BitmapFactoryInst::instance();
|
||||
}
|
||||
|
||||
+1
-1
@@ -76,7 +76,7 @@ public:
|
||||
*/
|
||||
virtual ~ComboView();
|
||||
|
||||
Gui::TaskView::TaskView *getTaskPanel(void){return taskPanel;}
|
||||
Gui::TaskView::TaskView *getTaskPanel(){return taskPanel;}
|
||||
QTabWidget* getTabPanel() const { return tabs;}
|
||||
|
||||
|
||||
|
||||
+23
-23
@@ -264,12 +264,12 @@ void Command::addToGroup(ActionGroup* group)
|
||||
group->addAction(_pcAction->findChild<QAction*>());
|
||||
}
|
||||
|
||||
Application *Command::getGuiApplication(void)
|
||||
Application *Command::getGuiApplication()
|
||||
{
|
||||
return Application::Instance;
|
||||
}
|
||||
|
||||
Gui::Document* Command::getActiveGuiDocument(void) const
|
||||
Gui::Document* Command::getActiveGuiDocument() const
|
||||
{
|
||||
return getGuiApplication()->activeDocument();
|
||||
}
|
||||
@@ -474,7 +474,7 @@ void Command::_invoke(int id, bool disablelog)
|
||||
#endif
|
||||
}
|
||||
|
||||
void Command::testActive(void)
|
||||
void Command::testActive()
|
||||
{
|
||||
if (!_pcAction)
|
||||
return;
|
||||
@@ -523,7 +523,7 @@ void Command::setEnabled(bool on)
|
||||
// Helper methods
|
||||
//--------------------------------------------------------------------------
|
||||
|
||||
bool Command::hasActiveDocument(void) const
|
||||
bool Command::hasActiveDocument() const
|
||||
{
|
||||
return getActiveGuiDocument() != nullptr;
|
||||
}
|
||||
@@ -533,7 +533,7 @@ bool Command::hasObject(const char* Name)
|
||||
return getDocument() != nullptr && getDocument()->getObject(Name) != nullptr;
|
||||
}
|
||||
|
||||
Gui::SelectionSingleton& Command::getSelection(void)
|
||||
Gui::SelectionSingleton& Command::getSelection()
|
||||
{
|
||||
return Gui::Selection();
|
||||
}
|
||||
@@ -605,17 +605,17 @@ void Command::openCommand(const char* sCmdName)
|
||||
App::GetApplication().setActiveTransaction(sCmdName);
|
||||
}
|
||||
|
||||
void Command::commitCommand(void)
|
||||
void Command::commitCommand()
|
||||
{
|
||||
App::GetApplication().closeActiveTransaction();
|
||||
}
|
||||
|
||||
void Command::abortCommand(void)
|
||||
void Command::abortCommand()
|
||||
{
|
||||
App::GetApplication().closeActiveTransaction(true);
|
||||
}
|
||||
|
||||
bool Command::hasPendingCommand(void)
|
||||
bool Command::hasPendingCommand()
|
||||
{
|
||||
return !!App::GetApplication().getActiveTransaction();
|
||||
}
|
||||
@@ -810,13 +810,13 @@ const std::string Command::strToPython(const char* Str)
|
||||
}
|
||||
|
||||
/// Updates the (active) document (propagate changes)
|
||||
void Command::updateActive(void)
|
||||
void Command::updateActive()
|
||||
{
|
||||
WaitCursor wc;
|
||||
doCommand(App,"App.ActiveDocument.recompute()");
|
||||
}
|
||||
|
||||
bool Command::isActiveObjectValid(void)
|
||||
bool Command::isActiveObjectValid()
|
||||
{
|
||||
Gui::Document* active = Gui::Application::Instance->activeDocument();
|
||||
assert(active);
|
||||
@@ -843,7 +843,7 @@ void Command::updateAll(std::list<Gui::Document*> cList)
|
||||
//--------------------------------------------------------------------------
|
||||
|
||||
/// returns the begin of a online help page
|
||||
const char * Command::beginCmdHelp(void)
|
||||
const char * Command::beginCmdHelp()
|
||||
{
|
||||
return "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.0 Transitional//EN\">\n"
|
||||
"<html>\n"
|
||||
@@ -855,7 +855,7 @@ const char * Command::beginCmdHelp(void)
|
||||
}
|
||||
|
||||
/// returns the end of a online help page
|
||||
const char * Command::endCmdHelp(void)
|
||||
const char * Command::endCmdHelp()
|
||||
{
|
||||
return "</body></html>\n\n";
|
||||
}
|
||||
@@ -974,7 +974,7 @@ void Command::printConflictingAccelerators() const
|
||||
Base::Console().Warning("Accelerator conflict between %s (%s) and %s (%s)\n", sName, sAccel, cmd->sName, cmd->sAccel);
|
||||
}
|
||||
|
||||
Action * Command::createAction(void)
|
||||
Action * Command::createAction()
|
||||
{
|
||||
Action *pcAction;
|
||||
pcAction = new Action(this,getMainWindow());
|
||||
@@ -1021,7 +1021,7 @@ Command *GroupCommand::addCommand(const char *name) {
|
||||
return cmd;
|
||||
}
|
||||
|
||||
Action * GroupCommand::createAction(void) {
|
||||
Action * GroupCommand::createAction() {
|
||||
ActionGroup* pcAction = new ActionGroup(this, getMainWindow());
|
||||
pcAction->setMenuRole(QAction::NoRole);
|
||||
pcAction->setDropDownMenu(true);
|
||||
@@ -1136,7 +1136,7 @@ void MacroCommand::activated(int iMsg)
|
||||
}
|
||||
}
|
||||
|
||||
Action * MacroCommand::createAction(void)
|
||||
Action * MacroCommand::createAction()
|
||||
{
|
||||
Action *pcAction;
|
||||
pcAction = new Action(this,getMainWindow());
|
||||
@@ -1306,7 +1306,7 @@ void PythonCommand::activated(int iMsg)
|
||||
}
|
||||
}
|
||||
|
||||
bool PythonCommand::isActive(void)
|
||||
bool PythonCommand::isActive()
|
||||
{
|
||||
try {
|
||||
Base::PyGILStateLocker lock;
|
||||
@@ -1336,7 +1336,7 @@ void PythonCommand::languageChange()
|
||||
}
|
||||
}
|
||||
|
||||
const char* PythonCommand::getHelpUrl(void) const
|
||||
const char* PythonCommand::getHelpUrl() const
|
||||
{
|
||||
PyObject* pcTemp;
|
||||
pcTemp = Interpreter().runMethodObject(_pcPyCommand, "CmdHelpURL");
|
||||
@@ -1347,7 +1347,7 @@ const char* PythonCommand::getHelpUrl(void) const
|
||||
return PyUnicode_AsUTF8(pcTemp);
|
||||
}
|
||||
|
||||
Action * PythonCommand::createAction(void)
|
||||
Action * PythonCommand::createAction()
|
||||
{
|
||||
QAction* qtAction = new QAction(nullptr);
|
||||
Action *pcAction;
|
||||
@@ -1522,7 +1522,7 @@ void PythonGroupCommand::activated(int iMsg)
|
||||
}
|
||||
}
|
||||
|
||||
bool PythonGroupCommand::isActive(void)
|
||||
bool PythonGroupCommand::isActive()
|
||||
{
|
||||
try {
|
||||
Base::PyGILStateLocker lock;
|
||||
@@ -1546,7 +1546,7 @@ bool PythonGroupCommand::isActive(void)
|
||||
return true;
|
||||
}
|
||||
|
||||
Action * PythonGroupCommand::createAction(void)
|
||||
Action * PythonGroupCommand::createAction()
|
||||
{
|
||||
Gui::ActionGroup* pcAction = new Gui::ActionGroup(this, Gui::getMainWindow());
|
||||
pcAction->setDropDownMenu(hasDropDownMenu());
|
||||
@@ -1656,7 +1656,7 @@ void PythonGroupCommand::languageChange()
|
||||
}
|
||||
}
|
||||
|
||||
const char* PythonGroupCommand::getHelpUrl(void) const
|
||||
const char* PythonGroupCommand::getHelpUrl() const
|
||||
{
|
||||
return "";
|
||||
}
|
||||
@@ -1833,7 +1833,7 @@ std::vector <Command*> CommandManager::getModuleCommands(const char *sModName) c
|
||||
return vCmds;
|
||||
}
|
||||
|
||||
std::vector <Command*> CommandManager::getAllCommands(void) const
|
||||
std::vector <Command*> CommandManager::getAllCommands() const
|
||||
{
|
||||
std::vector <Command*> vCmds;
|
||||
|
||||
@@ -1870,7 +1870,7 @@ void CommandManager::runCommandByName (const char* sName) const
|
||||
pCmd->invoke(0);
|
||||
}
|
||||
|
||||
void CommandManager::testActive(void)
|
||||
void CommandManager::testActive()
|
||||
{
|
||||
for ( std::map<std::string, Command*>::iterator It= _sCommands.begin();It!=_sCommands.end();++It) {
|
||||
It->second->testActive();
|
||||
|
||||
+36
-36
@@ -213,15 +213,15 @@ class SelectionSingleton;
|
||||
class MDIView;
|
||||
|
||||
|
||||
void CreateStdCommands(void);
|
||||
void CreateDocCommands(void);
|
||||
void CreateFeatCommands(void);
|
||||
void CreateMacroCommands(void);
|
||||
void CreateViewStdCommands(void);
|
||||
void CreateWindowStdCommands(void);
|
||||
void CreateStructureCommands(void);
|
||||
void CreateTestCommands(void);
|
||||
void CreateLinkCommands(void);
|
||||
void CreateStdCommands();
|
||||
void CreateDocCommands();
|
||||
void CreateFeatCommands();
|
||||
void CreateMacroCommands();
|
||||
void CreateViewStdCommands();
|
||||
void CreateWindowStdCommands();
|
||||
void CreateStructureCommands();
|
||||
void CreateTestCommands();
|
||||
void CreateLinkCommands();
|
||||
|
||||
|
||||
/** The CommandBase class
|
||||
@@ -246,7 +246,7 @@ public:
|
||||
//@{
|
||||
protected:
|
||||
/// Creates the used Action when adding to a widget. The default implementation does nothing.
|
||||
virtual Action * createAction(void);
|
||||
virtual Action * createAction();
|
||||
|
||||
public:
|
||||
/// Reassigns QAction stuff after the language has changed.
|
||||
@@ -323,7 +323,7 @@ protected:
|
||||
/// Methods which gets called when activated, needs to be reimplemented!
|
||||
virtual void activated(int iMsg)=0;
|
||||
/// Creates the used Action
|
||||
virtual Action * createAction(void);
|
||||
virtual Action * createAction();
|
||||
/// Applies the menu text, tool and status tip to the passed action object
|
||||
void applyCommandData(const char* context, Action* );
|
||||
const char* keySequenceToAccel(int) const;
|
||||
@@ -336,9 +336,9 @@ public:
|
||||
/// CommandManager is a friend
|
||||
friend class CommandManager;
|
||||
/// Override this method if your Cmd is not always active
|
||||
virtual bool isActive(void){return true;}
|
||||
virtual bool isActive(){return true;}
|
||||
/// Get somtile called to check the state of the command
|
||||
void testActive(void);
|
||||
void testActive();
|
||||
/// Enables or disables the command
|
||||
void setEnabled(bool);
|
||||
/// (Re)Create the text for the tooltip (for example, when the shortcut is changed)
|
||||
@@ -372,11 +372,11 @@ public:
|
||||
/** @name Helper methods to get important classes */
|
||||
//@{
|
||||
/// Get pointer to the Application Window
|
||||
static Application* getGuiApplication(void);
|
||||
static Application* getGuiApplication();
|
||||
/// Get a reference to the selection
|
||||
static Gui::SelectionSingleton& getSelection(void);
|
||||
static Gui::SelectionSingleton& getSelection();
|
||||
/// Get pointer to the active gui document
|
||||
Gui::Document* getActiveGuiDocument(void) const;
|
||||
Gui::Document* getActiveGuiDocument() const;
|
||||
/** Get pointer to the named or active App document
|
||||
* Returns a pointer to the named document or the active
|
||||
* document when no name is given. NULL is returned
|
||||
@@ -407,17 +407,17 @@ public:
|
||||
/// Open a new Undo transaction on the active document
|
||||
static void openCommand(const char* sName=nullptr);
|
||||
/// Commit the Undo transaction on the active document
|
||||
static void commitCommand(void);
|
||||
static void commitCommand();
|
||||
/// Abort the Undo transaction on the active document
|
||||
static void abortCommand(void);
|
||||
static void abortCommand();
|
||||
/// Check if an Undo transaction is open on the active document
|
||||
static bool hasPendingCommand(void);
|
||||
static bool hasPendingCommand();
|
||||
/// Updates the (active) document (propagate changes)
|
||||
static void updateActive(void);
|
||||
static void updateActive();
|
||||
/// Updates the (all or listed) documents (propagate changes)
|
||||
static void updateAll(std::list<Gui::Document*> cList);
|
||||
/// Checks if the active object of the active document is valid
|
||||
static bool isActiveObjectValid(void);
|
||||
static bool isActiveObjectValid();
|
||||
/// Translate command
|
||||
void languageChange();
|
||||
/// Updates the QAction with respect to the passed mode.
|
||||
@@ -539,17 +539,17 @@ public:
|
||||
/** @name Helper methods to generate help pages */
|
||||
//@{
|
||||
/// returns the begin of a online help page
|
||||
const char * beginCmdHelp(void);
|
||||
const char * beginCmdHelp();
|
||||
/// returns the end of a online help page
|
||||
const char * endCmdHelp(void);
|
||||
const char * endCmdHelp();
|
||||
/// Get the help URL
|
||||
virtual const char* getHelpUrl(void) const { return sHelpUrl; }
|
||||
virtual const char* getHelpUrl() const { return sHelpUrl; }
|
||||
//@}
|
||||
|
||||
/** @name Helper methods for the Active tests */
|
||||
//@{
|
||||
/// true when there is a document
|
||||
bool hasActiveDocument(void) const;
|
||||
bool hasActiveDocument() const;
|
||||
/// true when there is a document and a Feature with Name
|
||||
bool hasObject(const char* Name);
|
||||
//@}
|
||||
@@ -557,7 +557,7 @@ public:
|
||||
/** @name checking of internal state */
|
||||
//@{
|
||||
/// returns the name to which the command belongs
|
||||
const char* getAppModuleName(void) const {return sAppModule;}
|
||||
const char* getAppModuleName() const {return sAppModule;}
|
||||
void setAppModuleName(const char*);
|
||||
/// Get the command name
|
||||
const char* getName() const { return sName; }
|
||||
@@ -643,7 +643,7 @@ public:
|
||||
|
||||
protected:
|
||||
virtual void activated(int iMsg);
|
||||
virtual Gui::Action * createAction(void);
|
||||
virtual Gui::Action * createAction();
|
||||
virtual void languageChange();
|
||||
|
||||
void setup(Action *);
|
||||
@@ -673,11 +673,11 @@ protected:
|
||||
/// Method which gets called when activated
|
||||
virtual void activated(int iMsg);
|
||||
/// if the command is not always active
|
||||
virtual bool isActive(void);
|
||||
virtual bool isActive();
|
||||
/// Get the help URL
|
||||
const char* getHelpUrl(void) const;
|
||||
const char* getHelpUrl() const;
|
||||
/// Creates the used Action
|
||||
virtual Action * createAction(void);
|
||||
virtual Action * createAction();
|
||||
//@}
|
||||
|
||||
public:
|
||||
@@ -724,11 +724,11 @@ protected:
|
||||
/// Method which gets called when activated
|
||||
virtual void activated(int iMsg);
|
||||
/// if the command is not always active
|
||||
virtual bool isActive(void);
|
||||
virtual bool isActive();
|
||||
/// Get the help URL
|
||||
const char* getHelpUrl(void) const;
|
||||
const char* getHelpUrl() const;
|
||||
/// Creates the used Action
|
||||
virtual Action * createAction(void);
|
||||
virtual Action * createAction();
|
||||
//@}
|
||||
|
||||
public:
|
||||
@@ -779,7 +779,7 @@ protected:
|
||||
/// Method which get called when activated
|
||||
void activated(int iMsg);
|
||||
/// Creates the used Action
|
||||
Action * createAction(void);
|
||||
Action * createAction();
|
||||
//@}
|
||||
|
||||
public:
|
||||
@@ -845,7 +845,7 @@ public:
|
||||
* of a special app module use GetModuleCommands()
|
||||
* @see Command
|
||||
*/
|
||||
std::vector <Command*> getAllCommands(void) const;
|
||||
std::vector <Command*> getAllCommands() const;
|
||||
|
||||
/** Returns all commands of a group
|
||||
* delivers a vector of all commands in the given group.
|
||||
@@ -866,7 +866,7 @@ public:
|
||||
/// method is OBSOLETE use GetModuleCommands() or GetAllCommands()
|
||||
const std::map<std::string, Command*>& getCommands() const { return _sCommands; }
|
||||
/// get frequently called by the AppWnd to check the commands are active.
|
||||
void testActive(void);
|
||||
void testActive();
|
||||
|
||||
void addCommandMode(const char* sContext, const char* sName);
|
||||
void updateCommands(const char* sContext, int mode);
|
||||
|
||||
+32
-32
@@ -242,7 +242,7 @@ void StdCmdImport::activated(int iMsg)
|
||||
}
|
||||
}
|
||||
|
||||
bool StdCmdImport::isActive(void)
|
||||
bool StdCmdImport::isActive()
|
||||
{
|
||||
return (getActiveGuiDocument() ? true : false);
|
||||
}
|
||||
@@ -490,7 +490,7 @@ void StdCmdExport::activated(int iMsg)
|
||||
}
|
||||
}
|
||||
|
||||
bool StdCmdExport::isActive(void)
|
||||
bool StdCmdExport::isActive()
|
||||
{
|
||||
return (getActiveGuiDocument() ? true : false);
|
||||
}
|
||||
@@ -543,7 +543,7 @@ void StdCmdMergeProjects::activated(int iMsg)
|
||||
}
|
||||
}
|
||||
|
||||
bool StdCmdMergeProjects::isActive(void)
|
||||
bool StdCmdMergeProjects::isActive()
|
||||
{
|
||||
return this->hasActiveDocument();
|
||||
}
|
||||
@@ -576,7 +576,7 @@ void StdCmdDependencyGraph::activated(int iMsg)
|
||||
getMainWindow()->addWindow(view);
|
||||
}
|
||||
|
||||
bool StdCmdDependencyGraph::isActive(void)
|
||||
bool StdCmdDependencyGraph::isActive()
|
||||
{
|
||||
return (getActiveGuiDocument() ? true : false);
|
||||
}
|
||||
@@ -643,7 +643,7 @@ void StdCmdSave::activated(int iMsg)
|
||||
doCommand(Command::Gui,"Gui.SendMsgToActiveView(\"Save\")");
|
||||
}
|
||||
|
||||
bool StdCmdSave::isActive(void)
|
||||
bool StdCmdSave::isActive()
|
||||
{
|
||||
#if 0
|
||||
if( getActiveGuiDocument() )
|
||||
@@ -683,7 +683,7 @@ void StdCmdSaveAs::activated(int iMsg)
|
||||
doCommand(Command::Gui,"Gui.SendMsgToActiveView(\"SaveAs\")");
|
||||
}
|
||||
|
||||
bool StdCmdSaveAs::isActive(void)
|
||||
bool StdCmdSaveAs::isActive()
|
||||
{
|
||||
#if 0
|
||||
if( getActiveGuiDocument() )
|
||||
@@ -721,7 +721,7 @@ void StdCmdSaveCopy::activated(int iMsg)
|
||||
doCommand(Command::Gui,"Gui.SendMsgToActiveView(\"SaveCopy\")");
|
||||
}
|
||||
|
||||
bool StdCmdSaveCopy::isActive(void)
|
||||
bool StdCmdSaveCopy::isActive()
|
||||
{
|
||||
return ( getActiveGuiDocument() ? true : false );
|
||||
}
|
||||
@@ -748,7 +748,7 @@ void StdCmdSaveAll::activated(int iMsg)
|
||||
Gui::Document::saveAll();
|
||||
}
|
||||
|
||||
bool StdCmdSaveAll::isActive(void)
|
||||
bool StdCmdSaveAll::isActive()
|
||||
{
|
||||
return ( getActiveGuiDocument() ? true : false );
|
||||
}
|
||||
@@ -786,7 +786,7 @@ void StdCmdRevert::activated(int iMsg)
|
||||
doCommand(Command::App,"App.ActiveDocument.restore()");
|
||||
}
|
||||
|
||||
bool StdCmdRevert::isActive(void)
|
||||
bool StdCmdRevert::isActive()
|
||||
{
|
||||
return ( getActiveGuiDocument() ? true : false );
|
||||
}
|
||||
@@ -816,7 +816,7 @@ void StdCmdProjectInfo::activated(int iMsg)
|
||||
dlg.exec();
|
||||
}
|
||||
|
||||
bool StdCmdProjectInfo::isActive(void)
|
||||
bool StdCmdProjectInfo::isActive()
|
||||
{
|
||||
return ( getActiveGuiDocument() ? true : false );
|
||||
}
|
||||
@@ -846,7 +846,7 @@ void StdCmdProjectUtil::activated(int iMsg)
|
||||
dlg.exec();
|
||||
}
|
||||
|
||||
bool StdCmdProjectUtil::isActive(void)
|
||||
bool StdCmdProjectUtil::isActive()
|
||||
{
|
||||
return true;
|
||||
}
|
||||
@@ -878,7 +878,7 @@ void StdCmdPrint::activated(int iMsg)
|
||||
}
|
||||
}
|
||||
|
||||
bool StdCmdPrint::isActive(void)
|
||||
bool StdCmdPrint::isActive()
|
||||
{
|
||||
return getGuiApplication()->sendHasMsgToActiveView("Print");
|
||||
}
|
||||
@@ -908,7 +908,7 @@ void StdCmdPrintPreview::activated(int iMsg)
|
||||
}
|
||||
}
|
||||
|
||||
bool StdCmdPrintPreview::isActive(void)
|
||||
bool StdCmdPrintPreview::isActive()
|
||||
{
|
||||
return getGuiApplication()->sendHasMsgToActiveView("PrintPreview");
|
||||
}
|
||||
@@ -939,7 +939,7 @@ void StdCmdPrintPdf::activated(int iMsg)
|
||||
}
|
||||
}
|
||||
|
||||
bool StdCmdPrintPdf::isActive(void)
|
||||
bool StdCmdPrintPdf::isActive()
|
||||
{
|
||||
return getGuiApplication()->sendHasMsgToActiveView("PrintPdf");
|
||||
}
|
||||
@@ -996,12 +996,12 @@ void StdCmdUndo::activated(int iMsg)
|
||||
getGuiApplication()->sendMsgToActiveView("Undo");
|
||||
}
|
||||
|
||||
bool StdCmdUndo::isActive(void)
|
||||
bool StdCmdUndo::isActive()
|
||||
{
|
||||
return getGuiApplication()->sendHasMsgToActiveView("Undo");
|
||||
}
|
||||
|
||||
Action * StdCmdUndo::createAction(void)
|
||||
Action * StdCmdUndo::createAction()
|
||||
{
|
||||
Action *pcAction;
|
||||
|
||||
@@ -1040,12 +1040,12 @@ void StdCmdRedo::activated(int iMsg)
|
||||
getGuiApplication()->sendMsgToActiveView("Redo");
|
||||
}
|
||||
|
||||
bool StdCmdRedo::isActive(void)
|
||||
bool StdCmdRedo::isActive()
|
||||
{
|
||||
return getGuiApplication()->sendHasMsgToActiveView("Redo");
|
||||
}
|
||||
|
||||
Action * StdCmdRedo::createAction(void)
|
||||
Action * StdCmdRedo::createAction()
|
||||
{
|
||||
Action *pcAction;
|
||||
|
||||
@@ -1081,7 +1081,7 @@ void StdCmdCut::activated(int iMsg)
|
||||
getGuiApplication()->sendMsgToActiveView("Cut");
|
||||
}
|
||||
|
||||
bool StdCmdCut::isActive(void)
|
||||
bool StdCmdCut::isActive()
|
||||
{
|
||||
return getGuiApplication()->sendHasMsgToActiveView("Cut");
|
||||
}
|
||||
@@ -1114,7 +1114,7 @@ void StdCmdCopy::activated(int iMsg)
|
||||
}
|
||||
}
|
||||
|
||||
bool StdCmdCopy::isActive(void)
|
||||
bool StdCmdCopy::isActive()
|
||||
{
|
||||
if (getGuiApplication()->sendHasMsgToFocusView("Copy"))
|
||||
return true;
|
||||
@@ -1152,7 +1152,7 @@ void StdCmdPaste::activated(int iMsg)
|
||||
}
|
||||
}
|
||||
|
||||
bool StdCmdPaste::isActive(void)
|
||||
bool StdCmdPaste::isActive()
|
||||
{
|
||||
if (getGuiApplication()->sendHasMsgToFocusView("Paste"))
|
||||
return true;
|
||||
@@ -1243,7 +1243,7 @@ void StdCmdDuplicateSelection::activated(int iMsg)
|
||||
fi.deleteFile();
|
||||
}
|
||||
|
||||
bool StdCmdDuplicateSelection::isActive(void)
|
||||
bool StdCmdDuplicateSelection::isActive()
|
||||
{
|
||||
return Gui::Selection().hasSelection();
|
||||
}
|
||||
@@ -1275,7 +1275,7 @@ void StdCmdSelectAll::activated(int iMsg)
|
||||
rSel.setSelection(doc->getName(), objs);
|
||||
}
|
||||
|
||||
bool StdCmdSelectAll::isActive(void)
|
||||
bool StdCmdSelectAll::isActive()
|
||||
{
|
||||
return App::GetApplication().getActiveDocument() != nullptr;
|
||||
}
|
||||
@@ -1448,7 +1448,7 @@ void StdCmdDelete::activated(int iMsg)
|
||||
Gui::getMainWindow()->update();
|
||||
}
|
||||
|
||||
bool StdCmdDelete::isActive(void)
|
||||
bool StdCmdDelete::isActive()
|
||||
{
|
||||
return Selection().getCompleteSelection().size() > 0;
|
||||
}
|
||||
@@ -1502,7 +1502,7 @@ void StdCmdRefresh::activated(int iMsg)
|
||||
}
|
||||
}
|
||||
|
||||
bool StdCmdRefresh::isActive(void)
|
||||
bool StdCmdRefresh::isActive()
|
||||
{
|
||||
return this->getDocument() && this->getDocument()->mustExecute();
|
||||
}
|
||||
@@ -1528,7 +1528,7 @@ void StdCmdTransform::activated(int iMsg)
|
||||
Gui::Control().showDialog(new Gui::Dialog::TaskTransform());
|
||||
}
|
||||
|
||||
bool StdCmdTransform::isActive(void)
|
||||
bool StdCmdTransform::isActive()
|
||||
{
|
||||
return (Gui::Control().activeDialog()==nullptr);
|
||||
}
|
||||
@@ -1562,7 +1562,7 @@ void StdCmdPlacement::activated(int iMsg)
|
||||
Gui::Control().showDialog(plm);
|
||||
}
|
||||
|
||||
bool StdCmdPlacement::isActive(void)
|
||||
bool StdCmdPlacement::isActive()
|
||||
{
|
||||
return Gui::Selection().countObjectsOfType(App::GeoFeature::getClassTypeId()) >= 1;
|
||||
}
|
||||
@@ -1596,7 +1596,7 @@ void StdCmdTransformManip::activated(int iMsg)
|
||||
getActiveGuiDocument()->setEdit(vp, Gui::ViewProvider::Transform);
|
||||
}
|
||||
|
||||
bool StdCmdTransformManip::isActive(void)
|
||||
bool StdCmdTransformManip::isActive()
|
||||
{
|
||||
return Gui::Selection().countObjectsOfType(App::GeoFeature::getClassTypeId()) == 1;
|
||||
}
|
||||
@@ -1664,7 +1664,7 @@ void StdCmdAlignment::activated(int iMsg)
|
||||
Gui::Selection().clearSelection();
|
||||
}
|
||||
|
||||
bool StdCmdAlignment::isActive(void)
|
||||
bool StdCmdAlignment::isActive()
|
||||
{
|
||||
if (ManualAlignment::hasInstance())
|
||||
return false;
|
||||
@@ -1706,7 +1706,7 @@ void StdCmdEdit::activated(int iMsg)
|
||||
}
|
||||
}
|
||||
|
||||
bool StdCmdEdit::isActive(void)
|
||||
bool StdCmdEdit::isActive()
|
||||
{
|
||||
return (Selection().getCompleteSelection().size() > 0) || (Gui::Control().activeDialog() != nullptr);
|
||||
}
|
||||
@@ -1763,7 +1763,7 @@ protected:
|
||||
copyExpressions(objs);
|
||||
}
|
||||
|
||||
virtual Gui::Action * createAction(void) {
|
||||
virtual Gui::Action * createAction() {
|
||||
ActionGroup* pcAction = new ActionGroup(this, getMainWindow());
|
||||
pcAction->setDropDownMenu(true);
|
||||
applyCommandData(this->className(), pcAction);
|
||||
@@ -1932,7 +1932,7 @@ protected:
|
||||
|
||||
namespace Gui {
|
||||
|
||||
void CreateDocCommands(void)
|
||||
void CreateDocCommands()
|
||||
{
|
||||
CommandManager &rcCmdMgr = Application::Instance->commandManager();
|
||||
|
||||
|
||||
@@ -110,7 +110,7 @@ void StdCmdRandomColor::activated(int iMsg)
|
||||
}
|
||||
}
|
||||
|
||||
bool StdCmdRandomColor::isActive(void)
|
||||
bool StdCmdRandomColor::isActive()
|
||||
{
|
||||
return (Gui::Selection().size() != 0);
|
||||
}
|
||||
@@ -135,7 +135,7 @@ StdCmdSendToPythonConsole::StdCmdSendToPythonConsole()
|
||||
sAccel = "Ctrl+Shift+P";
|
||||
}
|
||||
|
||||
bool StdCmdSendToPythonConsole::isActive(void)
|
||||
bool StdCmdSendToPythonConsole::isActive()
|
||||
{
|
||||
//active only if either 1 object is selected or multiple subobjects from the same object
|
||||
return Gui::Selection().getSelectionEx().size() == 1;
|
||||
@@ -211,7 +211,7 @@ void StdCmdSendToPythonConsole::activated(int iMsg)
|
||||
|
||||
namespace Gui {
|
||||
|
||||
void CreateFeatCommands(void)
|
||||
void CreateFeatCommands()
|
||||
{
|
||||
CommandManager &rcCmdMgr = Application::Instance->commandManager();
|
||||
|
||||
|
||||
@@ -65,8 +65,8 @@ public:
|
||||
|
||||
protected:
|
||||
virtual void activated(int iMsg);
|
||||
virtual bool isActive(void);
|
||||
virtual Action * createAction(void);
|
||||
virtual bool isActive();
|
||||
virtual Action * createAction();
|
||||
virtual void languageChange();
|
||||
};
|
||||
|
||||
@@ -86,7 +86,7 @@ bool StdCmdLinkMakeGroup::isActive() {
|
||||
return !!App::GetApplication().getActiveDocument();
|
||||
}
|
||||
|
||||
Action * StdCmdLinkMakeGroup::createAction(void)
|
||||
Action * StdCmdLinkMakeGroup::createAction()
|
||||
{
|
||||
ActionGroup* pcAction = new ActionGroup(this, getMainWindow());
|
||||
pcAction->setDropDownMenu(true);
|
||||
@@ -892,7 +892,7 @@ public:
|
||||
|
||||
namespace Gui {
|
||||
|
||||
void CreateLinkCommands(void)
|
||||
void CreateLinkCommands()
|
||||
{
|
||||
CommandManager &rcCmdMgr = Application::Instance->commandManager();
|
||||
rcCmdMgr.addCommand(new StdCmdLinkMake());
|
||||
|
||||
+11
-11
@@ -58,7 +58,7 @@ void StdCmdDlgMacroRecord::activated(int iMsg)
|
||||
cDlg.exec();
|
||||
}
|
||||
|
||||
bool StdCmdDlgMacroRecord::isActive(void)
|
||||
bool StdCmdDlgMacroRecord::isActive()
|
||||
{
|
||||
return ! (getGuiApplication()->macroManager()->isOpen());
|
||||
}
|
||||
@@ -86,7 +86,7 @@ void StdCmdMacroStopRecord::activated(int iMsg)
|
||||
getGuiApplication()->macroManager()->commit();
|
||||
}
|
||||
|
||||
bool StdCmdMacroStopRecord::isActive(void)
|
||||
bool StdCmdMacroStopRecord::isActive()
|
||||
{
|
||||
return getGuiApplication()->macroManager()->isOpen();
|
||||
}
|
||||
@@ -115,7 +115,7 @@ void StdCmdDlgMacroExecute::activated(int iMsg)
|
||||
cDlg.exec();
|
||||
}
|
||||
|
||||
bool StdCmdDlgMacroExecute::isActive(void)
|
||||
bool StdCmdDlgMacroExecute::isActive()
|
||||
{
|
||||
return ! (getGuiApplication()->macroManager()->isOpen());
|
||||
}
|
||||
@@ -144,7 +144,7 @@ void StdCmdDlgMacroExecuteDirect::activated(int iMsg)
|
||||
doCommand(Command::Gui,"Gui.SendMsgToActiveView(\"Run\")");
|
||||
}
|
||||
|
||||
bool StdCmdDlgMacroExecuteDirect::isActive(void)
|
||||
bool StdCmdDlgMacroExecuteDirect::isActive()
|
||||
{
|
||||
return getGuiApplication()->sendHasMsgToActiveView("Run");
|
||||
}
|
||||
@@ -169,7 +169,7 @@ void StdCmdMacroAttachDebugger::activated(int iMsg)
|
||||
"RemoteDebugger.attachToRemoteDebugger()");
|
||||
}
|
||||
|
||||
bool StdCmdMacroAttachDebugger::isActive(void)
|
||||
bool StdCmdMacroAttachDebugger::isActive()
|
||||
{
|
||||
return true;
|
||||
}
|
||||
@@ -199,7 +199,7 @@ void StdCmdMacroStartDebug::activated(int iMsg)
|
||||
dbg->stepRun();
|
||||
}
|
||||
|
||||
bool StdCmdMacroStartDebug::isActive(void)
|
||||
bool StdCmdMacroStartDebug::isActive()
|
||||
{
|
||||
return getGuiApplication()->sendHasMsgToActiveView("StartDebug");
|
||||
}
|
||||
@@ -225,7 +225,7 @@ void StdCmdMacroStopDebug::activated(int iMsg)
|
||||
Application::Instance->macroManager()->debugger()->tryStop();
|
||||
}
|
||||
|
||||
bool StdCmdMacroStopDebug::isActive(void)
|
||||
bool StdCmdMacroStopDebug::isActive()
|
||||
{
|
||||
static PythonDebugger* dbg = Application::Instance->macroManager()->debugger();
|
||||
return dbg->isRunning();
|
||||
@@ -252,7 +252,7 @@ void StdCmdMacroStepOver::activated(int iMsg)
|
||||
Application::Instance->macroManager()->debugger()->stepOver();
|
||||
}
|
||||
|
||||
bool StdCmdMacroStepOver::isActive(void)
|
||||
bool StdCmdMacroStepOver::isActive()
|
||||
{
|
||||
static PythonDebugger* dbg = Application::Instance->macroManager()->debugger();
|
||||
return dbg->isRunning();
|
||||
@@ -279,7 +279,7 @@ void StdCmdMacroStepInto::activated(int iMsg)
|
||||
Application::Instance->macroManager()->debugger()->stepInto();
|
||||
}
|
||||
|
||||
bool StdCmdMacroStepInto::isActive(void)
|
||||
bool StdCmdMacroStepInto::isActive()
|
||||
{
|
||||
static PythonDebugger* dbg = Application::Instance->macroManager()->debugger();
|
||||
return dbg->isRunning();
|
||||
@@ -306,14 +306,14 @@ void StdCmdToggleBreakpoint::activated(int iMsg)
|
||||
doCommand(Command::Gui,"Gui.SendMsgToActiveView(\"ToggleBreakpoint\")");
|
||||
}
|
||||
|
||||
bool StdCmdToggleBreakpoint::isActive(void)
|
||||
bool StdCmdToggleBreakpoint::isActive()
|
||||
{
|
||||
return getGuiApplication()->sendHasMsgToActiveView("ToggleBreakpoint");
|
||||
}
|
||||
|
||||
namespace Gui {
|
||||
|
||||
void CreateMacroCommands(void)
|
||||
void CreateMacroCommands()
|
||||
{
|
||||
CommandManager &rcCmdMgr = Application::Instance->commandManager();
|
||||
rcCmdMgr.addCommand(new StdCmdDlgMacroRecord());
|
||||
|
||||
@@ -39,7 +39,7 @@
|
||||
|
||||
|
||||
// returns a string which represents the object e.g. when printed in python
|
||||
std::string CommandPy::representation(void) const
|
||||
std::string CommandPy::representation() const
|
||||
{
|
||||
return std::string("<Command object>");
|
||||
}
|
||||
|
||||
+12
-12
@@ -102,12 +102,12 @@ void StdCmdWorkbench::activated(int i)
|
||||
}
|
||||
}
|
||||
|
||||
bool StdCmdWorkbench::isActive(void)
|
||||
bool StdCmdWorkbench::isActive()
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
Action * StdCmdWorkbench::createAction(void)
|
||||
Action * StdCmdWorkbench::createAction()
|
||||
{
|
||||
Action *pcAction;
|
||||
|
||||
@@ -152,7 +152,7 @@ void StdCmdRecentFiles::activated(int iMsg)
|
||||
/**
|
||||
* Creates the QAction object containing the recent files.
|
||||
*/
|
||||
Action * StdCmdRecentFiles::createAction(void)
|
||||
Action * StdCmdRecentFiles::createAction()
|
||||
{
|
||||
RecentFilesAction* pcAction = new RecentFilesAction(this, getMainWindow());
|
||||
pcAction->setObjectName(QLatin1String("recentFiles"));
|
||||
@@ -192,7 +192,7 @@ void StdCmdRecentMacros::activated(int iMsg)
|
||||
/**
|
||||
* Creates the QAction object containing the recent macros.
|
||||
*/
|
||||
Action * StdCmdRecentMacros::createAction(void)
|
||||
Action * StdCmdRecentMacros::createAction()
|
||||
{
|
||||
RecentMacrosAction* pcAction = new RecentMacrosAction(this, getMainWindow());
|
||||
pcAction->setObjectName(QLatin1String("recentMacros"));
|
||||
@@ -218,7 +218,7 @@ StdCmdAbout::StdCmdAbout()
|
||||
eType = 0;
|
||||
}
|
||||
|
||||
Action * StdCmdAbout::createAction(void)
|
||||
Action * StdCmdAbout::createAction()
|
||||
{
|
||||
Action *pcAction;
|
||||
|
||||
@@ -356,7 +356,7 @@ StdCmdDlgPreferences::StdCmdDlgPreferences()
|
||||
eType = 0;
|
||||
}
|
||||
|
||||
Action * StdCmdDlgPreferences::createAction(void)
|
||||
Action * StdCmdDlgPreferences::createAction()
|
||||
{
|
||||
Action *pcAction = Command::createAction();
|
||||
pcAction->setMenuRole(QAction::PreferencesRole);
|
||||
@@ -803,7 +803,7 @@ void StdCmdTextDocument::activated(int iMsg)
|
||||
commitCommand();
|
||||
}
|
||||
|
||||
bool StdCmdTextDocument::isActive(void)
|
||||
bool StdCmdTextDocument::isActive()
|
||||
{
|
||||
return hasActiveDocument();
|
||||
}
|
||||
@@ -845,8 +845,8 @@ public:
|
||||
void updateIcon(int mode);
|
||||
protected:
|
||||
virtual void activated(int iMsg);
|
||||
virtual bool isActive(void);
|
||||
virtual Gui::Action * createAction(void);
|
||||
virtual bool isActive();
|
||||
virtual Gui::Action * createAction();
|
||||
};
|
||||
|
||||
StdCmdUserEditMode::StdCmdUserEditMode()
|
||||
@@ -863,7 +863,7 @@ StdCmdUserEditMode::StdCmdUserEditMode()
|
||||
this->getGuiApplication()->signalUserEditModeChanged.connect(boost::bind(&StdCmdUserEditMode::updateIcon, this, bp::_1));
|
||||
}
|
||||
|
||||
Gui::Action * StdCmdUserEditMode::createAction(void)
|
||||
Gui::Action * StdCmdUserEditMode::createAction()
|
||||
{
|
||||
Gui::ActionGroup* pcAction = new Gui::ActionGroup(this, Gui::getMainWindow());
|
||||
pcAction->setDropDownMenu(true);
|
||||
@@ -928,14 +928,14 @@ void StdCmdUserEditMode::activated(int iMsg)
|
||||
Gui::Application::Instance->setUserEditMode(iMsg);
|
||||
}
|
||||
|
||||
bool StdCmdUserEditMode::isActive(void)
|
||||
bool StdCmdUserEditMode::isActive()
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
namespace Gui {
|
||||
|
||||
void CreateStdCommands(void)
|
||||
void CreateStdCommands()
|
||||
{
|
||||
CommandManager &rcCmdMgr = Application::Instance->commandManager();
|
||||
|
||||
|
||||
@@ -75,7 +75,7 @@ void StdCmdPart::activated(int iMsg)
|
||||
updateActive();
|
||||
}
|
||||
|
||||
bool StdCmdPart::isActive(void)
|
||||
bool StdCmdPart::isActive()
|
||||
{
|
||||
return hasActiveDocument();
|
||||
}
|
||||
@@ -117,14 +117,14 @@ void StdCmdGroup::activated(int iMsg)
|
||||
gui->signalScrollToObject(*static_cast<ViewProviderDocumentObject*>(vp));
|
||||
}
|
||||
|
||||
bool StdCmdGroup::isActive(void)
|
||||
bool StdCmdGroup::isActive()
|
||||
{
|
||||
return hasActiveDocument();
|
||||
}
|
||||
|
||||
namespace Gui {
|
||||
|
||||
void CreateStructureCommands(void)
|
||||
void CreateStructureCommands()
|
||||
{
|
||||
CommandManager &rcCmdMgr = Application::Instance->commandManager();
|
||||
|
||||
|
||||
+16
-16
@@ -132,7 +132,7 @@ void FCCmdTest1::activated(int iMsg)
|
||||
Q_UNUSED(iMsg);
|
||||
}
|
||||
|
||||
bool FCCmdTest1::isActive(void)
|
||||
bool FCCmdTest1::isActive()
|
||||
{
|
||||
//return (GetActiveOCCDocument()!=NULL);
|
||||
return true;
|
||||
@@ -160,7 +160,7 @@ void FCCmdTest2::activated(int iMsg)
|
||||
Q_UNUSED(iMsg);
|
||||
}
|
||||
|
||||
bool FCCmdTest2::isActive(void)
|
||||
bool FCCmdTest2::isActive()
|
||||
{
|
||||
return (getDocument()!=nullptr);
|
||||
}
|
||||
@@ -190,7 +190,7 @@ void FCCmdTest3::activated(int iMsg)
|
||||
}
|
||||
|
||||
|
||||
bool FCCmdTest3::isActive(void)
|
||||
bool FCCmdTest3::isActive()
|
||||
{
|
||||
return (getDocument()!=nullptr);
|
||||
}
|
||||
@@ -221,7 +221,7 @@ void FCCmdTest4::activated(int iMsg)
|
||||
}
|
||||
|
||||
|
||||
bool FCCmdTest4::isActive(void)
|
||||
bool FCCmdTest4::isActive()
|
||||
{
|
||||
return (getDocument()!=nullptr);
|
||||
}
|
||||
@@ -250,7 +250,7 @@ void FCCmdTest5::activated(int iMsg)
|
||||
return;
|
||||
}
|
||||
|
||||
bool FCCmdTest5::isActive(void)
|
||||
bool FCCmdTest5::isActive()
|
||||
{
|
||||
return (getDocument()!=nullptr);
|
||||
}
|
||||
@@ -280,7 +280,7 @@ void FCCmdTest6::activated(int iMsg)
|
||||
return;
|
||||
}
|
||||
|
||||
bool FCCmdTest6::isActive(void)
|
||||
bool FCCmdTest6::isActive()
|
||||
{
|
||||
return (getDocument()!=nullptr);
|
||||
}
|
||||
@@ -330,7 +330,7 @@ void CmdTestCmdFuncs::activated(int iMsg)
|
||||
Gui::copyVisualT(objName.c_str(), "DisplayMode", objName.c_str());
|
||||
}
|
||||
|
||||
bool CmdTestCmdFuncs::isActive(void)
|
||||
bool CmdTestCmdFuncs::isActive()
|
||||
{
|
||||
return (getDocument()!=nullptr);
|
||||
}
|
||||
@@ -372,7 +372,7 @@ void CmdTestProgress1::activated(int iMsg)
|
||||
}
|
||||
}
|
||||
|
||||
bool CmdTestProgress1::isActive(void)
|
||||
bool CmdTestProgress1::isActive()
|
||||
{
|
||||
return (!Base::Sequencer().isRunning());
|
||||
}
|
||||
@@ -415,7 +415,7 @@ void CmdTestProgress2::activated(int iMsg)
|
||||
}
|
||||
}
|
||||
|
||||
bool CmdTestProgress2::isActive(void)
|
||||
bool CmdTestProgress2::isActive()
|
||||
{
|
||||
return ( !Base::Sequencer().isRunning() );
|
||||
}
|
||||
@@ -485,7 +485,7 @@ void CmdTestProgress3::activated(int iMsg)
|
||||
}
|
||||
}
|
||||
|
||||
bool CmdTestProgress3::isActive(void)
|
||||
bool CmdTestProgress3::isActive()
|
||||
{
|
||||
return ( !Base::Sequencer().isRunning() );
|
||||
}
|
||||
@@ -540,7 +540,7 @@ void CmdTestProgress4::activated(int iMsg)
|
||||
}
|
||||
}
|
||||
|
||||
bool CmdTestProgress4::isActive(void)
|
||||
bool CmdTestProgress4::isActive()
|
||||
{
|
||||
return (!Base::Sequencer().isRunning());
|
||||
}
|
||||
@@ -620,7 +620,7 @@ void CmdTestProgress5::activated(int iMsg)
|
||||
thr3->start();
|
||||
}
|
||||
|
||||
bool CmdTestProgress5::isActive(void)
|
||||
bool CmdTestProgress5::isActive()
|
||||
{
|
||||
return (!Base::Sequencer().isRunning());
|
||||
}
|
||||
@@ -647,7 +647,7 @@ void CmdTestMDI1::activated(int iMsg)
|
||||
getMainWindow()->removeWindow(mdi);
|
||||
}
|
||||
|
||||
bool CmdTestMDI1::isActive(void)
|
||||
bool CmdTestMDI1::isActive()
|
||||
{
|
||||
return getMainWindow()->activeWindow();
|
||||
}
|
||||
@@ -675,7 +675,7 @@ void CmdTestMDI2::activated(int iMsg)
|
||||
}
|
||||
}
|
||||
|
||||
bool CmdTestMDI2::isActive(void)
|
||||
bool CmdTestMDI2::isActive()
|
||||
{
|
||||
return getMainWindow()->activeWindow();
|
||||
}
|
||||
@@ -703,7 +703,7 @@ void CmdTestMDI3::activated(int iMsg)
|
||||
mdi->show();
|
||||
}
|
||||
|
||||
bool CmdTestMDI3::isActive(void)
|
||||
bool CmdTestMDI3::isActive()
|
||||
{
|
||||
return getMainWindow()->activeWindow();
|
||||
}
|
||||
@@ -811,7 +811,7 @@ void CmdTestConsoleOutput::activated(int iMsg)
|
||||
|
||||
namespace Gui {
|
||||
|
||||
void CreateTestCommands(void)
|
||||
void CreateTestCommands()
|
||||
{
|
||||
CommandManager &rcCmdMgr = Application::Instance->commandManager();
|
||||
|
||||
|
||||
+54
-54
@@ -115,7 +115,7 @@ void StdOrthographicCamera::activated(int iMsg)
|
||||
}
|
||||
}
|
||||
|
||||
bool StdOrthographicCamera::isActive(void)
|
||||
bool StdOrthographicCamera::isActive()
|
||||
{
|
||||
View3DInventor* view = qobject_cast<View3DInventor*>(getMainWindow()->activeWindow());
|
||||
if (view) {
|
||||
@@ -132,7 +132,7 @@ bool StdOrthographicCamera::isActive(void)
|
||||
return false;
|
||||
}
|
||||
|
||||
Action * StdOrthographicCamera::createAction(void)
|
||||
Action * StdOrthographicCamera::createAction()
|
||||
{
|
||||
Action *pcAction = Command::createAction();
|
||||
pcAction->setCheckable(true);
|
||||
@@ -165,7 +165,7 @@ void StdPerspectiveCamera::activated(int iMsg)
|
||||
}
|
||||
}
|
||||
|
||||
bool StdPerspectiveCamera::isActive(void)
|
||||
bool StdPerspectiveCamera::isActive()
|
||||
{
|
||||
View3DInventor* view = qobject_cast<View3DInventor*>(getMainWindow()->activeWindow());
|
||||
if (view) {
|
||||
@@ -183,7 +183,7 @@ bool StdPerspectiveCamera::isActive(void)
|
||||
return false;
|
||||
}
|
||||
|
||||
Action * StdPerspectiveCamera::createAction(void)
|
||||
Action * StdPerspectiveCamera::createAction()
|
||||
{
|
||||
Action *pcAction = Command::createAction();
|
||||
pcAction->setCheckable(true);
|
||||
@@ -261,8 +261,8 @@ public:
|
||||
|
||||
protected:
|
||||
virtual void activated(int iMsg);
|
||||
virtual bool isActive(void);
|
||||
virtual Action * createAction(void);
|
||||
virtual bool isActive();
|
||||
virtual Action * createAction();
|
||||
virtual void languageChange();
|
||||
|
||||
private:
|
||||
@@ -298,7 +298,7 @@ StdCmdFreezeViews::StdCmdFreezeViews()
|
||||
eType = Alter3DView;
|
||||
}
|
||||
|
||||
Action * StdCmdFreezeViews::createAction(void)
|
||||
Action * StdCmdFreezeViews::createAction()
|
||||
{
|
||||
ActionGroup* pcAction = new ActionGroup(this, getMainWindow());
|
||||
pcAction->setDropDownMenu(true);
|
||||
@@ -500,7 +500,7 @@ void StdCmdFreezeViews::onRestoreViews()
|
||||
}
|
||||
}
|
||||
|
||||
bool StdCmdFreezeViews::isActive(void)
|
||||
bool StdCmdFreezeViews::isActive()
|
||||
{
|
||||
View3DInventor* view = qobject_cast<View3DInventor*>(getMainWindow()->activeWindow());
|
||||
if (view) {
|
||||
@@ -557,7 +557,7 @@ StdCmdToggleClipPlane::StdCmdToggleClipPlane()
|
||||
eType = Alter3DView;
|
||||
}
|
||||
|
||||
Action * StdCmdToggleClipPlane::createAction(void)
|
||||
Action * StdCmdToggleClipPlane::createAction()
|
||||
{
|
||||
Action *pcAction = (Action*)Command::createAction();
|
||||
#if 0
|
||||
@@ -588,7 +588,7 @@ void StdCmdToggleClipPlane::activated(int iMsg)
|
||||
#endif
|
||||
}
|
||||
|
||||
bool StdCmdToggleClipPlane::isActive(void)
|
||||
bool StdCmdToggleClipPlane::isActive()
|
||||
{
|
||||
#if 0
|
||||
View3DInventor* view = qobject_cast<View3DInventor*>(getMainWindow()->activeWindow());
|
||||
@@ -623,8 +623,8 @@ public:
|
||||
void updateIcon(const Gui::MDIView* view);
|
||||
protected:
|
||||
virtual void activated(int iMsg);
|
||||
virtual bool isActive(void);
|
||||
virtual Gui::Action * createAction(void);
|
||||
virtual bool isActive();
|
||||
virtual Gui::Action * createAction();
|
||||
};
|
||||
|
||||
StdCmdDrawStyle::StdCmdDrawStyle()
|
||||
@@ -641,7 +641,7 @@ StdCmdDrawStyle::StdCmdDrawStyle()
|
||||
this->getGuiApplication()->signalActivateView.connect(boost::bind(&StdCmdDrawStyle::updateIcon, this, bp::_1));
|
||||
}
|
||||
|
||||
Gui::Action * StdCmdDrawStyle::createAction(void)
|
||||
Gui::Action * StdCmdDrawStyle::createAction()
|
||||
{
|
||||
Gui::ActionGroup* pcAction = new Gui::ActionGroup(this, Gui::getMainWindow());
|
||||
pcAction->setDropDownMenu(true);
|
||||
@@ -836,7 +836,7 @@ void StdCmdDrawStyle::activated(int iMsg)
|
||||
}
|
||||
}
|
||||
|
||||
bool StdCmdDrawStyle::isActive(void)
|
||||
bool StdCmdDrawStyle::isActive()
|
||||
{
|
||||
return Gui::Application::Instance->activeDocument();
|
||||
}
|
||||
@@ -866,7 +866,7 @@ void StdCmdToggleVisibility::activated(int iMsg)
|
||||
Selection().setVisible(SelectionSingleton::VisToggle);
|
||||
}
|
||||
|
||||
bool StdCmdToggleVisibility::isActive(void)
|
||||
bool StdCmdToggleVisibility::isActive()
|
||||
{
|
||||
return (Gui::Selection().size() != 0);
|
||||
}
|
||||
@@ -913,7 +913,7 @@ void StdCmdToggleSelectability::activated(int iMsg)
|
||||
}
|
||||
}
|
||||
|
||||
bool StdCmdToggleSelectability::isActive(void)
|
||||
bool StdCmdToggleSelectability::isActive()
|
||||
{
|
||||
return (Gui::Selection().size() != 0);
|
||||
}
|
||||
@@ -941,7 +941,7 @@ void StdCmdShowSelection::activated(int iMsg)
|
||||
Selection().setVisible(SelectionSingleton::VisShow);
|
||||
}
|
||||
|
||||
bool StdCmdShowSelection::isActive(void)
|
||||
bool StdCmdShowSelection::isActive()
|
||||
{
|
||||
return (Gui::Selection().size() != 0);
|
||||
}
|
||||
@@ -969,7 +969,7 @@ void StdCmdHideSelection::activated(int iMsg)
|
||||
Selection().setVisible(SelectionSingleton::VisHide);
|
||||
}
|
||||
|
||||
bool StdCmdHideSelection::isActive(void)
|
||||
bool StdCmdHideSelection::isActive()
|
||||
{
|
||||
return (Gui::Selection().size() != 0);
|
||||
}
|
||||
@@ -1011,7 +1011,7 @@ void StdCmdSelectVisibleObjects::activated(int iMsg)
|
||||
rSel.setSelection(app->getName(), visible);
|
||||
}
|
||||
|
||||
bool StdCmdSelectVisibleObjects::isActive(void)
|
||||
bool StdCmdSelectVisibleObjects::isActive()
|
||||
{
|
||||
return App::GetApplication().getActiveDocument();
|
||||
}
|
||||
@@ -1052,7 +1052,7 @@ void StdCmdToggleObjects::activated(int iMsg)
|
||||
}
|
||||
}
|
||||
|
||||
bool StdCmdToggleObjects::isActive(void)
|
||||
bool StdCmdToggleObjects::isActive()
|
||||
{
|
||||
return App::GetApplication().getActiveDocument();
|
||||
}
|
||||
@@ -1089,7 +1089,7 @@ void StdCmdShowObjects::activated(int iMsg)
|
||||
}
|
||||
}
|
||||
|
||||
bool StdCmdShowObjects::isActive(void)
|
||||
bool StdCmdShowObjects::isActive()
|
||||
{
|
||||
return App::GetApplication().getActiveDocument();
|
||||
}
|
||||
@@ -1126,7 +1126,7 @@ void StdCmdHideObjects::activated(int iMsg)
|
||||
}
|
||||
}
|
||||
|
||||
bool StdCmdHideObjects::isActive(void)
|
||||
bool StdCmdHideObjects::isActive()
|
||||
{
|
||||
return App::GetApplication().getActiveDocument();
|
||||
}
|
||||
@@ -1164,7 +1164,7 @@ void StdCmdSetAppearance::activated(int iMsg)
|
||||
#endif
|
||||
}
|
||||
|
||||
bool StdCmdSetAppearance::isActive(void)
|
||||
bool StdCmdSetAppearance::isActive()
|
||||
{
|
||||
#if 0
|
||||
return Gui::Selection().size() != 0;
|
||||
@@ -1491,7 +1491,7 @@ void StdCmdViewFitAll::activated(int iMsg)
|
||||
doCommand(Command::Gui,"Gui.SendMsgToActiveView(\"ViewFit\")");
|
||||
}
|
||||
|
||||
bool StdCmdViewFitAll::isActive(void)
|
||||
bool StdCmdViewFitAll::isActive()
|
||||
{
|
||||
//return isViewOfType(Gui::View3DInventor::getClassTypeId());
|
||||
return getGuiApplication()->sendHasMsgToActiveView("ViewFit");
|
||||
@@ -1522,7 +1522,7 @@ void StdCmdViewFitSelection::activated(int iMsg)
|
||||
doCommand(Command::Gui,"Gui.SendMsgToActiveView(\"ViewSelection\")");
|
||||
}
|
||||
|
||||
bool StdCmdViewFitSelection::isActive(void)
|
||||
bool StdCmdViewFitSelection::isActive()
|
||||
{
|
||||
//return isViewOfType(Gui::View3DInventor::getClassTypeId());
|
||||
return getGuiApplication()->sendHasMsgToActiveView("ViewSelection");
|
||||
@@ -1551,7 +1551,7 @@ void StdViewDock::activated(int iMsg)
|
||||
Q_UNUSED(iMsg);
|
||||
}
|
||||
|
||||
bool StdViewDock::isActive(void)
|
||||
bool StdViewDock::isActive()
|
||||
{
|
||||
MDIView* view = getMainWindow()->activeWindow();
|
||||
return (qobject_cast<View3DInventor*>(view) ? true : false);
|
||||
@@ -1580,7 +1580,7 @@ void StdViewUndock::activated(int iMsg)
|
||||
Q_UNUSED(iMsg);
|
||||
}
|
||||
|
||||
bool StdViewUndock::isActive(void)
|
||||
bool StdViewUndock::isActive()
|
||||
{
|
||||
MDIView* view = getMainWindow()->activeWindow();
|
||||
return (qobject_cast<View3DInventor*>(view) ? true : false);
|
||||
@@ -1642,7 +1642,7 @@ void StdViewFullscreen::activated(int iMsg)
|
||||
Q_UNUSED(iMsg);
|
||||
}
|
||||
|
||||
bool StdViewFullscreen::isActive(void)
|
||||
bool StdViewFullscreen::isActive()
|
||||
{
|
||||
MDIView* view = getMainWindow()->activeWindow();
|
||||
return (qobject_cast<View3DInventor*>(view) ? true : false);
|
||||
@@ -1669,7 +1669,7 @@ StdViewDockUndockFullscreen::StdViewDockUndockFullscreen()
|
||||
rcCmdMgr.addCommand(new StdViewFullscreen());
|
||||
}
|
||||
|
||||
Action * StdViewDockUndockFullscreen::createAction(void)
|
||||
Action * StdViewDockUndockFullscreen::createAction()
|
||||
{
|
||||
ActionGroup* pcAction = new ActionGroup(this, getMainWindow());
|
||||
pcAction->setDropDownMenu(true);
|
||||
@@ -1740,7 +1740,7 @@ void StdViewDockUndockFullscreen::activated(int iMsg)
|
||||
}
|
||||
}
|
||||
|
||||
bool StdViewDockUndockFullscreen::isActive(void)
|
||||
bool StdViewDockUndockFullscreen::isActive()
|
||||
{
|
||||
MDIView* view = getMainWindow()->activeWindow();
|
||||
if (qobject_cast<View3DInventor*>(view)) {
|
||||
@@ -1785,7 +1785,7 @@ void StdCmdViewVR::activated(int iMsg)
|
||||
doCommand(Command::Gui,"Gui.SendMsgToActiveView(\"ViewVR\")");
|
||||
}
|
||||
|
||||
bool StdCmdViewVR::isActive(void)
|
||||
bool StdCmdViewVR::isActive()
|
||||
{
|
||||
return getGuiApplication()->sendHasMsgToActiveView("ViewVR");
|
||||
}
|
||||
@@ -1958,7 +1958,7 @@ void StdViewScreenShot::activated(int iMsg)
|
||||
}
|
||||
}
|
||||
|
||||
bool StdViewScreenShot::isActive(void)
|
||||
bool StdViewScreenShot::isActive()
|
||||
{
|
||||
return isViewOfType(Gui::View3DInventor::getClassTypeId());
|
||||
}
|
||||
@@ -1988,7 +1988,7 @@ void StdCmdViewCreate::activated(int iMsg)
|
||||
getActiveGuiDocument()->getActiveView()->viewAll();
|
||||
}
|
||||
|
||||
bool StdCmdViewCreate::isActive(void)
|
||||
bool StdCmdViewCreate::isActive()
|
||||
{
|
||||
return (getActiveGuiDocument()!=nullptr);
|
||||
}
|
||||
@@ -2023,7 +2023,7 @@ void StdCmdToggleNavigation::activated(int iMsg)
|
||||
}
|
||||
}
|
||||
|
||||
bool StdCmdToggleNavigation::isActive(void)
|
||||
bool StdCmdToggleNavigation::isActive()
|
||||
{
|
||||
//#0001087: Inventor Navigation continues with released Mouse Button
|
||||
//This happens because 'Esc' is also used to close the task dialog.
|
||||
@@ -2159,7 +2159,7 @@ void StdCmdAxisCross::activated(int iMsg)
|
||||
}
|
||||
}
|
||||
|
||||
bool StdCmdAxisCross::isActive(void)
|
||||
bool StdCmdAxisCross::isActive()
|
||||
{
|
||||
Gui::View3DInventor* view = qobject_cast<View3DInventor*>(Gui::getMainWindow()->activeWindow());
|
||||
if (view && view->getViewer()->hasAxisCross()) {
|
||||
@@ -2201,7 +2201,7 @@ void StdCmdViewExample1::activated(int iMsg)
|
||||
doCommand(Command::Gui,"Gui.SendMsgToActiveView(\"Example1\")");
|
||||
}
|
||||
|
||||
bool StdCmdViewExample1::isActive(void)
|
||||
bool StdCmdViewExample1::isActive()
|
||||
{
|
||||
return getGuiApplication()->sendHasMsgToActiveView("Example1");
|
||||
}
|
||||
@@ -2229,7 +2229,7 @@ void StdCmdViewExample2::activated(int iMsg)
|
||||
doCommand(Command::Gui,"Gui.SendMsgToActiveView(\"Example2\")");
|
||||
}
|
||||
|
||||
bool StdCmdViewExample2::isActive(void)
|
||||
bool StdCmdViewExample2::isActive()
|
||||
{
|
||||
return getGuiApplication()->sendHasMsgToActiveView("Example2");
|
||||
}
|
||||
@@ -2257,7 +2257,7 @@ void StdCmdViewExample3::activated(int iMsg)
|
||||
doCommand(Command::Gui,"Gui.SendMsgToActiveView(\"Example3\")");
|
||||
}
|
||||
|
||||
bool StdCmdViewExample3::isActive(void)
|
||||
bool StdCmdViewExample3::isActive()
|
||||
{
|
||||
return getGuiApplication()->sendHasMsgToActiveView("Example3");
|
||||
}
|
||||
@@ -2286,7 +2286,7 @@ void StdCmdViewIvStereoOff::activated(int iMsg)
|
||||
doCommand(Command::Gui,"Gui.activeDocument().activeView().setStereoType(\"Mono\")");
|
||||
}
|
||||
|
||||
bool StdCmdViewIvStereoOff::isActive(void)
|
||||
bool StdCmdViewIvStereoOff::isActive()
|
||||
{
|
||||
return getGuiApplication()->sendHasMsgToActiveView("SetStereoOff");
|
||||
}
|
||||
@@ -2315,7 +2315,7 @@ void StdCmdViewIvStereoRedGreen::activated(int iMsg)
|
||||
doCommand(Command::Gui,"Gui.activeDocument().activeView().setStereoType(\"Anaglyph\")");
|
||||
}
|
||||
|
||||
bool StdCmdViewIvStereoRedGreen::isActive(void)
|
||||
bool StdCmdViewIvStereoRedGreen::isActive()
|
||||
{
|
||||
return getGuiApplication()->sendHasMsgToActiveView("SetStereoRedGreen");
|
||||
}
|
||||
@@ -2343,7 +2343,7 @@ void StdCmdViewIvStereoQuadBuff::activated(int iMsg)
|
||||
doCommand(Command::Gui,"Gui.activeDocument().activeView().setStereoType(\"QuadBuffer\")");
|
||||
}
|
||||
|
||||
bool StdCmdViewIvStereoQuadBuff::isActive(void)
|
||||
bool StdCmdViewIvStereoQuadBuff::isActive()
|
||||
{
|
||||
return getGuiApplication()->sendHasMsgToActiveView("SetStereoQuadBuff");
|
||||
}
|
||||
@@ -2371,7 +2371,7 @@ void StdCmdViewIvStereoInterleavedRows::activated(int iMsg)
|
||||
doCommand(Command::Gui,"Gui.activeDocument().activeView().setStereoType(\"InterleavedRows\")");
|
||||
}
|
||||
|
||||
bool StdCmdViewIvStereoInterleavedRows::isActive(void)
|
||||
bool StdCmdViewIvStereoInterleavedRows::isActive()
|
||||
{
|
||||
return getGuiApplication()->sendHasMsgToActiveView("SetStereoInterleavedRows");
|
||||
}
|
||||
@@ -2399,7 +2399,7 @@ void StdCmdViewIvStereoInterleavedColumns::activated(int iMsg)
|
||||
doCommand(Command::Gui,"Gui.activeDocument().activeView().setStereoType(\"InterleavedColumns\")");
|
||||
}
|
||||
|
||||
bool StdCmdViewIvStereoInterleavedColumns::isActive(void)
|
||||
bool StdCmdViewIvStereoInterleavedColumns::isActive()
|
||||
{
|
||||
return getGuiApplication()->sendHasMsgToActiveView("SetStereoInterleavedColumns");
|
||||
}
|
||||
@@ -2449,7 +2449,7 @@ void StdCmdViewIvIssueCamPos::activated(int iMsg)
|
||||
getGuiApplication()->macroManager()->addLine(MacroManager::Gui,Temp.c_str());
|
||||
}
|
||||
|
||||
bool StdCmdViewIvIssueCamPos::isActive(void)
|
||||
bool StdCmdViewIvIssueCamPos::isActive()
|
||||
{
|
||||
return getGuiApplication()->sendHasMsgToActiveView("GetCamera");
|
||||
}
|
||||
@@ -2483,7 +2483,7 @@ void StdViewZoomIn::activated(int iMsg)
|
||||
}
|
||||
}
|
||||
|
||||
bool StdViewZoomIn::isActive(void)
|
||||
bool StdViewZoomIn::isActive()
|
||||
{
|
||||
return (qobject_cast<View3DInventor*>(getMainWindow()->activeWindow()));
|
||||
}
|
||||
@@ -2516,7 +2516,7 @@ void StdViewZoomOut::activated(int iMsg)
|
||||
}
|
||||
}
|
||||
|
||||
bool StdViewZoomOut::isActive(void)
|
||||
bool StdViewZoomOut::isActive()
|
||||
{
|
||||
return (qobject_cast<View3DInventor*>(getMainWindow()->activeWindow()));
|
||||
}
|
||||
@@ -3124,7 +3124,7 @@ StdCmdTreeSelectAllInstances::StdCmdTreeSelectAllInstances()
|
||||
eType = AlterSelection;
|
||||
}
|
||||
|
||||
bool StdCmdTreeSelectAllInstances::isActive(void)
|
||||
bool StdCmdTreeSelectAllInstances::isActive()
|
||||
{
|
||||
const auto &sels = Selection().getSelectionEx("*",App::DocumentObject::getClassTypeId(), ResolveMode::OldStyleElement, true);
|
||||
if(sels.empty())
|
||||
@@ -3231,7 +3231,7 @@ void StdCmdMeasureDistance::activated(int iMsg)
|
||||
}
|
||||
}
|
||||
|
||||
bool StdCmdMeasureDistance::isActive(void)
|
||||
bool StdCmdMeasureDistance::isActive()
|
||||
{
|
||||
App::Document* doc = App::GetApplication().getActiveDocument();
|
||||
if (!doc || doc->countObjectsOfType(App::GeoFeature::getClassTypeId()) == 0)
|
||||
@@ -3304,7 +3304,7 @@ void StdCmdTextureMapping::activated(int iMsg)
|
||||
Gui::Control().showDialog(new Gui::Dialog::TaskTextureMapping);
|
||||
}
|
||||
|
||||
bool StdCmdTextureMapping::isActive(void)
|
||||
bool StdCmdTextureMapping::isActive()
|
||||
{
|
||||
Gui::MDIView* view = getMainWindow()->activeWindow();
|
||||
return view && view->isDerivedFrom(Gui::View3DInventor::getClassTypeId())
|
||||
@@ -3419,7 +3419,7 @@ void StdCmdSelBack::activated(int iMsg)
|
||||
Selection().selStackGoBack();
|
||||
}
|
||||
|
||||
bool StdCmdSelBack::isActive(void)
|
||||
bool StdCmdSelBack::isActive()
|
||||
{
|
||||
return Selection().selStackBackSize()>1;
|
||||
}
|
||||
@@ -3449,7 +3449,7 @@ void StdCmdSelForward::activated(int iMsg)
|
||||
Selection().selStackGoForward();
|
||||
}
|
||||
|
||||
bool StdCmdSelForward::isActive(void)
|
||||
bool StdCmdSelForward::isActive()
|
||||
{
|
||||
return !!Selection().selStackForwardSize();
|
||||
}
|
||||
@@ -3734,7 +3734,7 @@ void StdCmdSelBoundingBox::activated(int iMsg)
|
||||
}
|
||||
}
|
||||
|
||||
bool StdCmdSelBoundingBox::isActive(void)
|
||||
bool StdCmdSelBoundingBox::isActive()
|
||||
{
|
||||
if(_pcAction) {
|
||||
bool checked = _pcAction->isChecked();
|
||||
@@ -3744,7 +3744,7 @@ bool StdCmdSelBoundingBox::isActive(void)
|
||||
return true;
|
||||
}
|
||||
|
||||
Action * StdCmdSelBoundingBox::createAction(void)
|
||||
Action * StdCmdSelBoundingBox::createAction()
|
||||
{
|
||||
Action *pcAction = Command::createAction();
|
||||
pcAction->setCheckable(true);
|
||||
@@ -3758,7 +3758,7 @@ Action * StdCmdSelBoundingBox::createAction(void)
|
||||
|
||||
namespace Gui {
|
||||
|
||||
void CreateViewStdCommands(void)
|
||||
void CreateViewStdCommands()
|
||||
{
|
||||
CommandManager &rcCmdMgr = Application::Instance->commandManager();
|
||||
|
||||
|
||||
+15
-15
@@ -65,7 +65,7 @@ void StdCmdArrangeIcons::activated(int iMsg)
|
||||
getMainWindow()->arrangeIcons ();
|
||||
}
|
||||
|
||||
bool StdCmdArrangeIcons::isActive(void)
|
||||
bool StdCmdArrangeIcons::isActive()
|
||||
{
|
||||
return !(getMainWindow()->windows().isEmpty());
|
||||
}
|
||||
@@ -93,7 +93,7 @@ void StdCmdTileWindows::activated(int iMsg)
|
||||
getMainWindow()->tile();
|
||||
}
|
||||
|
||||
bool StdCmdTileWindows::isActive(void)
|
||||
bool StdCmdTileWindows::isActive()
|
||||
{
|
||||
return !(getMainWindow()->windows().isEmpty());
|
||||
}
|
||||
@@ -121,7 +121,7 @@ void StdCmdCascadeWindows::activated(int iMsg)
|
||||
getMainWindow()->cascade();
|
||||
}
|
||||
|
||||
bool StdCmdCascadeWindows::isActive(void)
|
||||
bool StdCmdCascadeWindows::isActive()
|
||||
{
|
||||
return !(getMainWindow()->windows().isEmpty());
|
||||
}
|
||||
@@ -153,7 +153,7 @@ void StdCmdCloseActiveWindow::activated(int iMsg)
|
||||
getMainWindow()->closeActiveWindow();
|
||||
}
|
||||
|
||||
bool StdCmdCloseActiveWindow::isActive(void)
|
||||
bool StdCmdCloseActiveWindow::isActive()
|
||||
{
|
||||
return !(getMainWindow()->windows().isEmpty());
|
||||
}
|
||||
@@ -181,7 +181,7 @@ void StdCmdCloseAllWindows::activated(int iMsg)
|
||||
getMainWindow()->closeAllDocuments();
|
||||
}
|
||||
|
||||
bool StdCmdCloseAllWindows::isActive(void)
|
||||
bool StdCmdCloseAllWindows::isActive()
|
||||
{
|
||||
return !(getMainWindow()->windows().isEmpty()) || App::GetApplication().getDocuments().size();
|
||||
}
|
||||
@@ -210,7 +210,7 @@ void StdCmdActivateNextWindow::activated(int iMsg)
|
||||
getMainWindow()->activateNextWindow();
|
||||
}
|
||||
|
||||
bool StdCmdActivateNextWindow::isActive(void)
|
||||
bool StdCmdActivateNextWindow::isActive()
|
||||
{
|
||||
return !(getMainWindow()->windows().isEmpty());
|
||||
}
|
||||
@@ -239,7 +239,7 @@ void StdCmdActivatePrevWindow::activated(int iMsg)
|
||||
getMainWindow()->activatePreviousWindow();
|
||||
}
|
||||
|
||||
bool StdCmdActivatePrevWindow::isActive(void)
|
||||
bool StdCmdActivatePrevWindow::isActive()
|
||||
{
|
||||
return !(getMainWindow()->windows().isEmpty());
|
||||
}
|
||||
@@ -312,12 +312,12 @@ void StdCmdDockViewMenu::activated(int iMsg)
|
||||
Q_UNUSED(iMsg);
|
||||
}
|
||||
|
||||
bool StdCmdDockViewMenu::isActive(void)
|
||||
bool StdCmdDockViewMenu::isActive()
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
Action * StdCmdDockViewMenu::createAction(void)
|
||||
Action * StdCmdDockViewMenu::createAction()
|
||||
{
|
||||
Action *pcAction;
|
||||
pcAction = new DockWidgetAction(this, getMainWindow());
|
||||
@@ -348,12 +348,12 @@ void StdCmdToolBarMenu::activated(int iMsg)
|
||||
Q_UNUSED(iMsg);
|
||||
}
|
||||
|
||||
bool StdCmdToolBarMenu::isActive(void)
|
||||
bool StdCmdToolBarMenu::isActive()
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
Action * StdCmdToolBarMenu::createAction(void)
|
||||
Action * StdCmdToolBarMenu::createAction()
|
||||
{
|
||||
Action *pcAction;
|
||||
pcAction = new ToolBarAction(this, getMainWindow());
|
||||
@@ -396,7 +396,7 @@ StdCmdStatusBar::StdCmdStatusBar()
|
||||
eType = 0;
|
||||
}
|
||||
|
||||
Action * StdCmdStatusBar::createAction(void)
|
||||
Action * StdCmdStatusBar::createAction()
|
||||
{
|
||||
Action *pcAction = Command::createAction();
|
||||
pcAction->setCheckable(true);
|
||||
@@ -448,12 +448,12 @@ void StdCmdWindowsMenu::activated(int iMsg)
|
||||
Q_UNUSED(iMsg);
|
||||
}
|
||||
|
||||
bool StdCmdWindowsMenu::isActive(void)
|
||||
bool StdCmdWindowsMenu::isActive()
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
Action * StdCmdWindowsMenu::createAction(void)
|
||||
Action * StdCmdWindowsMenu::createAction()
|
||||
{
|
||||
// Allow to show 10 menu items in the 'Window' menu and one separator.
|
||||
// If we have more windows then the user can use the 'Windows...' item.
|
||||
@@ -483,7 +483,7 @@ Action * StdCmdWindowsMenu::createAction(void)
|
||||
|
||||
namespace Gui {
|
||||
|
||||
void CreateWindowStdCommands(void)
|
||||
void CreateWindowStdCommands()
|
||||
{
|
||||
CommandManager &rcCmdMgr = Application::Instance->commandManager();
|
||||
|
||||
|
||||
+5
-5
@@ -230,7 +230,7 @@ void ControlSingleton::closedDialog()
|
||||
| QDockWidget::DockWidgetFloatable);
|
||||
}
|
||||
|
||||
bool ControlSingleton::isAllowedAlterDocument(void) const
|
||||
bool ControlSingleton::isAllowedAlterDocument() const
|
||||
{
|
||||
if (ActiveDialog)
|
||||
return ActiveDialog->isAllowedAlterDocument();
|
||||
@@ -238,14 +238,14 @@ bool ControlSingleton::isAllowedAlterDocument(void) const
|
||||
}
|
||||
|
||||
|
||||
bool ControlSingleton::isAllowedAlterView(void) const
|
||||
bool ControlSingleton::isAllowedAlterView() const
|
||||
{
|
||||
if (ActiveDialog)
|
||||
return ActiveDialog->isAllowedAlterView();
|
||||
return true;
|
||||
}
|
||||
|
||||
bool ControlSingleton::isAllowedAlterSelection(void) const
|
||||
bool ControlSingleton::isAllowedAlterSelection() const
|
||||
{
|
||||
if (ActiveDialog)
|
||||
return ActiveDialog->isAllowedAlterSelection();
|
||||
@@ -254,14 +254,14 @@ bool ControlSingleton::isAllowedAlterSelection(void) const
|
||||
|
||||
// -------------------------------------------
|
||||
|
||||
ControlSingleton& ControlSingleton::instance(void)
|
||||
ControlSingleton& ControlSingleton::instance()
|
||||
{
|
||||
if (_pcSingleton == nullptr)
|
||||
_pcSingleton = new ControlSingleton;
|
||||
return *_pcSingleton;
|
||||
}
|
||||
|
||||
void ControlSingleton::destruct (void)
|
||||
void ControlSingleton::destruct ()
|
||||
{
|
||||
if (_pcSingleton != nullptr)
|
||||
delete _pcSingleton;
|
||||
|
||||
+1
-1
@@ -128,7 +128,7 @@ private:
|
||||
};
|
||||
|
||||
/// Get the global instance
|
||||
inline ControlSingleton& Control(void)
|
||||
inline ControlSingleton& Control()
|
||||
{
|
||||
return ControlSingleton::instance();
|
||||
}
|
||||
|
||||
@@ -110,11 +110,11 @@ public:
|
||||
public:
|
||||
bool reject();
|
||||
|
||||
bool isAllowedAlterDocument(void) const
|
||||
bool isAllowedAlterDocument() const
|
||||
{ return true; }
|
||||
bool isAllowedAlterView(void) const
|
||||
bool isAllowedAlterView() const
|
||||
{ return true; }
|
||||
bool isAllowedAlterSelection(void) const
|
||||
bool isAllowedAlterSelection() const
|
||||
{ return true; }
|
||||
QDialogButtonBox::StandardButtons getStandardButtons() const;
|
||||
|
||||
|
||||
@@ -55,7 +55,7 @@ DlgEditFileIncludePropertyExternal::~DlgEditFileIncludePropertyExternal()
|
||||
}
|
||||
|
||||
|
||||
int DlgEditFileIncludePropertyExternal::Do(void)
|
||||
int DlgEditFileIncludePropertyExternal::Do()
|
||||
{
|
||||
QFileInfo file = QString::fromUtf8(Prop.getValue());
|
||||
assert(file.exists());
|
||||
|
||||
@@ -42,7 +42,7 @@ public:
|
||||
DlgEditFileIncludePropertyExternal( App::PropertyFileIncluded& Prop, QWidget* parent = nullptr, Qt::WindowFlags fl = Qt::WindowFlags() );
|
||||
virtual ~DlgEditFileIncludePropertyExternal();
|
||||
|
||||
int Do(void);
|
||||
int Do();
|
||||
|
||||
protected Q_SLOTS:
|
||||
protected:
|
||||
|
||||
@@ -110,7 +110,7 @@ DlgMacroExecuteImp::~DlgMacroExecuteImp()
|
||||
/**
|
||||
* Fills up the list with all macro files found in the specified location.
|
||||
*/
|
||||
void DlgMacroExecuteImp::fillUpList(void)
|
||||
void DlgMacroExecuteImp::fillUpList()
|
||||
{
|
||||
// lists all files in macro path
|
||||
QDir dir(this->macroPath, QLatin1String("*.FCMacro *.py"));
|
||||
|
||||
@@ -65,7 +65,7 @@ protected Q_SLOTS:
|
||||
void on_tabMacroWidget_currentChanged(int index);
|
||||
|
||||
protected:
|
||||
void fillUpList(void);
|
||||
void fillUpList();
|
||||
|
||||
protected:
|
||||
QString macroPath;
|
||||
|
||||
@@ -937,7 +937,7 @@ ParameterGroupItem::~ParameterGroupItem()
|
||||
_hcGrp->ClearObserver();
|
||||
}
|
||||
|
||||
void ParameterGroupItem::fillUp(void)
|
||||
void ParameterGroupItem::fillUp()
|
||||
{
|
||||
// filling up groups
|
||||
std::vector<Base::Reference<ParameterGrp> > vhcParamGrp = _hcGrp->GetGroups();
|
||||
|
||||
@@ -220,7 +220,7 @@ public:
|
||||
void setData ( int column, int role, const QVariant & value );
|
||||
QVariant data ( int column, int role ) const;
|
||||
|
||||
void fillUp(void);
|
||||
void fillUp();
|
||||
Base::Reference<ParameterGrp> _hcGrp;
|
||||
};
|
||||
|
||||
|
||||
@@ -36,11 +36,13 @@
|
||||
#include <App/Application.h>
|
||||
#include <Base/Console.h>
|
||||
#include <Base/Exception.h>
|
||||
#include <Base/Tools.h>
|
||||
|
||||
#include "DlgPreferencesImp.h"
|
||||
#include "ui_DlgPreferences.h"
|
||||
#include "BitmapFactory.h"
|
||||
#include "MainWindow.h"
|
||||
#include "Tools.h"
|
||||
#include "WidgetFactory.h"
|
||||
|
||||
|
||||
@@ -65,7 +67,9 @@ DlgPreferencesImp::DlgPreferencesImp(QWidget* parent, Qt::WindowFlags fl)
|
||||
invalidParameter(false), canEmbedScrollArea(true)
|
||||
{
|
||||
ui->setupUi(this);
|
||||
ui->listBox->setFixedWidth(108);
|
||||
QFontMetrics fm(font());
|
||||
int length = QtTools::horizontalAdvance(fm, longestGroupName());
|
||||
ui->listBox->setFixedWidth(Base::clamp<int>(length + 20, 108, 120));
|
||||
ui->listBox->setGridSize(QSize(108, 75));
|
||||
|
||||
connect(ui->buttonBox, SIGNAL (helpRequested()),
|
||||
@@ -106,6 +110,17 @@ void DlgPreferencesImp::setupPages()
|
||||
ui->listBox->setCurrentRow(0);
|
||||
}
|
||||
|
||||
QString DlgPreferencesImp::longestGroupName() const
|
||||
{
|
||||
std::string name;
|
||||
for (const auto &group : _pages) {
|
||||
if (group.first.size() > name.size())
|
||||
name = group.first;
|
||||
}
|
||||
|
||||
return QString::fromStdString(name);
|
||||
}
|
||||
|
||||
/**
|
||||
* Create the necessary widgets for a new group named \a groupName. Returns a
|
||||
* pointer to the group's QTabWidget: that widget's lifetime is managed by the
|
||||
@@ -122,11 +137,20 @@ QTabWidget* DlgPreferencesImp::createTabForGroup(const std::string &groupName)
|
||||
QListWidgetItem* item = new QListWidgetItem(ui->listBox);
|
||||
item->setData(GroupNameRole, QVariant(groupNameQString));
|
||||
item->setText(QObject::tr(groupNameQString.toLatin1()));
|
||||
item->setToolTip(QObject::tr(groupNameQString.toLatin1()));
|
||||
// for Part/PD we need another tooltip since this group is for 2 WBs
|
||||
if (groupName.compare("Part/Part Design") == 0)
|
||||
item->setToolTip(QObject::tr(QString::fromStdString("Part and Part Design workbench").toLatin1()));
|
||||
else
|
||||
item->setToolTip(QObject::tr(groupNameQString.toLatin1()));
|
||||
std::string fileName = groupName;
|
||||
for (auto & ch : fileName) {
|
||||
if (ch == ' ') ch = '_';
|
||||
else ch = tolower(ch);
|
||||
// for Part/PD the filename cannot be groupName since this group is for 2 WBs
|
||||
if (groupName.compare("Part/Part Design") == 0)
|
||||
fileName = "Part design";
|
||||
for (auto &ch : fileName) {
|
||||
if (ch == ' ')
|
||||
ch = '_';
|
||||
else
|
||||
ch = tolower(ch);
|
||||
}
|
||||
fileName = std::string("preferences-") + fileName;
|
||||
QPixmap icon = Gui::BitmapFactory().pixmapFromSvg(fileName.c_str(), QSize(48, 48));
|
||||
|
||||
@@ -143,6 +143,7 @@ private:
|
||||
void createPageInGroup(QTabWidget* tabWidget, const std::string& pageName);
|
||||
void applyChanges();
|
||||
void restoreDefaults();
|
||||
QString longestGroupName() const;
|
||||
//@}
|
||||
|
||||
private:
|
||||
|
||||
@@ -66,7 +66,7 @@ DlgRunExternal::~DlgRunExternal()
|
||||
delete ui;
|
||||
}
|
||||
|
||||
int DlgRunExternal::Do(void)
|
||||
int DlgRunExternal::Do()
|
||||
{
|
||||
QFileInfo ifo (ProcName);
|
||||
|
||||
@@ -79,23 +79,23 @@ int DlgRunExternal::Do(void)
|
||||
return exec();
|
||||
}
|
||||
|
||||
void DlgRunExternal::reject (void)
|
||||
void DlgRunExternal::reject ()
|
||||
{
|
||||
QDialog::reject();
|
||||
}
|
||||
|
||||
void DlgRunExternal::accept (void)
|
||||
void DlgRunExternal::accept ()
|
||||
{
|
||||
QDialog::accept();
|
||||
}
|
||||
|
||||
void DlgRunExternal::abort (void)
|
||||
void DlgRunExternal::abort ()
|
||||
{
|
||||
process.terminate();
|
||||
DlgRunExternal::reject();
|
||||
}
|
||||
|
||||
void DlgRunExternal::advanced (void)
|
||||
void DlgRunExternal::advanced ()
|
||||
{
|
||||
if (advancedHidden){
|
||||
ui->extensionWidget->show();
|
||||
|
||||
@@ -25,6 +25,7 @@
|
||||
|
||||
#include <QDialog>
|
||||
#include <QProcess>
|
||||
#include <FCGlobal.h>
|
||||
|
||||
namespace Gui {
|
||||
namespace Dialog {
|
||||
|
||||
@@ -180,13 +180,13 @@ void DlgUnitsCalculator::parseError(const QString& errorText)
|
||||
ui->ValueOutput->setText(errorText);
|
||||
}
|
||||
|
||||
void DlgUnitsCalculator::copy(void)
|
||||
void DlgUnitsCalculator::copy()
|
||||
{
|
||||
QClipboard *cb = QApplication::clipboard();
|
||||
cb->setText(ui->ValueOutput->text());
|
||||
}
|
||||
|
||||
void DlgUnitsCalculator::returnPressed(void)
|
||||
void DlgUnitsCalculator::returnPressed()
|
||||
{
|
||||
if (ui->pushButton_Copy->isEnabled()) {
|
||||
ui->textEdit->append(ui->ValueInput->text() + QString::fromLatin1(" = ") + ui->ValueOutput->text());
|
||||
|
||||
@@ -56,8 +56,8 @@ protected Q_SLOTS:
|
||||
void on_comboBoxScheme_activated(int);
|
||||
void on_spinBoxDecimals_valueChanged(int);
|
||||
|
||||
void copy(void);
|
||||
void returnPressed(void);
|
||||
void copy();
|
||||
void returnPressed();
|
||||
|
||||
void parseError(const QString& errorText);
|
||||
|
||||
|
||||
@@ -63,15 +63,15 @@ public:
|
||||
*/
|
||||
//@{
|
||||
/// get called when the document is updated
|
||||
virtual void onUpdate(void){}
|
||||
virtual void onUpdate(){}
|
||||
/// returns the name of the view (important for messages)
|
||||
virtual const char *getName(void) const { return "DockWindow"; }
|
||||
virtual const char *getName() const { return "DockWindow"; }
|
||||
/// Message handler
|
||||
virtual bool onMsg(const char* ,const char** ){ return false; }
|
||||
/// Message handler test
|
||||
virtual bool onHasMsg(const char*) const { return false; }
|
||||
/// overwrite when checking on close state
|
||||
virtual bool canClose(void){return true;}
|
||||
virtual bool canClose(){return true;}
|
||||
//@}
|
||||
|
||||
Q_SIGNALS:
|
||||
|
||||
+17
-17
@@ -457,11 +457,11 @@ void Document::setEditingTransform(const Base::Matrix4D &mat) {
|
||||
activeView->getViewer()->setEditingTransform(mat);
|
||||
}
|
||||
|
||||
void Document::resetEdit(void) {
|
||||
void Document::resetEdit() {
|
||||
Application::Instance->setEditDocument(nullptr);
|
||||
}
|
||||
|
||||
void Document::_resetEdit(void)
|
||||
void Document::_resetEdit()
|
||||
{
|
||||
std::list<Gui::BaseView*>::iterator it;
|
||||
if (d->_editViewProvider) {
|
||||
@@ -1036,7 +1036,7 @@ std::vector<std::pair<ViewProviderDocumentObject*,int> > Document::getViewProvid
|
||||
return ret;
|
||||
}
|
||||
|
||||
App::Document* Document::getDocument(void) const
|
||||
App::Document* Document::getDocument() const
|
||||
{
|
||||
return d->_pcDocument;
|
||||
}
|
||||
@@ -1130,7 +1130,7 @@ bool Document::askIfSavingFailed(const QString& error)
|
||||
}
|
||||
|
||||
/// Save the document
|
||||
bool Document::save(void)
|
||||
bool Document::save()
|
||||
{
|
||||
if (d->_pcDocument->isSaved()) {
|
||||
try {
|
||||
@@ -1213,7 +1213,7 @@ bool Document::save(void)
|
||||
}
|
||||
|
||||
/// Save the document under a new file name
|
||||
bool Document::saveAs(void)
|
||||
bool Document::saveAs()
|
||||
{
|
||||
getMainWindow()->showMessage(QObject::tr("Save document under new filename..."));
|
||||
|
||||
@@ -1314,7 +1314,7 @@ void Document::saveAll()
|
||||
}
|
||||
|
||||
/// Save a copy of the document under a new file name
|
||||
bool Document::saveCopy(void)
|
||||
bool Document::saveCopy()
|
||||
{
|
||||
getMainWindow()->showMessage(QObject::tr("Save a copy of the document under new filename..."));
|
||||
|
||||
@@ -1339,7 +1339,7 @@ bool Document::saveCopy(void)
|
||||
}
|
||||
}
|
||||
|
||||
unsigned int Document::getMemSize (void) const
|
||||
unsigned int Document::getMemSize () const
|
||||
{
|
||||
unsigned int size = 0;
|
||||
|
||||
@@ -1918,7 +1918,7 @@ void Document::detachView(Gui::BaseView* pcView, bool bPassiv)
|
||||
}
|
||||
}
|
||||
|
||||
void Document::onUpdate(void)
|
||||
void Document::onUpdate()
|
||||
{
|
||||
#ifdef FC_LOGUPDATECHAIN
|
||||
Base::Console().Log("Acti: Gui::Document::onUpdate()");
|
||||
@@ -1935,7 +1935,7 @@ void Document::onUpdate(void)
|
||||
}
|
||||
}
|
||||
|
||||
void Document::onRelabel(void)
|
||||
void Document::onRelabel()
|
||||
{
|
||||
#ifdef FC_LOGUPDATECHAIN
|
||||
Base::Console().Log("Acti: Gui::Document::onRelabel()");
|
||||
@@ -1954,7 +1954,7 @@ void Document::onRelabel(void)
|
||||
d->connectChangeDocumentBlocker.unblock();
|
||||
}
|
||||
|
||||
bool Document::isLastView(void)
|
||||
bool Document::isLastView()
|
||||
{
|
||||
if (d->baseViews.size() <= 1)
|
||||
return true;
|
||||
@@ -2113,7 +2113,7 @@ bool Document::sendMsgToFirstView(const Base::Type& typeId, const char* pMsg, co
|
||||
}
|
||||
|
||||
/// Getter for the active view
|
||||
MDIView* Document::getActiveView(void) const
|
||||
MDIView* Document::getActiveView() const
|
||||
{
|
||||
// get the main window's active view
|
||||
MDIView* active = getMainWindow()->activeWindow();
|
||||
@@ -2276,29 +2276,29 @@ void Document::openCommand(const char* sName)
|
||||
getDocument()->openTransaction(sName);
|
||||
}
|
||||
|
||||
void Document::commitCommand(void)
|
||||
void Document::commitCommand()
|
||||
{
|
||||
getDocument()->commitTransaction();
|
||||
}
|
||||
|
||||
void Document::abortCommand(void)
|
||||
void Document::abortCommand()
|
||||
{
|
||||
getDocument()->abortTransaction();
|
||||
}
|
||||
|
||||
bool Document::hasPendingCommand(void) const
|
||||
bool Document::hasPendingCommand() const
|
||||
{
|
||||
return getDocument()->hasPendingTransaction();
|
||||
}
|
||||
|
||||
/// Get a string vector with the 'Undo' actions
|
||||
std::vector<std::string> Document::getUndoVector(void) const
|
||||
std::vector<std::string> Document::getUndoVector() const
|
||||
{
|
||||
return getDocument()->getAvailableUndoNames();
|
||||
}
|
||||
|
||||
/// Get a string vector with the 'Redo' actions
|
||||
std::vector<std::string> Document::getRedoVector(void) const
|
||||
std::vector<std::string> Document::getRedoVector() const
|
||||
{
|
||||
return getDocument()->getAvailableRedoNames();
|
||||
}
|
||||
@@ -2401,7 +2401,7 @@ void Document::redo(int iSteps)
|
||||
d->_redoViewProviders.clear();
|
||||
}
|
||||
|
||||
PyObject* Document::getPyObject(void)
|
||||
PyObject* Document::getPyObject()
|
||||
{
|
||||
_pcDocPy->IncRef();
|
||||
return _pcDocPy;
|
||||
|
||||
+17
-17
@@ -141,13 +141,13 @@ public:
|
||||
|
||||
/** @name I/O of the document */
|
||||
//@{
|
||||
unsigned int getMemSize (void) const;
|
||||
unsigned int getMemSize () const;
|
||||
/// Save the document
|
||||
bool save(void);
|
||||
bool save();
|
||||
/// Save the document under a new file name
|
||||
bool saveAs(void);
|
||||
bool saveAs();
|
||||
/// Save a copy of the document under a new file name
|
||||
bool saveCopy(void);
|
||||
bool saveCopy();
|
||||
/// Save all open document
|
||||
static void saveAll();
|
||||
/// This method is used to save properties or very small amounts of data to an XML document.
|
||||
@@ -170,12 +170,12 @@ public:
|
||||
bool isModified() const;
|
||||
|
||||
/// Getter for the App Document
|
||||
App::Document* getDocument(void) const;
|
||||
App::Document* getDocument() const;
|
||||
|
||||
/** @name methods for View handling */
|
||||
//@{
|
||||
/// Getter for the active view
|
||||
Gui::MDIView* getActiveView(void) const;
|
||||
Gui::MDIView* getActiveView() const;
|
||||
void setActiveWindow(Gui::MDIView* view);
|
||||
Gui::MDIView* getEditingViewOfViewProvider(Gui::ViewProvider*) const;
|
||||
Gui::MDIView* getViewOfViewProvider(const Gui::ViewProvider*) const;
|
||||
@@ -207,9 +207,9 @@ public:
|
||||
/// Get all view providers along the path and the corresponding node index in the path
|
||||
std::vector<std::pair<ViewProviderDocumentObject*,int> > getViewProvidersByPath(SoPath * path) const;
|
||||
/// call update on all attached views
|
||||
void onUpdate(void);
|
||||
void onUpdate();
|
||||
/// call relabel to all attached views
|
||||
void onRelabel(void);
|
||||
void onRelabel();
|
||||
/// returns a list of all attached MDI views
|
||||
std::list<MDIView*> getMDIViews() const;
|
||||
/// returns a list of all MDI views of a certain type
|
||||
@@ -244,9 +244,9 @@ public:
|
||||
const Base::Matrix4D &getEditingTransform() const;
|
||||
void setEditingTransform(const Base::Matrix4D &mat);
|
||||
/// reset from edit mode, this cause all document to reset edit
|
||||
void resetEdit(void);
|
||||
void resetEdit();
|
||||
/// reset edit of this document
|
||||
void _resetEdit(void);
|
||||
void _resetEdit();
|
||||
/// get the in edit ViewProvider or NULL
|
||||
ViewProvider *getInEdit(ViewProviderDocumentObject **parentVp=nullptr,
|
||||
std::string *subname=nullptr, int *mode=nullptr, std::string *subElement=nullptr) const;
|
||||
@@ -265,15 +265,15 @@ public:
|
||||
/// Open a new Undo transaction on the document
|
||||
void openCommand(const char* sName=nullptr);
|
||||
/// Commit the Undo transaction on the document
|
||||
void commitCommand(void);
|
||||
void commitCommand();
|
||||
/// Abort the Undo transaction on the document
|
||||
void abortCommand(void);
|
||||
void abortCommand();
|
||||
/// Check if an Undo transaction is open
|
||||
bool hasPendingCommand(void) const;
|
||||
bool hasPendingCommand() const;
|
||||
/// Get an Undo string vector with the Undo names
|
||||
std::vector<std::string> getUndoVector(void) const;
|
||||
std::vector<std::string> getUndoVector() const;
|
||||
/// Get an Redo string vector with the Redo names
|
||||
std::vector<std::string> getRedoVector(void) const;
|
||||
std::vector<std::string> getRedoVector() const;
|
||||
/// Will UNDO one or more steps
|
||||
void undo(int iSteps);
|
||||
/// Will REDO one or more steps
|
||||
@@ -288,12 +288,12 @@ public:
|
||||
|
||||
/// handles the application close event
|
||||
bool canClose(bool checkModify=true, bool checkLink=false);
|
||||
bool isLastView(void);
|
||||
bool isLastView();
|
||||
|
||||
/// called by Application before being deleted
|
||||
void beforeDelete();
|
||||
|
||||
virtual PyObject *getPyObject(void);
|
||||
virtual PyObject *getPyObject();
|
||||
|
||||
const char *getCameraSettings() const;
|
||||
bool saveCameraSettings(const char *) const;
|
||||
|
||||
@@ -50,7 +50,7 @@
|
||||
using namespace Gui;
|
||||
|
||||
// returns a string which represent the object e.g. when printed in python
|
||||
std::string DocumentPy::representation(void) const
|
||||
std::string DocumentPy::representation() const
|
||||
{
|
||||
std::stringstream str;
|
||||
str << "<GUI Document object at " << getDocumentPtr() << ">";
|
||||
@@ -377,7 +377,7 @@ PyObject* DocumentPy::toggleInSceneGraph(PyObject *args) {
|
||||
Py_Return;
|
||||
}
|
||||
|
||||
Py::Object DocumentPy::getActiveObject(void) const
|
||||
Py::Object DocumentPy::getActiveObject() const
|
||||
{
|
||||
App::DocumentObject *object = getDocumentPtr()->getDocument()->getActiveObject();
|
||||
if (object) {
|
||||
@@ -394,7 +394,7 @@ void DocumentPy::setActiveObject(Py::Object /*arg*/)
|
||||
throw Py::AttributeError("'Document' object attribute 'ActiveObject' is read-only");
|
||||
}
|
||||
|
||||
Py::Object DocumentPy::getActiveView(void) const
|
||||
Py::Object DocumentPy::getActiveView() const
|
||||
{
|
||||
Gui::MDIView *view = getDocumentPtr()->getActiveView();
|
||||
if (view) {
|
||||
@@ -411,7 +411,7 @@ void DocumentPy::setActiveView(Py::Object /*arg*/)
|
||||
throw Py::AttributeError("'Document' object attribute 'ActiveView' is read-only");
|
||||
}
|
||||
|
||||
Py::Object DocumentPy::getDocument(void) const
|
||||
Py::Object DocumentPy::getDocument() const
|
||||
{
|
||||
App::Document *doc = getDocumentPtr()->getDocument();
|
||||
if (doc) {
|
||||
@@ -423,7 +423,7 @@ Py::Object DocumentPy::getDocument(void) const
|
||||
}
|
||||
}
|
||||
|
||||
Py::Object DocumentPy::getEditingTransform(void) const
|
||||
Py::Object DocumentPy::getEditingTransform() const
|
||||
{
|
||||
return Py::asObject(new Base::MatrixPy(new Base::Matrix4D(
|
||||
getDocumentPtr()->getEditingTransform())));
|
||||
@@ -438,7 +438,7 @@ void DocumentPy::setEditingTransform(Py::Object arg)
|
||||
*static_cast<Base::MatrixPy*>(arg.ptr())->getMatrixPtr());
|
||||
}
|
||||
|
||||
Py::Object DocumentPy::getInEditInfo(void) const {
|
||||
Py::Object DocumentPy::getInEditInfo() const {
|
||||
ViewProviderDocumentObject *vp = nullptr;
|
||||
std::string subname,subelement;
|
||||
int mode = 0;
|
||||
@@ -462,7 +462,7 @@ void DocumentPy::setInEditInfo(Py::Object arg)
|
||||
pyobj)->getViewProviderDocumentObjectPtr(),subname);
|
||||
}
|
||||
|
||||
Py::Int DocumentPy::getEditMode(void) const
|
||||
Py::Int DocumentPy::getEditMode() const
|
||||
{
|
||||
int mode = -1;
|
||||
getDocumentPtr()->getInEdit(nullptr,nullptr,&mode);
|
||||
@@ -475,7 +475,7 @@ Py::Boolean DocumentPy::getTransacting() const
|
||||
return Py::Boolean(getDocumentPtr()->isPerformingTransaction());
|
||||
}
|
||||
|
||||
Py::Boolean DocumentPy::getModified(void) const
|
||||
Py::Boolean DocumentPy::getModified() const
|
||||
{
|
||||
return Py::Boolean(getDocumentPtr()->isModified());
|
||||
}
|
||||
|
||||
@@ -311,7 +311,7 @@ bool EditorView::onHasMsg(const char* pMsg) const
|
||||
}
|
||||
|
||||
/** Checking on close state. */
|
||||
bool EditorView::canClose(void)
|
||||
bool EditorView::canClose()
|
||||
{
|
||||
if ( !d->textEdit->document()->isModified() )
|
||||
return true;
|
||||
@@ -341,7 +341,7 @@ void EditorView::setDisplayName(EditorView::DisplayName type)
|
||||
/**
|
||||
* Saves the content of the editor to a file specified by the appearing file dialog.
|
||||
*/
|
||||
bool EditorView::saveAs(void)
|
||||
bool EditorView::saveAs()
|
||||
{
|
||||
QString fn = FileDialog::getSaveFileName(this, QObject::tr("Save Macro"),
|
||||
QString(), QString::fromLatin1("%1 (*.FCMacro);;Python (*.py)").arg(tr("FreeCAD macro")));
|
||||
@@ -382,7 +382,7 @@ bool EditorView::open(const QString& fileName)
|
||||
* Copies the selected text to the clipboard and deletes it from the text edit.
|
||||
* If there is no selected text nothing happens.
|
||||
*/
|
||||
void EditorView::cut(void)
|
||||
void EditorView::cut()
|
||||
{
|
||||
d->textEdit->cut();
|
||||
}
|
||||
@@ -390,7 +390,7 @@ void EditorView::cut(void)
|
||||
/**
|
||||
* Copies any selected text to the clipboard.
|
||||
*/
|
||||
void EditorView::copy(void)
|
||||
void EditorView::copy()
|
||||
{
|
||||
d->textEdit->copy();
|
||||
}
|
||||
@@ -399,7 +399,7 @@ void EditorView::copy(void)
|
||||
* Pastes the text from the clipboard into the text edit at the current cursor position.
|
||||
* If there is no text in the clipboard nothing happens.
|
||||
*/
|
||||
void EditorView::paste(void)
|
||||
void EditorView::paste()
|
||||
{
|
||||
d->textEdit->paste();
|
||||
}
|
||||
@@ -408,7 +408,7 @@ void EditorView::paste(void)
|
||||
* Undoes the last operation.
|
||||
* If there is no operation to undo, i.e. there is no undo step in the undo/redo history, nothing happens.
|
||||
*/
|
||||
void EditorView::undo(void)
|
||||
void EditorView::undo()
|
||||
{
|
||||
d->lock = true;
|
||||
if (!d->undos.isEmpty()) {
|
||||
@@ -423,7 +423,7 @@ void EditorView::undo(void)
|
||||
* Redoes the last operation.
|
||||
* If there is no operation to undo, i.e. there is no undo step in the undo/redo history, nothing happens.
|
||||
*/
|
||||
void EditorView::redo(void)
|
||||
void EditorView::redo()
|
||||
{
|
||||
d->lock = true;
|
||||
if (!d->redos.isEmpty()) {
|
||||
|
||||
@@ -66,13 +66,13 @@ public:
|
||||
void setDisplayName(DisplayName);
|
||||
void OnChange(Base::Subject<const char*> &rCaller,const char* rcReason);
|
||||
|
||||
const char *getName(void) const {return "EditorView";}
|
||||
void onUpdate(void){}
|
||||
const char *getName() const {return "EditorView";}
|
||||
void onUpdate(){}
|
||||
|
||||
bool onMsg(const char* pMsg,const char** ppReturn);
|
||||
bool onHasMsg(const char* pMsg) const;
|
||||
|
||||
bool canClose(void);
|
||||
bool canClose();
|
||||
|
||||
/** @name Standard actions of the editor */
|
||||
//@{
|
||||
|
||||
@@ -31,7 +31,7 @@ class ExpressionBinding;
|
||||
class ExpressionBindingPy : public Py::PythonExtension<ExpressionBindingPy>
|
||||
{
|
||||
public:
|
||||
static void init_type(void); // announce properties and methods
|
||||
static void init_type(); // announce properties and methods
|
||||
|
||||
ExpressionBindingPy(ExpressionBinding*);
|
||||
~ExpressionBindingPy();
|
||||
|
||||
@@ -107,8 +107,8 @@ void GUIConsole::SendLog(const std::string& msg, Base::LogStyle level)
|
||||
#else /* FC_OS_LINUX */
|
||||
|
||||
// safely ignore GUIConsole::s_nMaxLines and GUIConsole::s_nRefCount
|
||||
GUIConsole::GUIConsole (void) {}
|
||||
GUIConsole::~GUIConsole (void) {}
|
||||
GUIConsole::GUIConsole () {}
|
||||
GUIConsole::~GUIConsole () {}
|
||||
void GUIConsole::SendLog(const std::string& msg, Base::LogStyle level)
|
||||
{
|
||||
switch(level){
|
||||
|
||||
@@ -44,11 +44,11 @@ class GuiExport GUIConsole :public Base::ILogger
|
||||
{
|
||||
public:
|
||||
/// Constructor
|
||||
GUIConsole(void);
|
||||
GUIConsole();
|
||||
/// Destructor
|
||||
virtual ~GUIConsole(void);
|
||||
virtual ~GUIConsole();
|
||||
void SendLog(const std::string& msg, Base::LogStyle level) override;
|
||||
const char* Name(void) override {return "GUIConsole";}
|
||||
const char* Name() override {return "GUIConsole";}
|
||||
|
||||
protected:
|
||||
static const unsigned int s_nMaxLines;
|
||||
|
||||
+11
-11
@@ -330,7 +330,7 @@ void InputField::pushToHistory(const QString &valueq)
|
||||
}
|
||||
}
|
||||
|
||||
std::vector<QString> InputField::getHistory(void)
|
||||
std::vector<QString> InputField::getHistory()
|
||||
{
|
||||
std::vector<QString> res;
|
||||
|
||||
@@ -349,7 +349,7 @@ std::vector<QString> InputField::getHistory(void)
|
||||
return res;
|
||||
}
|
||||
|
||||
void InputField::setToLastUsedValue(void)
|
||||
void InputField::setToLastUsedValue()
|
||||
{
|
||||
std::vector<QString> hist = getHistory();
|
||||
if(!hist.empty())
|
||||
@@ -378,7 +378,7 @@ void InputField::pushToSavedValues(const QString &valueq)
|
||||
}
|
||||
}
|
||||
|
||||
std::vector<QString> InputField::getSavedValues(void)
|
||||
std::vector<QString> InputField::getSavedValues()
|
||||
{
|
||||
std::vector<QString> res;
|
||||
|
||||
@@ -451,7 +451,7 @@ const Base::Unit& InputField::getUnit() const
|
||||
}
|
||||
|
||||
/// get stored, valid quantity as a string
|
||||
QString InputField::getQuantityString(void) const
|
||||
QString InputField::getQuantityString() const
|
||||
{
|
||||
return actQuantity.getUserString();
|
||||
}
|
||||
@@ -465,7 +465,7 @@ void InputField::setQuantityString(const QString& text)
|
||||
}
|
||||
|
||||
/// return the quantity in C locale, i.e. decimal separator is a dot.
|
||||
QString InputField::rawText(void) const
|
||||
QString InputField::rawText() const
|
||||
{
|
||||
double factor;
|
||||
QString unit;
|
||||
@@ -484,7 +484,7 @@ void InputField::setRawText(const QString& text)
|
||||
}
|
||||
|
||||
/// get the value of the singleStep property
|
||||
double InputField::singleStep(void)const
|
||||
double InputField::singleStep()const
|
||||
{
|
||||
return StepSize;
|
||||
}
|
||||
@@ -496,7 +496,7 @@ void InputField::setSingleStep(double s)
|
||||
}
|
||||
|
||||
/// get the value of the maximum property
|
||||
double InputField::maximum(void)const
|
||||
double InputField::maximum()const
|
||||
{
|
||||
return Maximum;
|
||||
}
|
||||
@@ -512,7 +512,7 @@ void InputField::setMaximum(double m)
|
||||
}
|
||||
|
||||
/// get the value of the minimum property
|
||||
double InputField::minimum(void)const
|
||||
double InputField::minimum()const
|
||||
{
|
||||
return Minimum;
|
||||
}
|
||||
@@ -538,7 +538,7 @@ void InputField::setUnitText(const QString& str)
|
||||
}
|
||||
}
|
||||
|
||||
QString InputField::getUnitText(void)
|
||||
QString InputField::getUnitText()
|
||||
{
|
||||
double dFactor;
|
||||
QString unitStr;
|
||||
@@ -576,7 +576,7 @@ void InputField::setFormat(const QString& format)
|
||||
}
|
||||
|
||||
// get the value of the minimum property
|
||||
int InputField::historySize(void)const
|
||||
int InputField::historySize()const
|
||||
{
|
||||
return HistorySize;
|
||||
}
|
||||
@@ -590,7 +590,7 @@ void InputField::setHistorySize(int i)
|
||||
HistorySize = i;
|
||||
}
|
||||
|
||||
void InputField::selectNumber(void)
|
||||
void InputField::selectNumber()
|
||||
{
|
||||
QString str = text();
|
||||
unsigned int i = 0;
|
||||
|
||||
+14
-14
@@ -83,18 +83,18 @@ public:
|
||||
void setValue(const double&);
|
||||
|
||||
/// get the current value
|
||||
Base::Quantity getQuantity(void)const{return this->actQuantity;}
|
||||
Base::Quantity getQuantity()const{return this->actQuantity;}
|
||||
/// Get the current quantity without unit
|
||||
double rawValue() const;
|
||||
|
||||
/// get stored, valid quantity as a string (user string - avoid storing)
|
||||
QString getQuantityString(void) const;
|
||||
QString getQuantityString() const;
|
||||
|
||||
/// set, validate and display quantity from a string. Must match existing units.
|
||||
void setQuantityString(const QString& text);
|
||||
|
||||
/// return the quantity in C locale, i.e. decimal separator is a dot.
|
||||
QString rawText(void) const;
|
||||
QString rawText() const;
|
||||
|
||||
/// expects the string in C locale and internally converts it into the OS-specific locale
|
||||
void setRawText(const QString& text);
|
||||
@@ -114,37 +114,37 @@ public:
|
||||
const Base::Unit& getUnit() const;
|
||||
|
||||
/// set the input field to the last used value (works only if the setParamGrpPath() was called)
|
||||
void setToLastUsedValue(void);
|
||||
void setToLastUsedValue();
|
||||
/// get the value of the singleStep property
|
||||
double singleStep(void)const;
|
||||
double singleStep()const;
|
||||
/// set the value of the singleStep property
|
||||
void setSingleStep(double);
|
||||
/// get the value of the maximum property
|
||||
double maximum(void)const;
|
||||
double maximum()const;
|
||||
/// set the value of the maximum property
|
||||
void setMaximum(double);
|
||||
/// get the value of the minimum property
|
||||
double minimum(void)const;
|
||||
double minimum()const;
|
||||
/// set the value of the minimum property
|
||||
void setMinimum(double);
|
||||
/// get the value of the minimum property
|
||||
int historySize(void)const;
|
||||
int historySize()const;
|
||||
/// set the value of the minimum property
|
||||
void setHistorySize(int);
|
||||
/// set the unit by a string (can be used in the *.ui file)
|
||||
void setUnitText(const QString&);
|
||||
/// get the unit as a string (can be used in the *.ui file)
|
||||
QString getUnitText(void);
|
||||
QString getUnitText();
|
||||
/// get the value of the precision property
|
||||
int getPrecision(void) const;
|
||||
int getPrecision() const;
|
||||
/// set the value of the precision property (can be used in the *.ui file)
|
||||
void setPrecision(const int);
|
||||
/// get the value of the format property: "f" (fixed), "e" (scientific), "g" (general)
|
||||
QString getFormat(void) const;
|
||||
QString getFormat() const;
|
||||
/// set the value of the format property (can be used in the *.ui file)
|
||||
void setFormat(const QString&);
|
||||
/// set the number portion selected (use after setValue())
|
||||
void selectNumber(void);
|
||||
void selectNumber();
|
||||
/// input validation
|
||||
void fixup(QString& input) const;
|
||||
/// input validation
|
||||
@@ -159,11 +159,11 @@ public:
|
||||
/// push a new value to the history, if no string given the actual text of the input field is used.
|
||||
void pushToHistory(const QString &valueq = QString());
|
||||
/// get the history of the field, newest first
|
||||
std::vector<QString> getHistory(void);
|
||||
std::vector<QString> getHistory();
|
||||
/// push a new value to the history, if no string given the actual text of the input field is used.
|
||||
void pushToSavedValues(const QString &valueq = QString());
|
||||
/// get the history of the field, newest first
|
||||
std::vector<QString> getSavedValues(void);
|
||||
std::vector<QString> getSavedValues();
|
||||
//@}
|
||||
|
||||
void bind(const App::ObjectIdentifier &_path);
|
||||
|
||||
@@ -113,14 +113,14 @@ public:
|
||||
};
|
||||
}
|
||||
|
||||
Translator* Translator::instance(void)
|
||||
Translator* Translator::instance()
|
||||
{
|
||||
if (!_pcSingleton)
|
||||
_pcSingleton = new Translator;
|
||||
return _pcSingleton;
|
||||
}
|
||||
|
||||
void Translator::destruct (void)
|
||||
void Translator::destruct ()
|
||||
{
|
||||
if (_pcSingleton)
|
||||
delete _pcSingleton;
|
||||
|
||||
@@ -46,7 +46,7 @@ int LinkViewPy::PyInit(PyObject* /*args*/, PyObject* /*kwd*/)
|
||||
|
||||
|
||||
// returns a string which represent the object e.g. when printed in python
|
||||
std::string LinkViewPy::representation(void) const
|
||||
std::string LinkViewPy::representation() const
|
||||
{
|
||||
return "<Link view>";
|
||||
}
|
||||
@@ -337,7 +337,7 @@ int LinkViewPy::setCustomAttributes(const char*, PyObject*)
|
||||
return 0;
|
||||
}
|
||||
|
||||
Py::Object LinkViewPy::getRootNode(void) const
|
||||
Py::Object LinkViewPy::getRootNode() const
|
||||
{
|
||||
try {
|
||||
SoNode* node = getLinkViewPtr()->getLinkRoot();
|
||||
|
||||
+1
-1
@@ -183,7 +183,7 @@ bool MDIView::onHasMsg(const char* pMsg) const
|
||||
return false;
|
||||
}
|
||||
|
||||
bool MDIView::canClose(void)
|
||||
bool MDIView::canClose()
|
||||
{
|
||||
if (getAppDocument() && getAppDocument()->testStatus(App::Document::TempDoc))
|
||||
return true;
|
||||
|
||||
+1
-1
@@ -78,7 +78,7 @@ public:
|
||||
/// Message handler test
|
||||
virtual bool onHasMsg(const char* pMsg) const;
|
||||
/// overwrite when checking on close state
|
||||
virtual bool canClose(void);
|
||||
virtual bool canClose();
|
||||
/// delete itself
|
||||
virtual void deleteSelf();
|
||||
virtual PyObject *getPyObject();
|
||||
|
||||
+2
-2
@@ -97,7 +97,7 @@ void MacroManager::open(MacroType eType, const char *sName)
|
||||
Base::Console().Log("CmdM: Open macro: %s\n", sName);
|
||||
}
|
||||
|
||||
void MacroManager::commit(void)
|
||||
void MacroManager::commit()
|
||||
{
|
||||
QFile file(this->macroName);
|
||||
if (file.open(QFile::WriteOnly))
|
||||
@@ -155,7 +155,7 @@ void MacroManager::commit(void)
|
||||
}
|
||||
}
|
||||
|
||||
void MacroManager::cancel(void)
|
||||
void MacroManager::cancel()
|
||||
{
|
||||
Base::Console().Log("Cancel macro: %s\n",(const char*)this->macroName.toUtf8());
|
||||
|
||||
|
||||
+3
-3
@@ -73,11 +73,11 @@ public:
|
||||
*/
|
||||
void open(MacroType eType,const char *sName);
|
||||
/// close (and save) the recording session
|
||||
void commit(void);
|
||||
void commit();
|
||||
/// cancels the recording session
|
||||
void cancel(void);
|
||||
void cancel();
|
||||
/// indicates if a macro recording is in progress
|
||||
bool isOpen(void) const {return openMacro;}
|
||||
bool isOpen() const {return openMacro;}
|
||||
/// insert a new line in the macro
|
||||
void addLine(LineType Type,const char* sLine,bool pending=false);
|
||||
/** Set the active module
|
||||
|
||||
@@ -1142,7 +1142,7 @@ QList<QWidget*> MainWindow::windows(QMdiArea::WindowOrder order) const
|
||||
return mdis;
|
||||
}
|
||||
|
||||
MDIView* MainWindow::activeWindow(void) const
|
||||
MDIView* MainWindow::activeWindow() const
|
||||
{
|
||||
// each activated window notifies this main window when it is activated
|
||||
return d->activeView;
|
||||
@@ -1450,7 +1450,7 @@ void MainWindow::saveWindowSettings()
|
||||
ToolBarManager::getInstance()->saveState();
|
||||
}
|
||||
|
||||
void MainWindow::startSplasher(void)
|
||||
void MainWindow::startSplasher()
|
||||
{
|
||||
// startup splasher
|
||||
// when running in verbose mode no splasher
|
||||
@@ -1468,7 +1468,7 @@ void MainWindow::startSplasher(void)
|
||||
}
|
||||
}
|
||||
|
||||
void MainWindow::stopSplasher(void)
|
||||
void MainWindow::stopSplasher()
|
||||
{
|
||||
if (d->splashscreen) {
|
||||
d->splashscreen->finish(this);
|
||||
@@ -1542,7 +1542,8 @@ QPixmap MainWindow::splashImage() const
|
||||
QString title = qApp->applicationName();
|
||||
QString major = QString::fromLatin1(App::Application::Config()["BuildVersionMajor"].c_str());
|
||||
QString minor = QString::fromLatin1(App::Application::Config()["BuildVersionMinor"].c_str());
|
||||
QString version = QString::fromLatin1("%1.%2").arg(major, minor);
|
||||
QString point = QString::fromLatin1(App::Application::Config()["BuildVersionPoint"].c_str());
|
||||
QString version = QString::fromLatin1("%1.%2.%3").arg(major, minor, point);
|
||||
QString position, fontFamily;
|
||||
|
||||
std::map<std::string,std::string>::const_iterator te = App::Application::Config().find("SplashInfoExeName");
|
||||
|
||||
@@ -136,9 +136,9 @@ public:
|
||||
/** Gets the one and only instance. */
|
||||
static MainWindow* getInstance();
|
||||
/** Starts the splasher at startup. */
|
||||
void startSplasher(void);
|
||||
void startSplasher();
|
||||
/** Stops the splasher after startup. */
|
||||
void stopSplasher(void);
|
||||
void stopSplasher();
|
||||
/* The image of the About dialog, it might be empty. */
|
||||
QPixmap aboutImage() const;
|
||||
/* The image of the splash screen of the application. */
|
||||
@@ -355,7 +355,7 @@ public:
|
||||
void SendLog(const std::string& msg, Base::LogStyle level) override;
|
||||
|
||||
/// name of the observer
|
||||
const char *Name(void) override {return "StatusBar";}
|
||||
const char *Name() override {return "StatusBar";}
|
||||
|
||||
friend class MainWindow;
|
||||
private:
|
||||
|
||||
@@ -136,7 +136,7 @@ MergeDocuments::~MergeDocuments()
|
||||
connectImport.disconnect();
|
||||
}
|
||||
|
||||
unsigned int MergeDocuments::getMemSize (void) const
|
||||
unsigned int MergeDocuments::getMemSize () const
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -41,7 +41,7 @@ class GuiExport MergeDocuments : public Base::Persistence
|
||||
public:
|
||||
MergeDocuments(App::Document* doc);
|
||||
~MergeDocuments();
|
||||
unsigned int getMemSize (void) const;
|
||||
unsigned int getMemSize () const;
|
||||
std::vector<App::DocumentObject*> importObjects(std::istream&);
|
||||
void importObject(const std::vector<App::DocumentObject*>& o, Base::XMLReader & r);
|
||||
void exportObject(const std::vector<App::DocumentObject*>& o, Base::Writer & w);
|
||||
|
||||
@@ -58,7 +58,7 @@ public:
|
||||
enum { Continue=0, Restart=1, Finish=2, Cancel=3, Ignore=4 };
|
||||
|
||||
AbstractMouseSelection();
|
||||
virtual ~AbstractMouseSelection(void) {}
|
||||
virtual ~AbstractMouseSelection() {}
|
||||
/// implement this in derived classes
|
||||
virtual void initialize() = 0;
|
||||
/// implement this in derived classes
|
||||
|
||||
@@ -414,7 +414,7 @@ StdCmdDownloadOnlineHelp::~StdCmdDownloadOnlineHelp()
|
||||
delete wget;
|
||||
}
|
||||
|
||||
Action * StdCmdDownloadOnlineHelp::createAction(void)
|
||||
Action * StdCmdDownloadOnlineHelp::createAction()
|
||||
{
|
||||
Action *pcAction;
|
||||
|
||||
|
||||
+3
-3
@@ -138,11 +138,11 @@ public:
|
||||
void clicked(int id);
|
||||
|
||||
void open();
|
||||
bool isAllowedAlterDocument(void) const
|
||||
bool isAllowedAlterDocument() const
|
||||
{ return true; }
|
||||
bool isAllowedAlterView(void) const
|
||||
bool isAllowedAlterView() const
|
||||
{ return true; }
|
||||
bool isAllowedAlterSelection(void) const
|
||||
bool isAllowedAlterSelection() const
|
||||
{ return true; }
|
||||
QDialogButtonBox::StandardButtons getStandardButtons() const;
|
||||
|
||||
|
||||
@@ -148,7 +148,7 @@ void PreferenceUiForm::changeEvent(QEvent *e)
|
||||
}
|
||||
|
||||
template <typename PW>
|
||||
void PreferenceUiForm::loadPrefWidgets(void)
|
||||
void PreferenceUiForm::loadPrefWidgets()
|
||||
{
|
||||
QList<PW> pw = form->findChildren<PW>();
|
||||
for (typename QList<PW>::iterator it = pw.begin(); it != pw.end(); ++it)
|
||||
@@ -156,7 +156,7 @@ void PreferenceUiForm::loadPrefWidgets(void)
|
||||
}
|
||||
|
||||
template <typename PW>
|
||||
void PreferenceUiForm::savePrefWidgets(void)
|
||||
void PreferenceUiForm::savePrefWidgets()
|
||||
{
|
||||
QList<PW> pw = form->findChildren<PW>();
|
||||
for (typename QList<PW>::iterator it = pw.begin(); it != pw.end(); ++it)
|
||||
|
||||
+10
-11
@@ -190,8 +190,8 @@ PyObject* InteractiveInterpreter::compile(const char* source) const
|
||||
PyObject* eval = PyObject_CallObject(func,args); // must decref later
|
||||
#endif
|
||||
|
||||
Py_DECREF(args);
|
||||
Py_DECREF(func);
|
||||
Py_XDECREF(args);
|
||||
Py_XDECREF(func);
|
||||
|
||||
if (eval){
|
||||
return eval;
|
||||
@@ -356,11 +356,10 @@ void InteractiveInterpreter::runCode(PyCodeObject* code) const
|
||||
*/
|
||||
bool InteractiveInterpreter::push(const char* line)
|
||||
{
|
||||
d->buffer.append(QString::fromLatin1(line));
|
||||
d->buffer.append(QString::fromUtf8(line));
|
||||
QString source = d->buffer.join(QLatin1String("\n"));
|
||||
try {
|
||||
// Source is already UTF-8, so we can use toLatin1()
|
||||
bool more = runSource(source.toLatin1());
|
||||
bool more = runSource(source.toUtf8());
|
||||
if (!more)
|
||||
d->buffer.clear();
|
||||
return more;
|
||||
@@ -378,7 +377,7 @@ bool InteractiveInterpreter::push(const char* line)
|
||||
return false;
|
||||
}
|
||||
|
||||
bool InteractiveInterpreter::hasPendingInput( void ) const
|
||||
bool InteractiveInterpreter::hasPendingInput( ) const
|
||||
{
|
||||
return (!d->buffer.isEmpty());
|
||||
}
|
||||
@@ -1083,7 +1082,7 @@ void PythonConsole::insertFromMimeData (const QMimeData * source)
|
||||
}
|
||||
}
|
||||
|
||||
QTextCursor PythonConsole::inputBegin(void) const
|
||||
QTextCursor PythonConsole::inputBegin() const
|
||||
{
|
||||
// construct cursor at begin of input line ...
|
||||
QTextCursor inputLineBegin(this->textCursor());
|
||||
@@ -1362,7 +1361,7 @@ void PythonConsole::onCopyCommand()
|
||||
d->type = PythonConsoleP::Normal;
|
||||
}
|
||||
|
||||
QString PythonConsole::readline( void )
|
||||
QString PythonConsole::readline( )
|
||||
{
|
||||
QEventLoop loop;
|
||||
// output is set to the current prompt which we need to extract
|
||||
@@ -1575,7 +1574,7 @@ const QStringList& ConsoleHistory::values() const
|
||||
/**
|
||||
* restart resets the history access to the latest item.
|
||||
*/
|
||||
void ConsoleHistory::restart( void )
|
||||
void ConsoleHistory::restart( )
|
||||
{
|
||||
_it = _history.end();
|
||||
}
|
||||
@@ -1585,7 +1584,7 @@ void ConsoleHistory::restart( void )
|
||||
* Note: with simply remembering a start index, it does not work to nest scratch regions.
|
||||
* However, just replace the index keeping by a stack - in case this is be a concern.
|
||||
*/
|
||||
void ConsoleHistory::markScratch( void )
|
||||
void ConsoleHistory::markScratch( )
|
||||
{
|
||||
_scratchBegin = _history.length();
|
||||
}
|
||||
@@ -1593,7 +1592,7 @@ void ConsoleHistory::markScratch( void )
|
||||
/**
|
||||
* doScratch removes the tail of the history list, starting from the index marked lately.
|
||||
*/
|
||||
void ConsoleHistory::doScratch( void )
|
||||
void ConsoleHistory::doScratch( )
|
||||
{
|
||||
if (_scratchBegin < _history.length())
|
||||
{
|
||||
|
||||
@@ -44,7 +44,7 @@ public:
|
||||
|
||||
bool push(const char*);
|
||||
int compileCommand(const char*) const;
|
||||
bool hasPendingInput( void ) const;
|
||||
bool hasPendingInput( ) const;
|
||||
void setBuffer(const QStringList&);
|
||||
QStringList getBuffer() const;
|
||||
void clearBuffer();
|
||||
@@ -78,8 +78,8 @@ public:
|
||||
void append(const QString &inputLine);
|
||||
const QStringList& values() const;
|
||||
void restart();
|
||||
void markScratch( void );
|
||||
void doScratch( void );
|
||||
void markScratch( );
|
||||
void doScratch( );
|
||||
|
||||
private:
|
||||
QStringList _history;
|
||||
@@ -110,7 +110,7 @@ public:
|
||||
|
||||
void OnChange( Base::Subject<const char*> &rCaller,const char* rcReason );
|
||||
void printStatement( const QString& cmd );
|
||||
QString readline( void );
|
||||
QString readline( );
|
||||
|
||||
public Q_SLOTS:
|
||||
void onSaveHistoryAs();
|
||||
@@ -139,7 +139,7 @@ protected:
|
||||
bool canInsertFromMimeData ( const QMimeData * source ) const;
|
||||
QMimeData * createMimeDataFromSelection () const;
|
||||
void insertFromMimeData ( const QMimeData * source );
|
||||
QTextCursor inputBegin( void ) const;
|
||||
QTextCursor inputBegin( ) const;
|
||||
|
||||
private:
|
||||
void runSource(const QString&);
|
||||
@@ -153,7 +153,7 @@ private:
|
||||
void saveHistory() const;
|
||||
|
||||
Q_SIGNALS:
|
||||
void pendingSource( void );
|
||||
void pendingSource( );
|
||||
|
||||
private:
|
||||
struct PythonConsoleP* d;
|
||||
|
||||
@@ -45,7 +45,7 @@ private:
|
||||
PythonConsole* pyConsole;
|
||||
|
||||
public:
|
||||
static void init_type(void); // announce properties and methods
|
||||
static void init_type(); // announce properties and methods
|
||||
|
||||
PythonStdout(PythonConsole *pc);
|
||||
~PythonStdout();
|
||||
@@ -71,7 +71,7 @@ private:
|
||||
PythonConsole* pyConsole;
|
||||
|
||||
public:
|
||||
static void init_type(void); // announce properties and methods
|
||||
static void init_type(); // announce properties and methods
|
||||
|
||||
PythonStderr(PythonConsole *pc);
|
||||
~PythonStderr();
|
||||
@@ -94,7 +94,7 @@ public:
|
||||
class OutputStdout : public Py::PythonExtension<OutputStdout>
|
||||
{
|
||||
public:
|
||||
static void init_type(void); // announce properties and methods
|
||||
static void init_type(); // announce properties and methods
|
||||
|
||||
OutputStdout();
|
||||
~OutputStdout();
|
||||
@@ -117,7 +117,7 @@ public:
|
||||
class OutputStderr : public Py::PythonExtension<OutputStderr>
|
||||
{
|
||||
public:
|
||||
static void init_type(void); // announce properties and methods
|
||||
static void init_type(); // announce properties and methods
|
||||
|
||||
OutputStderr();
|
||||
~OutputStderr();
|
||||
@@ -139,7 +139,7 @@ private:
|
||||
PythonConsole* pyConsole;
|
||||
|
||||
public:
|
||||
static void init_type(void); // announce properties and methods
|
||||
static void init_type(); // announce properties and methods
|
||||
|
||||
PythonStdin(PythonConsole *pc);
|
||||
~PythonStdin();
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user