VirtualBox

Changeset 87158 in vbox for trunk/src/VBox/Frontends


Ignore:
Timestamp:
Jan 4, 2021 11:12:01 AM (4 years ago)
Author:
vboxsync
Message:

FE/Qt: bugref:9831. Renaming UIHelpBrowserViewer

Location:
trunk/src/VBox/Frontends/VirtualBox
Files:
2 edited
2 moved

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Frontends/VirtualBox/Makefile.kmk

    r87157 r87158  
    813813        src/globals/VBoxUtils.h \
    814814        src/helpbrowser/UIHelpBrowserDialog.h \
    815         src/helpbrowser/UIHelpBrowserViewer.h \
     815        src/helpbrowser/UIHelpViewer.h \
    816816        src/helpbrowser/UIHelpBrowserWidget.h \
    817817        src/logviewer/UIVMLogPage.h \
     
    994994        src/globals/UIVirtualBoxEventHandler.cpp \
    995995        src/globals/UIVirtualBoxClientEventHandler.cpp \
    996         src/helpbrowser/UIHelpBrowserViewer.cpp \
     996        src/helpbrowser/UIHelpViewer.cpp \
    997997        src/helpbrowser/UIHelpBrowserWidget.cpp \
    998998        src/logviewer/UIVMLogViewerFilterPanel.cpp \
     
    13371337        src/globals/UIVirtualBoxClientEventHandler.cpp \
    13381338        src/helpbrowser/UIHelpBrowserDialog.cpp \
    1339         src/helpbrowser/UIHelpBrowserViewer.cpp \
     1339        src/helpbrowser/UIHelpViewer.cpp \
    13401340        src/helpbrowser/UIHelpBrowserWidget.cpp \
    13411341        src/logviewer/UIVMLogPage.cpp \
  • trunk/src/VBox/Frontends/VirtualBox/src/helpbrowser/UIHelpBrowserWidget.cpp

    r87157 r87158  
    5858#include "UIActionPool.h"
    5959#include "UIExtraDataManager.h"
    60 #include "UIHelpBrowserViewer.h"
     60#include "UIHelpViewer.h"
    6161#include "UIHelpBrowserWidget.h"
    6262#include "UIIconPool.h"
     
    250250    QIToolBar   *m_pToolBar;
    251251    QComboBox   *m_pAddressBar;
    252     UIHelpBrowserViewer *m_pContentViewer;
     252    UIHelpViewer *m_pContentViewer;
    253253    const QHelpEngine* m_pHelpEngine;
    254254    QUrl m_homeUrl;
     
    657657void UIHelpBrowserTab::prepareWidgets(const QUrl &initialUrl)
    658658{
    659     m_pContentViewer = new UIHelpBrowserViewer(m_pHelpEngine);
     659    m_pContentViewer = new UIHelpViewer(m_pHelpEngine);
    660660    AssertReturnVoid(m_pContentViewer);
    661661    m_pMainLayout->setContentsMargins(0, 0, 0, 0);
     
    664664    m_pMainLayout->addWidget(m_pContentViewer);
    665665    m_pContentViewer->setOpenExternalLinks(false);
    666     connect(m_pContentViewer, &UIHelpBrowserViewer::sourceChanged,
     666    connect(m_pContentViewer, &UIHelpViewer::sourceChanged,
    667667        this, &UIHelpBrowserTab::sigSourceChanged);
    668     connect(m_pContentViewer, &UIHelpBrowserViewer::historyChanged,
     668    connect(m_pContentViewer, &UIHelpViewer::historyChanged,
    669669        this, &UIHelpBrowserTab::sltHandleHistoryChanged);
    670     connect(m_pContentViewer, &UIHelpBrowserViewer::anchorClicked,
     670    connect(m_pContentViewer, &UIHelpViewer::anchorClicked,
    671671        this, &UIHelpBrowserTab::sltAnchorClicked);
    672     connect(m_pContentViewer, &UIHelpBrowserViewer::sigOpenLinkInNewTab,
     672    connect(m_pContentViewer, &UIHelpViewer::sigOpenLinkInNewTab,
    673673        this, &UIHelpBrowserTab::sigOpenLinkInNewTab);
    674     connect(m_pContentViewer, &UIHelpBrowserViewer::sigCloseFindInPageWidget,
     674    connect(m_pContentViewer, &UIHelpViewer::sigCloseFindInPageWidget,
    675675            this, &UIHelpBrowserTab::sltCloseFindInPageWidget);
    676     connect(m_pContentViewer, &UIHelpBrowserViewer::sigFontPointSizeChanged,
     676    connect(m_pContentViewer, &UIHelpViewer::sigFontPointSizeChanged,
    677677            this, &UIHelpBrowserTab::sigFontPointSizeChanged);
    678     connect(m_pContentViewer, &UIHelpBrowserViewer::sigGoBackward,
     678    connect(m_pContentViewer, &UIHelpViewer::sigGoBackward,
    679679            this, &UIHelpBrowserTab::sltHandleBackwardAction);
    680     connect(m_pContentViewer, &UIHelpBrowserViewer::sigGoForward,
     680    connect(m_pContentViewer, &UIHelpViewer::sigGoForward,
    681681            this, &UIHelpBrowserTab::sltHandleForwardAction);
    682     connect(m_pContentViewer, &UIHelpBrowserViewer::sigGoHome,
     682    connect(m_pContentViewer, &UIHelpViewer::sigGoHome,
    683683            this, &UIHelpBrowserTab::sltHandleHomeAction);
    684     connect(m_pContentViewer, &UIHelpBrowserViewer::sigAddBookmark,
     684    connect(m_pContentViewer, &UIHelpViewer::sigAddBookmark,
    685685            this, &UIHelpBrowserTab::sltHandleAddBookmarkAction);
    686     connect(m_pContentViewer, static_cast<void(UIHelpBrowserViewer::*)(const QString&)>(&UIHelpBrowserViewer::highlighted),
     686    connect(m_pContentViewer, static_cast<void(UIHelpViewer::*)(const QString&)>(&UIHelpViewer::highlighted),
    687687            this, &UIHelpBrowserTab::sigLinkHighlighted);
    688688
  • trunk/src/VBox/Frontends/VirtualBox/src/helpbrowser/UIHelpViewer.cpp

    r87157 r87158  
    5858#include "UIActionPool.h"
    5959#include "UIExtraDataManager.h"
    60 #include "UIHelpBrowserViewer.h"
     60#include "UIHelpViewer.h"
    6161#include "UIHelpBrowserWidget.h"
    6262#include "UIIconPool.h"
     
    324324
    325325/*********************************************************************************************************************************
    326 *   UIHelpBrowserViewer implementation.                                                                                          *
     326*   UIHelpViewer implementation.                                                                                          *
    327327*********************************************************************************************************************************/
    328328
    329 UIHelpBrowserViewer::UIHelpBrowserViewer(const QHelpEngine *pHelpEngine, QWidget *pParent /* = 0 */)
     329UIHelpViewer::UIHelpViewer(const QHelpEngine *pHelpEngine, QWidget *pParent /* = 0 */)
    330330    :QIWithRetranslateUI<QTextBrowser>(pParent)
    331331    , m_pHelpEngine(pHelpEngine)
     
    339339    setUndoRedoEnabled(true);
    340340    connect(m_pFindInPageWidget, &UIFindInPageWidget::sigDragging,
    341             this, &UIHelpBrowserViewer::sltHandleFindWidgetDrag);
     341            this, &UIHelpViewer::sltHandleFindWidgetDrag);
    342342    connect(m_pFindInPageWidget, &UIFindInPageWidget::sigSearchTextChanged,
    343             this, &UIHelpBrowserViewer::sltHandleFindInPageSearchTextChange);
     343            this, &UIHelpViewer::sltHandleFindInPageSearchTextChange);
    344344
    345345    connect(m_pFindInPageWidget, &UIFindInPageWidget::sigSelectPreviousMatch,
    346             this, &UIHelpBrowserViewer::sltSelectPreviousMatch);
     346            this, &UIHelpViewer::sltSelectPreviousMatch);
    347347    connect(m_pFindInPageWidget, &UIFindInPageWidget::sigSelectNextMatch,
    348             this, &UIHelpBrowserViewer::sltSelectNextMatch);
     348            this, &UIHelpViewer::sltSelectNextMatch);
    349349    connect(m_pFindInPageWidget, &UIFindInPageWidget::sigClose,
    350             this, &UIHelpBrowserViewer::sigCloseFindInPageWidget);
     350            this, &UIHelpViewer::sigCloseFindInPageWidget);
    351351
    352352    m_pFindInPageWidget->setVisible(false);
     
    354354}
    355355
    356 QVariant UIHelpBrowserViewer::loadResource(int type, const QUrl &name)
     356QVariant UIHelpViewer::loadResource(int type, const QUrl &name)
    357357{
    358358    if (name.scheme() == "qthelp" && m_pHelpEngine)
     
    362362}
    363363
    364 void UIHelpBrowserViewer::emitHistoryChangedSignal()
     364void UIHelpViewer::emitHistoryChangedSignal()
    365365{
    366366    emit historyChanged();
     
    368368}
    369369
    370 void UIHelpBrowserViewer::setSource(const QUrl &url)
     370void UIHelpViewer::setSource(const QUrl &url)
    371371{
    372372    QTextBrowser::setSource(url);
     
    383383}
    384384
    385 void UIHelpBrowserViewer::toggleFindInPageWidget(bool fVisible)
     385void UIHelpViewer::toggleFindInPageWidget(bool fVisible)
    386386{
    387387    if (!m_pFindInPageWidget)
     
    403403}
    404404
    405 int UIHelpBrowserViewer::initialFontPointSize() const
     405int UIHelpViewer::initialFontPointSize() const
    406406{
    407407    return m_iInitialFontPointSize;
    408408}
    409409
    410 void UIHelpBrowserViewer::setFont(const QFont &font)
     410void UIHelpViewer::setFont(const QFont &font)
    411411{
    412412    QIWithRetranslateUI<QTextBrowser>::setFont(font);
     
    420420}
    421421
    422 void UIHelpBrowserViewer::contextMenuEvent(QContextMenuEvent *event)
     422void UIHelpViewer::contextMenuEvent(QContextMenuEvent *event)
    423423{
    424424    QMenu pMenu;
     
    429429
    430430    connect(pNavigationActions, &UIContextMenuNavigationAction::sigGoBackward,
    431             this, &UIHelpBrowserViewer::sigGoBackward);
     431            this, &UIHelpViewer::sigGoBackward);
    432432    connect(pNavigationActions, &UIContextMenuNavigationAction::sigGoForward,
    433             this, &UIHelpBrowserViewer::sigGoForward);
     433            this, &UIHelpViewer::sigGoForward);
    434434    connect(pNavigationActions, &UIContextMenuNavigationAction::sigGoHome,
    435             this, &UIHelpBrowserViewer::sigGoHome);
     435            this, &UIHelpViewer::sigGoHome);
    436436    connect(pNavigationActions, &UIContextMenuNavigationAction::sigAddBookmark,
    437             this, &UIHelpBrowserViewer::sigAddBookmark);
     437            this, &UIHelpViewer::sigAddBookmark);
    438438
    439439    QAction *pOpenLinkAction = new QAction(UIHelpBrowserWidget::tr("Open Link"));
    440440    connect(pOpenLinkAction, &QAction::triggered,
    441             this, &UIHelpBrowserViewer::sltHandleOpenLink);
     441            this, &UIHelpViewer::sltHandleOpenLink);
    442442
    443443    QAction *pOpenInNewTabAction = new QAction(UIHelpBrowserWidget::tr("Open Link in New Tab"));
    444444    connect(pOpenInNewTabAction, &QAction::triggered,
    445             this, &UIHelpBrowserViewer::sltHandleOpenLinkInNewTab);
     445            this, &UIHelpViewer::sltHandleOpenLinkInNewTab);
    446446
    447447    QAction *pCopyLink = new QAction(UIHelpBrowserWidget::tr("Copy Link"));
    448448    connect(pCopyLink, &QAction::triggered,
    449             this, &UIHelpBrowserViewer::sltHandleCopyLink);
     449            this, &UIHelpViewer::sltHandleCopyLink);
    450450
    451451    pMenu.addAction(pNavigationActions);
     
    471471}
    472472
    473 void UIHelpBrowserViewer::resizeEvent(QResizeEvent *pEvent)
     473void UIHelpViewer::resizeEvent(QResizeEvent *pEvent)
    474474{
    475475    /* Make sure the widget stays inside the parent during parent resize: */
     
    482482}
    483483
    484 void UIHelpBrowserViewer::wheelEvent(QWheelEvent *pEvent)
     484void UIHelpViewer::wheelEvent(QWheelEvent *pEvent)
    485485{
    486486    int iPreviousSize = font().pointSize();
     
    498498}
    499499
    500 void UIHelpBrowserViewer::retranslateUi()
    501 {
    502 }
    503 
    504 void UIHelpBrowserViewer::moveFindWidgetIn(int iMargin)
     500void UIHelpViewer::retranslateUi()
     501{
     502}
     503
     504void UIHelpViewer::moveFindWidgetIn(int iMargin)
    505505{
    506506    if (!m_pFindInPageWidget)
     
    521521}
    522522
    523 bool UIHelpBrowserViewer::isRectInside(const QRect &rect, int iMargin) const
     523bool UIHelpViewer::isRectInside(const QRect &rect, int iMargin) const
    524524{
    525525    if (rect.left() < iMargin || rect.top() < iMargin)
     
    530530}
    531531
    532 void UIHelpBrowserViewer::findAllMatches(const QString &searchString)
     532void UIHelpViewer::findAllMatches(const QString &searchString)
    533533{
    534534    QTextDocument *pDocument = document();
     
    552552}
    553553
    554 void UIHelpBrowserViewer::highlightFinds(int iSearchTermLength)
     554void UIHelpViewer::highlightFinds(int iSearchTermLength)
    555555{
    556556    QTextDocument* pDocument = document();
     
    576576}
    577577
    578 void UIHelpBrowserViewer::selectMatch(int iMatchIndex, int iSearchStringLength)
     578void UIHelpViewer::selectMatch(int iMatchIndex, int iSearchStringLength)
    579579{
    580580    QTextCursor cursor = textCursor();
     
    587587}
    588588
    589 void UIHelpBrowserViewer::sltHandleOpenLinkInNewTab()
     589void UIHelpViewer::sltHandleOpenLinkInNewTab()
    590590{
    591591    QAction *pSender = qobject_cast<QAction*>(sender());
     
    597597}
    598598
    599 void UIHelpBrowserViewer::sltHandleOpenLink()
     599void UIHelpViewer::sltHandleOpenLink()
    600600{
    601601    QAction *pSender = qobject_cast<QAction*>(sender());
     
    607607}
    608608
    609 void UIHelpBrowserViewer::sltHandleCopyLink()
     609void UIHelpViewer::sltHandleCopyLink()
    610610{
    611611    QAction *pSender = qobject_cast<QAction*>(sender());
     
    621621}
    622622
    623 void UIHelpBrowserViewer::sltHandleFindWidgetDrag(const QPoint &delta)
     623void UIHelpViewer::sltHandleFindWidgetDrag(const QPoint &delta)
    624624{
    625625    if (!m_pFindInPageWidget)
     
    635635}
    636636
    637 void UIHelpBrowserViewer::sltHandleFindInPageSearchTextChange(const QString &strSearchText)
     637void UIHelpViewer::sltHandleFindInPageSearchTextChange(const QString &strSearchText)
    638638{
    639639    m_iSearchTermLength = strSearchText.length();
     
    646646}
    647647
    648 void UIHelpBrowserViewer::sltSelectPreviousMatch()
     648void UIHelpViewer::sltSelectPreviousMatch()
    649649{
    650650    m_iSelectedMatchIndex = m_iSelectedMatchIndex <= 0 ? m_matchedCursorPosition.size() - 1 : (m_iSelectedMatchIndex - 1);
     
    654654}
    655655
    656 void UIHelpBrowserViewer::sltSelectNextMatch()
     656void UIHelpViewer::sltSelectNextMatch()
    657657{
    658658    m_iSelectedMatchIndex = m_iSelectedMatchIndex >= m_matchedCursorPosition.size() - 1 ? 0 : (m_iSelectedMatchIndex + 1);
     
    662662}
    663663
    664 #include "UIHelpBrowserViewer.moc"
     664#include "UIHelpViewer.moc"
    665665
    666666#endif /*#if defined(RT_OS_LINUX) && defined(VBOX_WITH_DOCS_QHELP) && (QT_VERSION >= QT_VERSION_CHECK(5, 9, 0))*/
  • trunk/src/VBox/Frontends/VirtualBox/src/helpbrowser/UIHelpViewer.h

    r87157 r87158  
    1616 */
    1717
    18 #ifndef FEQT_INCLUDED_SRC_helpbrowser_UIHelpBrowserViewer_h
    19 #define FEQT_INCLUDED_SRC_helpbrowser_UIHelpBrowserViewer_h
     18#ifndef FEQT_INCLUDED_SRC_helpbrowser_UIHelpViewer_h
     19#define FEQT_INCLUDED_SRC_helpbrowser_UIHelpViewer_h
    2020#ifndef RT_WITHOUT_PRAGMA_ONCE
    2121# pragma once
     
    6060
    6161#if defined(RT_OS_LINUX) && defined(VBOX_WITH_DOCS_QHELP) && (QT_VERSION >= QT_VERSION_CHECK(5, 9, 0))
    62 class UIHelpBrowserViewer : public QIWithRetranslateUI<QTextBrowser>
     62class UIHelpViewer : public QIWithRetranslateUI<QTextBrowser>
    6363{
    6464    Q_OBJECT;
     
    7676public:
    7777
    78     UIHelpBrowserViewer(const QHelpEngine *pHelpEngine, QWidget *pParent = 0);
     78    UIHelpViewer(const QHelpEngine *pHelpEngine, QWidget *pParent = 0);
    7979    virtual QVariant loadResource(int type, const QUrl &name) /* override */;
    8080    void emitHistoryChangedSignal();
     
    124124
    125125#endif /* #if defined(RT_OS_LINUX) && defined(VBOX_WITH_DOCS_QHELP) && (QT_VERSION >= QT_VERSION_CHECK(5, 9, 0)) */
    126 #endif /* !FEQT_INCLUDED_SRC_helpbrowser_UIHelpBrowserViewer_h */
     126#endif /* !FEQT_INCLUDED_SRC_helpbrowser_UIHelpViewer_h */
Note: See TracChangeset for help on using the changeset viewer.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette