示例#1
0
void KURLLabel::m_leaveEvent()
{
	/* emit this signal with our URL*/
	emit(leftURL(m_url));
	emit(leftURL());

	/* check if we have an "alt" pixmap */
	if (!m_altPixmap.isNull() && (m_float || m_glow))
	{
		/* change back to the original */
		m_pixmap = m_origPixmap;
	}

	/* if we are using a custom cursor, set it back */
	if (m_haveCursor)
		setCursor(QCursor());

	/* check if we are in float mode */
	if (m_float)
	{
		/* switch underlining back to original state */
		QFont tmp_font = font();
		tmp_font.setUnderline(m_underline);
		QLabel::setFont(tmp_font);

		/* set palette back to normal*/
		setPalette(m_nsp);
	}
	else
	/* if we are in "glow" mode, turn off the selected palette */
	if (m_glow)
		setPalette(m_nsp);
} 
示例#2
0
void URLLabel::leaveEvent(QEvent* e)
{
    QLabel::leaveEvent(e);

    if(!d->AltPixmap.isNull() && pixmap())
        setPixmap(d->RealPixmap);

    if((d->Glow || d->Float) && !d->Timer->isActive())
        setLinkColor(d->LinkColor);

    setUnderline(d->RealUnderline);

    emit leftURL();
    emit leftURL(d->URL.toString());
}