- Timestamp:
- Nov 26, 2014 1:37:50 PM (10 years ago)
- Location:
- trunk/src/VBox/Frontends/VirtualBox/src
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Frontends/VirtualBox/src/extradata/UIExtraDataManager.cpp
r53389 r53401 3275 3275 } 3276 3276 3277 void UIExtraDataManager::setScaleFactor(double dScaleFactor, const QString &strID) 3278 { 3279 /* Set corresponding extra-data value: */ 3280 setExtraDataString(GUI_ScaleFactor, QString::number(dScaleFactor), strID); 3281 } 3282 3277 3283 QRect UIExtraDataManager::informationWindowGeometry(QWidget *pWidget, QWidget *pParentWidget, const QString &strID) 3278 3284 { -
trunk/src/VBox/Frontends/VirtualBox/src/extradata/UIExtraDataManager.h
r53389 r53401 454 454 bool hidLedsSyncState(const QString &strID); 455 455 456 /** Returns scale-factor. */456 /** Returns the scale-factor. */ 457 457 double scaleFactor(const QString &strID); 458 /** Defines the @a dScaleFactor. */ 459 void setScaleFactor(double dScaleFactor, const QString &strID); 458 460 /** @} */ 459 461 -
trunk/src/VBox/Frontends/VirtualBox/src/settings/machine/UIMachineSettingsDisplay.cpp
r53397 r53401 5 5 6 6 /* 7 * Copyright (C) 2008-201 3Oracle Corporation7 * Copyright (C) 2008-2014 Oracle Corporation 8 8 * 9 9 * This file is part of VirtualBox Open Source Edition (OSE), as … … 142 142 143 143 /* Cache Machine Window data: */ 144 displayData.m_dScaleFactor = gEDataManager->scaleFactor(m_machine.GetId()); 144 145 displayData.m_fShowMiniToolBar = gEDataManager->miniToolbarEnabled(m_machine.GetId()); 145 146 displayData.m_fMiniToolBarAtTop = gEDataManager->miniToolbarAlignment(m_machine.GetId()) == Qt::AlignTop; … … 197 198 m_pStatusBarEditor->setMachineID(strMachineID); 198 199 m_pMenuBarEditor->setActionPool(m_pActionPool); 200 m_pEditorGuestScreenScale->setValue(displayData.m_dScaleFactor * 100); 199 201 m_pCheckBoxShowMiniToolBar->setChecked(displayData.m_fShowMiniToolBar); 200 202 m_pComboToolBarAlignment->setChecked(displayData.m_fMiniToolBarAtTop); … … 243 245 244 246 /* Gather Machine Window data from page: */ 247 displayData.m_dScaleFactor = (double)m_pEditorGuestScreenScale->value() / 100; 245 248 displayData.m_fShowMiniToolBar = m_pCheckBoxShowMiniToolBar->isChecked(); 246 249 displayData.m_fMiniToolBarAtTop = m_pComboToolBarAlignment->isChecked(); … … 331 334 if (isMachineInValidMode()) 332 335 { 336 gEDataManager->setScaleFactor(displayData.m_dScaleFactor, m_machine.GetId()); 333 337 gEDataManager->setMiniToolbarEnabled(displayData.m_fShowMiniToolBar, m_machine.GetId()); 334 338 gEDataManager->setMiniToolbarAlignment(displayData.m_fMiniToolBarAtTop ? Qt::AlignTop : Qt::AlignBottom, m_machine.GetId()); … … 497 501 498 502 /* Machine Window tab-order: */ 499 setTabOrder(m_pEditorVideoCaptureBitRate, m_pCheckBoxShowMiniToolBar); 503 setTabOrder(m_pEditorVideoCaptureBitRate, m_pSliderGuestScreenScale); 504 setTabOrder(m_pSliderGuestScreenScale, m_pEditorGuestScreenScale); 505 setTabOrder(m_pEditorGuestScreenScale, m_pCheckBoxShowMiniToolBar); 500 506 setTabOrder(m_pCheckBoxShowMiniToolBar, m_pComboToolBarAlignment); 501 507 } … … 723 729 m_pSliderVideoCaptureQuality->blockSignals(false); 724 730 updateVideoCaptureSizeHint(); 731 } 732 733 void UIMachineSettingsDisplay::sltHandleGuestScreenScaleSliderChange() 734 { 735 /* Apply proposed scale-factor: */ 736 m_pEditorGuestScreenScale->blockSignals(true); 737 m_pEditorGuestScreenScale->setValue(m_pSliderGuestScreenScale->value()); 738 m_pEditorGuestScreenScale->blockSignals(false); 739 } 740 741 void UIMachineSettingsDisplay::sltHandleGuestScreenScaleEditorChange() 742 { 743 /* Apply proposed scale-factor: */ 744 m_pSliderGuestScreenScale->blockSignals(true); 745 m_pSliderGuestScreenScale->setValue(m_pEditorGuestScreenScale->value()); 746 m_pSliderGuestScreenScale->blockSignals(false); 725 747 } 726 748 … … 887 909 /* Create personal action-pool: */ 888 910 m_pActionPool = UIActionPool::create(UIActionPoolType_Runtime); 911 912 /* Prepare scale-factor slider: */ 913 m_pSliderGuestScreenScale->setMinimum(100); 914 m_pSliderGuestScreenScale->setMaximum(200); 915 m_pSliderGuestScreenScale->setPageStep(10); 916 m_pSliderGuestScreenScale->setSingleStep(1); 917 m_pSliderGuestScreenScale->setTickInterval(10); 918 m_pSliderGuestScreenScale->setSnappingEnabled(true); 919 connect(m_pSliderGuestScreenScale, SIGNAL(valueChanged(int)), this, SLOT(sltHandleGuestScreenScaleSliderChange())); 920 921 /* Prepare scale-factor editor: */ 922 m_pEditorGuestScreenScale->setMinimum(100); 923 m_pEditorGuestScreenScale->setMaximum(200); 924 vboxGlobal().setMinimumWidthAccordingSymbolCount(m_pEditorGuestScreenScale, 5); 925 connect(m_pEditorGuestScreenScale, SIGNAL(valueChanged(int)), this, SLOT(sltHandleGuestScreenScaleEditorChange())); 889 926 } 890 927 -
trunk/src/VBox/Frontends/VirtualBox/src/settings/machine/UIMachineSettingsDisplay.h
r53397 r53401 4 4 5 5 /* 6 * Copyright (C) 2008-201 3Oracle Corporation6 * Copyright (C) 2008-2014 Oracle Corporation 7 7 * 8 8 * This file is part of VirtualBox Open Source Edition (OSE), as … … 52 52 , m_iVideoCaptureFrameRate(0) 53 53 , m_iVideoCaptureBitRate(0) 54 , m_dScaleFactor(1) 54 55 , m_fShowMiniToolBar(false) 55 56 , m_fMiniToolBarAtTop(false) … … 78 79 (m_iVideoCaptureBitRate == other.m_iVideoCaptureBitRate) && 79 80 (m_screens == other.m_screens) && 81 (m_dScaleFactor == other.m_dScaleFactor) && 80 82 (m_fShowMiniToolBar == other.m_fShowMiniToolBar) && 81 83 (m_fMiniToolBarAtTop == other.m_fMiniToolBarAtTop); … … 113 115 114 116 /* Variables: Machine Window stuff: */ 117 double m_dScaleFactor; 115 118 bool m_fShowMiniToolBar; 116 119 bool m_fMiniToolBarAtTop; … … 185 188 void sltHandleVideoCaptureQualitySliderChange(); 186 189 void sltHandleVideoCaptureBitRateEditorChange(); 190 191 /* Handlers: Guest-screen scale-factor stuff: */ 192 void sltHandleGuestScreenScaleSliderChange(); 193 void sltHandleGuestScreenScaleEditorChange(); 187 194 188 195 private: -
trunk/src/VBox/Frontends/VirtualBox/src/settings/machine/UIMachineSettingsDisplay.ui
r53397 r53401 3 3 VBox frontends: Qt4 GUI ("VirtualBox"): 4 4 5 Copyright (C) 2008-201 3Oracle Corporation5 Copyright (C) 2008-2014 Oracle Corporation 6 6 7 7 This file is part of VirtualBox Open Source Edition (OSE), as … … 650 650 </attribute> 651 651 <layout class="QGridLayout" name="m_pLayoutTabMachineWindow"> 652 <item row="0" column="0" colspan=" 2">652 <item row="0" column="0" colspan="3"> 653 653 <widget class="UIMenuBarEditorWidget" name="m_pMenuBarEditor"> 654 654 <property name="whatsThis"> … … 658 658 </item> 659 659 <item row="1" column="0"> 660 <widget class="QLabel" name="m_pLabelGuestScreenScale"> 661 <property name="text"> 662 <string>Screen Scale Factor:</string> 663 </property> 664 <property name="alignment"> 665 <set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set> 666 </property> 667 </widget> 668 </item> 669 <item row="1" column="1" rowspan="2"> 670 <layout class="QGridLayout" name="m_pLayoutGuestScreenScaleSlider"> 671 <property name="spacing"> 672 <number>0</number> 673 </property> 674 <item row="0" column="0" colspan="3"> 675 <widget class="QIAdvancedSlider" name="m_pSliderGuestScreenScale"> 676 <property name="whatsThis"> 677 <string>This setting determines the guest-screen scale-factor.</string> 678 </property> 679 <property name="orientation"> 680 <enum>Qt::Horizontal</enum> 681 </property> 682 </widget> 683 </item> 684 <item row="1" column="0"> 685 <widget class="QLabel" name="m_pLabelGuestScreenScaleMin"> 686 <property name="text"> 687 <string>100%</string> 688 </property> 689 </widget> 690 </item> 691 <item row="1" column="1"> 692 <spacer name="m_pSpacerGuestScreenScale"> 693 <property name="orientation"> 694 <enum>Qt::Horizontal</enum> 695 </property> 696 <property name="sizeHint" stdset="0"> 697 <size> 698 <width>0</width> 699 <height>0</height> 700 </size> 701 </property> 702 </spacer> 703 </item> 704 <item row="1" column="2"> 705 <widget class="QLabel" name="m_pLabelGuestScreenScaleMax"> 706 <property name="text"> 707 <string>200%</string> 708 </property> 709 </widget> 710 </item> 711 </layout> 712 </item> 713 <item row="1" column="2"> 714 <widget class="QSpinBox" name="m_pEditorGuestScreenScale"> 715 <property name="whatsThis"> 716 <string>This setting determines the guest-screen scale-factor.</string> 717 </property> 718 <property name="suffix"> 719 <string>%</string> 720 </property> 721 </widget> 722 </item> 723 <item row="3" column="0"> 660 724 <widget class="QLabel" name="m_pLabelMiniToolBar"> 661 725 <property name="text"> … … 667 731 </widget> 668 732 </item> 669 <item row=" 1" column="1">733 <item row="3" column="1" colspan="2"> 670 734 <widget class="QCheckBox" name="m_pCheckBoxShowMiniToolBar"> 671 735 <property name="sizePolicy"> … … 686 750 </widget> 687 751 </item> 688 <item row=" 2" column="1">752 <item row="4" column="1" colspan="2"> 689 753 <widget class="QCheckBox" name="m_pComboToolBarAlignment"> 690 754 <property name="sizePolicy"> … … 705 769 </widget> 706 770 </item> 707 <item row=" 3" column="0" colspan="2">771 <item row="5" column="0" colspan="3"> 708 772 <spacer name="m_pSpacer"> 709 773 <property name="orientation"> … … 718 782 </spacer> 719 783 </item> 720 <item row=" 4" column="0" colspan="2">784 <item row="6" column="0" colspan="3"> 721 785 <widget class="UIStatusBarEditorWidget" name="m_pStatusBarEditor"> 722 786 <property name="whatsThis">
Note:
See TracChangeset
for help on using the changeset viewer.