コード例 #1
0
void PartsBinListView::showInfo(QListWidgetItem * item) {
	if (item == m_hoverItem) {
		// no change
		return;
	}

	if (m_hoverItem != NULL && m_infoView != NULL) {
		ItemBase * itemBase = itemItemBase(m_hoverItem);
		if (itemBase != NULL) {
			m_infoView->hoverLeaveItem(NULL, NULL, itemBase);
		}
	}

	if (item == NULL) {
		return;
	}

	m_hoverItem = item;
    if (m_infoView != NULL) {
	    ItemBase * itemBase = itemItemBase(item);
	    if (itemBase != NULL) {
	        m_infoView->hoverEnterItem(NULL, NULL, itemBase, swappingEnabled());
        }
    }
}
コード例 #2
0
void InfoGraphicsView::hoverEnterConnectorItem(QGraphicsSceneHoverEvent * event, ConnectorItem * item) {
	if (m_infoView == NULL) return;

	if (event->modifiers() & Qt::ShiftModifier) {
		m_hoverEnterConnectorMode = true;
		m_infoView->hoverEnterConnectorItem(this, event, item, swappingEnabled(item->attachedTo()));
	}
}
コード例 #3
0
void InfoGraphicsView::hoverEnterItem(QGraphicsSceneHoverEvent * event, ItemBase * itemBase) {
	if (m_infoView == NULL) return;

	if (event->modifiers() & Qt::ShiftModifier || itemBase->viewID() == ViewLayer::IconView) {
		m_hoverEnterMode = true;
		m_infoView->hoverEnterItem(this, event, itemBase ? itemBase->layerKinChief() : itemBase, swappingEnabled(itemBase));
	}
}
コード例 #4
0
void InfoGraphicsView::viewItemInfo(ItemBase * item) {
	if (m_infoView == NULL) return;

	m_infoView->viewItemInfo(this, item ? item->layerKinChief() : item, swappingEnabled(item));
}