return color;
}
-static QString colorToString(QColor color, bool alpha)
+static QString colorToString(const QColor &color, bool alpha)
{
QString colorStr;
QTextStream stream(&colorStr);
return colorStr;
}
-ChooseColorWidget::ChooseColorWidget(QString text, QString color, bool alphaEnabled, QWidget *parent) :
+ChooseColorWidget::ChooseColorWidget(const QString &text, const QString &color, bool alphaEnabled, QWidget *parent) :
QWidget(parent)
{
QHBoxLayout *layout = new QHBoxLayout(this);
connect(m_button, SIGNAL(changed(QColor)), this, SIGNAL(modified()));
}
-QString ChooseColorWidget::getColor()
+QString ChooseColorWidget::getColor() const
{
bool alphaChannel = false;
#if KDE_IS_VERSION(4,5,0)
return colorToString(m_button->color(), alphaChannel);
}
-void ChooseColorWidget::setColor(QColor color)
+void ChooseColorWidget::setColor(const QColor& color)
{
m_button->setColor(color);
}