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

Method showToolTip

kdevplatform/shell/workingsetcontroller.cpp:167–183  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

165}
166
167void WorkingSetController::showToolTip(WorkingSet* set, const QPoint& pos)
168{
169 delete m_tooltip;
170
171 auto* window = static_cast<KDevelop::MainWindow*>(Core::self()->uiControllerInternal()->activeMainWindow());
172
173 m_tooltip = new KDevelop::ActiveToolTip(window, pos);
174 auto* layout = new QVBoxLayout(m_tooltip);
175 layout->setContentsMargins(0, 0, 0, 0);
176 auto* widget = new WorkingSetToolTipWidget(m_tooltip, set, window);
177 layout->addWidget(widget);
178 m_tooltip->resize( m_tooltip->sizeHint() );
179
180 connect(widget, &WorkingSetToolTipWidget::shouldClose, m_tooltip.data(), &ActiveToolTip::close);
181
182 ActiveToolTip::showToolTip(m_tooltip);
183}
184
185void WorkingSetController::showGlobalToolTip()
186{

Callers 1

showTooltipMethod · 0.45

Calls 5

uiControllerInternalMethod · 0.80
activeMainWindowMethod · 0.45
addWidgetMethod · 0.45
sizeHintMethod · 0.45
dataMethod · 0.45

Tested by

no test coverage detected