-// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE
+// 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
+// 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 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.
+// 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
+// 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
+// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
+
#include "SUIT_Study.h"
#include "SUIT_Desktop.h"
}
/*!
- *\retval TRUE - if study saved, else FALSE.
+ *\retval \c true - if study saved, else \c false.
*/
bool SUIT_Study::isSaved() const
{
}
/*!
- *\retval TRUE - if study modified, else FALSE.
+ *\retval \c true - if study modified, else \c false.
*/
bool SUIT_Study::isModified() const
{
}
/*!
- * Open document. Sets file name. return true.
+ * Open document. Sets file name. return \c true.
*/
bool SUIT_Study::openDocument( const QString& fileName )
{
}
/*!
- *\retval TRUE - if document saved successful, else FALSE.
+ *\retval \c true - if document saved successful, else \c false.
*/
bool SUIT_Study::saveDocument()
{
void SUIT_Study::abortAllOperations()
{
myBlockChangeState = true;
- for ( Operations::iterator it = myOperations.begin(); it != myOperations.end(); ++it )
+ while ( !myOperations.isEmpty() ) {
+ Operations::iterator it = myOperations.begin();
(*it)->abort();
+ }
myBlockChangeState = false;
myOperations.clear();
}
/*!
* \brief Starts operation
* \param theOp - operation to be started
- * \param toCheck - if parameters is equal TRUE then checking performed whether
+ * \param toCheck - if parameters is equal \c true then checking performed whether
* all already started operations allow to start this operation above them (default
- * value is TRUE
- * \return TRUE if operation is started, FALSE otherwise
+ * value is \c true
+ * \return \c true if operation is started, \c false otherwise
*
* Verifies whether theOp operation can be started above already started ones (if toCheck
-* parameter is equal TRUE) and starts it
+* parameter is equal \c true) and starts it
*/
bool SUIT_Study::start( SUIT_Operation* theOp, const bool toCheck )
{
{
int anAnsw = SUIT_MessageBox::question( application()->desktop(),
tr( "OPERATION_LAUNCH" ), tr( "PREVIOUS_NOT_FINISHED" ),
- tr( "CONTINUE" ), tr( "CANCEL" ) );
+ tr( "CONTINUE" ), tr( "CANCEL" ) );
if ( anAnsw == 1 )
return false;
/*!
* \brief Aborts operation
* \param theOp - operation to be aborted
- * \return TRUE if operation is aborted successfully
+ * \return \c true if operation is aborted successfully
*
* Verifies whether operation already started and aborts it in this case (sets execution
* status to Rejected and stops operation)
/*!
* \brief Commits operation
* \param theOp - operation to be committed
- * \return TRUE if operation is committed successfully
+ * \return \c true if operation is committed successfully
*
* Verifies whether operation already started and commits it in this case (sets execution
* status to Accepted and stops operation)
/*!
* \brief Commits operation
* \param theOp - operation to be committed
- * \return TRUE if operation is suspended successfully
+ * \return \c true if operation is suspended successfully
*
* Verifies whether operation already started and suspends it in this case. Operations
* ususlly are suspended to start other one above them.
/*!
* \brief Resumes operation
* \param theOp - operation to be resumed
- * \return TRUE if operation is aborted successfully
+ * \return \c true if operation is aborted successfully
*
* Verifies whether operation already started but suspended and resumesit in this case.
*/
}
/*!
- * \brief Returns TRUE if transaction is opened.
+ * \brief Returns \c true if transaction is opened.
*/
bool SUIT_Study::hasTransaction() const
{