- Timestamp:
- Sep 7, 2020 2:58:04 PM (4 years ago)
- Location:
- trunk/src/VBox/Frontends/VirtualBox/src/settings/machine
- Files:
-
- 18 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Frontends/VirtualBox/src/settings/machine/UIMachineSettingsAudio.cpp
r85958 r86045 78 78 , m_pCheckBoxAudio(0) 79 79 , m_pWidgetAudioSettings(0) 80 , m_p AudioHostDriverLabel(0)81 , m_p AudioHostDriverEditor(0)82 , m_p AudioControllerLabel(0)83 , m_p AudioControllerEditor(0)80 , m_pLabelAudioHostDriver(0) 81 , m_pEditorAudioHostDriver(0) 82 , m_pLabelAudioController(0) 83 , m_pEditorAudioController(0) 84 84 , m_pLabelAudioExtended(0) 85 85 , m_pCheckBoxAudioOutput(0) … … 138 138 /* Load old audio data from the cache: */ 139 139 m_pCheckBoxAudio->setChecked(oldAudioData.m_fAudioEnabled); 140 m_p AudioHostDriverEditor->setValue(oldAudioData.m_audioDriverType);141 m_p AudioControllerEditor->setValue(oldAudioData.m_audioControllerType);140 m_pEditorAudioHostDriver->setValue(oldAudioData.m_audioDriverType); 141 m_pEditorAudioController->setValue(oldAudioData.m_audioControllerType); 142 142 m_pCheckBoxAudioOutput->setChecked(oldAudioData.m_fAudioOutputEnabled); 143 143 m_pCheckBoxAudioInput->setChecked(oldAudioData.m_fAudioInputEnabled); … … 154 154 /* Gather new audio data: */ 155 155 newAudioData.m_fAudioEnabled = m_pCheckBoxAudio->isChecked(); 156 newAudioData.m_audioDriverType = m_p AudioHostDriverEditor->value();157 newAudioData.m_audioControllerType = m_p AudioControllerEditor->value();156 newAudioData.m_audioDriverType = m_pEditorAudioHostDriver->value(); 157 newAudioData.m_audioControllerType = m_pEditorAudioController->value(); 158 158 newAudioData.m_fAudioOutputEnabled = m_pCheckBoxAudioOutput->isChecked(); 159 159 newAudioData.m_fAudioInputEnabled = m_pCheckBoxAudioInput->isChecked(); … … 181 181 "the host audio system using the specified driver.")); 182 182 m_pCheckBoxAudio->setText(tr("Enable &Audio")); 183 m_p AudioHostDriverLabel->setText(tr("Host Audio &Driver:"));184 m_p AudioHostDriverEditor->setWhatsThis(tr("Selects the audio output driver."183 m_pLabelAudioHostDriver->setText(tr("Host Audio &Driver:")); 184 m_pEditorAudioHostDriver->setWhatsThis(tr("Selects the audio output driver." 185 185 "The <b>Null Audio Driver</b> makes the guest see an audio card," 186 186 "however every access to it will be ignored.")); 187 m_p AudioControllerLabel->setText(tr("Audio &Controller:"));188 m_p AudioControllerEditor->setWhatsThis(tr("Selects the type of the virtual sound"187 m_pLabelAudioController->setText(tr("Audio &Controller:")); 188 m_pEditorAudioController->setWhatsThis(tr("Selects the type of the virtual sound" 189 189 "card. Depending on this value, VirtualBox will provide different" 190 190 "audio hardware to the virtual machine.")); … … 204 204 /* Polish audio page availability: */ 205 205 m_pCheckBoxAudio->setEnabled(isMachineOffline()); 206 m_p AudioHostDriverLabel->setEnabled(isMachineOffline() || isMachineSaved());207 m_p AudioHostDriverEditor->setEnabled(isMachineOffline() || isMachineSaved());208 m_p AudioControllerLabel->setEnabled(isMachineOffline());209 m_p AudioControllerEditor->setEnabled(isMachineOffline());206 m_pLabelAudioHostDriver->setEnabled(isMachineOffline() || isMachineSaved()); 207 m_pEditorAudioHostDriver->setEnabled(isMachineOffline() || isMachineSaved()); 208 m_pLabelAudioController->setEnabled(isMachineOffline()); 209 m_pEditorAudioController->setEnabled(isMachineOffline()); 210 210 m_pLabelAudioExtended->setEnabled(isMachineInValidMode()); 211 211 m_pCheckBoxAudioOutput->setEnabled(isMachineInValidMode()); … … 255 255 { 256 256 pLayoutAudioSettings->setContentsMargins(0, 0, 0, 0); 257 258 /* Prepare host driver label: */ 259 m_pAudioHostDriverLabel = new QLabel(m_pWidgetAudioSettings); 260 if (m_pAudioHostDriverLabel) 261 { 262 m_pAudioHostDriverLabel->setAlignment(Qt::AlignRight | Qt::AlignVCenter); 263 pLayoutAudioSettings->addWidget(m_pAudioHostDriverLabel, 0, 0); 264 } 265 /* Prepare host driver editor: */ 266 m_pAudioHostDriverEditor = new UIAudioHostDriverEditor(m_pWidgetAudioSettings); 267 if (m_pAudioHostDriverEditor) 268 { 269 m_pAudioHostDriverLabel->setBuddy(m_pAudioHostDriverEditor->focusProxy()); 270 pLayoutAudioSettings->addWidget(m_pAudioHostDriverEditor, 0, 1); 271 } 272 273 /* Prepare host controller label: */ 274 m_pAudioControllerLabel = new QLabel(m_pWidgetAudioSettings); 275 if (m_pAudioControllerLabel) 276 { 277 m_pAudioControllerLabel->setAlignment(Qt::AlignRight | Qt::AlignVCenter); 278 pLayoutAudioSettings->addWidget(m_pAudioControllerLabel, 1, 0); 279 } 280 /* Prepare host controller editor: */ 281 m_pAudioControllerEditor = new UIAudioControllerEditor(m_pWidgetAudioSettings); 282 if (m_pAudioControllerEditor) 283 { 284 m_pAudioControllerLabel->setBuddy(m_pAudioControllerEditor->focusProxy()); 285 pLayoutAudioSettings->addWidget(m_pAudioControllerEditor, 1, 1); 286 } 287 288 /* Prepare extended label: */ 257 pLayoutAudioSettings->setColumnStretch(1, 1); 258 259 /* Prepare audio host driver label: */ 260 m_pLabelAudioHostDriver = new QLabel(m_pWidgetAudioSettings); 261 if (m_pLabelAudioHostDriver) 262 { 263 m_pLabelAudioHostDriver->setAlignment(Qt::AlignRight | Qt::AlignVCenter); 264 pLayoutAudioSettings->addWidget(m_pLabelAudioHostDriver, 0, 0); 265 } 266 /* Prepare audio host driver editor: */ 267 m_pEditorAudioHostDriver = new UIAudioHostDriverEditor(m_pWidgetAudioSettings); 268 if (m_pEditorAudioHostDriver) 269 { 270 if (m_pLabelAudioHostDriver) 271 m_pLabelAudioHostDriver->setBuddy(m_pEditorAudioHostDriver->focusProxy()); 272 pLayoutAudioSettings->addWidget(m_pEditorAudioHostDriver, 0, 1, 1, 2); 273 } 274 275 /* Prepare audio host controller label: */ 276 m_pLabelAudioController = new QLabel(m_pWidgetAudioSettings); 277 if (m_pLabelAudioController) 278 { 279 m_pLabelAudioController->setAlignment(Qt::AlignRight | Qt::AlignVCenter); 280 pLayoutAudioSettings->addWidget(m_pLabelAudioController, 1, 0); 281 } 282 /* Prepare audio host controller editor: */ 283 m_pEditorAudioController = new UIAudioControllerEditor(m_pWidgetAudioSettings); 284 if (m_pEditorAudioController) 285 { 286 if (m_pLabelAudioController) 287 m_pLabelAudioController->setBuddy(m_pEditorAudioController->focusProxy()); 288 pLayoutAudioSettings->addWidget(m_pEditorAudioController, 1, 1, 1, 2); 289 } 290 291 /* Prepare audio extended label: */ 289 292 m_pLabelAudioExtended = new QLabel(m_pWidgetAudioSettings); 290 293 if (m_pLabelAudioExtended) … … 293 296 pLayoutAudioSettings->addWidget(m_pLabelAudioExtended, 2, 0); 294 297 } 295 /* Prepare output check-box: */298 /* Prepare audio output check-box: */ 296 299 m_pCheckBoxAudioOutput = new QCheckBox(m_pWidgetAudioSettings); 297 300 if (m_pCheckBoxAudioOutput) 298 301 pLayoutAudioSettings->addWidget(m_pCheckBoxAudioOutput, 2, 1); 299 /* Prepare input check-box: */302 /* Prepare audio input check-box: */ 300 303 m_pCheckBoxAudioInput = new QCheckBox(m_pWidgetAudioSettings); 301 304 if (m_pCheckBoxAudioInput) 302 305 pLayoutAudioSettings->addWidget(m_pCheckBoxAudioInput, 3, 1); 303 304 pLayoutMain->addWidget(m_pWidgetAudioSettings, 1, 1, 1, 1); 305 }306 } 307 308 pLayoutMain->addWidget(m_pWidgetAudioSettings, 1, 1); 306 309 } 307 310 } … … 310 313 void UIMachineSettingsAudio::prepareConnections() 311 314 { 312 QObject::connect(m_pCheckBoxAudio, &QCheckBox::toggled, m_pWidgetAudioSettings, &QWidget::setEnabled);315 connect(m_pCheckBoxAudio, &QCheckBox::toggled, m_pWidgetAudioSettings, &QWidget::setEnabled); 313 316 } 314 317 -
trunk/src/VBox/Frontends/VirtualBox/src/settings/machine/UIMachineSettingsAudio.h
r85883 r86045 93 93 /** Holds the audio settings widget instance. */ 94 94 QWidget *m_pWidgetAudioSettings; 95 /** Holds the host audiodriver label instance. */96 QLabel *m_p AudioHostDriverLabel;97 /** Holds the host audiodriver editor instance. */98 UIAudioHostDriverEditor *m_p AudioHostDriverEditor;99 /** Holds the host audiocontroller label instance. */100 QLabel *m_p AudioControllerLabel;101 /** Holds the host audiocontroller instance instance. */102 UIAudioControllerEditor *m_p AudioControllerEditor;95 /** Holds the audio host driver label instance. */ 96 QLabel *m_pLabelAudioHostDriver; 97 /** Holds the audio host driver editor instance. */ 98 UIAudioHostDriverEditor *m_pEditorAudioHostDriver; 99 /** Holds the audio host controller label instance. */ 100 QLabel *m_pLabelAudioController; 101 /** Holds the audio host controller instance instance. */ 102 UIAudioControllerEditor *m_pEditorAudioController; 103 103 /** Holds the audio extended label instance. */ 104 104 QLabel *m_pLabelAudioExtended; -
trunk/src/VBox/Frontends/VirtualBox/src/settings/machine/UIMachineSettingsDisplay.cpp
r85871 r86045 1080 1080 const CSystemProperties comProperties = uiCommon().virtualBox().GetSystemProperties(); 1081 1081 1082 /* Prepare Screentab: */1082 /* Prepare 'Screen' tab: */ 1083 1083 m_pTabScreen = new QWidget; 1084 1084 if (m_pTabScreen) 1085 1085 { 1086 /* Prepare Screentab layout: */1086 /* Prepare 'Screen' tab layout: */ 1087 1087 QGridLayout *pLayoutScreen = new QGridLayout(m_pTabScreen); 1088 1088 if (pLayoutScreen) … … 1101 1101 if (m_pEditorVideoMemorySize) 1102 1102 { 1103 m_pLabelVideoMemorySize->setBuddy(m_pEditorVideoMemorySize->focusProxy()); 1103 if (m_pLabelVideoMemorySize) 1104 m_pLabelVideoMemorySize->setBuddy(m_pEditorVideoMemorySize->focusProxy()); 1104 1105 pLayoutScreen->addWidget(m_pEditorVideoMemorySize, 0, 1, 2, 2); 1105 1106 } … … 1162 1163 if (m_pSpinboxMonitorCount) 1163 1164 { 1164 m_pLabelMonitorCount->setBuddy(m_pSpinboxMonitorCount); 1165 if (m_pLabelMonitorCount) 1166 m_pLabelMonitorCount->setBuddy(m_pSpinboxMonitorCount); 1165 1167 m_pSpinboxMonitorCount->setMinimum(1); 1166 1168 m_pSpinboxMonitorCount->setMaximum(comProperties.GetMaxGuestMonitors()); … … 1180 1182 if (m_pEditorScaleFactor) 1181 1183 { 1182 m_pLabelScaleFactor->setBuddy(m_pEditorScaleFactor->focusProxy()); 1184 if (m_pLabelScaleFactor) 1185 m_pLabelScaleFactor->setBuddy(m_pEditorScaleFactor->focusProxy()); 1183 1186 pLayoutScreen->addWidget(m_pEditorScaleFactor, 4, 1, 2, 2); 1184 1187 } … … 1195 1198 if (m_pEditorGraphicsController) 1196 1199 { 1197 m_pLabelGraphicsController->setBuddy(m_pEditorGraphicsController->focusProxy()); 1200 if (m_pLabelGraphicsController) 1201 m_pLabelGraphicsController->setBuddy(m_pEditorGraphicsController->focusProxy()); 1198 1202 pLayoutScreen->addWidget(m_pEditorGraphicsController, 6, 1, 1, 2); 1199 1203 } … … 1218 1222 void UIMachineSettingsDisplay::prepareTabRemoteDisplay() 1219 1223 { 1220 /* Prepare Remote Displaytab: */1224 /* Prepare 'Remote Display' tab: */ 1221 1225 m_pTabRemoteDisplay = new QWidget; 1222 1226 if (m_pTabRemoteDisplay) 1223 1227 { 1224 /* Prepare Remote Displaytab layout: */1225 QGridLayout *pLayout TabRemoteDisplay = new QGridLayout(m_pTabRemoteDisplay);1226 if (pLayout TabRemoteDisplay)1228 /* Prepare 'Remote Display' tab layout: */ 1229 QGridLayout *pLayoutRemoteDisplay = new QGridLayout(m_pTabRemoteDisplay); 1230 if (pLayoutRemoteDisplay) 1227 1231 { 1228 pLayout TabRemoteDisplay->setRowStretch(2, 1);1232 pLayoutRemoteDisplay->setRowStretch(2, 1); 1229 1233 1230 1234 /* Prepare remote display check-box: */ 1231 1235 m_pCheckboxRemoteDisplay = new QCheckBox(m_pTabRemoteDisplay); 1232 1236 if (m_pCheckboxRemoteDisplay) 1233 pLayout TabRemoteDisplay->addWidget(m_pCheckboxRemoteDisplay, 0, 0, 1, 2);1237 pLayoutRemoteDisplay->addWidget(m_pCheckboxRemoteDisplay, 0, 0, 1, 2); 1234 1238 1235 1239 /* Prepare 20-px shifting spacer: */ 1236 1240 QSpacerItem *pSpacerItem = new QSpacerItem(20, 0, QSizePolicy::Fixed, QSizePolicy::Minimum); 1237 1241 if (pSpacerItem) 1238 pLayout TabRemoteDisplay->addItem(pSpacerItem, 1, 0);1242 pLayoutRemoteDisplay->addItem(pSpacerItem, 1, 0); 1239 1243 1240 1244 /* Prepare remote display settings widget: */ … … 1259 1263 if (m_pEditorRemoteDisplayPort) 1260 1264 { 1261 m_pLabelRemoteDisplayPort->setBuddy(m_pEditorRemoteDisplayPort); 1265 if (m_pLabelRemoteDisplayPort) 1266 m_pLabelRemoteDisplayPort->setBuddy(m_pEditorRemoteDisplayPort); 1262 1267 m_pEditorRemoteDisplayPort->setValidator(new QRegExpValidator( 1263 1268 QRegExp("(([0-9]{1,5}(\\-[0-9]{1,5}){0,1}),)*([0-9]{1,5}(\\-[0-9]{1,5}){0,1})"), this)); … … 1277 1282 if (m_pComboRemoteDisplayAuthMethod) 1278 1283 { 1279 m_pLabelRemoteDisplayAuthMethod->setBuddy(m_pComboRemoteDisplayAuthMethod); 1284 if (m_pLabelRemoteDisplayAuthMethod) 1285 m_pLabelRemoteDisplayAuthMethod->setBuddy(m_pComboRemoteDisplayAuthMethod); 1280 1286 m_pComboRemoteDisplayAuthMethod->setSizeAdjustPolicy(QComboBox::AdjustToContents); 1281 1287 … … 1294 1300 if (m_pEditorRemoteDisplayTimeout) 1295 1301 { 1296 m_pLabelRemoteDisplayTimeout->setBuddy(m_pEditorRemoteDisplayTimeout); 1302 if (m_pLabelRemoteDisplayTimeout) 1303 m_pLabelRemoteDisplayTimeout->setBuddy(m_pEditorRemoteDisplayTimeout); 1297 1304 m_pEditorRemoteDisplayTimeout->setValidator(new QIntValidator(this)); 1298 1305 … … 1313 1320 } 1314 1321 1315 pLayout TabRemoteDisplay->addWidget(m_pWidgetRemoteDisplaySettings, 1, 1);1322 pLayoutRemoteDisplay->addWidget(m_pWidgetRemoteDisplaySettings, 1, 1); 1316 1323 } 1317 1324 } … … 1323 1330 void UIMachineSettingsDisplay::prepareTabRecording() 1324 1331 { 1325 /* Prepare Recordingtab: */1332 /* Prepare 'Recording' tab: */ 1326 1333 m_pTabRecording = new QWidget; 1327 1334 if (m_pTabRecording) 1328 1335 { 1329 /* Prepare Recordingtab layout: */1336 /* Prepare 'Recording' tab layout: */ 1330 1337 QGridLayout *pLayoutRecording = new QGridLayout(m_pTabRecording); 1331 1338 if (pLayoutRecording) … … 1364 1371 if (m_pComboRecordingMode) 1365 1372 { 1366 m_pLabelRecordingMode->setBuddy(m_pComboRecordingMode); 1373 if (m_pLabelRecordingMode) 1374 m_pLabelRecordingMode->setBuddy(m_pComboRecordingMode); 1367 1375 m_pComboRecordingMode->insertItem(0, ""); /* UISettingsDefs::RecordingMode_VideoAudio */ 1368 1376 m_pComboRecordingMode->insertItem(1, ""); /* UISettingsDefs::RecordingMode_VideoOnly */ … … 1383 1391 if (m_pEditorRecordingFilePath) 1384 1392 { 1385 m_pLabelRecordingFilePath->setBuddy(m_pEditorRecordingFilePath->focusProxy()); 1393 if (m_pLabelRecordingFilePath) 1394 m_pLabelRecordingFilePath->setBuddy(m_pEditorRecordingFilePath->focusProxy()); 1386 1395 m_pEditorRecordingFilePath->setEditable(false); 1387 1396 m_pEditorRecordingFilePath->setMode(UIFilePathSelector::Mode_File_Save); … … 1401 1410 if (m_pComboRecordingFrameSize) 1402 1411 { 1403 m_pLabelRecordingFrameSize->setBuddy(m_pComboRecordingFrameSize); 1412 if (m_pLabelRecordingFrameSize) 1413 m_pLabelRecordingFrameSize->setBuddy(m_pComboRecordingFrameSize); 1404 1414 m_pComboRecordingFrameSize->setSizePolicy(QSizePolicy(QSizePolicy::MinimumExpanding, QSizePolicy::Fixed)); 1405 1415 m_pComboRecordingFrameSize->addItem(""); /* User Defined */ … … 1508 1518 if (m_pSpinboxRecordingFrameRate) 1509 1519 { 1510 m_pLabelRecordingFrameRate->setBuddy(m_pSpinboxRecordingFrameRate); 1520 if (m_pLabelRecordingFrameRate) 1521 m_pLabelRecordingFrameRate->setBuddy(m_pSpinboxRecordingFrameRate); 1511 1522 uiCommon().setMinimumWidthAccordingSymbolCount(m_pSpinboxRecordingFrameRate, 3); 1512 1523 m_pSpinboxRecordingFrameRate->setMinimum(1); … … 1581 1592 if (m_pSpinboxRecordingVideoQuality) 1582 1593 { 1583 m_pLabelRecordingVideoQuality->setBuddy(m_pSpinboxRecordingVideoQuality); 1594 if (m_pLabelRecordingVideoQuality) 1595 m_pLabelRecordingVideoQuality->setBuddy(m_pSpinboxRecordingVideoQuality); 1584 1596 uiCommon().setMinimumWidthAccordingSymbolCount(m_pSpinboxRecordingVideoQuality, 5); 1585 1597 m_pSpinboxRecordingVideoQuality->setMinimum(VIDEO_CAPTURE_BIT_RATE_MIN); … … 1610 1622 if (m_pSliderRecordingAudioQuality) 1611 1623 { 1612 m_pLabelRecordingAudioQuality->setBuddy(m_pSliderRecordingAudioQuality); 1624 if (m_pLabelRecordingAudioQuality) 1625 m_pLabelRecordingAudioQuality->setBuddy(m_pSliderRecordingAudioQuality); 1613 1626 m_pSliderRecordingAudioQuality->setOrientation(Qt::Horizontal); 1614 1627 m_pSliderRecordingAudioQuality->setMinimum(1); … … 1620 1633 m_pSliderRecordingAudioQuality->setOptimalHint(1, 2); 1621 1634 m_pSliderRecordingAudioQuality->setWarningHint(2, 3); 1635 1622 1636 pLayoutRecordingAudioQuality->addWidget(m_pSliderRecordingAudioQuality); 1623 1637 } … … 1666 1680 if (m_pScrollerRecordingScreens) 1667 1681 { 1668 m_pLabelRecordingScreens->setBuddy(m_pScrollerRecordingScreens); 1682 if (m_pLabelRecordingScreens) 1683 m_pLabelRecordingScreens->setBuddy(m_pScrollerRecordingScreens); 1669 1684 pLayoutRecordingSettings->addWidget(m_pScrollerRecordingScreens, 10, 1, 1, 3); 1670 1685 } … … 1704 1719 connect(m_pCheckboxRecording, &QCheckBox::toggled, 1705 1720 this, &UIMachineSettingsDisplay::sltHandleRecordingCheckboxToggle); 1721 connect(m_pComboRecordingMode, static_cast<void(QComboBox::*)(int)>(&QComboBox::currentIndexChanged), 1722 this, &UIMachineSettingsDisplay::sltHandleRecordingComboBoxChange); 1706 1723 connect(m_pComboRecordingFrameSize, static_cast<void(QComboBox::*)(int)>(&QComboBox:: currentIndexChanged), 1707 1724 this, &UIMachineSettingsDisplay::sltHandleRecordingVideoFrameSizeComboboxChange); … … 1718 1735 connect(m_pSpinboxRecordingVideoQuality, static_cast<void(QSpinBox::*)(int)>(&QSpinBox::valueChanged), 1719 1736 this, &UIMachineSettingsDisplay::sltHandleRecordingVideoBitRateEditorChange); 1720 1721 connect(m_pComboRecordingMode, static_cast<void(QComboBox::*)(int)>(&QComboBox::currentIndexChanged),1722 this, &UIMachineSettingsDisplay::sltHandleRecordingComboBoxChange);1723 1737 } 1724 1738 -
trunk/src/VBox/Frontends/VirtualBox/src/settings/machine/UIMachineSettingsGeneral.cpp
r85871 r86045 611 611 void UIMachineSettingsGeneral::prepareTabBasic() 612 612 { 613 /* Prepare Basictab: */613 /* Prepare 'Basic' tab: */ 614 614 m_pTabBasic = new QWidget; 615 615 if (m_pTabBasic) 616 616 { 617 /* Prepare Basictab layout: */617 /* Prepare 'Basic' tab layout: */ 618 618 QVBoxLayout *pLayoutBasic = new QVBoxLayout(m_pTabBasic); 619 619 if (pLayoutBasic) … … 637 637 void UIMachineSettingsGeneral::prepareTabAdvanced() 638 638 { 639 /* Prepare Advancedtab: */639 /* Prepare 'Advanced' tab: */ 640 640 m_pTabAdvanced = new QWidget; 641 641 if (m_pTabAdvanced) 642 642 { 643 /* Prepare Advancedtab layout: */643 /* Prepare 'Advanced' tab layout: */ 644 644 QGridLayout *pLayoutAdvanced = new QGridLayout(m_pTabAdvanced); 645 645 if (pLayoutAdvanced) … … 703 703 void UIMachineSettingsGeneral::prepareTabDescription() 704 704 { 705 /* Prepare Descriptiontab: */705 /* Prepare 'Description' tab: */ 706 706 m_pTabDescription = new QWidget; 707 707 if (m_pTabDescription) 708 708 { 709 /* Prepare Descriptiontab layout: */709 /* Prepare 'Description' tab layout: */ 710 710 QVBoxLayout *pLayoutDescription = new QVBoxLayout(m_pTabDescription); 711 711 if (pLayoutDescription) … … 731 731 void UIMachineSettingsGeneral::prepareTabEncryption() 732 732 { 733 /* Prepare Encryptiontab: */733 /* Prepare 'Encryption' tab: */ 734 734 m_pTabEncryption = new QWidget; 735 735 if (m_pTabEncryption) 736 736 { 737 /* Prepare Encryptiontab layout: */737 /* Prepare 'Encryption' tab layout: */ 738 738 QGridLayout *pLayoutEncryption = new QGridLayout(m_pTabEncryption); 739 739 if (pLayoutEncryption) … … 772 772 if (m_pComboCipher) 773 773 { 774 if (m_pLabelCipher) 775 m_pLabelCipher->setBuddy(m_pComboCipher); 774 776 m_encryptionCiphers << QString() 775 777 << "AES-XTS256-PLAIN64" 776 778 << "AES-XTS128-PLAIN64"; 777 779 m_pComboCipher->addItems(m_encryptionCiphers); 778 if (m_pLabelCipher)779 m_pLabelCipher->setBuddy(m_pComboCipher);780 780 m_pLayoutEncryptionSettings->addWidget(m_pComboCipher, 0, 1); 781 781 } … … 792 792 if (m_pEditorEncryptionPassword) 793 793 { 794 m_pEditorEncryptionPassword->setEchoMode(QLineEdit::Password);795 794 if (m_pLabelEncryptionPassword) 796 795 m_pLabelEncryptionPassword->setBuddy(m_pEditorEncryptionPassword); 796 m_pEditorEncryptionPassword->setEchoMode(QLineEdit::Password); 797 797 m_pLayoutEncryptionSettings->addWidget(m_pEditorEncryptionPassword, 1, 1); 798 798 } … … 809 809 if (m_pEditorEncryptionPasswordConfirm) 810 810 { 811 m_pEditorEncryptionPasswordConfirm->setEchoMode(QLineEdit::Password);812 811 if (m_pLabelEncryptionPasswordConfirm) 813 812 m_pLabelEncryptionPasswordConfirm->setBuddy(m_pEditorEncryptionPasswordConfirm); 813 m_pEditorEncryptionPasswordConfirm->setEchoMode(QLineEdit::Password); 814 814 m_pLayoutEncryptionSettings->addWidget(m_pEditorEncryptionPasswordConfirm, 2, 1); 815 815 } -
trunk/src/VBox/Frontends/VirtualBox/src/settings/machine/UIMachineSettingsInterface.cpp
r85972 r86045 149 149 , m_pLabelMiniToolBar(0) 150 150 , m_pCheckBoxShowMiniToolBar(0) 151 , m_pCheckBox ToolBarAlignment(0)151 , m_pCheckBoxMiniToolBarAlignment(0) 152 152 , m_pEditorStatusBar(0) 153 153 { … … 238 238 #ifndef VBOX_WS_MAC 239 239 m_pCheckBoxShowMiniToolBar->setChecked(oldInterfaceData.m_fShowMiniToolBar); 240 m_pCheckBox ToolBarAlignment->setChecked(oldInterfaceData.m_fMiniToolBarAtTop);240 m_pCheckBoxMiniToolBarAlignment->setChecked(oldInterfaceData.m_fMiniToolBarAtTop); 241 241 #endif 242 242 m_pEditorVisualState->setMachineId(m_machine.GetId()); … … 277 277 #ifndef VBOX_WS_MAC 278 278 newInterfaceData.m_fShowMiniToolBar = m_pCheckBoxShowMiniToolBar->isChecked(); 279 newInterfaceData.m_fMiniToolBarAtTop = m_pCheckBox ToolBarAlignment->isChecked();279 newInterfaceData.m_fMiniToolBarAtTop = m_pCheckBoxMiniToolBarAlignment->isChecked(); 280 280 #endif 281 281 newInterfaceData.m_enmVisualState = m_pEditorVisualState->value(); … … 306 306 m_pCheckBoxShowMiniToolBar->setWhatsThis(tr("When checked, show the Mini ToolBar in full-screen and seamless modes.")); 307 307 m_pCheckBoxShowMiniToolBar->setText(tr("Show in &Full-screen/Seamless")); 308 m_pCheckBox ToolBarAlignment->setWhatsThis(tr("When checked, show the Mini ToolBar at the top of the screen, rather than in its"308 m_pCheckBoxMiniToolBarAlignment->setWhatsThis(tr("When checked, show the Mini ToolBar at the top of the screen, rather than in its" 309 309 "default position at the bottom of the screen.")); 310 m_pCheckBox ToolBarAlignment->setText(tr("Show at &Top of Screen"));310 m_pCheckBoxMiniToolBarAlignment->setText(tr("Show at &Top of Screen")); 311 311 m_pEditorStatusBar->setWhatsThis(tr("Allows to modify VM status-bar contents.")); 312 312 } … … 319 319 m_pLabelMiniToolBar->hide(); 320 320 m_pCheckBoxShowMiniToolBar->hide(); 321 m_pCheckBox ToolBarAlignment->hide();321 m_pCheckBoxMiniToolBarAlignment->hide(); 322 322 #else /* !VBOX_WS_MAC */ 323 323 m_pLabelMiniToolBar->setEnabled(isMachineInValidMode()); 324 324 m_pCheckBoxShowMiniToolBar->setEnabled(isMachineInValidMode()); 325 m_pCheckBox ToolBarAlignment->setEnabled(isMachineInValidMode() && m_pCheckBoxShowMiniToolBar->isChecked());325 m_pCheckBoxMiniToolBarAlignment->setEnabled(isMachineInValidMode() && m_pCheckBoxShowMiniToolBar->isChecked()); 326 326 #endif /* !VBOX_WS_MAC */ 327 327 m_pEditorStatusBar->setEnabled(isMachineInValidMode()); … … 361 361 m_pEditorMenuBar->setMachineID(m_uMachineId); 362 362 363 pLayoutMain->addWidget(m_pEditorMenuBar, 0, 0, 1, 2);363 pLayoutMain->addWidget(m_pEditorMenuBar, 0, 0, 1, 3); 364 364 } 365 365 … … 383 383 pLayoutMain->addWidget(m_pLabelMiniToolBar, 2, 0); 384 384 } 385 /* Prepare show mini-toolbarcheck-box: */385 /* Prepare 'show mini-toolbar' check-box: */ 386 386 m_pCheckBoxShowMiniToolBar = new QCheckBox(this); 387 387 if (m_pCheckBoxShowMiniToolBar) 388 388 pLayoutMain->addWidget(m_pCheckBoxShowMiniToolBar, 2, 1); 389 /* Prepare mini-toolbar alignmentcheck-box: */390 m_pCheckBox ToolBarAlignment = new QCheckBox(this);391 if (m_pCheckBox ToolBarAlignment)392 pLayoutMain->addWidget(m_pCheckBox ToolBarAlignment, 3, 1);389 /* Prepare 'mini-toolbar alignment' check-box: */ 390 m_pCheckBoxMiniToolBarAlignment = new QCheckBox(this); 391 if (m_pCheckBoxMiniToolBarAlignment) 392 pLayoutMain->addWidget(m_pCheckBoxMiniToolBarAlignment, 3, 1); 393 393 394 394 /* Prepare status-bar editor: */ … … 397 397 { 398 398 m_pEditorStatusBar->setMachineID(m_uMachineId); 399 pLayoutMain->addWidget(m_pEditorStatusBar, 5, 0, 1, 2);399 pLayoutMain->addWidget(m_pEditorStatusBar, 5, 0, 1, 3); 400 400 } 401 401 } … … 405 405 { 406 406 connect(m_pCheckBoxShowMiniToolBar, &QCheckBox::toggled, 407 m_pCheckBox ToolBarAlignment, &UIMachineSettingsInterface::setEnabled);407 m_pCheckBoxMiniToolBarAlignment, &UIMachineSettingsInterface::setEnabled); 408 408 } 409 409 -
trunk/src/VBox/Frontends/VirtualBox/src/settings/machine/UIMachineSettingsInterface.h
r85972 r86045 112 112 /** Holds the mini-toolbar label instance. */ 113 113 QLabel *m_pLabelMiniToolBar; 114 /** Holds the show mini-toolbarcheck-box instance. */114 /** Holds the 'show mini-toolbar' check-box instance. */ 115 115 QCheckBox *m_pCheckBoxShowMiniToolBar; 116 /** Holds the mini-toolbar alignmentcheck-box instance. */117 QCheckBox *m_pCheckBox ToolBarAlignment;116 /** Holds the 'mini-toolbar alignment' check-box instance. */ 117 QCheckBox *m_pCheckBoxMiniToolBarAlignment; 118 118 /** Holds the status-bar editor instance. */ 119 119 UIStatusBarEditorWidget *m_pEditorStatusBar; -
trunk/src/VBox/Frontends/VirtualBox/src/settings/machine/UIMachineSettingsNetwork.cpp
r85958 r86045 787 787 if (m_pEditorAttachmentType) 788 788 { 789 m_pLabelAttachmentType->setBuddy(m_pEditorAttachmentType->focusProxy1()); 790 m_pLabelAdapterName->setBuddy(m_pEditorAttachmentType->focusProxy2()); 789 if (m_pLabelAttachmentType) 790 m_pLabelAttachmentType->setBuddy(m_pEditorAttachmentType->focusProxy1()); 791 if (m_pLabelAdapterName) 792 m_pLabelAdapterName->setBuddy(m_pEditorAttachmentType->focusProxy2()); 793 791 794 pLayoutAdapterSettings->addWidget(m_pEditorAttachmentType, 0, 1, 2, 3); 792 795 } 793 796 794 /* Prepare advanced arr aow button: */797 /* Prepare advanced arrow button: */ 795 798 m_pButtonAdvanced = new QIArrowButtonSwitch(m_pWidgetAdapterSettings); 796 799 if (m_pButtonAdvanced) … … 816 819 if (m_pComboAdapterType) 817 820 { 818 m_pLabelAdapterType->setBuddy(m_pComboAdapterType); 821 if (m_pLabelAdapterType) 822 m_pLabelAdapterType->setBuddy(m_pComboAdapterType); 819 823 pLayoutAdapterSettings->addWidget(m_pComboAdapterType, 3, 1, 1, 3); 820 824 } … … 831 835 if (m_pComboPromiscuousMode) 832 836 { 833 m_pLabelPromiscuousMode->setBuddy(m_pComboPromiscuousMode); 837 if (m_pLabelPromiscuousMode) 838 m_pLabelPromiscuousMode->setBuddy(m_pComboPromiscuousMode); 834 839 pLayoutAdapterSettings->addWidget(m_pComboPromiscuousMode, 4, 1, 1, 3); 835 840 } … … 846 851 if (m_pEditorMAC) 847 852 { 848 m_pLabelMAC->setBuddy(m_pEditorMAC); 853 if (m_pLabelMAC) 854 m_pLabelMAC->setBuddy(m_pEditorMAC); 849 855 m_pEditorMAC->setValidator(new QRegExpValidator(QRegExp("[0-9A-Fa-f]{12}"), this)); 850 856 m_pEditorMAC->setMinimumWidthByText(QString().fill('0', 12)); … … 875 881 m_pCheckBoxCableConnected = new QCheckBox(m_pWidgetAdapterSettings); 876 882 if (m_pCheckBoxCableConnected) 877 pLayoutAdapterSettings->addWidget(m_pCheckBoxCableConnected, 7, 1, 1, 3);883 pLayoutAdapterSettings->addWidget(m_pCheckBoxCableConnected, 7, 1, 1, 2); 878 884 879 885 /* Prepare port forwarding button: */ -
trunk/src/VBox/Frontends/VirtualBox/src/settings/machine/UIMachineSettingsSF.cpp
r85959 r86045 283 283 , m_pLayoutTree(0) 284 284 , m_pTreeWidget(0) 285 , m_pTool Bar(0)285 , m_pToolbar(0) 286 286 , m_pActionAdd(0) 287 287 , m_pActionEdit(0) … … 450 450 /* Polish shared folders page availability: */ 451 451 m_pLabelSeparator->setEnabled(isMachineInValidMode()); 452 m_pTool Bar->setEnabled(isMachineInValidMode());453 m_pTool Bar->setEnabled(isMachineInValidMode());452 m_pToolbar->setEnabled(isMachineInValidMode()); 453 m_pToolbar->setEnabled(isMachineInValidMode()); 454 454 455 455 /* Update root items visibility: */ … … 711 711 if (pLayoutMain) 712 712 { 713 pLayoutMain->setContentsMargins(0, 0, 0, 0);714 715 713 /* Prepare separator: */ 716 714 m_pLabelSeparator = new QILabelSeparator(this); … … 756 754 { 757 755 /* Prepare shared folders toolbar: */ 758 m_pTool Bar = new UIToolBar(this);759 if (m_pTool Bar)756 m_pToolbar = new UIToolBar(this); 757 if (m_pToolbar) 760 758 { 761 759 const int iIconMetric = QApplication::style()->pixelMetric(QStyle::PM_SmallIconSize); 762 m_pTool Bar->setIconSize(QSize(iIconMetric, iIconMetric));763 m_pTool Bar->setOrientation(Qt::Vertical);764 765 /* Prepare ' Add Shared Folder' action: */766 m_pActionAdd = m_pTool Bar->addAction(UIIconPool::iconSet(":/sf_add_16px.png",767 768 760 m_pToolbar->setIconSize(QSize(iIconMetric, iIconMetric)); 761 m_pToolbar->setOrientation(Qt::Vertical); 762 763 /* Prepare 'add shared folder' action: */ 764 m_pActionAdd = m_pToolbar->addAction(UIIconPool::iconSet(":/sf_add_16px.png", 765 ":/sf_add_disabled_16px.png"), 766 QString(), this, SLOT(sltAddFolder())); 769 767 if (m_pActionAdd) 770 768 m_pActionAdd->setShortcuts(QList<QKeySequence>() << QKeySequence("Ins") << QKeySequence("Ctrl+N")); 771 769 772 /* Prepare ' Edit Shared Folder' action: */773 m_pActionEdit = m_pTool Bar->addAction(UIIconPool::iconSet(":/sf_edit_16px.png",774 775 770 /* Prepare 'edit shared folder' action: */ 771 m_pActionEdit = m_pToolbar->addAction(UIIconPool::iconSet(":/sf_edit_16px.png", 772 ":/sf_edit_disabled_16px.png"), 773 QString(), this, SLOT(sltEditFolder())); 776 774 if (m_pActionEdit) 777 775 m_pActionEdit->setShortcuts(QList<QKeySequence>() << QKeySequence("Space") << QKeySequence("F2")); 778 776 779 /* Prepare ' Remove Shared Folder' action: */780 m_pActionRemove = m_pTool Bar->addAction(UIIconPool::iconSet(":/sf_remove_16px.png",781 782 777 /* Prepare 'remove shared folder' action: */ 778 m_pActionRemove = m_pToolbar->addAction(UIIconPool::iconSet(":/sf_remove_16px.png", 779 ":/sf_remove_disabled_16px.png"), 780 QString(), this, SLOT(sltRemoveFolder())); 783 781 if (m_pActionRemove) 784 782 m_pActionRemove->setShortcuts(QList<QKeySequence>() << QKeySequence("Del") << QKeySequence("Ctrl+R")); 785 783 786 m_pLayoutTree->addWidget(m_pTool Bar);784 m_pLayoutTree->addWidget(m_pToolbar); 787 785 } 788 786 } -
trunk/src/VBox/Frontends/VirtualBox/src/settings/machine/UIMachineSettingsSF.h
r85959 r86045 163 163 QITreeWidget *m_pTreeWidget; 164 164 /** Holds the toolbar instance. */ 165 UIToolBar *m_pTool Bar;166 /** Holds the Addaction instance. */165 UIToolBar *m_pToolbar; 166 /** Holds the 'add shared folder' action instance. */ 167 167 QAction *m_pActionAdd; 168 /** Holds the Editaction instance. */168 /** Holds the 'edit shared folder' action instance. */ 169 169 QAction *m_pActionEdit; 170 /** Holds the Removeaction instance. */170 /** Holds the 'remove shared folder' action instance. */ 171 171 QAction *m_pActionRemove; 172 172 /** @} */ -
trunk/src/VBox/Frontends/VirtualBox/src/settings/machine/UIMachineSettingsSFDetails.cpp
r85961 r86045 46 46 , m_pLabelAutoMountPoint(0) 47 47 , m_pEditorAutoMountPoint(0) 48 , m_p ReadonlyCheckBox(0)49 , m_p AutoMountCheckBox(0)50 , m_p PermanentCheckBox(0)48 , m_pCheckBoxReadonly(0) 49 , m_pCheckBoxAutoMount(0) 50 , m_pCheckBoxPermanent(0) 51 51 , m_pButtonBox(0) 52 52 { … … 76 76 void UIMachineSettingsSFDetails::setWriteable(bool fWritable) 77 77 { 78 m_p ReadonlyCheckBox->setChecked(!fWritable);78 m_pCheckBoxReadonly->setChecked(!fWritable); 79 79 } 80 80 81 81 bool UIMachineSettingsSFDetails::isWriteable() const 82 82 { 83 return !m_p ReadonlyCheckBox->isChecked();83 return !m_pCheckBoxReadonly->isChecked(); 84 84 } 85 85 86 86 void UIMachineSettingsSFDetails::setAutoMount(bool fAutoMount) 87 87 { 88 m_p AutoMountCheckBox->setChecked(fAutoMount);88 m_pCheckBoxAutoMount->setChecked(fAutoMount); 89 89 } 90 90 91 91 bool UIMachineSettingsSFDetails::isAutoMounted() const 92 92 { 93 return m_p AutoMountCheckBox->isChecked();93 return m_pCheckBoxAutoMount->isChecked(); 94 94 } 95 95 … … 106 106 void UIMachineSettingsSFDetails::setPermanent(bool fPermanent) 107 107 { 108 m_p PermanentCheckBox->setChecked(fPermanent);108 m_pCheckBoxPermanent->setChecked(fPermanent); 109 109 } 110 110 111 111 bool UIMachineSettingsSFDetails::isPermanent() const 112 112 { 113 return m_fUsePermanent ? m_p PermanentCheckBox->isChecked() : true;113 return m_fUsePermanent ? m_pCheckBoxPermanent->isChecked() : true; 114 114 } 115 115 … … 119 119 m_pLabelName->setText(tr("Folder Name:")); 120 120 m_pEditorName->setToolTip(tr("Holds the name of the shared folder (as it will be seen by the guest OS).")); 121 m_p ReadonlyCheckBox->setToolTip(tr("When checked, the guest OS will not be able to write to the specified shared folder."));122 m_p ReadonlyCheckBox->setText(tr("&Read-only"));123 m_p AutoMountCheckBox->setToolTip(tr("When checked, the guest OS will try to automatically mount the shared folder on startup."));124 m_p AutoMountCheckBox->setText(tr("&Auto-mount"));121 m_pCheckBoxReadonly->setToolTip(tr("When checked, the guest OS will not be able to write to the specified shared folder.")); 122 m_pCheckBoxReadonly->setText(tr("&Read-only")); 123 m_pCheckBoxAutoMount->setToolTip(tr("When checked, the guest OS will try to automatically mount the shared folder on startup.")); 124 m_pCheckBoxAutoMount->setText(tr("&Auto-mount")); 125 125 m_pLabelAutoMountPoint->setText(tr("Mount point:")); 126 126 m_pEditorAutoMountPoint->setToolTip(tr("Where to automatically mount the folder in the guest. A drive letter (e.g. 'G:') for Windows and OS/2 guests, path for the others. If left empty the guest will pick something fitting.")); 127 m_p PermanentCheckBox->setToolTip(tr("When checked, this shared folder will be permanent."));128 m_p PermanentCheckBox->setText(tr("&Make Permanent"));127 m_pCheckBoxPermanent->setToolTip(tr("When checked, this shared folder will be permanent.")); 128 m_pCheckBoxPermanent->setText(tr("&Make Permanent")); 129 129 130 130 switch (m_type) … … 255 255 256 256 /* Prepare read-only check-box: */ 257 m_p ReadonlyCheckBox= new QCheckBox;258 if (m_p ReadonlyCheckBox)259 pLayoutMain->addWidget(m_p ReadonlyCheckBox, 3, 1);257 m_pCheckBoxReadonly = new QCheckBox; 258 if (m_pCheckBoxReadonly) 259 pLayoutMain->addWidget(m_pCheckBoxReadonly, 3, 1); 260 260 /* Prepare auto-mount check-box: */ 261 m_p AutoMountCheckBox= new QCheckBox;262 if (m_p AutoMountCheckBox)263 pLayoutMain->addWidget(m_p AutoMountCheckBox, 4, 1);261 m_pCheckBoxAutoMount = new QCheckBox; 262 if (m_pCheckBoxAutoMount) 263 pLayoutMain->addWidget(m_pCheckBoxAutoMount, 4, 1); 264 264 /* Prepare permanent check-box: */ 265 m_p PermanentCheckBox= new QCheckBox;266 if (m_p PermanentCheckBox)267 { 268 m_p PermanentCheckBox->setHidden(!m_fUsePermanent);269 pLayoutMain->addWidget(m_p PermanentCheckBox, 5, 1);265 m_pCheckBoxPermanent = new QCheckBox; 266 if (m_pCheckBoxPermanent) 267 { 268 m_pCheckBoxPermanent->setHidden(!m_fUsePermanent); 269 pLayoutMain->addWidget(m_pCheckBoxPermanent, 5, 1); 270 270 } 271 271 … … 287 287 connect(m_pEditorName, &QLineEdit::textChanged, this, &UIMachineSettingsSFDetails::sltValidate); 288 288 if (m_fUsePermanent) 289 connect(m_p PermanentCheckBox, &QCheckBox::toggled, this, &UIMachineSettingsSFDetails::sltValidate);289 connect(m_pCheckBoxPermanent, &QCheckBox::toggled, this, &UIMachineSettingsSFDetails::sltValidate); 290 290 connect(m_pButtonBox, &QIDialogButtonBox::accepted, this, &UIMachineSettingsSFDetails::accept); 291 291 connect(m_pButtonBox, &QIDialogButtonBox::rejected, this, &UIMachineSettingsSFDetails::reject); -
trunk/src/VBox/Frontends/VirtualBox/src/settings/machine/UIMachineSettingsSFDetails.h
r85961 r86045 107 107 QLineEdit *m_pEditorAutoMountPoint; 108 108 /** Holds the read-only check-box instance. */ 109 QCheckBox *m_p ReadonlyCheckBox;109 QCheckBox *m_pCheckBoxReadonly; 110 110 /** Holds the auto-mount check-box instance. */ 111 QCheckBox *m_p AutoMountCheckBox;111 QCheckBox *m_pCheckBoxAutoMount; 112 112 /** Holds the permanent check-box instance. */ 113 QCheckBox *m_p PermanentCheckBox;113 QCheckBox *m_pCheckBoxPermanent; 114 114 /** Holds the button-box instance. */ 115 115 QIDialogButtonBox *m_pButtonBox; -
trunk/src/VBox/Frontends/VirtualBox/src/settings/machine/UIMachineSettingsSerial.cpp
r85958 r86045 414 414 if (m_pComboNumber) 415 415 { 416 m_pLabelNumber->setBuddy(m_pComboNumber); 416 if (m_pLabelNumber) 417 m_pLabelNumber->setBuddy(m_pComboNumber); 417 418 m_pComboNumber->insertItem(0, uiCommon().toCOMPortName(0, 0)); 418 419 m_pComboNumber->insertItems(0, uiCommon().COMPortNames()); … … 427 428 if (m_pLineEditIRQ) 428 429 { 429 m_pLabelIRQ->setBuddy(m_pLineEditIRQ); 430 if (m_pLabelIRQ) 431 m_pLabelIRQ->setBuddy(m_pLineEditIRQ); 430 432 m_pLineEditIRQ->setFixedWidth(m_pLineEditIRQ->fontMetrics().width("8888")); 431 433 m_pLineEditIRQ->setValidator(new QIULongValidator(0, 255, this)); … … 440 442 if (m_pLineEditIOPort) 441 443 { 442 m_pLabelIOPort->setBuddy(m_pLineEditIOPort); 444 if (m_pLabelIOPort) 445 m_pLabelIOPort->setBuddy(m_pLineEditIOPort); 443 446 m_pLineEditIOPort->setFixedWidth(m_pLineEditIOPort->fontMetrics().width("8888888")); 444 447 m_pLineEditIOPort->setValidator(new QIULongValidator(0, 0xFFFF, this)); … … 457 460 if (m_pComboMode) 458 461 { 459 m_pLabelMode->setBuddy(m_pComboMode); 462 if (m_pLabelMode) 463 m_pLabelMode->setBuddy(m_pComboMode); 460 464 pLayoutPortSettings->addWidget(m_pComboMode, 1, 1); 461 465 } … … 477 481 if (m_pEditorPath) 478 482 { 479 m_pLabelPath->setBuddy(m_pEditorPath); 483 if (m_pLabelPath) 484 m_pLabelPath->setBuddy(m_pEditorPath); 480 485 m_pEditorPath->setValidator(new QRegExpValidator(QRegExp(".+"), this)); 481 486 pLayoutPortSettings->addWidget(m_pEditorPath, 3, 1, 1, 6); -
trunk/src/VBox/Frontends/VirtualBox/src/settings/machine/UIMachineSettingsStorage.cpp
r85872 r86045 2945 2945 UIMachineSettingsStorage::UIMachineSettingsStorage() 2946 2946 : m_pModelStorage(0) 2947 , m_pActionAddController(0), m_pActionRemoveController(0)2948 , m_pActionAddAttachment(0), m_pActionRemoveAttachment(0)2949 , m_pActionAddAttachmentHD(0), m_pActionAddAttachmentCD(0), m_pActionAddAttachmentFD(0)2950 2947 , m_pMediumIdHolder(new UIMediumIDHolder(this)) 2951 2948 , m_fLoadingInProgress(0) … … 2954 2951 , m_pWidgetLeftPane(0) 2955 2952 , m_pLabelSeparatorLeftPane(0) 2956 , m_pLayoutTreeView(0) 2957 , m_pTreeStorage(0) 2958 , m_pLayoutToolBar(0) 2959 , m_pToolBar(0) 2953 , m_pLayoutTree(0) 2954 , m_pTreeViewStorage(0) 2955 , m_pLayoutToolbar(0) 2956 , m_pToolbar(0) 2957 , m_pActionAddController(0) 2958 , m_pActionRemoveController(0) 2959 , m_pActionAddAttachment(0) 2960 , m_pActionRemoveAttachment(0) 2961 , m_pActionAddAttachmentHD(0) 2962 , m_pActionAddAttachmentCD(0) 2963 , m_pActionAddAttachmentFD(0) 2960 2964 , m_pStackRightPane(0) 2961 2965 , m_pLabelSeparatorEmpty(0) … … 2967 2971 , m_pComboType(0) 2968 2972 , m_pLabelPortCount(0) 2969 , m_pSpin BoxPortCount(0)2973 , m_pSpinboxPortCount(0) 2970 2974 , m_pCheckBoxIoCache(0) 2971 2975 , m_pLabelSeparatorAttributes(0) … … 3166 3170 /* Choose first controller as current: */ 3167 3171 if (m_pModelStorage->rowCount(m_pModelStorage->root()) > 0) 3168 m_pTree Storage->setCurrentIndex(m_pModelStorage->index(0, 0, m_pModelStorage->root()));3172 m_pTreeViewStorage->setCurrentIndex(m_pModelStorage->index(0, 0, m_pModelStorage->root())); 3169 3173 3170 3174 /* Fetch recent information: */ … … 3356 3360 m_pComboType->setWhatsThis(tr("Selects the sub-type of the storage controller currently selected in the Storage Tree.")); 3357 3361 m_pLabelPortCount->setText(tr("&Port Count:")); 3358 m_pSpin BoxPortCount->setWhatsThis(tr("Selects the port count of the SATA storage controller currently selected in the"3362 m_pSpinboxPortCount->setWhatsThis(tr("Selects the port count of the SATA storage controller currently selected in the" 3359 3363 "Storage Tree. This must be at least one more than the highest port number you need to use.")); 3360 3364 m_pCheckBoxIoCache->setWhatsThis(tr("When checked, allows to use host I/O caching capabilities.")); … … 3386 3390 3387 3391 /* Translate storage-view: */ 3388 m_pTree Storage->setWhatsThis(tr("Lists all storage controllers for this machine and "3392 m_pTreeViewStorage->setWhatsThis(tr("Lists all storage controllers for this machine and " 3389 3393 "the virtual images and host drives attached to them.")); 3390 3394 … … 3428 3432 { 3429 3433 /* Declare required variables: */ 3430 const QModelIndex index = m_pTree Storage->currentIndex();3434 const QModelIndex index = m_pTreeViewStorage->currentIndex(); 3431 3435 const KDeviceType enmDeviceType = m_pModelStorage->data(index, StorageModel::R_AttDevice).value<KDeviceType>(); 3432 3436 3433 3437 /* Polish left pane availability: */ 3434 3438 m_pLabelSeparatorLeftPane->setEnabled(isMachineInValidMode()); 3435 m_pTree Storage->setEnabled(isMachineInValidMode());3439 m_pTreeViewStorage->setEnabled(isMachineInValidMode()); 3436 3440 3437 3441 /* Polish empty information pane availability: */ … … 3446 3450 m_pComboType->setEnabled(isMachineOffline()); 3447 3451 m_pLabelPortCount->setEnabled(isMachineOffline()); 3448 m_pSpin BoxPortCount->setEnabled(isMachineOffline());3452 m_pSpinboxPortCount->setEnabled(isMachineOffline()); 3449 3453 m_pCheckBoxIoCache->setEnabled(isMachineOffline()); 3450 3454 … … 3604 3608 void UIMachineSettingsStorage::sltRemoveController() 3605 3609 { 3606 const QModelIndex index = m_pTree Storage->currentIndex();3610 const QModelIndex index = m_pTreeViewStorage->currentIndex(); 3607 3611 if (!m_pModelStorage->data(index, StorageModel::R_IsController).toBool()) 3608 3612 return; … … 3617 3621 void UIMachineSettingsStorage::sltAddAttachment() 3618 3622 { 3619 const QModelIndex index = m_pTree Storage->currentIndex();3623 const QModelIndex index = m_pTreeViewStorage->currentIndex(); 3620 3624 Assert(m_pModelStorage->data(index, StorageModel::R_IsController).toBool()); 3621 3625 … … 3671 3675 void UIMachineSettingsStorage::sltRemoveAttachment() 3672 3676 { 3673 const QModelIndex index = m_pTree Storage->currentIndex();3677 const QModelIndex index = m_pTreeViewStorage->currentIndex(); 3674 3678 3675 3679 const KDeviceType enmDeviceType = m_pModelStorage->data(index, StorageModel::R_AttDevice).value<KDeviceType>(); … … 3700 3704 m_fLoadingInProgress = true; 3701 3705 3702 const QModelIndex index = m_pTree Storage->currentIndex();3706 const QModelIndex index = m_pTreeViewStorage->currentIndex(); 3703 3707 if (!index.isValid() || index == m_pModelStorage->root()) 3704 3708 { … … 3738 3742 const KStorageBus enmBus = m_pModelStorage->data(index, StorageModel::R_CtrBusType).value<KStorageBus>(); 3739 3743 m_pLabelPortCount->setVisible(enmBus == KStorageBus_SATA || enmBus == KStorageBus_SAS); 3740 m_pSpin BoxPortCount->setVisible(enmBus == KStorageBus_SATA || enmBus == KStorageBus_SAS);3744 m_pSpinboxPortCount->setVisible(enmBus == KStorageBus_SATA || enmBus == KStorageBus_SAS); 3741 3745 const uint uPortCount = m_pModelStorage->data(index, StorageModel::R_CtrPortCount).toUInt(); 3742 3746 const uint uMaxPortCount = m_pModelStorage->data(index, StorageModel::R_CtrMaxPortCount).toUInt(); 3743 m_pSpin BoxPortCount->setMaximum(uMaxPortCount);3744 m_pSpin BoxPortCount->setValue(uPortCount);3747 m_pSpinboxPortCount->setMaximum(uMaxPortCount); 3748 m_pSpinboxPortCount->setValue(uPortCount); 3745 3749 3746 3750 const bool fUseIoCache = m_pModelStorage->data(index, StorageModel::R_CtrIoCache).toBool(); … … 3853 3857 void UIMachineSettingsStorage::sltSetInformation() 3854 3858 { 3855 const QModelIndex index = m_pTree Storage->currentIndex();3859 const QModelIndex index = m_pTreeViewStorage->currentIndex(); 3856 3860 if (m_fLoadingInProgress || !index.isValid() || index == m_pModelStorage->root()) 3857 3861 return; … … 3877 3881 StorageModel::R_CtrType); 3878 3882 } 3879 else if (pSender == m_pSpin BoxPortCount)3880 m_pModelStorage->setData(index, m_pSpin BoxPortCount->value(), StorageModel::R_CtrPortCount);3883 else if (pSender == m_pSpinboxPortCount) 3884 m_pModelStorage->setData(index, m_pSpinboxPortCount->value(), StorageModel::R_CtrPortCount); 3881 3885 else if (pSender == m_pCheckBoxIoCache) 3882 3886 m_pModelStorage->setData(index, m_pCheckBoxIoCache->isChecked(), StorageModel::R_CtrIoCache); … … 3893 3897 QModelIndex theSameIndexAtNewPosition = m_pModelStorage->attachmentBySlot(controllerIndex, attachmentStorageSlot); 3894 3898 AssertMsg(theSameIndexAtNewPosition.isValid(), ("Current attachment disappears!\n")); 3895 m_pTree Storage->setCurrentIndex(theSameIndexAtNewPosition);3899 m_pTreeViewStorage->setCurrentIndex(theSameIndexAtNewPosition); 3896 3900 } 3897 3901 /* Setting Attachment Medium: */ … … 4054 4058 void UIMachineSettingsStorage::sltUpdateActionStates() 4055 4059 { 4056 const QModelIndex index = m_pTree Storage->currentIndex();4060 const QModelIndex index = m_pTreeViewStorage->currentIndex(); 4057 4061 4058 4062 const bool fIDEPossible = m_pModelStorage->data(index, StorageModel::R_IsMoreIDEControllersPossible).toBool(); … … 4109 4113 { 4110 4114 /* Select the newly created Controller Item: */ 4111 m_pTree Storage->setCurrentIndex(index);4115 m_pTreeViewStorage->setCurrentIndex(index); 4112 4116 break; 4113 4117 } … … 4115 4119 { 4116 4120 /* Expand parent if it is not expanded yet: */ 4117 if (!m_pTree Storage->isExpanded(parentIndex))4118 m_pTree Storage->setExpanded(parentIndex, true);4121 if (!m_pTreeViewStorage->isExpanded(parentIndex)) 4122 m_pTreeViewStorage->setExpanded(parentIndex, true); 4119 4123 break; 4120 4124 } … … 4130 4134 { 4131 4135 if (m_pModelStorage->rowCount (m_pModelStorage->root()) == 0) 4132 m_pTree Storage->setCurrentIndex (m_pModelStorage->root());4136 m_pTreeViewStorage->setCurrentIndex (m_pModelStorage->root()); 4133 4137 4134 4138 sltUpdateActionStates(); … … 4147 4151 m_mousePressPosition = QPoint(); 4148 4152 4149 const QModelIndex index = m_pTree Storage->indexAt(position);4153 const QModelIndex index = m_pTreeViewStorage->indexAt(position); 4150 4154 if (!index.isValid()) 4151 4155 return sltAddController(); … … 4186 4190 } 4187 4191 if (!menu.isEmpty()) 4188 menu.exec(m_pTree Storage->viewport()->mapToGlobal(position));4192 menu.exec(m_pTreeViewStorage->viewport()->mapToGlobal(position)); 4189 4193 } 4190 4194 … … 4196 4200 pPainter->save(); 4197 4201 QStyleOption options; 4198 options.initFrom(m_pTree Storage);4202 options.initFrom(m_pTreeViewStorage); 4199 4203 options.rect = rect; 4200 4204 options.state |= QStyle::State_Item; … … 4216 4220 AssertPtrReturnVoid(pEvent); 4217 4221 4218 const QModelIndex index = m_pTree Storage->indexAt(pEvent->pos());4219 const QRect indexRect = m_pTree Storage->visualRect(index);4222 const QModelIndex index = m_pTreeViewStorage->indexAt(pEvent->pos()); 4223 const QRect indexRect = m_pTreeViewStorage->visualRect(index); 4220 4224 4221 4225 /* Expander tool-tip: */ … … 4235 4239 /* Adder tool-tip: */ 4236 4240 if (m_pModelStorage->data(index, StorageModel::R_IsController).toBool() && 4237 m_pTree Storage->currentIndex() == index)4241 m_pTreeViewStorage->currentIndex() == index) 4238 4242 { 4239 4243 const DeviceTypeList devicesList(m_pModelStorage->data(index, StorageModel::R_CtrDevices).value<DeviceTypeList>()); … … 4308 4312 4309 4313 /* Check what item we are hovering currently: */ 4310 QModelIndex index = m_pTree Storage->indexAt(pEvent->pos());4314 QModelIndex index = m_pTreeViewStorage->indexAt(pEvent->pos()); 4311 4315 AbstractItem *pItem = static_cast<AbstractItem*>(index.internalPointer()); 4312 4316 /* And make sure this is attachment item, we are supporting dragging for this kind only: */ … … 4344 4348 m_mousePressPosition = pEvent->globalPos(); 4345 4349 4346 const QModelIndex index = m_pTree Storage->indexAt(pEvent->pos());4347 const QRect indexRect = m_pTree Storage->visualRect(index);4350 const QModelIndex index = m_pTreeViewStorage->indexAt(pEvent->pos()); 4351 const QRect indexRect = m_pTreeViewStorage->visualRect(index); 4348 4352 4349 4353 /* Expander icon: */ … … 4355 4359 { 4356 4360 pEvent->setAccepted(true); 4357 m_pTree Storage->setExpanded(index, !m_pTreeStorage->isExpanded(index));4361 m_pTreeViewStorage->setExpanded(index, !m_pTreeViewStorage->isExpanded(index)); 4358 4362 return; 4359 4363 } … … 4362 4366 /* Adder icons: */ 4363 4367 if (m_pModelStorage->data(index, StorageModel::R_IsController).toBool() && 4364 m_pTree Storage->currentIndex() == index)4368 m_pTreeViewStorage->currentIndex() == index) 4365 4369 { 4366 4370 const DeviceTypeList devicesList(m_pModelStorage->data(index, StorageModel::R_CtrDevices).value<DeviceTypeList>()); … … 4436 4440 4437 4441 /* Check what item we are hovering currently: */ 4438 QModelIndex index = m_pTree Storage->indexAt(pEvent->pos());4442 QModelIndex index = m_pTreeViewStorage->indexAt(pEvent->pos()); 4439 4443 AbstractItem *pItem = static_cast<AbstractItem*>(index.internalPointer()); 4440 4444 /* And make sure this is controller item, we are supporting dropping for this kind only: */ … … 4464 4468 4465 4469 /* Check what item we are hovering currently: */ 4466 QModelIndex index = m_pTree Storage->indexAt(pEvent->pos());4470 QModelIndex index = m_pTreeViewStorage->indexAt(pEvent->pos()); 4467 4471 AbstractItem *pItem = static_cast<AbstractItem*>(index.internalPointer()); 4468 4472 /* And make sure this is controller item, we are supporting dropping for this kind only: */ … … 4542 4546 4543 4547 /* Prepare storage layout: */ 4544 m_pLayoutTree View= new QVBoxLayout;4545 if (m_pLayoutTree View)4548 m_pLayoutTree = new QVBoxLayout; 4549 if (m_pLayoutTree) 4546 4550 { 4547 4551 #ifdef VBOX_WS_MAC 4548 m_pLayoutTree View->setContentsMargins(3, 0, 3, 0);4549 m_pLayoutTree View->setSpacing(3);4552 m_pLayoutTree->setContentsMargins(3, 0, 3, 0); 4553 m_pLayoutTree->setSpacing(3); 4550 4554 #else 4551 m_pLayoutTree View->setContentsMargins(0, 0, 0, 0);4552 m_pLayoutTree View->setSpacing(qApp->style()->pixelMetric(QStyle::PM_LayoutVerticalSpacing) / 3);4555 m_pLayoutTree->setContentsMargins(0, 0, 0, 0); 4556 m_pLayoutTree->setSpacing(qApp->style()->pixelMetric(QStyle::PM_LayoutVerticalSpacing) / 3); 4553 4557 #endif 4554 4558 … … 4557 4561 4558 4562 /* Prepare toolbar layout: */ 4559 m_pLayoutTool Bar = new QHBoxLayout;4560 if (m_pLayoutTool Bar)4563 m_pLayoutToolbar = new QHBoxLayout; 4564 if (m_pLayoutToolbar) 4561 4565 { 4562 m_pLayoutTool Bar->addStretch();4566 m_pLayoutToolbar->addStretch(); 4563 4567 4564 4568 /* Prepare toolbar: */ 4565 4569 prepareToolBar(); 4566 4570 4567 m_pLayoutTree View->addLayout(m_pLayoutToolBar);4571 m_pLayoutTree->addLayout(m_pLayoutToolbar); 4568 4572 } 4569 4573 4570 pLayoutLeftPane->addLayout(m_pLayoutTree View);4574 pLayoutLeftPane->addLayout(m_pLayoutTree); 4571 4575 } 4572 4576 } … … 4579 4583 { 4580 4584 /* Prepare tree-view: */ 4581 m_pTree Storage = new QITreeView;4582 if (m_pTree Storage)4585 m_pTreeViewStorage = new QITreeView(m_pWidgetLeftPane); 4586 if (m_pTreeViewStorage) 4583 4587 { 4584 4588 if (m_pLabelSeparatorLeftPane) 4585 m_pLabelSeparatorLeftPane->setBuddy(m_pTree Storage);4586 m_pTree Storage->setMouseTracking(true);4587 m_pTree Storage->setAcceptDrops(true);4588 m_pTree Storage->setContextMenuPolicy(Qt::CustomContextMenu);4589 m_pLabelSeparatorLeftPane->setBuddy(m_pTreeViewStorage); 4590 m_pTreeViewStorage->setMouseTracking(true); 4591 m_pTreeViewStorage->setAcceptDrops(true); 4592 m_pTreeViewStorage->setContextMenuPolicy(Qt::CustomContextMenu); 4589 4593 4590 4594 /* Prepare storage model: */ 4591 m_pModelStorage = new StorageModel(m_pTree Storage);4595 m_pModelStorage = new StorageModel(m_pTreeViewStorage); 4592 4596 if (m_pModelStorage) 4593 4597 { 4594 m_pTree Storage->setModel(m_pModelStorage);4595 m_pTree Storage->setRootIndex(m_pModelStorage->root());4596 m_pTree Storage->setCurrentIndex(m_pModelStorage->root());4598 m_pTreeViewStorage->setModel(m_pModelStorage); 4599 m_pTreeViewStorage->setRootIndex(m_pModelStorage->root()); 4600 m_pTreeViewStorage->setCurrentIndex(m_pModelStorage->root()); 4597 4601 } 4598 4602 4599 4603 /* Prepare storage delegate: */ 4600 StorageDelegate *pStorageDelegate = new StorageDelegate(m_pTree Storage);4604 StorageDelegate *pStorageDelegate = new StorageDelegate(m_pTreeViewStorage); 4601 4605 if (pStorageDelegate) 4602 m_pTree Storage->setItemDelegate(pStorageDelegate);4603 4604 m_pLayoutTree View->addWidget(m_pTreeStorage);4606 m_pTreeViewStorage->setItemDelegate(pStorageDelegate); 4607 4608 m_pLayoutTree->addWidget(m_pTreeViewStorage); 4605 4609 } 4606 4610 } … … 4609 4613 { 4610 4614 /* Prepare toolbar: */ 4611 m_pTool Bar = new UIToolBar(m_pWidgetLeftPane);4612 if (m_pTool Bar)4615 m_pToolbar = new UIToolBar(m_pWidgetLeftPane); 4616 if (m_pToolbar) 4613 4617 { 4614 4618 /* Configure toolbar: */ 4615 4619 const int iIconMetric = QApplication::style()->pixelMetric(QStyle::PM_SmallIconSize); 4616 m_pTool Bar->setIconSize(QSize(iIconMetric, iIconMetric));4620 m_pToolbar->setIconSize(QSize(iIconMetric, iIconMetric)); 4617 4621 4618 4622 /* Prepare 'Add Controller' action: */ … … 4621 4625 { 4622 4626 m_pActionAddController->setIcon(iconPool()->icon(ControllerAddEn, ControllerAddDis)); 4623 m_pTool Bar->addAction(m_pActionAddController);4627 m_pToolbar->addAction(m_pActionAddController); 4624 4628 } 4625 4629 … … 4674 4678 { 4675 4679 m_pActionRemoveController->setIcon(iconPool()->icon(ControllerDelEn, ControllerDelDis)); 4676 m_pTool Bar->addAction(m_pActionRemoveController);4680 m_pToolbar->addAction(m_pActionRemoveController); 4677 4681 } 4678 4682 … … 4682 4686 { 4683 4687 m_pActionAddAttachment->setIcon(iconPool()->icon(AttachmentAddEn, AttachmentAddDis)); 4684 m_pTool Bar->addAction(m_pActionAddAttachment);4688 m_pToolbar->addAction(m_pActionAddAttachment); 4685 4689 } 4686 4690 … … 4703 4707 { 4704 4708 m_pActionRemoveAttachment->setIcon(iconPool()->icon(AttachmentDelEn, AttachmentDelDis)); 4705 m_pTool Bar->addAction(m_pActionRemoveAttachment);4706 } 4707 4708 m_pLayoutTool Bar->addWidget(m_pToolBar);4709 m_pToolbar->addAction(m_pActionRemoveAttachment); 4710 } 4711 4712 m_pLayoutToolbar->addWidget(m_pToolbar); 4709 4713 } 4710 4714 } … … 4748 4752 { 4749 4753 m_pLabelInfo->setWordWrap(true); 4750 pLayoutEmpty->addWidget(m_pLabelInfo, 1, 1 , 1, 1);4754 pLayoutEmpty->addWidget(m_pLabelInfo, 1, 1); 4751 4755 } 4752 4756 … … 4781 4785 { 4782 4786 m_pLabelName->setAlignment(Qt::AlignRight | Qt::AlignVCenter); 4783 m_pLayoutController->addWidget(m_pLabelName, 1, 1 , 1, 1);4787 m_pLayoutController->addWidget(m_pLabelName, 1, 1); 4784 4788 } 4785 4789 /* Prepare name editor: */ … … 4787 4791 if (m_pEditorName) 4788 4792 { 4789 m_pLabelName->setBuddy(m_pEditorName); 4790 m_pLayoutController->addWidget(m_pEditorName, 1, 2, 1, 1); 4793 if (m_pLabelName) 4794 m_pLabelName->setBuddy(m_pEditorName); 4795 m_pLayoutController->addWidget(m_pEditorName, 1, 2); 4791 4796 } 4792 4797 … … 4796 4801 { 4797 4802 m_pLabelType->setAlignment(Qt::AlignRight | Qt::AlignVCenter); 4798 m_pLayoutController->addWidget(m_pLabelType, 2, 1 , 1, 1);4803 m_pLayoutController->addWidget(m_pLabelType, 2, 1); 4799 4804 } 4800 4805 /* Prepare type combo: */ … … 4802 4807 if (m_pComboType) 4803 4808 { 4804 m_pLabelType->setBuddy(m_pComboType); 4809 if (m_pLabelType) 4810 m_pLabelType->setBuddy(m_pComboType); 4805 4811 m_pComboType->setSizeAdjustPolicy(QComboBox::AdjustToContents); 4806 m_pLayoutController->addWidget(m_pComboType, 2, 2 , 1, 1);4812 m_pLayoutController->addWidget(m_pComboType, 2, 2); 4807 4813 } 4808 4814 … … 4812 4818 { 4813 4819 m_pLabelPortCount->setAlignment(Qt::AlignRight | Qt::AlignVCenter); 4814 m_pLayoutController->addWidget(m_pLabelPortCount, 3, 1 , 1, 1);4820 m_pLayoutController->addWidget(m_pLabelPortCount, 3, 1); 4815 4821 } 4816 4822 /* Prepare port count spinbox: */ 4817 m_pSpinBoxPortCount = new QSpinBox(pWidgetController); 4818 if (m_pSpinBoxPortCount) 4819 { 4820 m_pLabelPortCount->setBuddy(m_pSpinBoxPortCount); 4821 m_pLayoutController->addWidget(m_pSpinBoxPortCount, 3, 2, 1, 1); 4823 m_pSpinboxPortCount = new QSpinBox(pWidgetController); 4824 if (m_pSpinboxPortCount) 4825 { 4826 if (m_pLabelPortCount) 4827 m_pLabelPortCount->setBuddy(m_pSpinboxPortCount); 4828 m_pLayoutController->addWidget(m_pSpinboxPortCount, 3, 2); 4822 4829 } 4823 4830 … … 4825 4832 m_pCheckBoxIoCache = new QCheckBox(pWidgetController); 4826 4833 if (m_pCheckBoxIoCache) 4827 m_pLayoutController->addWidget(m_pCheckBoxIoCache, 4, 2 , 1, 1);4834 m_pLayoutController->addWidget(m_pCheckBoxIoCache, 4, 2); 4828 4835 4829 4836 m_pLayoutController->setColumnMinimumWidth(0, 10); … … 4918 4925 pLayoutAttachmentSettings->addWidget(m_pCheckBoxHotPluggable); 4919 4926 4920 m_pLayoutAttachment->addLayout(pLayoutAttachmentSettings, 2, 2 , 1, 1);4927 m_pLayoutAttachment->addLayout(pLayoutAttachmentSettings, 2, 2); 4921 4928 } 4922 4929 … … 5077 5084 5078 5085 /* Configure tree-view: */ 5079 connect(m_pTree Storage, &QITreeView::currentItemChanged,5086 connect(m_pTreeViewStorage, &QITreeView::currentItemChanged, 5080 5087 this, &UIMachineSettingsStorage::sltHandleCurrentItemChange); 5081 connect(m_pTree Storage, &QITreeView::customContextMenuRequested,5088 connect(m_pTreeViewStorage, &QITreeView::customContextMenuRequested, 5082 5089 this, &UIMachineSettingsStorage::sltHandleContextMenuRequest); 5083 connect(m_pTree Storage, &QITreeView::drawItemBranches,5090 connect(m_pTreeViewStorage, &QITreeView::drawItemBranches, 5084 5091 this, &UIMachineSettingsStorage::sltHandleDrawItemBranches); 5085 connect(m_pTree Storage, &QITreeView::mouseMoved,5092 connect(m_pTreeViewStorage, &QITreeView::mouseMoved, 5086 5093 this, &UIMachineSettingsStorage::sltHandleMouseMove); 5087 connect(m_pTree Storage, &QITreeView::mousePressed,5094 connect(m_pTreeViewStorage, &QITreeView::mousePressed, 5088 5095 this, &UIMachineSettingsStorage::sltHandleMouseClick); 5089 connect(m_pTree Storage, &QITreeView::mouseReleased,5096 connect(m_pTreeViewStorage, &QITreeView::mouseReleased, 5090 5097 this, &UIMachineSettingsStorage::sltHandleMouseRelease); 5091 connect(m_pTree Storage, &QITreeView::mouseDoubleClicked,5098 connect(m_pTreeViewStorage, &QITreeView::mouseDoubleClicked, 5092 5099 this, &UIMachineSettingsStorage::sltHandleMouseClick); 5093 connect(m_pTree Storage, &QITreeView::dragEntered,5100 connect(m_pTreeViewStorage, &QITreeView::dragEntered, 5094 5101 this, &UIMachineSettingsStorage::sltHandleDragEnter); 5095 connect(m_pTree Storage, &QITreeView::dragMoved,5102 connect(m_pTreeViewStorage, &QITreeView::dragMoved, 5096 5103 this, &UIMachineSettingsStorage::sltHandleDragMove); 5097 connect(m_pTree Storage, &QITreeView::dragDropped,5104 connect(m_pTreeViewStorage, &QITreeView::dragDropped, 5098 5105 this, &UIMachineSettingsStorage::sltHandleDragDrop); 5099 5106 … … 5132 5139 connect(m_pMediumIdHolder, &UIMediumIDHolder::sigChanged, 5133 5140 this, &UIMachineSettingsStorage::sltSetInformation); 5134 connect(m_pSpin BoxPortCount, static_cast<void(QSpinBox::*)(int)>(&QSpinBox::valueChanged),5141 connect(m_pSpinboxPortCount, static_cast<void(QSpinBox::*)(int)>(&QSpinBox::valueChanged), 5135 5142 this, &UIMachineSettingsStorage::sltSetInformation); 5136 5143 connect(m_pEditorName, &QLineEdit::textEdited, … … 5165 5172 { 5166 5173 #ifdef RT_STRICT 5167 const QModelIndex index = m_pTree Storage->currentIndex();5174 const QModelIndex index = m_pTreeViewStorage->currentIndex(); 5168 5175 switch (enmBus) 5169 5176 { … … 5203 5210 void UIMachineSettingsStorage::addAttachmentWrapper(KDeviceType enmDeviceType) 5204 5211 { 5205 const QModelIndex index = m_pTree Storage->currentIndex();5212 const QModelIndex index = m_pTreeViewStorage->currentIndex(); 5206 5213 Assert(m_pModelStorage->data(index, StorageModel::R_IsController).toBool()); 5207 5214 Assert(m_pModelStorage->data(index, StorageModel::R_IsMoreAttachmentsPossible).toBool()); -
trunk/src/VBox/Frontends/VirtualBox/src/settings/machine/UIMachineSettingsStorage.h
r85952 r86045 285 285 StorageModel *m_pModelStorage; 286 286 287 /** Holds the 'Add Controller' action instance. */288 QAction *m_pActionAddController;289 /** Holds the 'Remove Controller' action instance. */290 QAction *m_pActionRemoveController;291 /** Holds the map of add controller action instances. */292 QMap<KStorageControllerType, QAction*> m_addControllerActions;293 294 /** Holds the 'Add Attachment' action instance. */295 QAction *m_pActionAddAttachment;296 /** Holds the 'Remove Attachment' action instance. */297 QAction *m_pActionRemoveAttachment;298 /** Holds the 'Add HD Attachment' action instance. */299 QAction *m_pActionAddAttachmentHD;300 /** Holds the 'Add CD Attachment' action instance. */301 QAction *m_pActionAddAttachmentCD;302 /** Holds the 'Add FD Attachment' action instance. */303 QAction *m_pActionAddAttachmentFD;304 305 287 /** Holds the medium ID wrapper instance. */ 306 288 UIMediumIDHolder *m_pMediumIdHolder; … … 318 300 * @{ */ 319 301 /** Holds the splitter instance. */ 320 QISplitter *m_pSplitter; 302 QISplitter *m_pSplitter; 303 321 304 /** Holds the left pane instance. */ 322 QWidget *m_pWidgetLeftPane;305 QWidget *m_pWidgetLeftPane; 323 306 /** Holds the left pane separator instance. */ 324 QILabelSeparator *m_pLabelSeparatorLeftPane;307 QILabelSeparator *m_pLabelSeparatorLeftPane; 325 308 /** Holds the tree-view layout instance. */ 326 QVBoxLayout *m_pLayoutTreeView;309 QVBoxLayout *m_pLayoutTree; 327 310 /** Holds the tree-view instance. */ 328 QITreeView *m_pTreeStorage;311 QITreeView *m_pTreeViewStorage; 329 312 /** Holds the toolbar layout instance. */ 330 QHBoxLayout *m_pLayoutToolBar;313 QHBoxLayout *m_pLayoutToolbar; 331 314 /** Holds the toolbar instance. */ 332 UIToolBar *m_pToolBar; 315 UIToolBar *m_pToolbar; 316 /** Holds the 'Add Controller' action instance. */ 317 QAction *m_pActionAddController; 318 /** Holds the 'Remove Controller' action instance. */ 319 QAction *m_pActionRemoveController; 320 /** Holds the map of add controller action instances. */ 321 QMap<KStorageControllerType, QAction*> m_addControllerActions; 322 /** Holds the 'Add Attachment' action instance. */ 323 QAction *m_pActionAddAttachment; 324 /** Holds the 'Remove Attachment' action instance. */ 325 QAction *m_pActionRemoveAttachment; 326 /** Holds the 'Add HD Attachment' action instance. */ 327 QAction *m_pActionAddAttachmentHD; 328 /** Holds the 'Add CD Attachment' action instance. */ 329 QAction *m_pActionAddAttachmentCD; 330 /** Holds the 'Add FD Attachment' action instance. */ 331 QAction *m_pActionAddAttachmentFD; 333 332 334 333 /** Holds the right pane instance. */ … … 351 350 QLabel *m_pLabelPortCount; 352 351 /** Holds the port count spinbox instance. */ 353 QSpinBox *m_pSpin BoxPortCount;352 QSpinBox *m_pSpinboxPortCount; 354 353 /** Holds the IO cache check-box instance. */ 355 354 QCheckBox *m_pCheckBoxIoCache; -
trunk/src/VBox/Frontends/VirtualBox/src/settings/machine/UIMachineSettingsSystem.cpp
r85871 r86045 839 839 void UIMachineSettingsSystem::prepareTabMotherboard() 840 840 { 841 /* Prepare Motherboardtab: */841 /* Prepare 'Motherboard' tab: */ 842 842 m_pTabMotherboard = new QWidget; 843 843 if (m_pTabMotherboard) 844 844 { 845 /* Prepare Motherboardtab layout: */845 /* Prepare 'Motherboard' tab layout: */ 846 846 QGridLayout *pLayoutMotherboard = new QGridLayout(m_pTabMotherboard); 847 847 if (pLayoutMotherboard) … … 861 861 if (m_pEditorBaseMemory) 862 862 { 863 m_pLabelBaseMemory->setBuddy(m_pEditorBaseMemory->focusProxy()); 863 if (m_pLabelBaseMemory) 864 m_pLabelBaseMemory->setBuddy(m_pEditorBaseMemory->focusProxy()); 864 865 m_pEditorBaseMemory->setSizePolicy(QSizePolicy(QSizePolicy::MinimumExpanding, QSizePolicy::Fixed)); 865 866 … … 878 879 if (m_pEditorBootOrder) 879 880 { 880 m_pLabelBootOrder->setBuddy(m_pEditorBootOrder->focusProxy()); 881 if (m_pLabelBootOrder) 882 m_pLabelBootOrder->setBuddy(m_pEditorBootOrder->focusProxy()); 881 883 m_pEditorBootOrder->setSizePolicy(QSizePolicy(QSizePolicy::Fixed, QSizePolicy::Fixed)); 882 884 … … 895 897 if (m_pComboChipset) 896 898 { 897 m_pLabelChipset->setBuddy(m_pComboChipset); 899 if (m_pLabelChipset) 900 m_pLabelChipset->setBuddy(m_pComboChipset); 898 901 m_pComboChipset->setSizeAdjustPolicy(QComboBox::AdjustToContents); 899 902 m_pComboChipset->setSizePolicy(QSizePolicy(QSizePolicy::Fixed, QSizePolicy::Fixed)); … … 913 916 if (m_pComboPointingHID) 914 917 { 915 m_pLabelPointingHID->setBuddy(m_pComboPointingHID); 918 if (m_pLabelPointingHID) 919 m_pLabelPointingHID->setBuddy(m_pComboPointingHID); 916 920 m_pComboPointingHID->setSizeAdjustPolicy(QComboBox::AdjustToContents); 917 921 m_pComboPointingHID->setSizePolicy(QSizePolicy(QSizePolicy::Fixed, QSizePolicy::Fixed)); … … 965 969 m_uMaxGuestCPUExecCap = 100; 966 970 967 /* Prepare Processortab: */971 /* Prepare 'Processor' tab: */ 968 972 m_pTabProcessor = new QWidget; 969 973 if (m_pTabProcessor) 970 974 { 971 /* Prepare Processortab layout: */975 /* Prepare 'Processor' tab layout: */ 972 976 QGridLayout *pLayoutProcessor = new QGridLayout(m_pTabProcessor); 973 977 if (pLayoutProcessor) 974 978 { 979 pLayoutProcessor->setColumnStretch(1, 1); 975 980 pLayoutProcessor->setRowStretch(6, 1); 976 981 … … 1020 1025 } 1021 1026 1022 pLayoutProcessor->addLayout(pLayoutProcessorCount, 0, 1, 2, 1);1027 pLayoutProcessor->addLayout(pLayoutProcessorCount, 0, 1, 2, 2); 1023 1028 } 1024 1029 /* Prepare processor count spinbox: */ … … 1026 1031 if (m_pSpinboxProcessorCount) 1027 1032 { 1028 m_pLabelProcessorCount->setBuddy(m_pSpinboxProcessorCount); 1033 if (m_pLabelProcessorCount) 1034 m_pLabelProcessorCount->setBuddy(m_pSpinboxProcessorCount); 1029 1035 m_pSpinboxProcessorCount->setMinimum(m_uMinGuestCPU); 1030 1036 m_pSpinboxProcessorCount->setMaximum(m_uMaxGuestCPU); 1031 1037 uiCommon().setMinimumWidthAccordingSymbolCount(m_pSpinboxProcessorCount, 4); 1032 1038 1033 pLayoutProcessor->addWidget(m_pSpinboxProcessorCount, 0, 2);1039 pLayoutProcessor->addWidget(m_pSpinboxProcessorCount, 0, 3); 1034 1040 } 1035 1041 … … 1079 1085 } 1080 1086 1081 pLayoutProcessor->addLayout(pLayoutProcessorExecCap, 2, 1, 2, 1);1087 pLayoutProcessor->addLayout(pLayoutProcessorExecCap, 2, 1, 2, 2); 1082 1088 } 1083 1089 /* Prepare processor exec cap spinbox: */ … … 1085 1091 if (m_pSpinboxProcessorExecCap) 1086 1092 { 1087 m_pLabelProcessorExecCap->setBuddy(m_pSpinboxProcessorExecCap); 1093 if (m_pLabelProcessorExecCap) 1094 m_pLabelProcessorExecCap->setBuddy(m_pSpinboxProcessorExecCap); 1088 1095 m_pSpinboxProcessorExecCap->setMinimum(m_uMinGuestCPUExecCap); 1089 1096 m_pSpinboxProcessorExecCap->setMaximum(m_uMaxGuestCPUExecCap); 1090 1097 uiCommon().setMinimumWidthAccordingSymbolCount(m_pSpinboxProcessorExecCap, 4); 1091 1098 1092 pLayoutProcessor->addWidget(m_pSpinboxProcessorExecCap, 2, 2);1099 pLayoutProcessor->addWidget(m_pSpinboxProcessorExecCap, 2, 3); 1093 1100 } 1094 1101 … … 1103 1110 m_pCheckBoxPAE = new QCheckBox(m_pTabProcessor); 1104 1111 if (m_pCheckBoxPAE) 1105 pLayoutProcessor->addWidget(m_pCheckBoxPAE, 4, 1 , 1, 2);1112 pLayoutProcessor->addWidget(m_pCheckBoxPAE, 4, 1); 1106 1113 /* Prepare nested virtualization check-box: */ 1107 1114 m_pCheckBoxNestedVirtualization = new QCheckBox(m_pTabProcessor); 1108 1115 if (m_pCheckBoxNestedVirtualization) 1109 pLayoutProcessor->addWidget(m_pCheckBoxNestedVirtualization, 5, 1 , 1, 2);1116 pLayoutProcessor->addWidget(m_pCheckBoxNestedVirtualization, 5, 1); 1110 1117 } 1111 1118 … … 1116 1123 void UIMachineSettingsSystem::prepareTabAcceleration() 1117 1124 { 1118 /* Prepare Accelerationtab: */1125 /* Prepare 'Acceleration' tab: */ 1119 1126 m_pTabAcceleration = new QWidget; 1120 1127 if (m_pTabAcceleration) 1121 1128 { 1122 /* Prepare Accelerationtab layout: */1129 /* Prepare 'Acceleration' tab layout: */ 1123 1130 QGridLayout *pLayoutAcceleration = new QGridLayout(m_pTabAcceleration); 1124 1131 if (pLayoutAcceleration) … … 1138 1145 if (m_pComboParavirtProvider) 1139 1146 { 1140 m_pLabelParavirtProvider->setBuddy(m_pComboParavirtProvider); 1147 if (m_pLabelParavirtProvider) 1148 m_pLabelParavirtProvider->setBuddy(m_pComboParavirtProvider); 1141 1149 m_pComboParavirtProvider->setSizeAdjustPolicy(QComboBox::AdjustToContents); 1142 1150 m_pComboParavirtProvider->setSizePolicy(QSizePolicy(QSizePolicy::Fixed, QSizePolicy::Fixed)); 1143 1151 1144 pLayoutAcceleration->addWidget(m_pComboParavirtProvider, 0, 1 );1152 pLayoutAcceleration->addWidget(m_pComboParavirtProvider, 0, 1, 1, 2); 1145 1153 } 1146 1154 -
trunk/src/VBox/Frontends/VirtualBox/src/settings/machine/UIMachineSettingsSystem.h
r85839 r86045 244 244 QComboBox *m_pComboParavirtProvider; 245 245 /** Holds the virtualization label instance. */ 246 QLabel *m_pLabelVirtualization;246 QLabel *m_pLabelVirtualization; 247 247 /** Holds the virtualization check-box instance. */ 248 248 QCheckBox *m_pCheckBoxVirtualization; -
trunk/src/VBox/Frontends/VirtualBox/src/settings/machine/UIMachineSettingsUSB.cpp
r85958 r86045 341 341 , m_pLayoutFilters(0) 342 342 , m_pTreeWidgetFilters(0) 343 , m_pTool BarFilters(0)343 , m_pToolbarFilters(0) 344 344 , m_pActionNew(0) 345 345 , m_pActionAdd(0) … … 961 961 { 962 962 /* Prepare USB filters toolbar: */ 963 m_pTool BarFilters = new UIToolBar(m_pWidgetUSBSettings);964 if (m_pTool BarFilters)963 m_pToolbarFilters = new UIToolBar(m_pWidgetUSBSettings); 964 if (m_pToolbarFilters) 965 965 { 966 966 const int iIconMetric = QApplication::style()->pixelMetric(QStyle::PM_SmallIconSize); 967 m_pTool BarFilters->setIconSize(QSize(iIconMetric, iIconMetric));968 m_pTool BarFilters->setOrientation(Qt::Vertical);967 m_pToolbarFilters->setIconSize(QSize(iIconMetric, iIconMetric)); 968 m_pToolbarFilters->setOrientation(Qt::Vertical); 969 969 970 970 /* Prepare 'New USB Filter' action: */ 971 m_pActionNew = m_pTool BarFilters->addAction(UIIconPool::iconSet(":/usb_new_16px.png",971 m_pActionNew = m_pToolbarFilters->addAction(UIIconPool::iconSet(":/usb_new_16px.png", 972 972 ":/usb_new_disabled_16px.png"), 973 973 QString(), this, SLOT(sltNewFilter())); … … 976 976 977 977 /* Prepare 'Add USB Filter' action: */ 978 m_pActionAdd = m_pTool BarFilters->addAction(UIIconPool::iconSet(":/usb_add_16px.png",978 m_pActionAdd = m_pToolbarFilters->addAction(UIIconPool::iconSet(":/usb_add_16px.png", 979 979 ":/usb_add_disabled_16px.png"), 980 980 QString(), this, SLOT(sltAddFilter())); … … 983 983 984 984 /* Prepare 'Edit USB Filter' action: */ 985 m_pActionEdit = m_pTool BarFilters->addAction(UIIconPool::iconSet(":/usb_filter_edit_16px.png",985 m_pActionEdit = m_pToolbarFilters->addAction(UIIconPool::iconSet(":/usb_filter_edit_16px.png", 986 986 ":/usb_filter_edit_disabled_16px.png"), 987 987 QString(), this, SLOT(sltEditFilter())); … … 990 990 991 991 /* Prepare 'Remove USB Filter' action: */ 992 m_pActionRemove = m_pTool BarFilters->addAction(UIIconPool::iconSet(":/usb_remove_16px.png",992 m_pActionRemove = m_pToolbarFilters->addAction(UIIconPool::iconSet(":/usb_remove_16px.png", 993 993 ":/usb_remove_disabled_16px.png"), 994 994 QString(), this, SLOT(sltRemoveFilter())); … … 997 997 998 998 /* Prepare 'Move USB Filter Up' action: */ 999 m_pActionMoveUp = m_pTool BarFilters->addAction(UIIconPool::iconSet(":/usb_moveup_16px.png",999 m_pActionMoveUp = m_pToolbarFilters->addAction(UIIconPool::iconSet(":/usb_moveup_16px.png", 1000 1000 ":/usb_moveup_disabled_16px.png"), 1001 1001 QString(), this, SLOT(sltMoveFilterUp())); … … 1004 1004 1005 1005 /* Prepare 'Move USB Filter Down' action: */ 1006 m_pActionMoveDown = m_pTool BarFilters->addAction(UIIconPool::iconSet(":/usb_movedown_16px.png",1006 m_pActionMoveDown = m_pToolbarFilters->addAction(UIIconPool::iconSet(":/usb_movedown_16px.png", 1007 1007 ":/usb_movedown_disabled_16px.png"), 1008 1008 QString(), this, SLOT(sltMoveFilterDown())); … … 1013 1013 m_pMenuUSBDevices = new VBoxUSBMenu(this); 1014 1014 1015 m_pLayoutFilters->addWidget(m_pTool BarFilters);1015 m_pLayoutFilters->addWidget(m_pToolbarFilters); 1016 1016 } 1017 1017 } -
trunk/src/VBox/Frontends/VirtualBox/src/settings/machine/UIMachineSettingsUSB.h
r85953 r86045 174 174 QITreeWidget *m_pTreeWidgetFilters; 175 175 /** Holds the USB filters toolbar instance. */ 176 UIToolBar *m_pTool BarFilters;176 UIToolBar *m_pToolbarFilters; 177 177 /** Holds the New action instance. */ 178 178 QAction *m_pActionNew;
Note:
See TracChangeset
for help on using the changeset viewer.