Changeset 51514 in vbox for trunk/src/VBox
- Timestamp:
- Jun 3, 2014 2:42:36 PM (11 years ago)
- Location:
- trunk/src/VBox/Frontends/VirtualBox/src
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Frontends/VirtualBox/src/extradata/UIExtraDataManager.cpp
r51484 r51514 311 311 } 312 312 313 QRect UIExtraDataManager::selectorWindowGeometry(QWidget *pHintWidget /* = 0 */) 313 QRect UIExtraDataManager::selectorWindowGeometry(QWidget *pHintWidget /* = 0 */) const 314 314 { 315 315 /* Load corresponding extra-data: */ … … 354 354 } 355 355 356 bool UIExtraDataManager::isSelectorWindowShouldBeMaximized() 356 bool UIExtraDataManager::isSelectorWindowShouldBeMaximized() const 357 357 { 358 358 /* Load corresponding extra-data: */ … … 376 376 /* Re-cache corresponding extra-data: */ 377 377 setExtraDataStringList(GUI_LastSelectorWindowPosition, data); 378 } 379 380 QList<int> UIExtraDataManager::selectorWindowSplitterHints() const 381 { 382 /* Load corresponding extra-data list: */ 383 const QStringList data = extraDataStringList(GUI_SplitterSizes); 384 385 /* Parse loaded data: */ 386 QList<int> hints; 387 hints << (data.size() > 0 ? data[0].toInt() : 0); 388 hints << (data.size() > 1 ? data[1].toInt() : 0); 389 390 /* Return hints: */ 391 return hints; 392 } 393 394 void UIExtraDataManager::setSelectorWindowSplitterHints(const QList<int> &hints) 395 { 396 /* Parse passed hints: */ 397 QStringList data; 398 data << (hints.size() > 0 ? QString::number(hints[0]) : QString()); 399 data << (hints.size() > 1 ? QString::number(hints[1]) : QString()); 400 401 /* Re-cache corresponding extra-data: */ 402 setExtraDataStringList(GUI_SplitterSizes, data); 378 403 } 379 404 -
trunk/src/VBox/Frontends/VirtualBox/src/extradata/UIExtraDataManager.h
r51484 r51514 132 132 133 133 /** Returns selector-window geometry using @a pHintWidget as the hint. */ 134 QRect selectorWindowGeometry(QWidget *pHintWidget = 0) ;134 QRect selectorWindowGeometry(QWidget *pHintWidget = 0) const; 135 135 /** Returns whether selector-window should be maximized or not. */ 136 bool isSelectorWindowShouldBeMaximized() ;136 bool isSelectorWindowShouldBeMaximized() const; 137 137 /** Defines selector-window geometry to passed @a geometry which is @a fMaximized. */ 138 138 void setSelectorWindowGeometry(const QRect &geometry, bool fMaximized); 139 140 /** Returns selector-window splitter hints. */ 141 QList<int> selectorWindowSplitterHints() const; 142 /** Defines selector-window splitter @a hints. */ 143 void setSelectorWindowSplitterHints(const QList<int> &hints); 139 144 140 145 /** Returns whether this machine started for the first time. */ -
trunk/src/VBox/Frontends/VirtualBox/src/selector/UISelectorWindow.cpp
r51455 r51514 1543 1543 /* Restore splitter handle position: */ 1544 1544 { 1545 QList<int> sizes = vbox.GetExtraDataIntList(GUI_SplitterSizes); 1546 1547 if (sizes.size() == 2) 1548 m_pSplitter->setSizes(sizes); 1545 m_pSplitter->setSizes(gEDataManager->selectorWindowSplitterHints()); 1549 1546 } 1550 1547 … … 1570 1567 /* Save splitter handle position: */ 1571 1568 { 1572 vbox.SetExtraDataIntList(GUI_SplitterSizes,m_pSplitter->sizes());1569 gEDataManager->setSelectorWindowSplitterHints(m_pSplitter->sizes()); 1573 1570 } 1574 1571
Note:
See TracChangeset
for help on using the changeset viewer.