void NemoThemeTextField::setSelectionColor(const QColor &selectionColor)
{
    if (m_selectionColor != selectionColor) {
        m_selectionColor = selectionColor;
        emit selectionColorChanged();
    }
}
예제 #2
0
파일: cropping.cpp 프로젝트: tibob/yasw
//TODO: add a settings box to set size of resulting image.
Cropping::Cropping(QObject *parent)
{
    widget = new CroppingWidget();
    filterWidget = widget;
    connect(widget, SIGNAL(rectangleChanged()), this, SLOT(recalculate()));

    if (parent) {
        /* Connect slots to the filtercontainer */
        connect(parent, SIGNAL(selectionColorChanged(QColor)), widget, SLOT(setSelectionColor(QColor)));
    }
}
void QDeclarativeTextInput::setSelectionColor(const QColor &color)
{
    Q_D(QDeclarativeTextInput);
    if (d->selectionColor == color)
        return;

    d->selectionColor = color;
    QPalette p = d->control->palette();
    p.setColor(QPalette::Highlight, d->selectionColor);
    d->control->setPalette(p);
    clearCache();
    update();
    emit selectionColorChanged(color);
}