Changeset 43782 in vbox
- Timestamp:
- Oct 31, 2012 11:12:47 AM (12 years ago)
- Location:
- trunk/src/VBox/Frontends/VirtualBox/src/selector/graphics/chooser
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Frontends/VirtualBox/src/selector/graphics/chooser/UIGChooserItemGroup.cpp
r43779 r43782 345 345 int iHorizontalMargin = data(GroupItemData_HorizonalMargin).toInt(); 346 346 int iMajorSpacing = data(GroupItemData_MajorSpacing).toInt(); 347 int iToggleButtonWidth = data(GroupItemData_ToggleButtonSize).toSize F().width();348 int iEnterButtonWidth = data(GroupItemData_EnterButtonSize).toSize F().width();349 int iExitButtonWidth = data(GroupItemData_ExitButtonSize).toSize F().width();347 int iToggleButtonWidth = data(GroupItemData_ToggleButtonSize).toSize().width(); 348 int iEnterButtonWidth = data(GroupItemData_EnterButtonSize).toSize().width(); 349 int iExitButtonWidth = data(GroupItemData_ExitButtonSize).toSize().width(); 350 350 int iGroupPixmapWidth = data(GroupItemData_GroupPixmapSize).toSize().width(); 351 351 int iMachinePixmapWidth = data(GroupItemData_MachinePixmapSize).toSize().width(); … … 377 377 case GroupItemData_MachineCountText: return m_machineItems.isEmpty() ? QString() : QString::number(m_machineItems.size()); 378 378 /* Sizes: */ 379 case GroupItemData_ToggleButtonSize: return m_pToggleButton ? m_pToggleButton->minimumSizeHint() : QSizeF(0, 0);380 case GroupItemData_EnterButtonSize: return m_pEnterButton ? m_pEnterButton->minimumSizeHint() : QSizeF(0, 0);381 case GroupItemData_ExitButtonSize: return m_pExitButton ? m_pExitButton->minimumSizeHint() : QSizeF(0, 0);379 case GroupItemData_ToggleButtonSize: return m_pToggleButton ? m_pToggleButton->minimumSizeHint().toSize() : QSize(0, 0); 380 case GroupItemData_EnterButtonSize: return m_pEnterButton ? m_pEnterButton->minimumSizeHint().toSize() : QSize(0, 0); 381 case GroupItemData_ExitButtonSize: return m_pExitButton ? m_pExitButton->minimumSizeHint().toSize() : QSize(0, 0); 382 382 case GroupItemData_MinimumNameSize: 383 383 { 384 384 if (isMainRoot()) 385 return QSize F(0, 0);385 return QSize(0, 0); 386 386 QFont font = data(GroupItemData_NameFont).value<QFont>(); 387 387 QPaintDevice *pPaintDevice = model()->paintDevice(); … … 395 395 { 396 396 if (isMainRoot()) 397 return QSize F(0, 0);397 return QSize(0, 0); 398 398 QFontMetrics fm(data(GroupItemData_NameFont).value<QFont>(), model()->paintDevice()); 399 399 return QSize(fm.width(data(GroupItemData_Name).toString()) + 2, fm.height()); 400 }401 case GroupItemData_NameEditorSize:402 {403 if (isRoot())404 return QSizeF(0, 0);405 return m_pNameEditorWidget->minimumSizeHint();406 400 } 407 401 case GroupItemData_GroupPixmapSize: … … 412 406 { 413 407 if (isMainRoot()) 414 return QSize F(0, 0);408 return QSize(0, 0); 415 409 QFontMetrics fm(data(GroupItemData_InfoFont).value<QFont>(), model()->paintDevice()); 416 410 return QSize(fm.width(data(GroupItemData_GroupCountText).toString()), fm.height()); … … 419 413 { 420 414 if (isMainRoot()) 421 return QSize F(0, 0);415 return QSize(0, 0); 422 416 QFontMetrics fm(data(GroupItemData_InfoFont).value<QFont>(), model()->paintDevice()); 423 417 return QSize(fm.width(data(GroupItemData_MachineCountText).toString()), fm.height()); … … 885 879 886 880 /* Prepare variables: */ 887 int iExitButtonHeight = data(GroupItemData_ExitButtonSize).toSize F().height();881 int iExitButtonHeight = data(GroupItemData_ExitButtonSize).toSize().height(); 888 882 889 883 /* Layout exit-button: */ … … 915 909 /* Prepare variables: */ 916 910 int iFullWidth = geometry().width(); 917 QSizeF toggleButtonSize = data(GroupItemData_ToggleButtonSize).toSize F().toSize();911 QSizeF toggleButtonSize = data(GroupItemData_ToggleButtonSize).toSize(); 918 912 int iToggleButtonWidth = toggleButtonSize.width(); 919 913 int iButtonHeight = toggleButtonSize.height(); 920 QSizeF enterButtonSize = data(GroupItemData_EnterButtonSize).toSize F().toSize();914 QSizeF enterButtonSize = data(GroupItemData_EnterButtonSize).toSize(); 921 915 int iEnterButtonWidth = enterButtonSize.width(); 922 916 int iEnterButtonHeight = enterButtonSize.height(); … … 1509 1503 QRect fullRect = pOption->rect; 1510 1504 int iMinorSpacing = data(GroupItemData_MinorSpacing).toInt(); 1511 int iEnterButtonWidth = data(GroupItemData_EnterButtonSize).toSize F().width();1505 int iEnterButtonWidth = data(GroupItemData_EnterButtonSize).toSize().width(); 1512 1506 QSize groupPixmapSize = data(GroupItemData_GroupPixmapSize).toSize(); 1513 1507 QSize machinePixmapSize = data(GroupItemData_MachinePixmapSize).toSize(); -
trunk/src/VBox/Frontends/VirtualBox/src/selector/graphics/chooser/UIGChooserItemGroup.h
r43779 r43782 118 118 GroupItemData_MinimumNameSize, 119 119 GroupItemData_NameSize, 120 GroupItemData_NameEditorSize,121 120 GroupItemData_GroupPixmapSize, 122 121 GroupItemData_MachinePixmapSize,
Note:
See TracChangeset
for help on using the changeset viewer.