Esempio n. 1
0
// >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
void GeometryLayer::mouseOnGeometry(QEvent* event) {

	if ( event->type() == QEvent::ToolTip ) {

		QHelpEvent* helpEvent = static_cast<QHelpEvent *>(event);
		const Geometry* d = geometryAt(helpEvent->pos());

		if ( d ) {

			//! Advise the widget that this element should be highlighted,
			//! it will deal with this notice the way it wants to...
			emit highlightElement(d->name());

			if ( !d->toolTip().isEmpty() )
				QToolTip::showText(helpEvent->globalPos(), d->toolTip());
			else
				QToolTip::showText(helpEvent->globalPos(), d->name());
		}
		else {
			QToolTip::hideText();
			event->ignore();
			emit restoreElementsSizes();
		}
	}
}
Esempio n. 2
0
void ErrorListWidget::clickList()
{
	highlightElement(currentItem());
}