From ea93a2f76d9aec379fcfd7e134d1206df1a5aab6 Mon Sep 17 00:00:00 2001 From: wmayer Date: Sun, 19 Mar 2023 21:53:15 +0100 Subject: [PATCH] Gui: add image icon resources --- src/Gui/CommandView.cpp | 2 +- src/Gui/Icons/image-open.svg | 480 +++++++++++++++++++++++++ src/Gui/Icons/image-plane.svg | 557 +++++++++++++++++++++++++++++ src/Gui/Icons/image-scaling.svg | 349 ++++++++++++++++++ src/Gui/Icons/resource.qrc | 3 + src/Gui/ImageView.cpp | 2 + src/Gui/ViewProviderImagePlane.cpp | 2 + 7 files changed, 1394 insertions(+), 1 deletion(-) create mode 100644 src/Gui/Icons/image-open.svg create mode 100644 src/Gui/Icons/image-plane.svg create mode 100644 src/Gui/Icons/image-scaling.svg diff --git a/src/Gui/CommandView.cpp b/src/Gui/CommandView.cpp index f2005234a8..8ef15b3530 100644 --- a/src/Gui/CommandView.cpp +++ b/src/Gui/CommandView.cpp @@ -1984,7 +1984,7 @@ StdViewLoadImage::StdViewLoadImage() sToolTipText= QT_TR_NOOP("Loads a image"); sWhatsThis = "Std_ViewLoadPicture"; sStatusTip = QT_TR_NOOP("Loads a image"); - //sPixmap = "camera-photo"; + sPixmap = "image-open"; eType = 0; } diff --git a/src/Gui/Icons/image-open.svg b/src/Gui/Icons/image-open.svg new file mode 100644 index 0000000000..6f199ddda2 --- /dev/null +++ b/src/Gui/Icons/image-open.svg @@ -0,0 +1,480 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + image/svg+xml + + + + Mon Oct 10 13:44:52 2011 +0000 + + + [wmayer] + + + + + FreeCAD LGPL2+ + + + + + FreeCAD + + + FreeCAD/src/Mod/Draft/Resources/icons/Draft_Macro.svg + http://www.freecadweb.org/wiki/index.php?title=Artwork + + + [agryson] Alexander Gryson + + + + + flower + macro + + + A two leaved flower, similar in form to a tulip + + + + diff --git a/src/Gui/Icons/image-plane.svg b/src/Gui/Icons/image-plane.svg new file mode 100644 index 0000000000..84b26a34d9 --- /dev/null +++ b/src/Gui/Icons/image-plane.svg @@ -0,0 +1,557 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + image/svg+xml + + + + Mon Oct 10 13:44:52 2011 +0000 + + + [wmayer] + + + + + FreeCAD LGPL2+ + + + + + FreeCAD + + + FreeCAD/src/Mod/Draft/Resources/icons/Draft_Drawing.svg + http://www.freecadweb.org/wiki/index.php?title=Artwork + + + [agryson] Alexander Gryson + + + + + arrow + page + shapes + + + An arrow pointing from left to right onto a page with shapes drawn on it + + + + diff --git a/src/Gui/Icons/image-scaling.svg b/src/Gui/Icons/image-scaling.svg new file mode 100644 index 0000000000..501dd9b5f3 --- /dev/null +++ b/src/Gui/Icons/image-scaling.svg @@ -0,0 +1,349 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + image/svg+xml + + + + Mon Oct 10 13:44:52 2011 +0000 + + + [wmayer] + + + + + FreeCAD LGPL2+ + + + + + FreeCAD + + + FreeCAD/src/Mod/Draft/Resources/icons/Draft_Scale.svg + http://www.freecadweb.org/wiki/index.php?title=Artwork + + + [agryson] Alexander Gryson + + + + + square + arrow + dotted line + + + + A small square in the bottom left corner of a large dotted box with an arrow pointing from the top left corner of the inner box to the top left corner of the outer box + + + + diff --git a/src/Gui/Icons/resource.qrc b/src/Gui/Icons/resource.qrc index 39df69cbc5..90c3458461 100644 --- a/src/Gui/Icons/resource.qrc +++ b/src/Gui/Icons/resource.qrc @@ -255,6 +255,9 @@ Std_UserEditModeCutting.svg Std_UserEditModeColor.svg Warning.svg + image-open.svg + image-plane.svg + image-scaling.svg diff --git a/src/Gui/ImageView.cpp b/src/Gui/ImageView.cpp index 3f3cd7b60f..38059d36ac 100644 --- a/src/Gui/ImageView.cpp +++ b/src/Gui/ImageView.cpp @@ -43,6 +43,7 @@ #endif #include "ImageView.h" +#include "BitmapFactory.h" using namespace Gui; @@ -62,6 +63,7 @@ ImageView::ImageView(QWidget* parent) scrollArea->setVisible(false); setCentralWidget(scrollArea); setAcceptDrops(true); + setWindowIcon(Gui::BitmapFactory().pixmap("colors")); } bool ImageView::loadFile(const QString& fileName) diff --git a/src/Gui/ViewProviderImagePlane.cpp b/src/Gui/ViewProviderImagePlane.cpp index d3240272e4..34aebcca7c 100644 --- a/src/Gui/ViewProviderImagePlane.cpp +++ b/src/Gui/ViewProviderImagePlane.cpp @@ -54,6 +54,8 @@ ViewProviderImagePlane::ViewProviderImagePlane() pcCoords = new SoCoordinate3(); pcCoords->ref(); + + sPixmap = "image-plane"; } ViewProviderImagePlane::~ViewProviderImagePlane()