Changeset 80773 in vbox
- Timestamp:
- Sep 13, 2019 11:10:21 AM (5 years ago)
- Location:
- trunk/src/VBox/Frontends/VirtualBox/src
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Frontends/VirtualBox/src/extradata/UIExtraDataDefs.cpp
r79921 r80773 194 194 const char *UIExtraDataDefs::GUI_Scaling_Optimization = "GUI/Scaling/Optimization"; 195 195 196 /* Virtual Machine: Information dialog: */ 197 const char *UIExtraDataDefs::GUI_InformationWindowGeometry = "GUI/InformationWindowGeometry"; 198 const char *UIExtraDataDefs::GUI_InformationWindowElements = "GUI/InformationWindowElements"; 196 /* Virtual Machine: Session Information Dialog: */ 197 const char *UIExtraDataDefs::GUI_SessionInformationDialogGeometry = "GUI/SessionInformationDialogGeometry"; 199 198 200 199 /* Guest control UI: */ -
trunk/src/VBox/Frontends/VirtualBox/src/extradata/UIExtraDataDefs.h
r80129 r80773 369 369 * @{ */ 370 370 /** Holds information-window geometry. */ 371 SHARED_LIBRARY_STUFF extern const char *GUI_InformationWindowGeometry; 372 /** Holds information-window elements. */ 373 SHARED_LIBRARY_STUFF extern const char *GUI_InformationWindowElements; 371 SHARED_LIBRARY_STUFF extern const char *GUI_SessionInformationDialogGeometry; 374 372 /** @} */ 375 373 -
trunk/src/VBox/Frontends/VirtualBox/src/extradata/UIExtraDataManager.cpp
r79921 r80773 2023 2023 << GUI_HidLedsSync 2024 2024 << GUI_ScaleFactor << GUI_Scaling_Optimization 2025 << GUI_InformationWindowGeometry 2026 << GUI_InformationWindowElements 2025 << GUI_SessionInformationDialogGeometry 2027 2026 << GUI_GuestControl_ProcessControlSplitterHints 2028 2027 << GUI_GuestControl_FileManagerDialogGeometry … … 4161 4160 } 4162 4161 4163 QRect UIExtraDataManager:: informationWindowGeometry(QWidget *pWidget, QWidget *pParentWidget, const QUuid &uID)4162 QRect UIExtraDataManager::sessionInformationDialogGeometry(QWidget *pWidget, QWidget *pParentWidget) 4164 4163 { 4165 4164 /* Get corresponding extra-data: */ 4166 const QStringList data = extraDataStringList(GUI_ InformationWindowGeometry, uID);4165 const QStringList data = extraDataStringList(GUI_SessionInformationDialogGeometry); 4167 4166 4168 4167 /* Parse loaded data: */ … … 4211 4210 } 4212 4211 4213 bool UIExtraDataManager:: informationWindowShouldBeMaximized(const QUuid &uID)4212 bool UIExtraDataManager::sessionInformationDialogShouldBeMaximized() 4214 4213 { 4215 4214 /* Get corresponding extra-data: */ 4216 const QStringList data = extraDataStringList(GUI_ InformationWindowGeometry, uID);4215 const QStringList data = extraDataStringList(GUI_SessionInformationDialogGeometry); 4217 4216 4218 4217 /* Make sure 5th item has required value: */ … … 4220 4219 } 4221 4220 4222 void UIExtraDataManager::set InformationWindowGeometry(const QRect &geometry, bool fMaximized, const QUuid &uID)4221 void UIExtraDataManager::setSessionInformationDialogGeometry(const QRect &geometry, bool fMaximized) 4223 4222 { 4224 4223 /* Serialize passed values: */ … … 4232 4231 4233 4232 /* Re-cache corresponding extra-data: */ 4234 setExtraDataStringList(GUI_ InformationWindowGeometry, data, uID);4233 setExtraDataStringList(GUI_SessionInformationDialogGeometry, data); 4235 4234 } 4236 4235 … … 4436 4435 { 4437 4436 setDialogGeometry(GUI_GuestControl_ProcessControlDialogGeometry, geometry, fMaximized); 4438 }4439 4440 4441 QMap<InformationElementType, bool> UIExtraDataManager::informationWindowElements()4442 {4443 /* Get corresponding extra-data: */4444 const QStringList data = extraDataStringList(GUI_InformationWindowElements);4445 4446 /* Desearialize passed elements: */4447 QMap<InformationElementType, bool> elements;4448 foreach (QString strItem, data)4449 {4450 bool fOpened = true;4451 if (strItem.endsWith("Closed", Qt::CaseInsensitive))4452 {4453 fOpened = false;4454 strItem.remove("Closed");4455 }4456 InformationElementType type = gpConverter->fromInternalString<InformationElementType>(strItem);4457 if (type != InformationElementType_Invalid)4458 elements[type] = fOpened;4459 }4460 4461 /* Return elements: */4462 return elements;4463 }4464 4465 void UIExtraDataManager::setInformationWindowElements(const QMap<InformationElementType, bool> &elements)4466 {4467 /* Prepare corresponding extra-data: */4468 QStringList data;4469 4470 /* Searialize passed elements: */4471 foreach (InformationElementType type, elements.keys())4472 {4473 QString strValue = gpConverter->toInternalString(type);4474 if (!elements[type])4475 strValue += "Closed";4476 data << strValue;4477 }4478 4479 /* Re-cache corresponding extra-data: */4480 setExtraDataStringList(GUI_InformationWindowElements, data);4481 4437 } 4482 4438 -
trunk/src/VBox/Frontends/VirtualBox/src/extradata/UIExtraDataManager.h
r79921 r80773 642 642 /** @} */ 643 643 644 /** @name Virtual Machine: Information dialog645 * @{ */ 646 /** Returns information-windowgeometry using @a pWidget and @a pParentWidget as hints. */647 QRect informationWindowGeometry(QWidget *pWidget, QWidget *pParentWidget, const QUuid &uID);644 /** @name Virtual Machine: Session Information dialog 645 * @{ */ 646 /** Returns session information dialog geometry using @a pWidget and @a pParentWidget as hints. */ 647 QRect sessionInformationDialogGeometry(QWidget *pWidget, QWidget *pParentWidget); 648 648 /** Returns whether information-window should be maximized or not. */ 649 bool informationWindowShouldBeMaximized(const QUuid &uID);649 bool sessionInformationDialogShouldBeMaximized(); 650 650 /** Defines information-window @a geometry and @a fMaximized state. */ 651 void setInformationWindowGeometry(const QRect &geometry, bool fMaximized, const QUuid &uID); 652 653 /** Returns information-window elements. */ 654 QMap<InformationElementType, bool> informationWindowElements(); 655 /** Defines information-window @a elements. */ 656 void setInformationWindowElements(const QMap<InformationElementType, bool> &elements); 651 void setSessionInformationDialogGeometry(const QRect &geometry, bool fMaximized); 657 652 /** @} */ 658 653 -
trunk/src/VBox/Frontends/VirtualBox/src/runtime/information/UIVMInformationDialog.cpp
r80381 r80773 100 100 bool UIVMInformationDialog::shouldBeMaximized() const 101 101 { 102 return gEDataManager-> informationWindowShouldBeMaximized(uiCommon().managedVMUuid());102 return gEDataManager->sessionInformationDialogShouldBeMaximized(); 103 103 } 104 104 … … 292 292 { 293 293 /* Load geometry: */ 294 m_geometry = gEDataManager-> informationWindowGeometry(this, m_pMachineWindow, uiCommon().managedVMUuid());294 m_geometry = gEDataManager->sessionInformationDialogGeometry(this, m_pMachineWindow); 295 295 296 296 /* Restore geometry: */ … … 307 307 /* Save geometry: */ 308 308 #ifdef VBOX_WS_MAC 309 gEDataManager->set InformationWindowGeometry(m_geometry, ::darwinIsWindowMaximized(this), uiCommon().managedVMUuid());309 gEDataManager->setSessionInformationDialogGeometry(m_geometry, ::darwinIsWindowMaximized(this)); 310 310 #else /* VBOX_WS_MAC */ 311 gEDataManager->set InformationWindowGeometry(m_geometry, isMaximized(), uiCommon().managedVMUuid());311 gEDataManager->setSessionInformationDialogGeometry(m_geometry, isMaximized()); 312 312 #endif /* !VBOX_WS_MAC */ 313 313 LogRel2(("GUI: UIVMInformationDialog: Geometry saved as: Origin=%dx%d, Size=%dx%d\n",
Note:
See TracChangeset
for help on using the changeset viewer.