From 0dd5f149181789b5c15dad13496be8c41c37966a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Stefan=20Tr=C3=B6ger?= Date: Sun, 30 Jul 2017 15:17:41 +0200 Subject: [PATCH] Add new icons for Part and Group --- src/Gui/CommandStructure.cpp | 4 +- src/Gui/Icons/Geofeaturegroup.svg | 548 ++++++++++++++++++++ src/Gui/Icons/Group.svg | 548 ++++++++++++++++++++ src/Gui/Icons/resource.qrc | 2 + src/Gui/ViewProviderDocumentObjectGroup.cpp | 15 +- src/Gui/ViewProviderDocumentObjectGroup.h | 1 - src/Gui/ViewProviderPart.cpp | 16 +- src/Gui/ViewProviderPart.h | 2 - 8 files changed, 1104 insertions(+), 32 deletions(-) create mode 100644 src/Gui/Icons/Geofeaturegroup.svg create mode 100644 src/Gui/Icons/Group.svg diff --git a/src/Gui/CommandStructure.cpp b/src/Gui/CommandStructure.cpp index eb1690bdf9..7a42dafa83 100644 --- a/src/Gui/CommandStructure.cpp +++ b/src/Gui/CommandStructure.cpp @@ -49,7 +49,7 @@ StdCmdPart::StdCmdPart() sToolTipText = QT_TR_NOOP("Create a new part and make it active"); sWhatsThis = sToolTipText; sStatusTip = sToolTipText; - sPixmap = "Tree_Annotation"; + sPixmap = "Geofeaturegroup.svg"; } void StdCmdPart::activated(int iMsg) @@ -89,7 +89,7 @@ StdCmdGroup::StdCmdGroup() sToolTipText = QT_TR_NOOP("Create a new group for ordering objects"); sWhatsThis = sToolTipText; sStatusTip = sToolTipText; - sPixmap = "Tree_Annotation"; + sPixmap = "Group.svg"; } void StdCmdGroup::activated(int iMsg) diff --git a/src/Gui/Icons/Geofeaturegroup.svg b/src/Gui/Icons/Geofeaturegroup.svg new file mode 100644 index 0000000000..3e2d643879 --- /dev/null +++ b/src/Gui/Icons/Geofeaturegroup.svg @@ -0,0 +1,548 @@ + + + + + + image/svg+xml + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/Gui/Icons/Group.svg b/src/Gui/Icons/Group.svg new file mode 100644 index 0000000000..c631372de0 --- /dev/null +++ b/src/Gui/Icons/Group.svg @@ -0,0 +1,548 @@ + + + + + + image/svg+xml + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/Gui/Icons/resource.qrc b/src/Gui/Icons/resource.qrc index 9d3890449a..4c838926b4 100644 --- a/src/Gui/Icons/resource.qrc +++ b/src/Gui/Icons/resource.qrc @@ -153,6 +153,8 @@ colors.svg px.svg AddonManager.svg + Group.svg + Geofeaturegroup.svg diff --git a/src/Gui/ViewProviderDocumentObjectGroup.cpp b/src/Gui/ViewProviderDocumentObjectGroup.cpp index 6b450b0609..a86f30104e 100644 --- a/src/Gui/ViewProviderDocumentObjectGroup.cpp +++ b/src/Gui/ViewProviderDocumentObjectGroup.cpp @@ -59,6 +59,8 @@ ViewProviderDocumentObjectGroup::ViewProviderDocumentObjectGroup() setDefaultMode(SO_SWITCH_ALL); #endif ViewProviderGroupExtension::initExtension(this); + + sPixmap = "Group.svg"; } ViewProviderDocumentObjectGroup::~ViewProviderDocumentObjectGroup() @@ -94,19 +96,6 @@ void ViewProviderDocumentObjectGroup::getViewProviders(std::vectorstandardPixmap(QStyle::SP_DirClosedIcon), - QIcon::Normal, QIcon::Off); - groupIcon.addPixmap(QApplication::style()->standardPixmap(QStyle::SP_DirOpenIcon), - QIcon::Normal, QIcon::On); - return groupIcon; -} - // Python feature ----------------------------------------------------------------------- diff --git a/src/Gui/ViewProviderDocumentObjectGroup.h b/src/Gui/ViewProviderDocumentObjectGroup.h index 9a6d85ed3a..f0d19fa75a 100644 --- a/src/Gui/ViewProviderDocumentObjectGroup.h +++ b/src/Gui/ViewProviderDocumentObjectGroup.h @@ -42,7 +42,6 @@ public: /// destructor. virtual ~ViewProviderDocumentObjectGroup(); - QIcon getIcon(void) const; /// returns a list of all possible modes std::vector getDisplayModes(void) const; bool isShow(void) const; diff --git a/src/Gui/ViewProviderPart.cpp b/src/Gui/ViewProviderPart.cpp index 525c69ab68..4171b78a51 100644 --- a/src/Gui/ViewProviderPart.cpp +++ b/src/Gui/ViewProviderPart.cpp @@ -52,6 +52,8 @@ PROPERTY_SOURCE_WITH_EXTENSIONS(Gui::ViewProviderPart, Gui::ViewProviderDocument ViewProviderPart::ViewProviderPart() { initExtension(this); + + sPixmap = "Geofeaturegroup.svg"; } ViewProviderPart::~ViewProviderPart() @@ -96,20 +98,6 @@ bool ViewProviderPart::doubleClicked(void) return true; } -/** - * Returns the pixmap for the list item. - */ -QIcon ViewProviderPart::getIcon() const -{ - // TODO Make a nice icon for the part (2015-09-01, Fat-Zer) - QIcon groupIcon; - groupIcon.addPixmap(QApplication::style()->standardPixmap(QStyle::SP_DirClosedIcon), - QIcon::Normal, QIcon::Off); - groupIcon.addPixmap(QApplication::style()->standardPixmap(QStyle::SP_DirOpenIcon), - QIcon::Normal, QIcon::On); - return groupIcon; -} - // Python feature ----------------------------------------------------------------------- namespace Gui { diff --git a/src/Gui/ViewProviderPart.h b/src/Gui/ViewProviderPart.h index a418aa9d59..8cdf55034b 100644 --- a/src/Gui/ViewProviderPart.h +++ b/src/Gui/ViewProviderPart.h @@ -42,8 +42,6 @@ public: /// destructor. virtual ~ViewProviderPart(); - QIcon getIcon(void) const; - virtual bool doubleClicked(void); protected: /// get called by the container whenever a property has been changed