-/**
-* SALOME SalomeApp
-*
-* Copyright (C) 2005 CEA/DEN, EDF R&D
-*
-*
-*
-* File : SUIT_Operation.h
-* Author : Unknown
-* Module : SALOME
-*/
+// Copyright (C) 2007-2024 CEA, EDF, 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, or (at your option) any later version.
+//
+// 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
+//
#include "SUIT_Operation.h"
#include "SUIT_Study.h"
-#include "SUIT_Desktop.h"
-#include "SUIT_MessageBox.h"
#include "SUIT_Application.h"
/*!
- * \brief Constructor
- * \param SUIT_Application - application for this operation
-*
-* Constructs an empty operation. Constructor should work very fast because many
-* operators may be created after starting application but only several from them
-* may be used. As result this constructor stores given application in myApp field
-* and set Waiting status.
+ \brief Constructor
+ \param SUIT_Application - application for this operation
+
+ Constructs an empty operation. Constructor should work very fast because many
+ operators may be created after starting application but only several from them
+ may be used. As result this constructor stores given application in myApp field
+ and set Waiting status.
*/
SUIT_Operation::SUIT_Operation( SUIT_Application* app )
: QObject(),
myApp( app ),
+myFlags( Transaction ),
myStudy( 0 ),
-myState( Waiting ),
-myFlags( Transaction )
+myState( Waiting )
{
}
* \brief Test the flags of operation
* \param f - flags of operation to be tested
*
-* Returns TRUE if the specified flags setted in the operation (see Flags enumeration)
+* Returns \c true if the specified flags setted in the operation (see Flags enumeration)
*/
bool SUIT_Operation::testFlags( const int f ) const
{
*/
QString SUIT_Operation::operationName() const
{
- return QString::null;
+ return QString();
}
/*!
/*!
* \brief Verifies whether operator is ready to start.
- * \return TRUE if operation is ready to start
+ * \return \c true if operation is ready to start
*
-* Default implementation returns TRUE. Redefine this method to add own verifications
+* Default implementation returns \c true. Redefine this method to add own verifications
*/
bool SUIT_Operation::isReadyToStart() const
{
/*!
* \brief Sets slot which is called when operation is started
- * \param theReceiver - object containing slot
- * \param theSlot - slot of theReceiver object
- * \return TR if slot was connected successfully, FALSE otherwise
-*
-* Sets slot which is called when operation is started. There is no point in
-* using this method. It would be better to inherit own operator from base
-* one and redefine startOperation method
-*/
+ * \param theReceiver - object containing slot
+ * \param theSlot - slot of theReceiver object
+ * \return \c true if slot was connected successfully, \c false otherwise
+ *
+ * Sets slot which is called when operation is started. There is no point in
+ * using this method. It would be better to inherit own operator from base
+ * one and redefine startOperation method
+ */
bool SUIT_Operation::setSlot( const QObject* theReceiver, const char* theSlot )
{
return connect( this, SIGNAL( callSlot() ), theReceiver, theSlot );
/*!
* \brief Verifies whether given operator is valid for this one
* \param theOtherOp - other operation
- * \return Returns TRUE if the given operator is valid for this one
+ * \return Returns \c true if the given operator is valid for this one
*
* Verifies whether given operator is valid for this one (i.e. can be started "above"
* this operator)
/*!
* \brief Verifies whether this operator can be always started above any already runnig one
- * \return Returns TRUE if current operation must not be checked for ActiveOperation->IsValid( this )
+ * \return Returns \c true if current operation must not be checked for ActiveOperation->IsValid( this )
*
* This method must be redefined in derived operation if operation of derived class
-* must be always can start above any launched one. Default implementation returns FALSE,
+* must be always can start above any launched one. Default implementation returns \c false,
* so it is being checked for IsValid, but some operations may overload IsGranted()
* In this case they will always start, no matter what operation is running.
*/
/*!
* \brief Verifies whether operation is an runned one (state()==Running)
- * \return TRUE if operation is active, FALSE otherwise
+ * \return \c true if operation is active, \c false otherwise
*
-* Verifies whether operation is an running. Returns TRUE if state of operator
+* Verifies whether operation is an running. Returns \c true if state of operator
* is Running
*/
bool SUIT_Operation::isRunning() const
/*!
* \brief Verifies whether operation is an active for study.
- * \return TRUE if operation is active, FALSE otherwise
+ * \return \c true if operation is active, \c false otherwise
*
-* Verifies whether operation is an active on. Returns TRUE if this operator
+* Verifies whether operation is an active on. Returns \c true if this operator
* is active for study
*/
bool SUIT_Operation::isActive() const
return;
if ( study() )
- study()->start( op, false );
+ study()->start( op, check );
else
{
connect( this, SIGNAL( stopped( SUIT_Operation* ) ), op, SLOT( abort() ) );
}
/*!
- * \brief Returns TRUE if transaction is opened.
+ * \brief Returns \c true if transaction is opened.
*/
bool SUIT_Operation::hasTransaction() const
{