- Timestamp:
- May 22, 2023 5:15:24 PM (17 months ago)
- Location:
- trunk/src/VBox/Frontends/VirtualBox
- Files:
-
- 7 edited
-
Makefile.kmk (modified) (8 diffs)
-
src/globals/UIMessageCenter.cpp (modified) (2 diffs)
-
src/helpbrowser/UIHelpBrowserDialog.cpp (modified) (3 diffs)
-
src/helpbrowser/UIHelpBrowserWidget.cpp (modified) (3 diffs)
-
src/helpbrowser/UIHelpBrowserWidget.h (modified) (2 diffs)
-
src/helpbrowser/UIHelpViewer.cpp (modified) (3 diffs)
-
src/helpbrowser/UIHelpViewer.h (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Frontends/VirtualBox/Makefile.kmk
r99881 r99910 898 898 src/guestctrl/UIFileManagerTable.h \ 899 899 src/helpbrowser/UIHelpBrowserDialog.h \ 900 src/helpbrowser/UIHelpViewer.h \ 901 src/helpbrowser/UIHelpBrowserWidget.h \ 900 902 src/logviewer/UIVMLogPage.h \ 901 903 src/logviewer/UIVMLogViewerBookmarksPanel.h \ … … 1031 1033 src/wizards/newvd/UIWizardNewVDExpertPage.h 1032 1034 1033 ifdef VBOX_WITH_DOCS_QHELP1034 UICommon_QT_MOCHDRS += \1035 src/helpbrowser/UIHelpViewer.h \1036 src/helpbrowser/UIHelpBrowserWidget.h1037 endif1038 1039 1035 ifdef VBOX_GUI_WITH_NETWORK_MANAGER 1040 1036 UICommon_QT_MOCHDRS += \ … … 1119 1115 src/guestctrl/UIFileManagerGuestTable.cpp \ 1120 1116 src/guestctrl/UIFileManagerHostTable.cpp \ 1117 src/helpbrowser/UIHelpViewer.cpp \ 1118 src/helpbrowser/UIHelpBrowserWidget.cpp \ 1121 1119 src/logviewer/UIVMLogViewerFilterPanel.cpp \ 1122 1120 src/logviewer/UIVMLogViewerTextEdit.cpp \ … … 1143 1141 src/widgets/UIStatusBarEditorWindow.cpp \ 1144 1142 src/widgets/UIToolBox.cpp 1145 1146 ifdef VBOX_WITH_DOCS_QHELP1147 UICommon_QT_MOCSRCS += \1148 src/helpbrowser/UIHelpViewer.cpp \1149 src/helpbrowser/UIHelpBrowserWidget.cpp1150 endif1151 1143 1152 1144 ifdef VBOX_GUI_WITH_NETWORK_MANAGER … … 1486 1478 src/guestctrl/UIFileManagerTable.cpp \ 1487 1479 src/helpbrowser/UIHelpBrowserDialog.cpp \ 1480 src/helpbrowser/UIHelpViewer.cpp \ 1481 src/helpbrowser/UIHelpBrowserWidget.cpp \ 1488 1482 src/logviewer/UIVMLogPage.cpp \ 1489 1483 src/logviewer/UIVMLogViewerBookmarksPanel.cpp \ … … 1624 1618 src/wizards/newvd/UIWizardNewVDExpertPage.cpp 1625 1619 1626 ifdef VBOX_WITH_DOCS_QHELP1627 UICommon_SOURCES += \1628 src/helpbrowser/UIHelpViewer.cpp \1629 src/helpbrowser/UIHelpBrowserWidget.cpp1630 endif1631 1632 1620 ifdef VBOX_GUI_WITH_NETWORK_MANAGER 1633 1621 UICommon_SOURCES += \ … … 1740 1728 # (The include directory and lib/framework for each module will be added by the Qt unit.) 1741 1729 # 1742 UICommon_QT_MODULES = Core Gui Widgets 1730 UICommon_QT_MODULES = Core Gui Widgets Help 1743 1731 ifdef VBOX_WITH_QT6 1744 1732 UICommon_QT_MODULES += StateMachine … … 1768 1756 UICommon_QT_MODULES.darwin += MacExtras 1769 1757 UICommon_QT_MODULES.win += WinExtras 1770 endif1771 1772 ifdef VBOX_WITH_DOCS_QHELP1773 UICommon_QT_MODULES += Help1774 1758 endif 1775 1759 -
trunk/src/VBox/Frontends/VirtualBox/src/globals/UIMessageCenter.cpp
r99905 r99910 2097 2097 } 2098 2098 2099 void UIMessageCenter::sltResetSuppressedMessages() 2100 { 2101 /* Nullify suppressed message list: */ 2102 gEDataManager->setSuppressedMessages(QStringList()); 2103 } 2104 2105 void UIMessageCenter::sltShowUserManual(const QString &strHelpFilePath) 2106 { 2107 if (!QFileInfo(strHelpFilePath).exists()) 2108 { 2109 UINotificationMessage::cannotFindHelpFile(strHelpFilePath); 2110 return; 2111 } 2112 if (!m_pHelpBrowserDialog) 2113 { 2114 m_pHelpBrowserDialog = new UIHelpBrowserDialog(0 /* parent */, 0 /* Center Widget */, strHelpFilePath); 2115 AssertReturnVoid(m_pHelpBrowserDialog); 2116 connect(m_pHelpBrowserDialog, &QMainWindow::destroyed, this, &UIMessageCenter::sltHelpBrowserClosed); 2117 } 2118 2119 m_pHelpBrowserDialog->show(); 2120 m_pHelpBrowserDialog->setWindowState(m_pHelpBrowserDialog->windowState() & ~Qt::WindowMinimized); 2121 m_pHelpBrowserDialog->activateWindow(); 2122 } 2123 2124 void UIMessageCenter::sltHelpBrowserClosed() 2125 { 2126 m_pHelpBrowserDialog = 0; 2127 } 2128 2129 void UIMessageCenter::sltHandleHelpRequest() 2130 { 2131 sltHandleHelpRequestWithKeyword(uiCommon().helpKeyword(sender())); 2132 } 2133 2134 void UIMessageCenter::sltHandleHelpRequestWithKeyword(const QString &strHelpKeyword) 2135 { 2136 /* First open or show the help browser: */ 2137 sltShowUserManual(uiCommon().helpFile()); 2138 /* Show the help page for the @p strHelpKeyword: */ 2139 if (m_pHelpBrowserDialog) 2140 m_pHelpBrowserDialog->showHelpForKeyword(strHelpKeyword); 2141 } 2142 2099 2143 void UIMessageCenter::sltShowHelpHelpDialog() 2100 2144 { 2101 /* Currently I am sure how this logic should be changed. I will just disable it for now: */2102 sltShowUserManual(uiCommon().helpFile());2103 #if 02104 2145 #ifndef VBOX_OSE 2105 2146 /* For non-OSE version we just open it: */ … … 2132 2173 # endif /* VBOX_GUI_WITH_NETWORK_MANAGER */ 2133 2174 #endif /* #ifdef VBOX_OSE */ 2134 #endif2135 }2136 2137 void UIMessageCenter::sltResetSuppressedMessages()2138 {2139 /* Nullify suppressed message list: */2140 gEDataManager->setSuppressedMessages(QStringList());2141 }2142 2143 void UIMessageCenter::sltShowUserManual(const QString &strHelpFilePath)2144 {2145 #if defined(VBOX_WITH_DOCS_QHELP)2146 if (!QFileInfo(strHelpFilePath).exists())2147 {2148 UINotificationMessage::cannotFindHelpFile(strHelpFilePath);2149 return;2150 }2151 if (!m_pHelpBrowserDialog)2152 {2153 m_pHelpBrowserDialog = new UIHelpBrowserDialog(0 /* parent */, 0 /* Center Widget */, strHelpFilePath);2154 AssertReturnVoid(m_pHelpBrowserDialog);2155 connect(m_pHelpBrowserDialog, &QMainWindow::destroyed, this, &UIMessageCenter::sltHelpBrowserClosed);2156 }2157 2158 m_pHelpBrowserDialog->show();2159 m_pHelpBrowserDialog->setWindowState(m_pHelpBrowserDialog->windowState() & ~Qt::WindowMinimized);2160 m_pHelpBrowserDialog->activateWindow();2161 #else2162 Q_UNUSED(strHelpFilePath);2163 #endif2164 2165 }2166 2167 void UIMessageCenter::sltHelpBrowserClosed()2168 {2169 m_pHelpBrowserDialog = 0;2170 }2171 2172 void UIMessageCenter::sltHandleHelpRequest()2173 {2174 #if defined(VBOX_WITH_DOCS_QHELP)2175 sltHandleHelpRequestWithKeyword(uiCommon().helpKeyword(sender()));2176 #endif /* #if (QT_VERSION >= QT_VERSION_CHECK(5, 9, 0))&& (QT_VERSION >= QT_VERSION_CHECK(5, 9, 0)) */2177 }2178 2179 void UIMessageCenter::sltHandleHelpRequestWithKeyword(const QString &strHelpKeyword)2180 {2181 #if defined(VBOX_WITH_DOCS_QHELP)2182 /* First open or show the help browser: */2183 sltShowUserManual(uiCommon().helpFile());2184 /* Show the help page for the @p strHelpKeyword: */2185 if (m_pHelpBrowserDialog)2186 m_pHelpBrowserDialog->showHelpForKeyword(strHelpKeyword);2187 #else2188 Q_UNUSED(strHelpKeyword);2189 # endif /* #if (QT_VERSION >= QT_VERSION_CHECK(5, 9, 0))&& (QT_VERSION >= QT_VERSION_CHECK(5, 9, 0)) */2190 2175 } 2191 2176 -
trunk/src/VBox/Frontends/VirtualBox/src/helpbrowser/UIHelpBrowserDialog.cpp
r99880 r99910 72 72 void UIHelpBrowserDialog::showHelpForKeyword(const QString &strKeyword) 73 73 { 74 #ifdef VBOX_WITH_DOCS_QHELP75 74 if (m_pWidget) 76 75 m_pWidget->showHelpForKeyword(strKeyword); 77 #else78 Q_UNUSED(strKeyword);79 #endif80 76 } 81 77 82 78 void UIHelpBrowserDialog::retranslateUi() 83 79 { 84 #ifdef VBOX_WITH_DOCS_QHELP85 80 setWindowTitle(UIHelpBrowserWidget::tr("Oracle VM VirtualBox User Manual")); 86 #endif87 81 } 88 82 … … 119 113 void UIHelpBrowserDialog::prepareCentralWidget() 120 114 { 121 #ifdef VBOX_WITH_DOCS_QHELP122 115 m_pWidget = new UIHelpBrowserWidget(EmbedTo_Dialog, m_strHelpFilePath); 123 116 AssertPtrReturnVoid(m_pWidget); … … 136 129 foreach (QMenu *pMenu, menuList) 137 130 menuBar()->addMenu(pMenu); 138 #endif139 131 } 140 132 -
trunk/src/VBox/Frontends/VirtualBox/src/helpbrowser/UIHelpBrowserWidget.cpp
r99880 r99910 30 30 #include <QComboBox> 31 31 #include <QtGlobal> 32 #ifdef VBOX_WITH_DOCS_QHELP 33 # include <QtHelp/QHelpEngine> 34 # include <QtHelp/QHelpContentWidget> 35 # include <QtHelp/QHelpIndexWidget> 36 # include <QtHelp/QHelpSearchEngine> 37 # include <QtHelp/QHelpSearchQueryWidget> 38 # include <QtHelp/QHelpSearchResultWidget> 39 # if QT_VERSION >= QT_VERSION_CHECK(5, 15, 0) 40 # include <QtHelp/QHelpLink> 41 # endif 32 #include <QtHelp/QHelpEngine> 33 #include <QtHelp/QHelpContentWidget> 34 #include <QtHelp/QHelpIndexWidget> 35 #include <QtHelp/QHelpSearchEngine> 36 #include <QtHelp/QHelpSearchQueryWidget> 37 #include <QtHelp/QHelpSearchResultWidget> 38 #if QT_VERSION >= QT_VERSION_CHECK(5, 15, 0) 39 # include <QtHelp/QHelpLink> 42 40 #endif 41 43 42 #include <QLabel> 44 43 #include <QListWidget> … … 70 69 #include "CSystemProperties.h" 71 70 72 #ifdef VBOX_WITH_DOCS_QHELP73 71 74 72 enum HelpBrowserTabs … … 2274 2272 2275 2273 #include "UIHelpBrowserWidget.moc" 2276 2277 #endif /*#ifdef VBOX_WITH_DOCS_QHELP*/ -
trunk/src/VBox/Frontends/VirtualBox/src/helpbrowser/UIHelpBrowserWidget.h
r99880 r99910 58 58 class UIZoomMenuAction; 59 59 60 #ifdef VBOX_WITH_DOCS_QHELP61 60 class SHARED_LIBRARY_STUFF UIHelpBrowserWidget : public QIWithRetranslateUI<QWidget> 62 61 { … … 220 219 }; 221 220 222 #endif /* #ifdef VBOX_WITH_DOCS_QHELP */223 221 #endif /* !FEQT_INCLUDED_SRC_helpbrowser_UIHelpBrowserWidget_h */ -
trunk/src/VBox/Frontends/VirtualBox/src/helpbrowser/UIHelpViewer.cpp
r99880 r99910 29 29 #include <QClipboard> 30 30 #include <QtGlobal> 31 #ifdef VBOX_WITH_DOCS_QHELP 32 #include <QtHelp/QHelpEngine> 33 #include <QtHelp/QHelpContentWidget> 34 #include <QtHelp/QHelpIndexWidget> 35 #include <QtHelp/QHelpSearchEngine> 36 #include <QtHelp/QHelpSearchQueryWidget> 37 #include <QtHelp/QHelpSearchResultWidget> 38 #endif 31 #include <QtHelp/QHelpEngine> 32 #include <QtHelp/QHelpContentWidget> 33 #include <QtHelp/QHelpIndexWidget> 34 #include <QtHelp/QHelpSearchEngine> 35 #include <QtHelp/QHelpSearchQueryWidget> 36 #include <QtHelp/QHelpSearchResultWidget> 39 37 #include <QLabel> 40 38 #include <QMenu> … … 63 61 #include "COMEnums.h" 64 62 #include "CSystemProperties.h" 65 66 #ifdef VBOX_WITH_DOCS_QHELP67 63 68 64 … … 1069 1065 1070 1066 #include "UIHelpViewer.moc" 1071 1072 #endif /* #ifdef VBOX_WITH_DOCS_QHELP */ -
trunk/src/VBox/Frontends/VirtualBox/src/helpbrowser/UIHelpViewer.h
r99880 r99910 43 43 class QLabel; 44 44 class UIFindInPageWidget; 45 46 #ifdef VBOX_WITH_DOCS_QHELP47 45 48 46 /** A QTextBrowser extension used as poor man's html viewer. Since we were not happy with the quality of QTextBrowser's image … … 172 170 }; 173 171 174 #endif /* #ifdef VBOX_WITH_DOCS_QHELP */175 172 #endif /* !FEQT_INCLUDED_SRC_helpbrowser_UIHelpViewer_h */
Note:
See TracChangeset
for help on using the changeset viewer.

