- Timestamp:
- Oct 30, 2020 10:08:52 AM (4 years ago)
- Location:
- trunk/src/VBox/Frontends/VirtualBox/src
- Files:
-
- 7 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Frontends/VirtualBox/src/extradata/UIExtraDataDefs.cpp
r86716 r86764 240 240 /* Help Browser */ 241 241 const char *UIExtraDataDefs::GUI_HelpBrowserLastURL = "GUI/HelpBrowserLastURL"; 242 const char *UIExtraDataDefs::GUI_HelpBrowserDialogGeometry = "GUI/HelpBrowserDialogGeomety"; 242 243 243 244 /* VM Resource Monitor: */ -
trunk/src/VBox/Frontends/VirtualBox/src/extradata/UIExtraDataDefs.h
r86716 r86764 439 439 * @{ */ 440 440 SHARED_LIBRARY_STUFF extern const char *GUI_HelpBrowserLastURL; 441 SHARED_LIBRARY_STUFF extern const char *GUI_HelpBrowserDialogGeometry; 441 442 /** @} */ 442 443 -
trunk/src/VBox/Frontends/VirtualBox/src/extradata/UIExtraDataManager.cpp
r86716 r86764 1981 1981 #endif /* VBOX_WITH_DEBUGGER_GUI */ 1982 1982 << GUI_ExtraDataManager_Geometry << GUI_ExtraDataManager_SplitterHints 1983 << GUI_LogWindowGeometry; 1983 << GUI_LogWindowGeometry 1984 << GUI_HelpBrowserLastURL 1985 << GUI_HelpBrowserDialogGeometry; 1984 1986 } 1985 1987 … … 4600 4602 { 4601 4603 return extraDataString(GUI_HelpBrowserLastURL); 4604 } 4605 4606 QRect UIExtraDataManager::helpBrowserDialogGeometry(QWidget *pWidget, QWidget *pParentWidget, const QRect &defaultGeometry) 4607 { 4608 return dialogGeometry(GUI_HelpBrowserDialogGeometry, pWidget, pParentWidget, defaultGeometry); 4609 } 4610 4611 void UIExtraDataManager::setHelpBrowserDialogGeometry(const QRect &geometry, bool fMaximized) 4612 { 4613 /* Serialize passed values: */ 4614 QStringList data; 4615 data << QString::number(geometry.x()); 4616 data << QString::number(geometry.y()); 4617 data << QString::number(geometry.width()); 4618 data << QString::number(geometry.height()); 4619 if (fMaximized) 4620 data << GUI_Geometry_State_Max; 4621 4622 /* Re-cache corresponding extra-data: */ 4623 setExtraDataStringList(GUI_HelpBrowserDialogGeometry, data); 4624 } 4625 4626 bool UIExtraDataManager::helpBrowserDialogShouldBeMaximized() 4627 { 4628 /* Get corresponding extra-data: */ 4629 const QStringList data = extraDataStringList(GUI_HelpBrowserDialogGeometry); 4630 4631 /* Make sure 5th item has required value: */ 4632 return data.size() == 5 && data[4] == GUI_Geometry_State_Max; 4602 4633 } 4603 4634 -
trunk/src/VBox/Frontends/VirtualBox/src/extradata/UIExtraDataManager.h
r86716 r86764 789 789 void setHelpBrowserLastUrl(const QString &url); 790 790 QString helpBrowserLastUrl(); 791 QRect helpBrowserDialogGeometry(QWidget *pWidget, QWidget *pParentWidget, const QRect &defaultGeometry); 792 void setHelpBrowserDialogGeometry(const QRect &geometry, bool fMaximized); 793 bool helpBrowserDialogShouldBeMaximized(); 791 794 /** @} */ 792 795 -
trunk/src/VBox/Frontends/VirtualBox/src/helpbrowser/UIHelpBrowserDialog.cpp
r86583 r86764 112 112 void UIHelpBrowserDialog::loadSettings() 113 113 { 114 const QRect availableGeo = gpDesktop->availableGeometry(this); 115 int iDefaultWidth = availableGeo.width() / 2; 116 int iDefaultHeight = availableGeo.height() * 3 / 4; 117 QRect defaultGeo(0, 0, iDefaultWidth, iDefaultHeight); 118 119 /* Load geometry from extradata: */ 120 const QRect geo = gEDataManager->helpBrowserDialogGeometry(this, centerWidget(), defaultGeo); 121 LogRel2(("GUI: UIHelpBrowserDialog: Restoring geometry to: Origin=%dx%d, Size=%dx%d\n", 122 geo.x(), geo.y(), geo.width(), geo.height())); 123 restoreGeometry(geo); 114 124 } 115 125 116 126 void UIHelpBrowserDialog::saveSettings() 117 127 { 128 const QRect geo = currentGeometry(); 129 LogRel2(("GUI: UIHelpBrowserDialog: Saving geometry as: Origin=%dx%d, Size=%dx%d\n", 130 geo.x(), geo.y(), geo.width(), geo.height())); 131 gEDataManager->setHelpBrowserDialogGeometry(geo, isCurrentlyMaximized()); 118 132 } 119 133 120 134 bool UIHelpBrowserDialog::shouldBeMaximized() const 121 135 { 122 return gEDataManager-> logWindowShouldBeMaximized();136 return gEDataManager->helpBrowserDialogShouldBeMaximized(); 123 137 } 124 138 -
trunk/src/VBox/Frontends/VirtualBox/src/helpbrowser/UIHelpBrowserWidget.cpp
r86758 r86764 315 315 pSearchLayout->addWidget(m_pHelpSearchQueryWidget); 316 316 pSearchLayout->addWidget(m_pHelpSearchResultWidget); 317 317 m_pHelpSearchQueryWidget->expandExtendedSearch(); 318 318 319 319 connect(m_pHelpSearchQueryWidget, &QHelpSearchQueryWidget::search, 320 320 this, &UIHelpBrowserWidget::sltHandleSearchStart); 321 // connect(resultWidget, &QHelpSearchResultWidget::requestShowLink,322 // this, &SearchWidget::requestShowLink);321 connect(m_pHelpSearchResultWidget, &QHelpSearchResultWidget::requestShowLink, 322 m_pContentViewer, &UIHelpBrowserViewer::setSource); 323 323 324 324 // connect(searchEngine, &QHelpSearchEngine::searchingStarted, … … 328 328 329 329 330 331 332 // connect(m_pHelpSearchEngine, &QHelpSearchEngine::indexingStarted, 333 // this, &UIHelpBrowserWidget::sltHandleIndexingStarted); 334 // connect(m_pHelpSearchEngine, &QHelpSearchEngine::indexingFinished, 335 // this, &UIHelpBrowserWidget::sltHandleIndexingFinished); 336 337 //void searchingFinished(int searchResultCount) 338 330 connect(m_pHelpSearchEngine, &QHelpSearchEngine::indexingStarted, 331 this, &UIHelpBrowserWidget::sltHandleIndexingStarted); 332 connect(m_pHelpSearchEngine, &QHelpSearchEngine::indexingFinished, 333 this, &UIHelpBrowserWidget::sltHandleIndexingFinished); 339 334 340 335 connect(m_pHelpSearchEngine, &QHelpSearchEngine::searchingStarted, 341 336 this, &UIHelpBrowserWidget::sltHandleSearchingStarted); 342 337 343 m_pHelpSearchEngine->reindexDocumentation(); 338 344 339 # endif//if QT_VERSION >= QT_VERSION_CHECK(5, 9, 0) 345 340 #endif … … 693 688 void UIHelpBrowserWidget::sltHandleIndexingStarted() 694 689 { 690 if (m_pSearchContainerWidget) 691 m_pSearchContainerWidget->setEnabled(false); 695 692 printf("indexing started\n"); 696 693 } … … 698 695 void UIHelpBrowserWidget::sltHandleIndexingFinished() 699 696 { 697 if (m_pSearchContainerWidget) 698 m_pSearchContainerWidget->setEnabled(true); 699 700 700 printf("indexing finished\n"); 701 701 } … … 703 703 void UIHelpBrowserWidget::sltHandleSearchingStarted() 704 704 { 705 printf("search started\n"); 705 706 706 } 707 707 -
trunk/src/VBox/Frontends/VirtualBox/src/logviewer/UIVMLogViewerDialog.cpp
r86231 r86764 115 115 void UIVMLogViewerDialog::loadSettings() 116 116 { 117 /* Invent default window geometry: */ 117 118 118 const QRect availableGeo = gpDesktop->availableGeometry(this); 119 119 int iDefaultWidth = availableGeo.width() / 2;
Note:
See TracChangeset
for help on using the changeset viewer.