X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?a=blobdiff_plain;f=vv%2FvvToolCreatorBase.cxx;h=f25926ca5d7f77cb23c72b9e8534167f9186f238;hb=763162847a349f22fd1f599210a082810973bef8;hp=bb10c0f5922f865f9428adf49f838626970dd158;hpb=6d4c696c5443af116efb9bb5b7a202bdf0104281;p=clitk.git diff --git a/vv/vvToolCreatorBase.cxx b/vv/vvToolCreatorBase.cxx index bb10c0f..f25926c 100644 --- a/vv/vvToolCreatorBase.cxx +++ b/vv/vvToolCreatorBase.cxx @@ -3,7 +3,7 @@ Authors belong to: - University of LYON http://www.universite-lyon.fr/ - - Léon Bérard cancer center http://oncora1.lyon.fnclcc.fr + - Léon Bérard cancer center http://www.centreleonberard.fr - CREATIS CNRS laboratory http://www.creatis.insa-lyon.fr This software is distributed WITHOUT ANY WARRANTY; without even @@ -14,7 +14,7 @@ - BSD See included LICENSE.txt file - CeCILL-B http://www.cecill.info/licences/Licence_CeCILL-B_V1-en.html -======================================================================-====*/ +===========================================================================**/ #include "vvToolCreatorBase.h" #include "vvToolManager.h" @@ -22,7 +22,7 @@ #include //------------------------------------------------------------------------------ -vvToolCreatorBase::vvToolCreatorBase(QString name): mExperimental(false) +vvToolCreatorBase::vvToolCreatorBase(QString name): mAction(NULL), mExperimental(false) { mUseContextMenu = false; mToolName = name; @@ -51,9 +51,12 @@ void vvToolCreatorBase::InsertToolInMenu(vvMainWindowBase * m) // Create main action if (mToolIconFilename == "noicon") mAction = new QAction(QString("&").append(mToolMenuName), this); - else + else { mAction = new QAction(QIcon(mToolIconFilename), QString("&").append(mToolMenuName), this); + mAction->setIconVisibleInMenu(true); + } + mAction->setStatusTip(mToolTip); // Connect the action connect(mAction, SIGNAL(triggered()), this, SLOT(MenuToolSlot()));