-// Copyright (C) 2009-2014 CEA/DEN, EDF R&D
+// Copyright (C) 2009-2024 CEA, EDF
//
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
{
if (anItemIndex.isValid())
{
- theModel->setData(anItemIndex, fgColor, Qt::ForegroundRole);
- theModel->setData(anItemIndex, bgColor, Qt::BackgroundRole);
+ theModel->setData(anItemIndex, QColor(fgColor), Qt::ForegroundRole);
+ theModel->setData(anItemIndex, QColor(bgColor), Qt::BackgroundRole);
currentHighlightedItems << anItemIndex;
}
}
{
if (anItemIndex.isValid())
{
- theModel->setData(anItemIndex, Qt::darkGreen, Qt::ForegroundRole);
- theModel->setData(anItemIndex, Qt::white, Qt::BackgroundRole);
+ theModel->setData(anItemIndex, QColor(Qt::darkGreen), Qt::ForegroundRole);
+ theModel->setData(anItemIndex, QColor(Qt::white), Qt::BackgroundRole);
}
}
currentHighlightedItems.clear();
{
if (anItemIndex.isValid())
{
- theModel->setData(anItemIndex, fgColor, Qt::ForegroundRole);
- theModel->setData(anItemIndex, bgColor, Qt::BackgroundRole);
+ theModel->setData(anItemIndex, QColor(fgColor), Qt::ForegroundRole);
+ theModel->setData(anItemIndex, QColor(bgColor), Qt::BackgroundRole);
currentHighlightedItems << anItemIndex;
}
}
{
if (anItemIndex.isValid())
{
- theModel->setData(anItemIndex, Qt::darkGreen, Qt::ForegroundRole);
- theModel->setData(anItemIndex, Qt::white, Qt::BackgroundRole);
+ theModel->setData(anItemIndex, QColor(Qt::darkGreen), Qt::ForegroundRole);
+ theModel->setData(anItemIndex, QColor(Qt::white), Qt::BackgroundRole);
}
}
currentHighlightedItems.clear();