Changeset 86716 in vbox for trunk/src/VBox/Frontends/VirtualBox
- Timestamp:
- Oct 26, 2020 5:54:33 PM (4 years ago)
- Location:
- trunk/src/VBox/Frontends/VirtualBox/src
- Files:
-
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Frontends/VirtualBox/src/extradata/UIExtraDataDefs.cpp
r86541 r86716 237 237 const char *UIExtraDataDefs::GUI_LogViewerNoFontStyleName = "noFontStyleName"; 238 238 const char *UIExtraDataDefs::GUI_GuestControl_LogViewerVisiblePanels = "GUI/LogViewerVisiblePanels"; 239 240 /* Help Browser */ 241 const char *UIExtraDataDefs::GUI_HelpBrowserLastURL = "GUI/HelpBrowserLastURL"; 239 242 240 243 /* VM Resource Monitor: */ -
trunk/src/VBox/Frontends/VirtualBox/src/extradata/UIExtraDataDefs.h
r86541 r86716 436 436 /** @} */ 437 437 438 /** @name Help Browser 439 * @{ */ 440 SHARED_LIBRARY_STUFF extern const char *GUI_HelpBrowserLastURL; 441 /** @} */ 442 438 443 /** @name Manager UI: VM Resource Monitor Related stuff 439 444 * @{ */ -
trunk/src/VBox/Frontends/VirtualBox/src/extradata/UIExtraDataManager.cpp
r86541 r86716 4592 4592 } 4593 4593 4594 void UIExtraDataManager::setHelpBrowserLastUrl(const QString &url) 4595 { 4596 setExtraDataString(GUI_HelpBrowserLastURL, url); 4597 } 4598 4599 QString UIExtraDataManager::helpBrowserLastUrl() 4600 { 4601 return extraDataString(GUI_HelpBrowserLastURL); 4602 } 4603 4594 4604 void UIExtraDataManager::setVMResourceMonitorHiddenColumnList(const QStringList &hiddenColumnList) 4595 4605 { -
trunk/src/VBox/Frontends/VirtualBox/src/extradata/UIExtraDataManager.h
r86541 r86716 783 783 void setLogViewerVisiblePanels(const QStringList &panelNameList); 784 784 QStringList logViewerVisiblePanels(); 785 /** @} */ 786 787 /** @name Help Browser 788 * @{ */ 789 void setHelpBrowserLastUrl(const QString &url); 790 QString helpBrowserLastUrl(); 785 791 /** @} */ 786 792 -
trunk/src/VBox/Frontends/VirtualBox/src/helpbrowser/UIHelpBrowserWidget.cpp
r86715 r86716 128 128 qRegisterMetaType<HelpBrowserTabs>("HelpBrowserTabs"); 129 129 prepare(); 130 loadOptions(); 130 131 } 131 132 … … 149 150 void UIHelpBrowserWidget::prepare() 150 151 { 151 loadOptions();152 153 152 prepareActions(); 154 153 prepareWidgets(); … … 197 196 m_pContentViewer = new UIHelpBrowserViewer(m_pHelpEngine); 198 197 AssertReturnVoid(m_pContentViewer); 198 199 200 connect(m_pContentViewer, &UIHelpBrowserViewer::sourceChanged, 201 this, &UIHelpBrowserWidget::sltHandleHelpBrowserViewerSourceChange); 199 202 m_pSplitter->addWidget(m_pContentViewer); 200 203 … … 205 208 connect(m_pHelpEngine, &QHelpEngine::setupFinished, 206 209 this, &UIHelpBrowserWidget::sltHandleHelpEngineSetupFinished); 207 208 210 connect(m_pContentWidget, &QHelpContentWidget::linkActivated, 209 211 m_pContentViewer, &UIHelpBrowserViewer::setSource); 210 212 connect(m_pContentWidget, &QHelpContentWidget::clicked, 211 213 this, &UIHelpBrowserWidget::sltHandleContentWidgetItemClicked); 212 213 214 214 connect(m_pIndexWidget, &QHelpIndexWidget::linkActivated, 215 215 m_pContentViewer, &UIHelpBrowserViewer::setSource); … … 256 256 void UIHelpBrowserWidget::loadOptions() 257 257 { 258 if (m_pContentViewer) 259 { 260 QUrl url(gEDataManager->helpBrowserLastUrl()); 261 if (url.isValid()) 262 m_pContentViewer->setSource(url); 263 } 258 264 } 259 265 260 266 void UIHelpBrowserWidget::saveOptions() 261 267 { 268 if (m_pContentViewer) 269 { 270 gEDataManager->setHelpBrowserLastUrl(m_pContentViewer->source().toString()); 271 } 262 272 } 263 273 … … 357 367 } 358 368 369 void UIHelpBrowserWidget::sltHandleHelpBrowserViewerSourceChange(const QUrl &source) 370 { 371 printf("%s\n", qPrintable(source.toString())); 372 } 373 359 374 360 375 #include "UIHelpBrowserWidget.moc" -
trunk/src/VBox/Frontends/VirtualBox/src/helpbrowser/UIHelpBrowserWidget.h
r86715 r86716 80 80 void sltHandleContentWidgetItemClicked(const QModelIndex &index); 81 81 void sltHandleTabVisibility(bool togggled); 82 void sltHandleHelpBrowserViewerSourceChange(const QUrl &source); 82 83 83 84 private:
Note:
See TracChangeset
for help on using the changeset viewer.