X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?a=blobdiff_plain;f=vv%2FvvToolCreatorBase.cxx;h=075e3352913d6ed59123d7aa866e21cd35b0e5a1;hb=a0bcf3084e5092bb1beccdbed6b2710f839346d9;hp=bb10c0f5922f865f9428adf49f838626970dd158;hpb=6d4c696c5443af116efb9bb5b7a202bdf0104281;p=clitk.git diff --git a/vv/vvToolCreatorBase.cxx b/vv/vvToolCreatorBase.cxx index bb10c0f..075e335 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,11 +22,13 @@ #include //------------------------------------------------------------------------------ -vvToolCreatorBase::vvToolCreatorBase(QString name): mExperimental(false) +vvToolCreatorBase::vvToolCreatorBase(QString name): mAction(NULL), mExperimental(false) { mUseContextMenu = false; mToolName = name; m_MenuName = "Tools"; + mReadStateFlag = false; + mImageIndex = 0; vvToolManager::GetInstance()->AddTool(this); } //------------------------------------------------------------------------------ @@ -51,9 +53,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()));