diff options
author | Alessandro Portale <[email protected]> | 2017-06-12 18:27:57 +0200 |
---|---|---|
committer | Alessandro Portale <[email protected]> | 2017-06-13 09:53:28 +0000 |
commit | a1d4b63f8d13cd7afe676c3673b752a50820d614 (patch) | |
tree | 73ea507048b340cf6848ceb8b6b7daec30bc61f0 /src/libs/cplusplus | |
parent | be42d40c44abc8ce4ddf672ab25810705e1b2809 (diff) |
CPlusPlus: Add a property icon
Properties have been so useful in Qt for Years, and they will
continue being so. Properties deserve a proper icon.
Change-Id: Ifd19c97470a48a033bbe4017855f7b150befb365
Reviewed-by: Nikolai Kosjar <[email protected]>
Reviewed-by: Ivan Donchevskii <[email protected]>
Diffstat (limited to 'src/libs/cplusplus')
-rw-r--r-- | src/libs/cplusplus/Icons.cpp | 12 | ||||
-rw-r--r-- | src/libs/cplusplus/Icons.h | 1 | ||||
-rw-r--r-- | src/libs/cplusplus/cplusplus.qrc | 4 | ||||
-rw-r--r-- | src/libs/cplusplus/images/property.png | bin | 0 -> 148 bytes | |||
-rw-r--r-- | src/libs/cplusplus/images/[email protected] | bin | 0 -> 133 bytes | |||
-rw-r--r-- | src/libs/cplusplus/images/propertybackground.png | bin | 0 -> 131 bytes | |||
-rw-r--r-- | src/libs/cplusplus/images/[email protected] | bin | 0 -> 187 bytes |
7 files changed, 17 insertions, 0 deletions
diff --git a/src/libs/cplusplus/Icons.cpp b/src/libs/cplusplus/Icons.cpp index 27e4b92d09f..5e5297b4030 100644 --- a/src/libs/cplusplus/Icons.cpp +++ b/src/libs/cplusplus/Icons.cpp @@ -107,6 +107,8 @@ Icons::IconType Icons::iconTypeForSymbol(const Symbol *symbol) return NamespaceIconType; } else if (symbol->isTypenameArgument()) { return ClassIconType; + } else if (symbol->isQtPropertyDeclaration() || symbol->isObjCPropertyDeclaration()) { + return PropertyIconType; } else if (symbol->isUsingNamespaceDirective() || symbol->isUsingDeclaration()) { // TODO: Might be nice to have a different icons for these things @@ -136,6 +138,10 @@ QIcon Icons::iconForType(IconType type) QLatin1String(":/codemodel/images/signal.png"), Theme::IconsCodeModelFunctionColor}; static const IconMaskAndColor slotIcon { QLatin1String(":/codemodel/images/slot.png"), Theme::IconsCodeModelFunctionColor}; + static const IconMaskAndColor propertyIcon { + QLatin1String(":/codemodel/images/property.png"), Theme::IconsCodeModelOverlayForegroundColor}; + static const IconMaskAndColor propertyBackgroundIcon { + QLatin1String(":/codemodel/images/propertybackground.png"), Theme::IconsCodeModelOverlayBackgroundColor}; static const IconMaskAndColor protectedIcon { QLatin1String(":/codemodel/images/protected.png"), Theme::IconsCodeModelOverlayForegroundColor}; static const IconMaskAndColor protectedBackgroundIcon { @@ -291,6 +297,12 @@ QIcon Icons::iconForType(IconType type) }, Icon::Tint).icon()); return icon; } + case PropertyIconType: { + const static QIcon icon(Icon({ + variableIcon, propertyBackgroundIcon, propertyIcon + }, Icon::Tint).icon()); + return icon; + } default: break; } diff --git a/src/libs/cplusplus/Icons.h b/src/libs/cplusplus/Icons.h index 2b8ce0beeed..a5aaa33d601 100644 --- a/src/libs/cplusplus/Icons.h +++ b/src/libs/cplusplus/Icons.h @@ -65,6 +65,7 @@ public: SlotPrivateIconType, KeywordIconType, MacroIconType, + PropertyIconType, UnknownIconType }; diff --git a/src/libs/cplusplus/cplusplus.qrc b/src/libs/cplusplus/cplusplus.qrc index 32d9a712495..357db691c0b 100644 --- a/src/libs/cplusplus/cplusplus.qrc +++ b/src/libs/cplusplus/cplusplus.qrc @@ -18,6 +18,10 @@ <file>images/[email protected]</file> <file>images/privatebackground.png</file> <file>images/[email protected]</file> + <file>images/property.png</file> + <file>images/[email protected]</file> + <file>images/propertybackground.png</file> + <file>images/[email protected]</file> <file>images/protected.png</file> <file>images/[email protected]</file> <file>images/protectedbackground.png</file> diff --git a/src/libs/cplusplus/images/property.png b/src/libs/cplusplus/images/property.png Binary files differnew file mode 100644 index 00000000000..e3f2244ca58 --- /dev/null +++ b/src/libs/cplusplus/images/property.png diff --git a/src/libs/cplusplus/images/[email protected] b/src/libs/cplusplus/images/[email protected] Binary files differnew file mode 100644 index 00000000000..9e5b80909eb --- /dev/null +++ b/src/libs/cplusplus/images/[email protected] diff --git a/src/libs/cplusplus/images/propertybackground.png b/src/libs/cplusplus/images/propertybackground.png Binary files differnew file mode 100644 index 00000000000..7766b9fe82d --- /dev/null +++ b/src/libs/cplusplus/images/propertybackground.png diff --git a/src/libs/cplusplus/images/[email protected] b/src/libs/cplusplus/images/[email protected] Binary files differnew file mode 100644 index 00000000000..05572902186 --- /dev/null +++ b/src/libs/cplusplus/images/[email protected] |