Beispiel #1
0
void URLLabel::enterEvent(QEvent* e)
{
    QLabel::enterEvent(e);

    if(!d->AltPixmap.isNull() && pixmap())
    {
        d->RealPixmap = *pixmap();
        setPixmap(d->AltPixmap);
    }

    if(d->Glow || d->Float)
    {
        d->Timer->stop();

        setLinkColor(d->HighlightedLinkColor);

        d->RealUnderline = d->Underline;

        if(d->Float)
            setUnderline(true);
    }

    emit enteredURL();
    emit enteredURL(d->URL);
}
Beispiel #2
0
void KURLLabel::m_enterEvent()
{
	/* emit this signal with our URL*/
	emit(enteredURL(m_url));
	emit(enteredURL());

	/* check if we have an "alt" pixmap */
	if (!m_altPixmap.isNull() && (m_float || m_glow))
	{
		/* display it instead of the regular pixmap */
		m_origPixmap = m_pixmap;
		m_pixmap = m_altPixmap;
	}

	/* if we are using a custom cursor, use it */
	if (m_haveCursor);
		setCursor(m_customCursor);

	/* check if we are in float mode */
	if (m_float)
	{
		/* turn on underlining */
		QFont tmp_font = font();
		tmp_font.setUnderline(true);
		QLabel::setFont(tmp_font);

		/* and "glow" this */
		setPalette(m_sp);
	}
	else
	/* if we are in "glow" mode, turn on the selected palette */
	if (m_glow)
		setPalette(m_sp);
}