Changeset 54228 in vbox
- Timestamp:
- Feb 17, 2015 11:06:40 AM (10 years ago)
- Location:
- trunk/src/VBox/Frontends/VirtualBox/src
- Files:
-
- 8 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Frontends/VirtualBox/src/converter/UIConverterBackendGlobal.cpp
r54199 r54228 830 830 case DetailsElementType_USB: strResult = QApplication::translate("VBoxGlobal", "USB", "DetailsElementType"); break; 831 831 case DetailsElementType_SF: strResult = QApplication::translate("VBoxGlobal", "Shared folders", "DetailsElementType"); break; 832 case DetailsElementType_UI: strResult = QApplication::translate("VBoxGlobal", "User interface", "DetailsElementType"); break; 832 833 case DetailsElementType_Description: strResult = QApplication::translate("VBoxGlobal", "Description", "DetailsElementType"); break; 833 834 default: … … 859 860 keys << QApplication::translate("VBoxGlobal", "USB", "DetailsElementType"); values << DetailsElementType_USB; 860 861 keys << QApplication::translate("VBoxGlobal", "Shared folders", "DetailsElementType"); values << DetailsElementType_SF; 862 keys << QApplication::translate("VBoxGlobal", "User interface", "DetailsElementType"); values << DetailsElementType_UI; 861 863 keys << QApplication::translate("VBoxGlobal", "Description", "DetailsElementType"); values << DetailsElementType_Description; 862 864 /* Invalid type for unknown words: */ … … 886 888 case DetailsElementType_USB: strResult = "usb"; break; 887 889 case DetailsElementType_SF: strResult = "sharedFolders"; break; 890 case DetailsElementType_UI: strResult = "userInterface"; break; 888 891 case DetailsElementType_Description: strResult = "description"; break; 889 892 default: … … 915 918 keys << "usb"; values << DetailsElementType_USB; 916 919 keys << "sharedFolders"; values << DetailsElementType_SF; 920 keys << "userInterface"; values << DetailsElementType_UI; 917 921 keys << "description"; values << DetailsElementType_Description; 918 922 /* Invalid type for unknown words: */ -
trunk/src/VBox/Frontends/VirtualBox/src/extradata/UIExtraDataDefs.h
r54199 r54228 524 524 DetailsElementType_USB, 525 525 DetailsElementType_SF, 526 DetailsElementType_UI, 526 527 DetailsElementType_Description 527 528 }; -
trunk/src/VBox/Frontends/VirtualBox/src/selector/graphics/details/UIGDetailsElement.cpp
r53410 r54228 609 609 QString strCategory; 610 610 if (m_type >= DetailsElementType_General && 611 m_type < = DetailsElementType_SF)611 m_type < DetailsElementType_Description) 612 612 strCategory = QString("#%1").arg(gpConverter->toInternalString(m_type)); 613 613 else if (m_type == DetailsElementType_Description) -
trunk/src/VBox/Frontends/VirtualBox/src/selector/graphics/details/UIGDetailsElements.cpp
r53412 r54228 1039 1039 1040 1040 1041 UIGDetailsUpdateThreadUI::UIGDetailsUpdateThreadUI(const CMachine &machine) 1042 : UIGDetailsUpdateThread(machine) 1043 { 1044 } 1045 1046 void UIGDetailsUpdateThreadUI::run() 1047 { 1048 COMBase::InitializeCOM(false); 1049 1050 if (!machine().isNull()) 1051 { 1052 /* Prepare table: */ 1053 UITextTable m_text; 1054 1055 /* Gather information: */ 1056 if (machine().GetAccessible()) 1057 { 1058 /* Damn GetExtraData should be const already :( */ 1059 CMachine localMachine = machine(); 1060 1061 /* Get scale-factor value: */ 1062 const QString strScaleFactor = localMachine.GetExtraData(UIExtraDataDefs::GUI_ScaleFactor); 1063 { 1064 /* Try to convert loaded data to double: */ 1065 bool fOk = false; 1066 double dValue = strScaleFactor.toDouble(&fOk); 1067 /* Invent the default value: */ 1068 if (!fOk || !dValue) 1069 dValue = 1.0; 1070 /* Append information: */ 1071 m_text << UITextTableLine(QApplication::translate("UIGDetails", "Scale-factor", "details (user interface)"), QString::number(dValue, 'f', 2)); 1072 } 1073 1074 #ifdef Q_WS_MAC 1075 /* Get 'Unscaled HiDPI Video Output' mode value: */ 1076 const QString strUnscaledHiDPIMode = localMachine.GetExtraData(UIExtraDataDefs::GUI_HiDPI_UnscaledOutput); 1077 { 1078 /* Try to convert loaded data to bool: */ 1079 const bool fEnabled = strUnscaledHiDPIMode.compare("true", Qt::CaseInsensitive) == 0 || 1080 strUnscaledHiDPIMode.compare("yes", Qt::CaseInsensitive) == 0 || 1081 strUnscaledHiDPIMode.compare("on", Qt::CaseInsensitive) == 0 || 1082 strUnscaledHiDPIMode == "1"; 1083 /* Append information: */ 1084 if (fEnabled) 1085 m_text << UITextTableLine(QApplication::translate("UIGDetails", "Unscaled HiDPI Video Output", "details (user interface)"), 1086 QApplication::translate("UIGDetails", "Enabled", "details (user interface/Unscaled HiDPI Video Output)")); 1087 } 1088 #endif /* Q_WS_MAC */ 1089 1090 /* Get mini-toolbar availability status: */ 1091 const QString strMiniToolbarEnabled = localMachine.GetExtraData(UIExtraDataDefs::GUI_ShowMiniToolBar); 1092 { 1093 /* Try to convert loaded data to bool: */ 1094 const bool fEnabled = !(strMiniToolbarEnabled.compare("false", Qt::CaseInsensitive) == 0 || 1095 strMiniToolbarEnabled.compare("no", Qt::CaseInsensitive) == 0 || 1096 strMiniToolbarEnabled.compare("off", Qt::CaseInsensitive) == 0 || 1097 strMiniToolbarEnabled == "0"); 1098 /* Append information: */ 1099 if (fEnabled) 1100 { 1101 /* Get mini-toolbar position: */ 1102 const QString &strMiniToolbarPosition = localMachine.GetExtraData(UIExtraDataDefs::GUI_MiniToolBarAlignment); 1103 { 1104 /* Try to convert loaded data to alignment: */ 1105 switch (gpConverter->fromInternalString<MiniToolbarAlignment>(strMiniToolbarPosition)) 1106 { 1107 /* Append information: */ 1108 case MiniToolbarAlignment_Top: 1109 m_text << UITextTableLine(QApplication::translate("UIGDetails", "Mini-toolbar Position", "details (user interface)"), 1110 QApplication::translate("UIGDetails", "Top", "details (user interface/mini-toolbar position)")); 1111 break; 1112 /* Append information: */ 1113 case MiniToolbarAlignment_Bottom: 1114 m_text << UITextTableLine(QApplication::translate("UIGDetails", "Mini-toolbar Position", "details (user interface)"), 1115 QApplication::translate("UIGDetails", "Bottom", "details (user interface/mini-toolbar position)")); 1116 break; 1117 } 1118 } 1119 } 1120 /* Append information: */ 1121 else 1122 m_text << UITextTableLine(QApplication::translate("UIGDetails", "Mini-toolbar", "details (user interface)"), 1123 QApplication::translate("UIGDetails", "Disabled", "details (user interface/mini-toolbar)")); 1124 } 1125 } 1126 else 1127 m_text << UITextTableLine(QApplication::translate("UIGDetails", "Information Inaccessible", "details"), QString()); 1128 1129 /* Send information into GUI thread: */ 1130 emit sigComplete(m_text); 1131 } 1132 1133 COMBase::CleanupCOM(); 1134 } 1135 1136 UIGDetailsElementUI::UIGDetailsElementUI(UIGDetailsSet *pParent, bool fOpened) 1137 : UIGDetailsElementInterface(pParent, DetailsElementType_UI, fOpened) 1138 { 1139 /* Icon: */ 1140 setIcon(UIIconPool::iconSet(":/interface_16px.png")); 1141 1142 /* Translate: */ 1143 retranslateUi(); 1144 } 1145 1146 void UIGDetailsElementUI::retranslateUi() 1147 { 1148 setName(gpConverter->toString(DetailsElementType_UI)); 1149 } 1150 1151 UIGDetailsUpdateThread* UIGDetailsElementUI::createUpdateThread() 1152 { 1153 return new UIGDetailsUpdateThreadUI(machine()); 1154 } 1155 1156 1041 1157 UIGDetailsUpdateThreadDescription::UIGDetailsUpdateThreadDescription(const CMachine &machine) 1042 1158 : UIGDetailsUpdateThread(machine) -
trunk/src/VBox/Frontends/VirtualBox/src/selector/graphics/details/UIGDetailsElements.h
r52727 r54228 485 485 486 486 487 /* Thread 'UI': */ 488 class UIGDetailsUpdateThreadUI : public UIGDetailsUpdateThread 489 { 490 Q_OBJECT; 491 492 public: 493 494 /* Constructor: */ 495 UIGDetailsUpdateThreadUI(const CMachine &machine); 496 497 private: 498 499 /* Helpers: Prepare stuff: */ 500 void run(); 501 }; 502 503 /* Element 'UI': */ 504 class UIGDetailsElementUI : public UIGDetailsElementInterface 505 { 506 Q_OBJECT; 507 508 public: 509 510 /* Constructor: */ 511 UIGDetailsElementUI(UIGDetailsSet *pParent, bool fOpened); 512 513 private: 514 515 /* Helper: Translate stuff: */ 516 void retranslateUi(); 517 518 /* Helper: Update stuff: */ 519 UIGDetailsUpdateThread* createUpdateThread(); 520 }; 521 522 487 523 /* Thread 'Description': */ 488 524 class UIGDetailsUpdateThreadDescription : public UIGDetailsUpdateThread -
trunk/src/VBox/Frontends/VirtualBox/src/selector/graphics/details/UIGDetailsSet.cpp
r52730 r54228 384 384 case DetailsElementType_USB: 385 385 case DetailsElementType_SF: 386 case DetailsElementType_UI: 386 387 case DetailsElementType_Description: 387 388 { … … 443 444 case DetailsElementType_USB: 444 445 case DetailsElementType_SF: 446 case DetailsElementType_UI: 445 447 case DetailsElementType_Description: 446 448 { … … 497 499 case DetailsElementType_USB: 498 500 case DetailsElementType_SF: 501 case DetailsElementType_UI: 499 502 case DetailsElementType_Description: 500 503 { … … 585 588 case DetailsElementType_USB: return new UIGDetailsElementUSB(this, fOpen); 586 589 case DetailsElementType_SF: return new UIGDetailsElementSF(this, fOpen); 590 case DetailsElementType_UI: return new UIGDetailsElementUI(this, fOpen); 587 591 case DetailsElementType_Description: return new UIGDetailsElementDescription(this, fOpen); 588 592 } -
trunk/src/VBox/Frontends/VirtualBox/src/settings/UISettingsDialogSpecific.cpp
r54199 r54228 708 708 pSettingsPage = new UIMachineSettingsInterface(m_machine.GetId()); 709 709 addItem(":/interface_32px.png", ":/interface_24px.png", ":/interface_16px.png", 710 iPageIndex, "# interface", pSettingsPage);710 iPageIndex, "#userInterface", pSettingsPage); 711 711 break; 712 712 } … … 934 934 935 935 /* Interface page: */ 936 m_pSelector->setItemText(MachineSettingsPageType_Interface, tr(" Interface"));936 m_pSelector->setItemText(MachineSettingsPageType_Interface, tr("User Interface")); 937 937 938 938 /* Polish the selector: */ -
trunk/src/VBox/Frontends/VirtualBox/src/settings/machine/UIMachineSettingsInterface.h
r54199 r54228 25 25 class UIActionPool; 26 26 27 /* Machine settings / Interface page / Data: */27 /* Machine settings / User Interface page / Data: */ 28 28 struct UIDataSettingsMachineInterface 29 29 { … … 63 63 typedef UISettingsCache<UIDataSettingsMachineInterface> UICacheSettingsMachineInterface; 64 64 65 /* Machine settings / Interface page: */65 /* Machine settings / User Interface page: */ 66 66 class UIMachineSettingsInterface : public UISettingsPageMachine, 67 67 public Ui::UIMachineSettingsInterface
Note:
See TracChangeset
for help on using the changeset viewer.