Changeset 75813 in vbox for trunk/src/VBox/Frontends
- Timestamp:
- Nov 29, 2018 12:57:51 PM (6 years ago)
- Location:
- trunk/src/VBox/Frontends/VirtualBox/src
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Frontends/VirtualBox/src/converter/UIConverterBackend.h
r75626 r75813 142 142 template<> SHARED_LIBRARY_STUFF bool canConvert<KAudioControllerType>(); 143 143 template<> SHARED_LIBRARY_STUFF bool canConvert<KAuthType>(); 144 template<> SHARED_LIBRARY_STUFF bool canConvert<KGraphicsControllerType>(); 144 145 template<> SHARED_LIBRARY_STUFF bool canConvert<KStorageBus>(); 145 146 template<> SHARED_LIBRARY_STUFF bool canConvert<KStorageControllerType>(); … … 287 288 template<> SHARED_LIBRARY_STUFF QString toString(const KAuthType &type); 288 289 template<> SHARED_LIBRARY_STUFF KAuthType fromString<KAuthType>(const QString &strType); 290 template<> SHARED_LIBRARY_STUFF QString toString(const KGraphicsControllerType &type); 291 template<> SHARED_LIBRARY_STUFF KGraphicsControllerType fromString<KGraphicsControllerType>(const QString &strType); 289 292 template<> SHARED_LIBRARY_STUFF QString toString(const KStorageBus &bus); 290 293 template<> SHARED_LIBRARY_STUFF QString toString(const KStorageControllerType &type); … … 297 300 298 301 #endif /* !___UIConverterBackend_h___ */ 299 -
trunk/src/VBox/Frontends/VirtualBox/src/converter/UIConverterBackendCOM.cpp
r73716 r75813 55 55 template<> bool canConvert<KAudioControllerType>() { return true; } 56 56 template<> bool canConvert<KAuthType>() { return true; } 57 template<> bool canConvert<KGraphicsControllerType>() { return true; } 57 58 template<> bool canConvert<KStorageBus>() { return true; } 58 59 template<> bool canConvert<KStorageControllerType>() { return true; } … … 542 543 } 543 544 545 /* QString <= KGraphicsControllerType: */ 546 template<> QString toString(const KGraphicsControllerType &type) 547 { 548 switch (type) 549 { 550 case KGraphicsControllerType_Null: return QApplication::translate("VBoxGlobal", "Null", "GraphicsControllerType"); 551 case KGraphicsControllerType_VBoxVGA: return QApplication::translate("VBoxGlobal", "VBoxVGA", "GraphicsControllerType"); 552 case KGraphicsControllerType_VMSVGA: return QApplication::translate("VBoxGlobal", "VMSVGA", "GraphicsControllerType"); 553 case KGraphicsControllerType_VBoxSVGA: return QApplication::translate("VBoxGlobal", "VBoxSVGA", "GraphicsControllerType"); 554 default: AssertMsgFailed(("No text for %d", type)); break; 555 } 556 return QString(); 557 } 558 559 /* KGraphicsControllerType <= QString: */ 560 template<> KGraphicsControllerType fromString<KGraphicsControllerType>(const QString &strType) 561 { 562 QHash<QString, KGraphicsControllerType> list; 563 list.insert(QApplication::translate("VBoxGlobal", "Null", "GraphicsControllerType"), KGraphicsControllerType_Null); 564 list.insert(QApplication::translate("VBoxGlobal", "VBoxVGA", "GraphicsControllerType"), KGraphicsControllerType_VBoxVGA); 565 list.insert(QApplication::translate("VBoxGlobal", "VMSVGA", "GraphicsControllerType"), KGraphicsControllerType_VMSVGA); 566 list.insert(QApplication::translate("VBoxGlobal", "VBoxSVGA", "GraphicsControllerType"), KGraphicsControllerType_VBoxSVGA); 567 if (!list.contains(strType)) 568 { 569 AssertMsgFailed(("No value for '%s'", strType.toUtf8().constData())); 570 } 571 return list.value(strType, KGraphicsControllerType_Null); 572 } 573 544 574 /* QString <= KStorageBus: */ 545 575 template<> QString toString(const KStorageBus &bus) -
trunk/src/VBox/Frontends/VirtualBox/src/settings/machine/UIMachineSettingsDisplay.cpp
r75368 r75813 53 53 , m_f2dAccelerationEnabled(false) 54 54 #endif /* VBOX_WITH_VIDEOHWACCEL */ 55 , m_graphicsControllerType(KGraphicsControllerType_Null) 55 56 , m_fRemoteDisplayServerSupported(false) 56 57 , m_fRemoteDisplayServerEnabled(false) … … 80 81 && (m_f2dAccelerationEnabled == other.m_f2dAccelerationEnabled) 81 82 #endif /* VBOX_WITH_VIDEOHWACCEL */ 83 && (m_graphicsControllerType == other.m_graphicsControllerType) 82 84 && (m_fRemoteDisplayServerSupported == other.m_fRemoteDisplayServerSupported) 83 85 && (m_fRemoteDisplayServerEnabled == other.m_fRemoteDisplayServerEnabled) … … 252 254 bool m_f2dAccelerationEnabled; 253 255 #endif /* VBOX_WITH_VIDEOHWACCEL */ 254 256 /** Holds the graphics controller type of the virtual machine. */ 257 KGraphicsControllerType m_graphicsControllerType; 255 258 /** Holds whether the remote display server is supported. */ 256 259 bool m_fRemoteDisplayServerSupported; … … 368 371 oldDisplayData.m_f2dAccelerationEnabled = m_machine.GetAccelerate2DVideoEnabled(); 369 372 #endif 370 373 oldDisplayData.m_graphicsControllerType = m_machine.GetGraphicsControllerType(); 371 374 /* Check whether remote display server is valid: */ 372 375 const CVRDEServer &vrdeServer = m_machine.GetVRDEServer(); … … 432 435 m_pCheckbox2DVideo->setChecked(oldDisplayData.m_f2dAccelerationEnabled); 433 436 #endif 437 m_pComboGraphicsControllerType->setCurrentIndex((int)oldDisplayData.m_graphicsControllerType); 434 438 // Should be the last one for this tab: 435 439 m_pEditorVideoMemorySize->setValue(oldDisplayData.m_iCurrentVRAM); … … 490 494 newDisplayData.m_f2dAccelerationEnabled = m_pCheckbox2DVideo->isChecked(); 491 495 #endif 492 496 newDisplayData.m_graphicsControllerType = (KGraphicsControllerType) m_pComboGraphicsControllerType->currentIndex(); 493 497 /* If remote display server is supported: */ 494 498 newDisplayData.m_fRemoteDisplayServerSupported = m_pCache->base().m_fRemoteDisplayServerSupported; … … 680 684 #ifdef VBOX_WITH_VIDEOHWACCEL 681 685 setTabOrder(m_pCheckbox3D, m_pCheckbox2DVideo); 682 setTabOrder(m_pCheckbox2DVideo, m_pC heckboxRemoteDisplay);686 setTabOrder(m_pCheckbox2DVideo, m_pComboGraphicsControllerType); 683 687 #else /* VBOX_WITH_VIDEOHWACCEL */ 684 setTabOrder(m_pCheckbox3D, m_pC heckboxRemoteDisplay);688 setTabOrder(m_pCheckbox3D, m_pComboGraphicsControllerType); 685 689 #endif /* !VBOX_WITH_VIDEOHWACCEL */ 690 setTabOrder(m_pComboGraphicsControllerType, m_pCheckboxRemoteDisplay); 686 691 687 692 /* Remote Display tab-order: */ … … 760 765 m_pCheckbox2DVideo->hide(); 761 766 #endif /* !VBOX_WITH_VIDEOHWACCEL */ 767 m_pComboGraphicsControllerType->setEnabled(isMachineOffline()); 762 768 763 769 /* Polish 'Remote Display' availability: */ … … 1044 1050 m_pComboRemoteDisplayAuthMethod->insertItem(1, ""); /* KAuthType_External */ 1045 1051 m_pComboRemoteDisplayAuthMethod->insertItem(2, ""); /* KAuthType_Guest */ 1052 } 1053 AssertPtrReturnVoid(m_pComboGraphicsControllerType); 1054 { 1055 m_pComboGraphicsControllerType->insertItem((int)KGraphicsControllerType_Null, gpConverter->toString(KGraphicsControllerType_Null)); 1056 m_pComboGraphicsControllerType->insertItem((int)KGraphicsControllerType_VBoxVGA, gpConverter->toString(KGraphicsControllerType_VBoxVGA)); 1057 m_pComboGraphicsControllerType->insertItem((int)KGraphicsControllerType_VMSVGA, gpConverter->toString(KGraphicsControllerType_VMSVGA)); 1058 m_pComboGraphicsControllerType->insertItem((int)KGraphicsControllerType_VBoxSVGA, gpConverter->toString(KGraphicsControllerType_VBoxSVGA)); 1046 1059 } 1047 1060 } … … 1413 1426 } 1414 1427 #endif 1428 /* Save the Graphics Controller Type: */ 1429 if (fSuccess && isMachineOffline() && newDisplayData.m_graphicsControllerType != oldDisplayData.m_graphicsControllerType) 1430 { 1431 m_machine.SetGraphicsControllerType(newDisplayData.m_graphicsControllerType); 1432 fSuccess = m_machine.isOk(); 1433 } 1415 1434 1416 1435 /* Get machine ID for further activities: */ -
trunk/src/VBox/Frontends/VirtualBox/src/settings/machine/UIMachineSettingsDisplay.ui
r74872 r75813 211 211 </property> 212 212 </widget> 213 </item> 214 <item row="8" column="0"> 215 <widget class="QLabel" name="m_pLabelGraphicsControllerType"> 216 <property name="text"> 217 <string>&Graphics Controller:</string> 218 </property> 219 <property name="alignment"> 220 <set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set> 221 </property> 222 <property name="buddy"> 223 <cstring>m_pComboGraphicsControllerType</cstring> 224 </property> 225 </widget> 226 </item> 227 <item row="8" column="1" colspan="3"> 228 <layout class="QHBoxLayout"> 229 <item> 230 <widget class="QComboBox" name="m_pComboGraphicsControllerType" > 231 <property name="sizePolicy" > 232 <sizepolicy vsizetype="Fixed" hsizetype="Minimum" > 233 <horstretch>0</horstretch> 234 <verstretch>0</verstretch> 235 </sizepolicy> 236 </property> 237 <property name="whatsThis" > 238 <string>Selects the graphics adapter type the virtual machine will use.</string> 239 </property> 240 </widget> 241 </item> 242 <item> 243 <spacer name="m_pSpacerHorizontalGraphicsAdapterType"> 244 <property name="orientation"> 245 <enum>Qt::Horizontal</enum> 246 </property> 247 <property name="sizeHint" stdset="0"> 248 <size> 249 <width>0</width> 250 <height>0</height> 251 </size> 252 </property> 253 </spacer> 254 </item> 255 </layout> 213 256 </item> 214 257 </layout>
Note:
See TracChangeset
for help on using the changeset viewer.