MCPcopy Create free account
hub / github.com/KDE/kdevelop / tabToolTipRequested

Method tabToolTipRequested

kdevplatform/shell/mainwindow_p.cpp:376–405  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

374}
375
376void MainWindowPrivate::tabToolTipRequested(Sublime::View* view, Sublime::Container* container, int tab)
377{
378 if (m_tabTooltip.second) {
379 if (m_tabTooltip.first == view) {
380 // tooltip already shown, don't do anything. prevents flicker when moving mouse over same tab
381 return;
382 } else {
383 m_tabTooltip.second.data()->close();
384 }
385 }
386
387 auto* urlDoc = qobject_cast<Sublime::UrlDocument*>(view->document());
388
389 if (urlDoc) {
390 DUChainReadLocker lock;
391 TopDUContext* top = DUChainUtils::standardContextForUrl(urlDoc->url());
392
393 if (top) {
394 if (auto* navigationWidget = top->createNavigationWidget()) {
395 auto* tooltip = new KDevelop::NavigationToolTip(m_mainWindow, QCursor::pos() + QPoint(20, 20), navigationWidget);
396 tooltip->resize(navigationWidget->sizeHint() + QSize(10, 10));
397 tooltip->setHandleRect(container->tabRect(tab));
398
399 m_tabTooltip.first = view;
400 m_tabTooltip.second = tooltip;
401 ActiveToolTip::showToolTip(m_tabTooltip.second.data());
402 }
403 }
404 }
405}
406
407void MainWindowPrivate::dockBarContextMenuRequested(Qt::DockWidgetArea area, const QPoint& position)
408{

Callers

nothing calls this directly

Calls 9

setHandleRectMethod · 0.80
tabRectMethod · 0.80
QPointClass · 0.70
closeMethod · 0.45
dataMethod · 0.45
documentMethod · 0.45
urlMethod · 0.45
sizeHintMethod · 0.45

Tested by

no test coverage detected