Changeset 86826 in vbox for trunk/src/VBox/Frontends/VirtualBox
- Timestamp:
- Nov 6, 2020 1:17:15 PM (4 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Frontends/VirtualBox/src/helpbrowser/UIHelpBrowserWidget.cpp
r86821 r86826 88 88 void sigSelectNextMatch(); 89 89 void sigSelectPreviousMatch(); 90 void sigClose(); 90 91 91 92 public: … … 106 107 QIToolButton *m_pNextButton; 107 108 QIToolButton *m_pPreviousButton; 109 QIToolButton *m_pCloseButton; 108 110 QLabel *m_pDragMoveLabel; 109 111 QPoint m_previousMousePosition; … … 121 123 122 124 void sigOpenLinkInNewTab(const QUrl &url); 125 void sigCloseFindInPageWidget(); 123 126 124 127 public: … … 200 203 void sltHandleAddBookmarkAction(); 201 204 void sltAnchorClicked(const QUrl &link); 205 void sltCloseFindInPageWidget(); 202 206 203 207 private: … … 276 280 , m_pNextButton(0) 277 281 , m_pPreviousButton(0) 282 , m_pCloseButton(0) 278 283 , m_previousMousePosition(-1, -1) 279 284 { … … 348 353 m_pPreviousButton = new QIToolButton; 349 354 m_pNextButton = new QIToolButton; 355 m_pCloseButton = new QIToolButton; 350 356 351 357 pLayout->addWidget(m_pPreviousButton); 352 358 pLayout->addWidget(m_pNextButton); 359 pLayout->addWidget(m_pCloseButton); 353 360 354 361 m_pPreviousButton->setIcon(UIIconPool::iconSet(":/arrow_up_10px.png")); 355 362 m_pNextButton->setIcon(UIIconPool::iconSet(":/arrow_down_10px.png")); 363 m_pCloseButton->setIcon(UIIconPool::iconSet(":/close_16px.png")); 356 364 357 365 connect(m_pPreviousButton, &QIToolButton::pressed, this, &UIFindInPageWidget::sigSelectPreviousMatch); 358 366 connect(m_pNextButton, &QIToolButton::pressed, this, &UIFindInPageWidget::sigSelectNextMatch); 367 connect(m_pCloseButton, &QIToolButton::pressed, this, &UIFindInPageWidget::sigClose); 359 368 } 360 369 … … 448 457 connect(m_pContentViewer, &UIHelpBrowserViewer::sigOpenLinkInNewTab, 449 458 this, &UIHelpBrowserTab::sigOpenLinkInNewTab); 459 connect(m_pContentViewer, &UIHelpBrowserViewer::sigCloseFindInPageWidget, 460 this, &UIHelpBrowserTab::sltCloseFindInPageWidget); 461 450 462 m_pContentViewer->setSource(initialUrl, m_strPageNotFoundText); 451 463 } … … 596 608 } 597 609 598 599 610 void UIHelpBrowserTab::sltAnchorClicked(const QUrl &link) 600 611 { … … 602 613 } 603 614 615 void UIHelpBrowserTab::sltCloseFindInPageWidget() 616 { 617 if (m_pFindInPageAction) 618 m_pFindInPageAction->setChecked(false); 619 } 604 620 605 621 /********************************************************************************************************************************* … … 626 642 connect(m_pFindInPageWidget, &UIFindInPageWidget::sigSelectNextMatch, 627 643 this, &UIHelpBrowserViewer::sltSelectNextMatch); 644 connect(m_pFindInPageWidget, &UIFindInPageWidget::sigClose, 645 this, &UIHelpBrowserViewer::sigCloseFindInPageWidget); 628 646 629 647 m_pFindInPageWidget->setVisible(false); … … 697 715 if (!m_fFindWidgetPositioned) 698 716 { 699 m_pFindInPageWidget->move( width() - m_pFindInPageWidget->width() - 10, 10);717 m_pFindInPageWidget->move(m_iMarginForFindWidget, m_iMarginForFindWidget); 700 718 m_fFindWidgetPositioned = true; 701 719 } … … 844 862 m_pFindInPageWidget->setMatchCountAndCurrentIndex(m_matchedCursorPosition.size(), m_iSelectedMatchIndex); 845 863 } 846 847 864 848 865 /*********************************************************************************************************************************
Note:
See TracChangeset
for help on using the changeset viewer.