- Timestamp:
- Dec 3, 2018 6:41:46 AM (6 years ago)
- svn:sync-xref-src-repo-rev:
- 127090
- Location:
- trunk/src/VBox/Frontends/VirtualBox/src
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Frontends/VirtualBox/src/converter/UIConverterBackend.h
r75813 r75886 130 130 template<> SHARED_LIBRARY_STUFF bool canConvert<KDnDMode>(); 131 131 template<> SHARED_LIBRARY_STUFF bool canConvert<KPointingHIDType>(); 132 template<> SHARED_LIBRARY_STUFF bool canConvert<KGraphicsControllerType>(); 132 133 template<> SHARED_LIBRARY_STUFF bool canConvert<KMediumType>(); 133 134 template<> SHARED_LIBRARY_STUFF bool canConvert<KMediumVariant>(); … … 142 143 template<> SHARED_LIBRARY_STUFF bool canConvert<KAudioControllerType>(); 143 144 template<> SHARED_LIBRARY_STUFF bool canConvert<KAuthType>(); 144 template<> SHARED_LIBRARY_STUFF bool canConvert<KGraphicsControllerType>();145 145 template<> SHARED_LIBRARY_STUFF bool canConvert<KStorageBus>(); 146 146 template<> SHARED_LIBRARY_STUFF bool canConvert<KStorageControllerType>(); … … 271 271 template<> SHARED_LIBRARY_STUFF QString toString(const KDnDMode &mode); 272 272 template<> SHARED_LIBRARY_STUFF QString toString(const KPointingHIDType &type); 273 template<> SHARED_LIBRARY_STUFF QString toString(const KGraphicsControllerType &type); 274 template<> SHARED_LIBRARY_STUFF KGraphicsControllerType fromString<KGraphicsControllerType>(const QString &strType); 273 275 template<> SHARED_LIBRARY_STUFF QString toString(const KMediumType &type); 274 276 template<> SHARED_LIBRARY_STUFF QString toString(const KMediumVariant &variant); … … 288 290 template<> SHARED_LIBRARY_STUFF QString toString(const KAuthType &type); 289 291 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);292 292 template<> SHARED_LIBRARY_STUFF QString toString(const KStorageBus &bus); 293 293 template<> SHARED_LIBRARY_STUFF QString toString(const KStorageControllerType &type); -
trunk/src/VBox/Frontends/VirtualBox/src/converter/UIConverterBackendCOM.cpp
r75813 r75886 43 43 template<> bool canConvert<KDnDMode>() { return true; } 44 44 template<> bool canConvert<KPointingHIDType>() { return true; } 45 template<> bool canConvert<KGraphicsControllerType>() { return true; } 45 46 template<> bool canConvert<KMediumType>() { return true; } 46 47 template<> bool canConvert<KMediumVariant>() { return true; } … … 55 56 template<> bool canConvert<KAudioControllerType>() { return true; } 56 57 template<> bool canConvert<KAuthType>() { return true; } 57 template<> bool canConvert<KGraphicsControllerType>() { return true; }58 58 template<> bool canConvert<KStorageBus>() { return true; } 59 59 template<> bool canConvert<KStorageControllerType>() { return true; } … … 263 263 } 264 264 265 /* QString <= KGraphicsControllerType: */ 266 template<> QString toString(const KGraphicsControllerType &type) 267 { 268 switch (type) 269 { 270 case KGraphicsControllerType_Null: return QApplication::translate("VBoxGlobal", "Null", "GraphicsControllerType"); 271 case KGraphicsControllerType_VBoxVGA: return QApplication::translate("VBoxGlobal", "VBoxVGA", "GraphicsControllerType"); 272 case KGraphicsControllerType_VMSVGA: return QApplication::translate("VBoxGlobal", "VMSVGA", "GraphicsControllerType"); 273 case KGraphicsControllerType_VBoxSVGA: return QApplication::translate("VBoxGlobal", "VBoxSVGA", "GraphicsControllerType"); 274 default: AssertMsgFailed(("No text for %d", type)); break; 275 } 276 return QString(); 277 } 278 279 /* KGraphicsControllerType <= QString: */ 280 template<> KGraphicsControllerType fromString<KGraphicsControllerType>(const QString &strType) 281 { 282 QHash<QString, KGraphicsControllerType> list; 283 list.insert(QApplication::translate("VBoxGlobal", "Null", "GraphicsControllerType"), KGraphicsControllerType_Null); 284 list.insert(QApplication::translate("VBoxGlobal", "VBoxVGA", "GraphicsControllerType"), KGraphicsControllerType_VBoxVGA); 285 list.insert(QApplication::translate("VBoxGlobal", "VMSVGA", "GraphicsControllerType"), KGraphicsControllerType_VMSVGA); 286 list.insert(QApplication::translate("VBoxGlobal", "VBoxSVGA", "GraphicsControllerType"), KGraphicsControllerType_VBoxSVGA); 287 if (!list.contains(strType)) 288 { 289 AssertMsgFailed(("No value for '%s'", strType.toUtf8().constData())); 290 } 291 return list.value(strType, KGraphicsControllerType_Null); 292 } 293 265 294 /* QString <= KMediumType: */ 266 295 template<> QString toString(const KMediumType &type) … … 543 572 } 544 573 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 574 574 /* QString <= KStorageBus: */ 575 575 template<> QString toString(const KStorageBus &bus) -
trunk/src/VBox/Frontends/VirtualBox/src/settings/machine/UIMachineSettingsDisplay.cpp
r75813 r75886 243 243 244 244 /** Holds the video RAM amount. */ 245 int m_iCurrentVRAM;245 int m_iCurrentVRAM; 246 246 /** Holds the guest screen count. */ 247 int m_cGuestScreenCount;247 int m_cGuestScreenCount; 248 248 /** Holds the guest screen scale-factor. */ 249 QList<double> m_scaleFactors;249 QList<double> m_scaleFactors; 250 250 /** Holds whether the 3D acceleration is enabled. */ 251 bool m_f3dAccelerationEnabled;251 bool m_f3dAccelerationEnabled; 252 252 #ifdef VBOX_WITH_VIDEOHWACCEL 253 253 /** Holds whether the 2D video acceleration is enabled. */ 254 bool m_f2dAccelerationEnabled;254 bool m_f2dAccelerationEnabled; 255 255 #endif /* VBOX_WITH_VIDEOHWACCEL */ 256 /** Holds the graphics controller type of the virtual machine. */257 KGraphicsControllerType m_graphicsControllerType;256 /** Holds the graphics controller type. */ 257 KGraphicsControllerType m_graphicsControllerType; 258 258 /** Holds whether the remote display server is supported. */ 259 bool m_fRemoteDisplayServerSupported;259 bool m_fRemoteDisplayServerSupported; 260 260 /** Holds whether the remote display server is enabled. */ 261 bool m_fRemoteDisplayServerEnabled;261 bool m_fRemoteDisplayServerEnabled; 262 262 /** Holds the remote display server port. */ 263 QString m_strRemoteDisplayPort;263 QString m_strRemoteDisplayPort; 264 264 /** Holds the remote display server auth type. */ 265 KAuthType m_remoteDisplayAuthType;265 KAuthType m_remoteDisplayAuthType; 266 266 /** Holds the remote display server timeout. */ 267 ulong m_uRemoteDisplayTimeout;267 ulong m_uRemoteDisplayTimeout; 268 268 /** Holds whether the remote display server allows multiple connections. */ 269 bool m_fRemoteDisplayMultiConnAllowed;269 bool m_fRemoteDisplayMultiConnAllowed; 270 270 271 271 /** Holds whether recording is enabled. */ … … 435 435 m_pCheckbox2DVideo->setChecked(oldDisplayData.m_f2dAccelerationEnabled); 436 436 #endif 437 m_pComboGraphicsControllerType->setCurrentIndex( (int)oldDisplayData.m_graphicsControllerType);437 m_pComboGraphicsControllerType->setCurrentIndex(m_pComboGraphicsControllerType->findText(gpConverter->toString(oldDisplayData.m_graphicsControllerType))); 438 438 // Should be the last one for this tab: 439 439 m_pEditorVideoMemorySize->setValue(oldDisplayData.m_iCurrentVRAM); … … 494 494 newDisplayData.m_f2dAccelerationEnabled = m_pCheckbox2DVideo->isChecked(); 495 495 #endif 496 newDisplayData.m_graphicsControllerType = (KGraphicsControllerType) m_pComboGraphicsControllerType->currentIndex();496 newDisplayData.m_graphicsControllerType = gpConverter->fromString<KGraphicsControllerType>(m_pComboGraphicsControllerType->currentText()); 497 497 /* If remote display server is supported: */ 498 498 newDisplayData.m_fRemoteDisplayServerSupported = m_pCache->base().m_fRemoteDisplayServerSupported; … … 720 720 m_pLabelVideoScreenCountMin->setText(QString::number(1)); 721 721 m_pLabelVideoScreenCountMax->setText(QString::number(qMin(sys.GetMaxGuestMonitors(), (ULONG)8))); 722 m_pComboGraphicsControllerType->setItemText(0, gpConverter->toString(KGraphicsControllerType_Null)); 723 m_pComboGraphicsControllerType->setItemText(1, gpConverter->toString(KGraphicsControllerType_VBoxVGA)); 724 m_pComboGraphicsControllerType->setItemText(2, gpConverter->toString(KGraphicsControllerType_VMSVGA)); 725 m_pComboGraphicsControllerType->setItemText(3, gpConverter->toString(KGraphicsControllerType_VBoxSVGA)); 722 726 723 727 /* Remote Display stuff: */ … … 1021 1025 m_pScaleFactorEditor->setSpinBoxWidthHint(m_pEditorVideoMemorySize->minimumWidth()); 1022 1026 } 1027 1028 /* Graphics controller combo-box created in the .ui file. */ 1029 AssertPtrReturnVoid(m_pComboGraphicsControllerType); 1030 { 1031 /* Configure combo-box: */ 1032 m_pComboGraphicsControllerType->insertItem(0, ""); /* KGraphicsControllerType_Null */ 1033 m_pComboGraphicsControllerType->insertItem(1, ""); /* KGraphicsControllerType_VBoxVGA */ 1034 m_pComboGraphicsControllerType->insertItem(2, ""); /* KGraphicsControllerType_VMSVGA */ 1035 m_pComboGraphicsControllerType->insertItem(3, ""); /* KGraphicsControllerType_VBoxSVGA */ 1036 } 1023 1037 } 1024 1038 } … … 1050 1064 m_pComboRemoteDisplayAuthMethod->insertItem(1, ""); /* KAuthType_External */ 1051 1065 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));1059 1066 } 1060 1067 } -
trunk/src/VBox/Frontends/VirtualBox/src/settings/machine/UIMachineSettingsDisplay.ui
r75813 r75886 171 171 </item> 172 172 <item row="6" column="0"> 173 <widget class="QLabel" name="m_pLabelVideoOptions">174 <property name="text">175 <string>Acceleration:</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="6" column="1">183 <widget class="QCheckBox" name="m_pCheckbox3D">184 <property name="sizePolicy">185 <sizepolicy hsizetype="MinimumExpanding" vsizetype="Fixed">186 <horstretch>0</horstretch>187 <verstretch>0</verstretch>188 </sizepolicy>189 </property>190 <property name="whatsThis">191 <string>When checked, the virtual machine will be given access to the 3D graphics capabilities available on the host.</string>192 </property>193 <property name="text">194 <string>Enable &3D Acceleration</string>195 </property>196 </widget>197 </item>198 <item row="7" column="1">199 <widget class="QCheckBox" name="m_pCheckbox2DVideo">200 <property name="sizePolicy">201 <sizepolicy hsizetype="MinimumExpanding" vsizetype="Fixed">202 <horstretch>0</horstretch>203 <verstretch>0</verstretch>204 </sizepolicy>205 </property>206 <property name="whatsThis">207 <string>When checked, the virtual machine will be given access to the Video Acceleration capabilities available on the host.</string>208 </property>209 <property name="text">210 <string>Enable &2D Video Acceleration</string>211 </property>212 </widget>213 </item>214 <item row="8" column="0">215 173 <widget class="QLabel" name="m_pLabelGraphicsControllerType"> 216 174 <property name="text"> … … 225 183 </widget> 226 184 </item> 227 <item row=" 8" column="1" colspan="3">185 <item row="6" column="1" colspan="2"> 228 186 <layout class="QHBoxLayout"> 229 187 <item> … … 254 212 </item> 255 213 </layout> 214 </item> 215 <item row="7" column="0"> 216 <widget class="QLabel" name="m_pLabelVideoOptions"> 217 <property name="text"> 218 <string>Acceleration:</string> 219 </property> 220 <property name="alignment"> 221 <set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set> 222 </property> 223 </widget> 224 </item> 225 <item row="7" column="1"> 226 <widget class="QCheckBox" name="m_pCheckbox3D"> 227 <property name="sizePolicy"> 228 <sizepolicy hsizetype="MinimumExpanding" vsizetype="Fixed"> 229 <horstretch>0</horstretch> 230 <verstretch>0</verstretch> 231 </sizepolicy> 232 </property> 233 <property name="whatsThis"> 234 <string>When checked, the virtual machine will be given access to the 3D graphics capabilities available on the host.</string> 235 </property> 236 <property name="text"> 237 <string>Enable &3D Acceleration</string> 238 </property> 239 </widget> 240 </item> 241 <item row="8" column="1"> 242 <widget class="QCheckBox" name="m_pCheckbox2DVideo"> 243 <property name="sizePolicy"> 244 <sizepolicy hsizetype="MinimumExpanding" vsizetype="Fixed"> 245 <horstretch>0</horstretch> 246 <verstretch>0</verstretch> 247 </sizepolicy> 248 </property> 249 <property name="whatsThis"> 250 <string>When checked, the virtual machine will be given access to the Video Acceleration capabilities available on the host.</string> 251 </property> 252 <property name="text"> 253 <string>Enable &2D Video Acceleration</string> 254 </property> 255 </widget> 256 256 </item> 257 257 </layout>
Note:
See TracChangeset
for help on using the changeset viewer.