| 362 | } |
| 363 | |
| 364 | void 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 | |
| 390 | void DiffTextWindow::slotRefresh() |
| 391 | { |