- Timestamp:
- Nov 25, 2014 3:26:49 PM (10 years ago)
- Location:
- trunk/src/VBox/Frontends/VirtualBox/src/settings/machine
- Files:
-
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Frontends/VirtualBox/src/settings/machine/UIMachineSettingsDisplay.cpp
r53321 r53397 26 26 # include "QIWidgetValidator.h" 27 27 # include "UIMachineSettingsDisplay.h" 28 # include "UIExtraDataManager.h" 29 # include "UIMessageCenter.h" 30 # include "UIActionPool.h" 31 # include "UIConverter.h" 28 32 # include "VBoxGlobal.h" 29 # include "UIMessageCenter.h"30 # include "UIConverter.h"31 # include "UIActionPool.h"32 33 33 34 /* COM includes: */ … … 140 141 displayData.m_screens = m_machine.GetVideoCaptureScreens(); 141 142 143 /* Cache Machine Window data: */ 144 displayData.m_fShowMiniToolBar = gEDataManager->miniToolbarEnabled(m_machine.GetId()); 145 displayData.m_fMiniToolBarAtTop = gEDataManager->miniToolbarAlignment(m_machine.GetId()) == Qt::AlignTop; 146 142 147 /* Initialize other variables: */ 143 148 m_iInitialVRAM = RT_MIN(displayData.m_iCurrentVRAM, m_iMaxVRAM); … … 192 197 m_pStatusBarEditor->setMachineID(strMachineID); 193 198 m_pMenuBarEditor->setActionPool(m_pActionPool); 199 m_pCheckBoxShowMiniToolBar->setChecked(displayData.m_fShowMiniToolBar); 200 m_pComboToolBarAlignment->setChecked(displayData.m_fMiniToolBarAtTop); 194 201 195 202 /* Polish page finally: */ … … 234 241 displayData.m_iVideoCaptureBitRate = m_pEditorVideoCaptureBitRate->value(); 235 242 displayData.m_screens = m_pScrollerVideoCaptureScreens->value(); 243 244 /* Gather Machine Window data from page: */ 245 displayData.m_fShowMiniToolBar = m_pCheckBoxShowMiniToolBar->isChecked(); 246 displayData.m_fMiniToolBarAtTop = m_pComboToolBarAlignment->isChecked(); 236 247 237 248 /* Cache display data: */ … … 316 327 m_machine.SetVideoCaptureScreens(displayData.m_screens); 317 328 } 329 330 /* Store Machine Window data: */ 331 if (isMachineInValidMode()) 332 { 333 gEDataManager->setMiniToolbarEnabled(displayData.m_fShowMiniToolBar, m_machine.GetId()); 334 gEDataManager->setMiniToolbarAlignment(displayData.m_fMiniToolBarAtTop ? Qt::AlignTop : Qt::AlignBottom, m_machine.GetId()); 335 } 318 336 } 319 337 … … 477 495 setTabOrder(m_pEditorVideoCaptureFrameRate, m_pSliderVideoCaptureQuality); 478 496 setTabOrder(m_pSliderVideoCaptureQuality, m_pEditorVideoCaptureBitRate); 497 498 /* Machine Window tab-order: */ 499 setTabOrder(m_pEditorVideoCaptureBitRate, m_pCheckBoxShowMiniToolBar); 500 setTabOrder(m_pCheckBoxShowMiniToolBar, m_pComboToolBarAlignment); 479 501 } 480 502 … … 530 552 m_pContainerVideoCapture->setEnabled(isMachineInValidMode()); 531 553 sltHandleVideoCaptureCheckboxToggle(); 554 555 /* Machine-window tab: */ 556 m_pLabelMiniToolBar->setEnabled(isMachineInValidMode()); 557 m_pCheckBoxShowMiniToolBar->setEnabled(isMachineInValidMode()); 558 m_pComboToolBarAlignment->setEnabled(isMachineInValidMode() && m_pCheckBoxShowMiniToolBar->isChecked()); 532 559 } 533 560 -
trunk/src/VBox/Frontends/VirtualBox/src/settings/machine/UIMachineSettingsDisplay.h
r53321 r53397 52 52 , m_iVideoCaptureFrameRate(0) 53 53 , m_iVideoCaptureBitRate(0) 54 , m_fShowMiniToolBar(false) 55 , m_fMiniToolBarAtTop(false) 54 56 {} 55 57 … … 75 77 (m_iVideoCaptureFrameRate == other.m_iVideoCaptureFrameRate) && 76 78 (m_iVideoCaptureBitRate == other.m_iVideoCaptureBitRate) && 77 (m_screens == other.m_screens); 79 (m_screens == other.m_screens) && 80 (m_fShowMiniToolBar == other.m_fShowMiniToolBar) && 81 (m_fMiniToolBarAtTop == other.m_fMiniToolBarAtTop); 78 82 } 79 83 … … 107 111 int m_iVideoCaptureBitRate; 108 112 QVector<BOOL> m_screens; 113 114 /* Variables: Machine Window stuff: */ 115 bool m_fShowMiniToolBar; 116 bool m_fMiniToolBarAtTop; 109 117 }; 110 118 typedef UISettingsCache<UIDataSettingsMachineDisplay> UICacheSettingsMachineDisplay; -
trunk/src/VBox/Frontends/VirtualBox/src/settings/machine/UIMachineSettingsDisplay.ui
r53321 r53397 649 649 <string>Machine &Window</string> 650 650 </attribute> 651 <layout class="Q VBoxLayout" name="m_pLayoutTabMachineWindow">652 <item >651 <layout class="QGridLayout" name="m_pLayoutTabMachineWindow"> 652 <item row="0" column="0" colspan="2"> 653 653 <widget class="UIMenuBarEditorWidget" name="m_pMenuBarEditor"> 654 654 <property name="whatsThis"> … … 657 657 </widget> 658 658 </item> 659 <item> 659 <item row="1" column="0"> 660 <widget class="QLabel" name="m_pLabelMiniToolBar"> 661 <property name="text"> 662 <string>Mini ToolBar:</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"> 670 <widget class="QCheckBox" name="m_pCheckBoxShowMiniToolBar"> 671 <property name="sizePolicy"> 672 <sizepolicy vsizetype="Fixed" hsizetype="MinimumExpanding"> 673 <horstretch>0</horstretch> 674 <verstretch>0</verstretch> 675 </sizepolicy> 676 </property> 677 <property name="whatsThis"> 678 <string>If checked, show the Mini ToolBar in Fullscreen and Seamless modes.</string> 679 </property> 680 <property name="text"> 681 <string>Show in &Fullscreen/Seamless</string> 682 </property> 683 <property name="checked"> 684 <bool>true</bool> 685 </property> 686 </widget> 687 </item> 688 <item row="2" column="1"> 689 <widget class="QCheckBox" name="m_pComboToolBarAlignment"> 690 <property name="sizePolicy"> 691 <sizepolicy vsizetype="Fixed" hsizetype="MinimumExpanding"> 692 <horstretch>0</horstretch> 693 <verstretch>0</verstretch> 694 </sizepolicy> 695 </property> 696 <property name="whatsThis"> 697 <string>If checked, show the Mini ToolBar at the top of the screen, rather than in its default position at the bottom of the screen.</string> 698 </property> 699 <property name="text"> 700 <string>Show at &Top of Screen</string> 701 </property> 702 <property name="checked"> 703 <bool>false</bool> 704 </property> 705 </widget> 706 </item> 707 <item row="3" column="0" colspan="2"> 660 708 <spacer name="m_pSpacer"> 661 709 <property name="orientation"> … … 670 718 </spacer> 671 719 </item> 672 <item >720 <item row="4" column="0" colspan="2"> 673 721 <widget class="UIStatusBarEditorWidget" name="m_pStatusBarEditor"> 674 722 <property name="whatsThis"> … … 724 772 <slot>setEnabled(bool)</slot> 725 773 </connection> 774 <connection> 775 <sender>m_pCheckBoxShowMiniToolBar</sender> 776 <signal>toggled(bool)</signal> 777 <receiver>m_pComboToolBarAlignment</receiver> 778 <slot>setEnabled(bool)</slot> 779 <hints> 780 <hint type="sourcelabel"> 781 <x>195</x> 782 <y>50</y> 783 </hint> 784 <hint type="destinationlabel"> 785 <x>196</x> 786 <y>72</y> 787 </hint> 788 </hints> 789 </connection> 726 790 </connections> 727 791 </ui> -
trunk/src/VBox/Frontends/VirtualBox/src/settings/machine/UIMachineSettingsGeneral.cpp
r52730 r53397 27 27 # include "QIWidgetValidator.h" 28 28 # include "UIMachineSettingsGeneral.h" 29 # include "UIExtraDataManager.h"30 29 # include "UIMessageCenter.h" 31 30 # include "UIConverter.h" … … 112 111 generalData.m_strName = m_machine.GetName(); 113 112 generalData.m_strGuestOsTypeId = m_machine.GetOSTypeId(); 114 generalData.m_fShowMiniToolBar = gEDataManager->miniToolbarEnabled(m_machine.GetId());115 generalData.m_fMiniToolBarAtTop = gEDataManager->miniToolbarAlignment(m_machine.GetId()) == Qt::AlignTop;116 113 generalData.m_strSnapshotsFolder = m_machine.GetSnapshotFolder(); 117 114 generalData.m_strSnapshotsHomeDir = QFileInfo(m_machine.GetSettingsFilePath()).absolutePath(); … … 137 134 m_pNameAndSystemEditor->setName(generalData.m_strName); 138 135 m_pNameAndSystemEditor->setType(vboxGlobal().vmGuestOSType(generalData.m_strGuestOsTypeId)); 139 mCbShowToolBar->setChecked(generalData.m_fShowMiniToolBar);140 mCbToolBarAlignment->setChecked(generalData.m_fMiniToolBarAtTop);141 136 mPsSnapshot->setPath(generalData.m_strSnapshotsFolder); 142 137 mPsSnapshot->setHomeDir(generalData.m_strSnapshotsHomeDir); … … 162 157 generalData.m_strName = m_pNameAndSystemEditor->name(); 163 158 generalData.m_strGuestOsTypeId = m_pNameAndSystemEditor->type().GetId(); 164 generalData.m_fShowMiniToolBar = mCbShowToolBar->isChecked();165 generalData.m_fMiniToolBarAtTop = mCbToolBarAlignment->isChecked();166 159 generalData.m_strSnapshotsFolder = mPsSnapshot->path(); 167 160 generalData.m_clipboardMode = (KClipboardMode)mCbClipboard->currentIndex(); … … 193 186 m_machine.SetClipboardMode(generalData.m_clipboardMode); 194 187 m_machine.SetDnDMode(generalData.m_dndMode); 195 gEDataManager->setMiniToolbarEnabled(generalData.m_fShowMiniToolBar, m_machine.GetId());196 gEDataManager->setMiniToolbarAlignment(generalData.m_fMiniToolBarAtTop ? Qt::AlignTop : Qt::AlignBottom, m_machine.GetId());197 188 /* Description tab: */ 198 189 m_machine.SetDescription(generalData.m_strDescription); … … 265 256 setTabOrder (mPsSnapshot, mCbClipboard); 266 257 setTabOrder (mCbClipboard, mCbDragAndDrop); 267 setTabOrder (mCbDragAndDrop, mCbShowToolBar);268 setTabOrder (mCbShowToolBar, mCbToolBarAlignment);269 258 270 259 /* Description tab-order */ 271 setTabOrder (mCb ToolBarAlignment, mTeDescription);260 setTabOrder (mCbDragAndDrop, mTeDescription); 272 261 } 273 262 … … 314 303 mLbDragAndDrop->setEnabled(isMachineInValidMode()); 315 304 mCbDragAndDrop->setEnabled(isMachineInValidMode()); 316 mLbToolBar->setEnabled(isMachineInValidMode()); 317 mCbShowToolBar->setEnabled(isMachineInValidMode()); 318 mCbToolBarAlignment->setEnabled(isMachineInValidMode() && mCbShowToolBar->isChecked()); 319 } 320 305 } 306 -
trunk/src/VBox/Frontends/VirtualBox/src/settings/machine/UIMachineSettingsGeneral.h
r52727 r53397 29 29 : m_strName(QString()) 30 30 , m_strGuestOsTypeId(QString()) 31 , m_fShowMiniToolBar(false)32 , m_fMiniToolBarAtTop(false)33 31 , m_strSnapshotsFolder(QString()) 34 32 , m_strSnapshotsHomeDir(QString()) … … 36 34 , m_dndMode(KDnDMode_Disabled) 37 35 , m_strDescription(QString()) {} 36 38 37 /* Functions: */ 39 38 bool equal(const UIDataSettingsMachineGeneral &other) const … … 41 40 return (m_strName == other.m_strName) && 42 41 (m_strGuestOsTypeId == other.m_strGuestOsTypeId) && 43 (m_fShowMiniToolBar == other.m_fShowMiniToolBar) &&44 (m_fMiniToolBarAtTop == other.m_fMiniToolBarAtTop) &&45 42 (m_strSnapshotsFolder == other.m_strSnapshotsFolder) && 46 43 (m_strSnapshotsHomeDir == other.m_strSnapshotsHomeDir) && … … 49 46 (m_strDescription == other.m_strDescription); 50 47 } 48 51 49 /* Operators: */ 52 50 bool operator==(const UIDataSettingsMachineGeneral &other) const { return equal(other); } 53 51 bool operator!=(const UIDataSettingsMachineGeneral &other) const { return !equal(other); } 52 54 53 /* Variables: */ 55 54 QString m_strName; 56 55 QString m_strGuestOsTypeId; 57 bool m_fShowMiniToolBar;58 bool m_fMiniToolBarAtTop;59 56 QString m_strSnapshotsFolder; 60 57 QString m_strSnapshotsHomeDir; -
trunk/src/VBox/Frontends/VirtualBox/src/settings/machine/UIMachineSettingsGeneral.ui
r52917 r53397 170 170 </spacer> 171 171 </item> 172 <item row="3" column="0" >173 <widget class="QLabel" name="mLbToolBar" >174 <property name="text" >175 <string>Mini ToolBar:</string>176 </property>177 <property name="alignment" >178 <set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>179 </property>180 </widget>181 </item>182 <item row="3" column="1" >183 <widget class="QCheckBox" name="mCbShowToolBar" >184 <property name="sizePolicy" >185 <sizepolicy vsizetype="Fixed" hsizetype="MinimumExpanding" >186 <horstretch>0</horstretch>187 <verstretch>0</verstretch>188 </sizepolicy>189 </property>190 <property name="whatsThis" >191 <string>If checked, show the Mini ToolBar in Fullscreen and Seamless modes.</string>192 </property>193 <property name="text" >194 <string>Show in &Fullscreen/Seamless</string>195 </property>196 <property name="checked" >197 <bool>true</bool>198 </property>199 </widget>200 </item>201 <item row="4" column="1" >202 <widget class="QCheckBox" name="mCbToolBarAlignment" >203 <property name="sizePolicy" >204 <sizepolicy vsizetype="Fixed" hsizetype="MinimumExpanding" >205 <horstretch>0</horstretch>206 <verstretch>0</verstretch>207 </sizepolicy>208 </property>209 <property name="whatsThis" >210 <string>If checked, show the Mini ToolBar at the top of the screen, rather than in its default position at the bottom of the screen.</string>211 </property>212 <property name="text" >213 <string>Show at &Top of Screen</string>214 </property>215 <property name="checked" >216 <bool>false</bool>217 </property>218 </widget>219 </item>220 172 </layout> 221 173 </widget> … … 279 231 </customwidgets> 280 232 <resources/> 281 <connections> 282 <connection> 283 <sender>mCbShowToolBar</sender> 284 <signal>toggled(bool)</signal> 285 <receiver>mCbToolBarAlignment</receiver> 286 <slot>setEnabled(bool)</slot> 287 <hints> 288 <hint type="sourcelabel"> 289 <x>195</x> 290 <y>50</y> 291 </hint> 292 <hint type="destinationlabel"> 293 <x>196</x> 294 <y>72</y> 295 </hint> 296 </hints> 297 </connection> 298 </connections> 233 <connections/> 299 234 </ui>
Note:
See TracChangeset
for help on using the changeset viewer.