- Timestamp:
- Sep 24, 2024 12:36:53 PM (2 months ago)
- Location:
- trunk/src/VBox/Frontends/VirtualBox/src/settings/editors
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Frontends/VirtualBox/src/settings/editors/UIStorageSettingsEditor.cpp
r106076 r106138 2872 2872 , m_pCheckBoxIoCache(0) 2873 2873 , m_pLabelSeparatorAttributes(0) 2874 , m_pLabelMedium(0) 2874 , m_pContainerMediumLabels(0) 2875 , m_pLabelHD(0) 2876 , m_pLabelCD(0) 2877 , m_pLabelFD(0) 2875 2878 , m_pComboSlot(0) 2876 2879 , m_pToolButtonOpen(0) … … 3001 3004 /* Polish attachments pane availability: */ 3002 3005 m_pLabelSeparatorAttributes->setEnabled(fMachineInValidMode); 3003 m_pLabelMedium->setEnabled(fMachineOffline || (fMachineOnline && enmDeviceType != KDeviceType_HardDisk)); 3006 m_pLabelHD->setEnabled(fMachineOffline); 3007 m_pLabelCD->setEnabled(fMachineOffline || fMachineOnline); 3008 m_pLabelFD->setEnabled(fMachineOffline || fMachineOnline); 3004 3009 m_pComboSlot->setEnabled(fMachineOffline); 3005 3010 m_pToolButtonOpen->setEnabled(fMachineOffline || (fMachineOnline && enmDeviceType != KDeviceType_HardDisk)); … … 3197 3202 m_pCheckBoxIoCache->setText(tr("Use Host I/O Cache")); 3198 3203 m_pLabelSeparatorAttributes->setText(tr("Attributes")); 3204 m_pLabelHD->setText(tr("Hard &Disk:")); 3205 m_pLabelCD->setText(tr("Optical &Drive:")); 3206 m_pLabelFD->setText(tr("Floppy &Drive:")); 3199 3207 m_pComboSlot->setToolTip(tr("Selects the slot on the storage controller used by this attachment. The available slots depend " 3200 3208 "on the type of the controller and other attachments on it.")); … … 3598 3606 { 3599 3607 case KDeviceType_HardDisk: 3600 m_pLabelMedium->setText(tr("Hard &Disk:"));3601 3608 m_pToolButtonOpen->setIcon(iconPool()->icon(PixmapType_HDAttachmentNormal)); 3602 3609 m_pToolButtonOpen->setToolTip(tr("Choose or create a virtual hard disk file. The virtual machine will " … … 3604 3611 break; 3605 3612 case KDeviceType_DVD: 3606 m_pLabelMedium->setText(tr("Optical &Drive:"));3607 3613 m_pToolButtonOpen->setIcon(iconPool()->icon(PixmapType_CDAttachmentNormal)); 3608 3614 m_pToolButtonOpen->setToolTip(tr("Choose a virtual optical disk or a physical drive to use with the " … … 3612 3618 break; 3613 3619 case KDeviceType_Floppy: 3614 m_pLabelMedium->setText(tr("Floppy &Drive:"));3615 3620 m_pToolButtonOpen->setIcon(iconPool()->icon(PixmapType_FDAttachmentNormal)); 3616 3621 m_pToolButtonOpen->setToolTip(tr("Choose a virtual floppy disk or a physical drive to use with the " … … 3636 3641 || ( m_enmConfigurationAccessLevel == ConfigurationAccessLevel_Partial_Running 3637 3642 && enmDeviceType == KDeviceType_HardDisk && fIsHotPluggable); 3638 m_pLabelMedium->setEnabled(fIsEditable); 3643 m_pLabelHD->setEnabled(fIsEditable); 3644 m_pLabelCD->setEnabled(fIsEditable); 3645 m_pLabelFD->setEnabled(fIsEditable); 3639 3646 m_pToolButtonOpen->setEnabled(fIsEditable); 3647 3648 /* Prepare medium label to show: */ 3649 int iIndexForMediumLabel = 0; 3650 switch (enmDeviceType) 3651 { 3652 case KDeviceType_HardDisk: iIndexForMediumLabel = 0; break; 3653 case KDeviceType_DVD: iIndexForMediumLabel = 1; break; 3654 case KDeviceType_Floppy: iIndexForMediumLabel = 2; break; 3655 default: break; 3656 } 3657 /* Trigger information to show: */ 3658 m_pContainerMediumLabels->setCurrentIndex(iIndexForMediumLabel); 3640 3659 3641 3660 /* Prepare setting #1 to show: */ … … 4781 4800 m_pLayoutAttachment->addWidget(m_pLabelSeparatorAttributes, 0, 0, 1, 3); 4782 4801 4783 /* Prepare medium label : */4784 m_p LabelMedium = new QLabel(pWidgetAttachment);4785 if (m_p LabelMedium)4802 /* Prepare medium label container: */ 4803 m_pContainerMediumLabels = new QStackedWidget(pWidgetAttachment); 4804 if (m_pContainerMediumLabels) 4786 4805 { 4787 m_pLabelMedium->setAlignment(Qt::AlignRight | Qt::AlignVCenter); 4788 m_pLayoutAttachment->addWidget(m_pLabelMedium, 1, 1); 4806 /* Prepare HD label: */ 4807 m_pLabelHD = new QLabel(m_pContainerMediumLabels); 4808 if (m_pLabelHD) 4809 { 4810 m_pLabelHD->setAlignment(Qt::AlignRight | Qt::AlignVCenter); 4811 m_pContainerMediumLabels->addWidget(m_pLabelHD); 4812 } 4813 4814 /* Prepare CD label: */ 4815 m_pLabelCD = new QLabel(m_pContainerMediumLabels); 4816 if (m_pLabelCD) 4817 { 4818 m_pLabelCD->setAlignment(Qt::AlignRight | Qt::AlignVCenter); 4819 m_pContainerMediumLabels->addWidget(m_pLabelCD); 4820 } 4821 4822 /* Prepare FD label: */ 4823 m_pLabelFD = new QLabel(m_pContainerMediumLabels); 4824 if (m_pLabelFD) 4825 { 4826 m_pLabelFD->setAlignment(Qt::AlignRight | Qt::AlignVCenter); 4827 m_pContainerMediumLabels->addWidget(m_pLabelFD); 4828 } 4829 4830 m_pLayoutAttachment->addWidget(m_pContainerMediumLabels, 1, 1); 4789 4831 } 4790 4832 … … 4808 4850 if (m_pToolButtonOpen) 4809 4851 { 4810 if (m_pLabelMedium) 4811 m_pLabelMedium->setBuddy(m_pToolButtonOpen); 4852 if (m_pLabelHD) 4853 m_pLabelHD->setBuddy(m_pToolButtonOpen); 4854 if (m_pLabelCD) 4855 m_pLabelCD->setBuddy(m_pToolButtonOpen); 4856 if (m_pLabelFD) 4857 m_pLabelFD->setBuddy(m_pToolButtonOpen); 4812 4858 4813 4859 /* Prepare open medium menu: */ -
trunk/src/VBox/Frontends/VirtualBox/src/settings/editors/UIStorageSettingsEditor.h
r106075 r106138 480 480 /** Holds the right pane attachment widget separator instance. */ 481 481 QILabelSeparator *m_pLabelSeparatorAttributes; 482 /** Holds the medium label instance. */ 483 QLabel *m_pLabelMedium; 482 /** Holds the medium label container instance. */ 483 QStackedWidget *m_pContainerMediumLabels; 484 /** Holds the HD label instance. */ 485 QLabel *m_pLabelHD; 486 /** Holds the CD label instance. */ 487 QLabel *m_pLabelCD; 488 /** Holds the FD label instance. */ 489 QLabel *m_pLabelFD; 484 490 /** Holds the slot combo instance. */ 485 491 QComboBox *m_pComboSlot;
Note:
See TracChangeset
for help on using the changeset viewer.