X-Git-Url: http://git.salome-platform.org/gitweb/?p=modules%2Fsmesh.git;a=blobdiff_plain;f=src%2FSMESHGUI%2FSMESHGUI_Operation.cxx;h=5ed8957ebd9372c9e38aa47a61a207d4c8ba8583;hp=95c3c5ce12d1d604710fcd46fe1c800e89ba951e;hb=6650dea1f85dd5c640829d6e0391d703a304a152;hpb=79b1ac2b6df9117f16f11d444b1f165d477a1813 diff --git a/src/SMESHGUI/SMESHGUI_Operation.cxx b/src/SMESHGUI/SMESHGUI_Operation.cxx index 95c3c5ce1..5ed8957eb 100755 --- a/src/SMESHGUI/SMESHGUI_Operation.cxx +++ b/src/SMESHGUI/SMESHGUI_Operation.cxx @@ -1,39 +1,46 @@ -// SMESH SMDS : implementaion of Salome mesh data structure +// Copyright (C) 2007-2010 CEA/DEN, EDF R&D, OPEN CASCADE +// +// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +// +// This library is free software; you can redistribute it and/or +// modify it under the terms of the GNU Lesser General Public +// License as published by the Free Software Foundation; either +// version 2.1 of the License. +// +// This library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public +// License along with this library; if not, write to the Free Software +// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA // -// Copyright (C) 2003 OPEN CASCADE -// -// This library is free software; you can redistribute it and/or -// modify it under the terms of the GNU Lesser General Public -// License as published by the Free Software Foundation; either -// version 2.1 of the License. -// -// This library is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -// Lesser General Public License for more details. -// -// You should have received a copy of the GNU Lesser General Public -// License along with this library; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -// // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // -// File : SMESHGUI_Operation.h -// Author : Sergey LITONIN -// Module : SALOME +// SMESH SMDS : implementaion of Salome mesh data structure +// File : SMESHGUI_Operation.cxx +// Author : Sergey LITONIN, Open CASCADE S.A.S. +// SMESH includes +// #include "SMESHGUI_Operation.h" -#include -#include +#include "SMESHGUI.h" +#include "SMESHGUI_Dialog.h" + +// SALOME GUI includes #include #include #include #include #include +#include -#include +// Qt includes +#include /* Class : SMESHGUI_Operation @@ -113,8 +120,8 @@ bool SMESHGUI_Operation::isReadyToStart() const return false; else if ( getSMESHGUI() == 0 ) { - SUIT_MessageBox::warn1( desktop(), tr( "SMESH_WRN_WARNING" ), - tr( "NO_MODULE" ), tr( "SMESH_BUT_OK" ) ); + SUIT_MessageBox::warning( desktop(), tr( "SMESH_WRN_WARNING" ), + tr( "NO_MODULE" ) ); return false; } else if ( isStudyLocked() ) @@ -187,16 +194,17 @@ void SMESHGUI_Operation::onHelp() if (app) app->onHelpContextModule(getSMESHGUI() ? app->moduleName(getSMESHGUI()->moduleName()) : QString(""), myHelpFileName); else { - QString platform; + QString platform; #ifdef WIN32 - platform = "winapplication"; + platform = "winapplication"; #else - platform = "application"; + platform = "application"; #endif - SUIT_MessageBox::warn1(0, QObject::tr("WRN_WARNING"), - QObject::tr("EXTERNAL_BROWSER_CANNOT_SHOW_PAGE"). - arg(app->resourceMgr()->stringValue("ExternalBrowser", platform)).arg(myHelpFileName), - QObject::tr("BUT_OK")); + SUIT_MessageBox::warning( desktop(), tr("WRN_WARNING"), + tr("EXTERNAL_BROWSER_CANNOT_SHOW_PAGE"). + arg(app->resourceMgr()->stringValue("ExternalBrowser", + platform)). + arg(myHelpFileName) ); } } @@ -223,8 +231,8 @@ bool SMESHGUI_Operation::isStudyLocked( const bool theMess ) const if ( studyDS()->GetProperties()->IsLocked() ) { if ( theMess ) - SUIT_MessageBox::warn1 ( SMESHGUI::desktop(), QObject::tr( "WRN_WARNING" ), - QObject::tr( "WRN_STUDY_LOCKED" ), QObject::tr( "BUT_OK" ) ); + SUIT_MessageBox::warning( SMESHGUI::desktop(), tr( "WRN_WARNING" ), + tr( "WRN_STUDY_LOCKED" ) ); return true; } } @@ -252,19 +260,8 @@ bool SMESHGUI_Operation::isValid( SUIT_Operation* theOtherOp ) const } return theOtherOp && theOtherOp->inherits( "SMESHGUI_Operation" ) && - ( !anOps.contains( theOtherOp->className() ) || anOps.contains( className() ) ); + ( !anOps.contains( theOtherOp->metaObject()->className() ) || + anOps.contains( metaObject()->className() ) ); return true; } - - - - - - - - - - - -