Subversion Repositories Scribus

Compare Revisions

Ignore whitespace Rev 21880 → Rev 21881

/trunk/Scribus/scribus/ui/colorlistmodel.cpp
47,6 → 47,30
return pColorValue->m_name;
}
 
if (role == Qt::ToolTipRole)
{
const ScColor& color = pColorValue->m_color;
if (color.getColorModel() == colorModelRGB)
{
int r, g, b;
color.getRawRGBColor(&r, &g, &b);
return QString("R:%1 G:%2 B:%3").arg(r).arg(g).arg(b);
}
else if (color.getColorModel() == colorModelCMYK)
{
int c, m, y, k;
color.getCMYK(&c, &m, &y, &k);
return QString("C:%1% M:%2% Y:%3% K:%4%").arg(qRound(c / 2.55)).arg(qRound(m / 2.55)).arg(qRound(y / 2.55)).arg(qRound(k / 2.55));
}
else if (color.getColorModel() == colorModelLab)
{
double L, a, b;
color.getLab(&L, &a, &b);
return QString("L:%1% a:%2% b:%3%").arg(L, 0, 'f', 2).arg(a, 0, 'f', 2).arg(b, 0, 'f', 2);
}
return QVariant();
}
 
if (role == Qt::UserRole)
{
if (pColorValue->m_name == CommonStrings::None)