MCPcopy Create free account
hub / github.com/KDE/kdiff3 / setupConnections

Method setupConnections

src/difftextwindow.cpp:364–388  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

362}
363
364void DiffTextWindow::setupConnections(const KDiff3App* app)
365{
366 assert(qobject_cast<DiffTextWindowFrame*>(parent()) != nullptr);
367
368 chk_connect_a(this, &DiffTextWindow::firstLineChanged, dynamic_cast<DiffTextWindowFrame*>(parent()), &DiffTextWindowFrame::setFirstLine);
369 chk_connect_a(this, &DiffTextWindow::newSelection, app, &KDiff3App::slotSelectionStart);
370 chk_connect_a(this, &DiffTextWindow::selectionEnd, app, &KDiff3App::slotSelectionEnd);
371 chk_connect_a(this, &DiffTextWindow::scrollDiffTextWindow, app, &KDiff3App::scrollDiffTextWindow);
372 chk_connect_q(this, &DiffTextWindow::finishRecalcWordWrap, app, &KDiff3App::slotFinishRecalcWordWrap);
373
374 chk_connect_a(this, &DiffTextWindow::finishDrop, app, &KDiff3App::slotFinishDrop);
375
376 chk_connect_a(this, &DiffTextWindow::statusBarMessage, app, &KDiff3App::slotStatusMsg);
377
378 chk_connect_a(app, &KDiff3App::showWhiteSpaceToggled, this, static_cast<void (DiffTextWindow::*)(void)>(&DiffTextWindow::update));
379 chk_connect_a(app, &KDiff3App::showLineNumbersToggled, this, static_cast<void (DiffTextWindow::*)(void)>(&DiffTextWindow::update));
380 chk_connect_a(app, &KDiff3App::doRefresh, this, &DiffTextWindow::slotRefresh);
381 chk_connect_a(app, &KDiff3App::selectAll, this, &DiffTextWindow::slotSelectAll);
382 chk_connect_a(app, &KDiff3App::copy, this, &DiffTextWindow::slotCopy);
383
384 chk_connect_a(this, &DiffTextWindow::scrollToH, app, &KDiff3App::slotScrollToH);
385
386 connections.push_back(StandardMenus::allowCopy.connect(boost::bind(&DiffTextWindow::canCopy, this)));
387 connections.push_back(KDiff3App::getSelection.connect(boost::bind(&DiffTextWindow::getSelection, this)));
388}
389
390void DiffTextWindow::slotRefresh()
391{

Callers 2

KDiff3AppMethod · 0.45
initViewMethod · 0.45

Calls 2

push_backMethod · 0.80
connectMethod · 0.80

Tested by

no test coverage detected