-// Copyright (C) 2007-2016 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2023 CEA/DEN, EDF R&D, OPEN CASCADE
//
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
//============================================================================
NoteBook_TableRow::NoteBook_TableRow(int index, NoteBook_Table* parentTable, QWidget* parent):
QWidget(parent),
- myParentTable(parentTable),
myIndex(index),
+ myParentTable(parentTable),
myRowHeader(new QTableWidgetItem()),
myVariableName(new QTableWidgetItem()),
myVariableValue(new QTableWidgetItem())
* The whole notebook is verified on apply
*/
//============================================================================
-bool NoteBook_TableRow::IsValidStringValue(const QString theValue)
+bool NoteBook_TableRow::IsValidStringValue(const QString /*theValue*/)
{
int aNumRows = myParentTable->myRows.count();
if( aNumRows == 0 )
//Add all variables into the table
std::vector<std::string> aVariables = SalomeApp_Application::getStudy()->GetVariableNames();
- for(int iVar = 0; iVar < aVariables.size(); iVar++ ) {
+ for(int iVar = 0; iVar < (int)aVariables.size(); iVar++ ) {
AddRow(QString(aVariables[iVar].c_str()),
Variable2String(aVariables[iVar]));
}
if( myVariableMap.contains( anIndex ) )
{
const NoteBoox_Variable& aVariable = myVariableMap[ anIndex ];
- if( !aVariable.Name.isEmpty() && SalomeApp_Application::getStudy()->IsVariableUsed( std::string( aVariable.Name.toLatin1().constData() ) ) )
+ if( !aVariable.Name.isEmpty() && SalomeApp_Application::getStudy()->IsVariableUsed( std::string( aVariable.Name.toUtf8().constData() ) ) )
{
if( QMessageBox::warning( parentWidget(), tr( "WARNING" ),
tr( "RENAME_VARIABLE_IS_USED" ).arg( aVariable.Name ),
else {
int nRow = row(aSelectedItems[i]);
- if( aStudy->IsVariableUsed( std::string( aRow->GetName().toLatin1().constData() ) ) )
+ if( aStudy->IsVariableUsed( std::string( aRow->GetName().toUtf8().constData() ) ) )
{
if( QMessageBox::warning( parentWidget(), tr( "WARNING" ),
tr( "REMOVE_VARIABLE_IS_USED" ).arg( aRow->GetName() ),
myVariableMap.remove( index );
removeRow(nRow);
myRows.removeAt(nRow);
- if(aStudy->IsVariable(aVarName.toLatin1().constData()))
+ if(aStudy->IsVariable(aVarName.toUtf8().constData()))
removedFromStudy = true;
}
}
* Purpose : [slot]
*/
//============================================================================
-void SalomeApp_NoteBook::onVarUpdate(QString theVarName)
+void SalomeApp_NoteBook::onVarUpdate(QString /*theVarName*/)
{
myTable->Init();
}
if( aVariableMapRef.contains( anIndex ) )
{
QString aRemovedVariable = aVariableMapRef[ anIndex ].Name;
- aStudy->RemoveVariable( std::string( aRemovedVariable.toLatin1().constData() ) );
+ aStudy->RemoveVariable( std::string( aRemovedVariable.toUtf8().constData() ) );
}
}
if( !aNameRef.isEmpty() && !aValueRef.isEmpty() && aNameRef != aName )
{
- aStudy->RenameVariable( std::string( aNameRef.toLatin1().constData() ),
- std::string( aName.toLatin1().constData() ) );
+ aStudy->RenameVariable( std::string( aNameRef.toUtf8().constData() ),
+ std::string( aName.toUtf8().constData() ) );
}
}
if( NoteBook_TableRow::IsIntegerValue(aValue,&anIVal) )
- aStudy->SetInteger(std::string(aName.toLatin1().constData()),anIVal);
+ aStudy->SetInteger(std::string(aName.toUtf8().constData()),anIVal);
else if( NoteBook_TableRow::IsRealValue(aValue,&aDVal) )
- aStudy->SetReal(std::string(aName.toLatin1().constData()),aDVal);
+ aStudy->SetReal(std::string(aName.toUtf8().constData()),aDVal);
else if( NoteBook_TableRow::IsBooleanValue(aValue,&aBVal) )
- aStudy->SetBoolean(std::string(aName.toLatin1().constData()),aBVal);
+ aStudy->SetBoolean(std::string(aName.toUtf8().constData()),aBVal);
else
- aStudy->SetString(std::string(aName.toLatin1().constData()),aValue.toStdString());
+ aStudy->SetString(std::string(aName.toUtf8().constData()),aValue.toStdString());
}
}
myTable->ResetMaps();