VirtualBox

Changeset 106048 in vbox for trunk/src/VBox


Ignore:
Timestamp:
Sep 13, 2024 1:38:09 PM (3 months ago)
Author:
vboxsync
Message:

FE/Qt: bugref:10513: VM Settings / Storage page: Split widgets common for HD, CD and FD attachments into properly arranged separate pairs; That is necessary to move them later into appropriate stacked widget containers to use vertical space more effectively; That is the 2nd step after the r164803.

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

    r106047 r106048  
    29722972    , m_pLabelHDDetails(0)
    29732973    , m_pFieldHDDetails(0)
     2974    , m_pLabelHDLocation(0)
     2975    , m_pFieldHDLocation(0)
     2976    , m_pLabelHDUsage(0)
     2977    , m_pFieldHDUsage(0)
    29742978    , m_pLabelHDEncryption(0)
    29752979    , m_pFieldHDEncryption(0)
     
    29782982    , m_pLabelCDSize(0)
    29792983    , m_pFieldCDSize(0)
     2984    , m_pLabelCDLocation(0)
     2985    , m_pFieldCDLocation(0)
     2986    , m_pLabelCDUsage(0)
     2987    , m_pFieldCDUsage(0)
    29802988    , m_pLabelFDType(0)
    29812989    , m_pFieldFDType(0)
    29822990    , m_pLabelFDSize(0)
    29832991    , m_pFieldFDSize(0)
    2984     , m_pLabelLocation(0)
    2985     , m_pFieldLocation(0)
    2986     , m_pLabelUsage(0)
    2987     , m_pFieldUsage(0)
     2992    , m_pLabelFDLocation(0)
     2993    , m_pFieldFDLocation(0)
     2994    , m_pLabelFDUsage(0)
     2995    , m_pFieldFDUsage(0)
    29882996{
    29892997    prepare();
     
    30903098    m_pLabelHDDetails->setEnabled(fMachineInValidMode);
    30913099    m_pFieldHDDetails->setEnabled(fMachineInValidMode);
     3100    m_pLabelHDLocation->setEnabled(fMachineInValidMode);
     3101    m_pFieldHDLocation->setEnabled(fMachineInValidMode);
     3102    m_pLabelHDUsage->setEnabled(fMachineInValidMode);
     3103    m_pFieldHDUsage->setEnabled(fMachineInValidMode);
    30923104    m_pLabelHDEncryption->setEnabled(fMachineInValidMode);
    30933105    m_pFieldHDEncryption->setEnabled(fMachineInValidMode);
     
    30963108    m_pLabelCDSize->setEnabled(fMachineInValidMode);
    30973109    m_pFieldCDSize->setEnabled(fMachineInValidMode);
     3110    m_pLabelCDLocation->setEnabled(fMachineInValidMode);
     3111    m_pFieldCDLocation->setEnabled(fMachineInValidMode);
     3112    m_pLabelCDUsage->setEnabled(fMachineInValidMode);
     3113    m_pFieldCDUsage->setEnabled(fMachineInValidMode);
    30983114    m_pLabelFDType->setEnabled(fMachineInValidMode);
    30993115    m_pFieldFDType->setEnabled(fMachineInValidMode);
    31003116    m_pLabelFDSize->setEnabled(fMachineInValidMode);
    31013117    m_pFieldFDSize->setEnabled(fMachineInValidMode);
    3102     m_pLabelLocation->setEnabled(fMachineInValidMode);
    3103     m_pFieldLocation->setEnabled(fMachineInValidMode);
    3104     m_pLabelUsage->setEnabled(fMachineInValidMode);
    3105     m_pFieldUsage->setEnabled(fMachineInValidMode);
     3118    m_pLabelFDLocation->setEnabled(fMachineInValidMode);
     3119    m_pFieldFDLocation->setEnabled(fMachineInValidMode);
     3120    m_pLabelFDUsage->setEnabled(fMachineInValidMode);
     3121    m_pFieldFDUsage->setEnabled(fMachineInValidMode);
    31063122
    31073123    /* Update remaining stuff: */
     
    32803296    m_pLabelHDActualSize->setText(tr("Actual size:"));
    32813297    m_pLabelHDDetails->setText(tr("Storage details:"));
     3298    m_pLabelHDLocation->setText(tr("Location:"));
     3299    m_pLabelHDUsage->setText(tr("Attached to:"));
    32823300    m_pLabelHDEncryption->setText(tr("Encryption key:"));
    32833301    m_pLabelCDType->setText(tr("Type:"));
    32843302    m_pLabelCDSize->setText(tr("Size:"));
     3303    m_pLabelCDLocation->setText(tr("Location:"));
     3304    m_pLabelCDUsage->setText(tr("Attached to:"));
    32853305    m_pLabelFDType->setText(tr("Type:"));
    32863306    m_pLabelFDSize->setText(tr("Size:"));
    3287     m_pLabelLocation->setText(tr("Location:"));
    3288     m_pLabelUsage->setText(tr("Attached to:"));
     3307    m_pLabelFDLocation->setText(tr("Location:"));
     3308    m_pLabelFDUsage->setText(tr("Attached to:"));
    32893309
    32903310    /* Translate storage-view: */
     
    37363756                m_pLabelHDDetails->setVisible(enmDeviceType == KDeviceType_HardDisk);
    37373757                m_pFieldHDDetails->setVisible(enmDeviceType == KDeviceType_HardDisk);
     3758                m_pLabelHDLocation->setVisible(enmDeviceType == KDeviceType_HardDisk);
     3759                m_pFieldHDLocation->setVisible(enmDeviceType == KDeviceType_HardDisk);
     3760                m_pLabelHDUsage->setVisible(enmDeviceType == KDeviceType_HardDisk);
     3761                m_pFieldHDUsage->setVisible(enmDeviceType == KDeviceType_HardDisk);
    37383762                m_pLabelHDEncryption->setVisible(enmDeviceType == KDeviceType_HardDisk);
    37393763                m_pFieldHDEncryption->setVisible(enmDeviceType == KDeviceType_HardDisk);
     
    37423766                m_pLabelCDSize->setVisible(enmDeviceType == KDeviceType_DVD);
    37433767                m_pFieldCDSize->setVisible(enmDeviceType == KDeviceType_DVD);
     3768                m_pLabelCDLocation->setVisible(enmDeviceType == KDeviceType_DVD);
     3769                m_pFieldCDLocation->setVisible(enmDeviceType == KDeviceType_DVD);
     3770                m_pLabelCDUsage->setVisible(enmDeviceType == KDeviceType_DVD);
     3771                m_pFieldCDUsage->setVisible(enmDeviceType == KDeviceType_DVD);
    37443772                m_pLabelFDType->setVisible(enmDeviceType == KDeviceType_Floppy);
    37453773                m_pFieldFDType->setVisible(enmDeviceType == KDeviceType_Floppy);
    37463774                m_pLabelFDSize->setVisible(enmDeviceType == KDeviceType_Floppy);
    37473775                m_pFieldFDSize->setVisible(enmDeviceType == KDeviceType_Floppy);
     3776                m_pLabelFDLocation->setVisible(enmDeviceType == KDeviceType_Floppy);
     3777                m_pFieldFDLocation->setVisible(enmDeviceType == KDeviceType_Floppy);
     3778                m_pLabelFDUsage->setVisible(enmDeviceType == KDeviceType_Floppy);
     3779                m_pFieldFDUsage->setVisible(enmDeviceType == KDeviceType_Floppy);
    37483780
    37493781                /* Getting other information: */
     
    37523784                m_pFieldHDActualSize->setText(compressText(pModel->data(index, StorageModel::R_AttSize).toString()));
    37533785                m_pFieldHDDetails->setText(compressText(pModel->data(index, StorageModel::R_AttDetails).toString()));
     3786                m_pFieldHDLocation->setText(compressText(pModel->data(index, StorageModel::R_AttLocation).toString()));
     3787                m_pFieldHDUsage->setText(compressText(pModel->data(index, StorageModel::R_AttUsage).toString()));
    37543788                m_pFieldHDEncryption->setText(compressText(pModel->data(index, StorageModel::R_AttEncryptionPasswordID).toString()));
    37553789                m_pFieldCDType->setText(compressText(pModel->data(index, StorageModel::R_AttFormat).toString()));
    37563790                m_pFieldCDSize->setText(compressText(pModel->data(index, StorageModel::R_AttSize).toString()));
     3791                m_pFieldCDLocation->setText(compressText(pModel->data(index, StorageModel::R_AttLocation).toString()));
     3792                m_pFieldCDUsage->setText(compressText(pModel->data(index, StorageModel::R_AttUsage).toString()));
    37573793                m_pFieldFDType->setText(compressText(pModel->data(index, StorageModel::R_AttFormat).toString()));
    37583794                m_pFieldFDSize->setText(compressText(pModel->data(index, StorageModel::R_AttSize).toString()));
    3759                 m_pFieldLocation->setText(compressText(pModel->data(index, StorageModel::R_AttLocation).toString()));
    3760                 m_pFieldUsage->setText(compressText(pModel->data(index, StorageModel::R_AttUsage).toString()));
     3795                m_pFieldFDLocation->setText(compressText(pModel->data(index, StorageModel::R_AttLocation).toString()));
     3796                m_pFieldFDUsage->setText(compressText(pModel->data(index, StorageModel::R_AttUsage).toString()));
    37613797
    37623798                /* Showing attachment page: */
     
    48374873            m_pLayoutAttachment->setContentsMargins(10, 0, 0, 0);
    48384874            m_pLayoutAttachment->setColumnStretch(2, 1);
    4839             m_pLayoutAttachment->setRowStretch(16, 1);
     4875            m_pLayoutAttachment->setRowStretch(20, 1);
    48404876
    48414877            /* Prepare separator for attachment case: */
     
    49915027            }
    49925028
     5029            /* Prepare HD location label: */
     5030            m_pLabelHDLocation = new QLabel(pWidgetAttachment);
     5031            if (m_pLabelHDLocation)
     5032            {
     5033                m_pLabelHDLocation->setAlignment(Qt::AlignRight | Qt::AlignVCenter);
     5034                m_pLayoutAttachment->addWidget(m_pLabelHDLocation, 9, 1);
     5035            }
     5036            /* Prepare HD location field: */
     5037            m_pFieldHDLocation = new QILabel(pWidgetAttachment);
     5038            if (m_pFieldHDLocation)
     5039            {
     5040                m_pFieldHDLocation->setFullSizeSelection(true);
     5041                m_pFieldHDLocation->setSizePolicy(QSizePolicy(QSizePolicy::Ignored, QSizePolicy::Minimum));
     5042                m_pLayoutAttachment->addWidget(m_pFieldHDLocation, 9, 2);
     5043            }
     5044
     5045            /* Prepare HD usage label: */
     5046            m_pLabelHDUsage = new QLabel(pWidgetAttachment);
     5047            if (m_pLabelHDUsage)
     5048            {
     5049                m_pLabelHDUsage->setAlignment(Qt::AlignRight | Qt::AlignVCenter);
     5050                m_pLayoutAttachment->addWidget(m_pLabelHDUsage, 10, 1);
     5051            }
     5052            /* Prepare HD usage field: */
     5053            m_pFieldHDUsage = new QILabel(pWidgetAttachment);
     5054            if (m_pFieldHDUsage)
     5055            {
     5056                m_pFieldHDUsage->setFullSizeSelection(true);
     5057                m_pFieldHDUsage->setSizePolicy(QSizePolicy(QSizePolicy::Ignored, QSizePolicy::Minimum));
     5058                m_pLayoutAttachment->addWidget(m_pFieldHDUsage, 10, 2);
     5059            }
     5060
    49935061            /* Prepare encryption label: */
    49945062            m_pLabelHDEncryption = new QLabel(pWidgetAttachment);
     
    49965064            {
    49975065                m_pLabelHDEncryption->setAlignment(Qt::AlignRight | Qt::AlignVCenter);
    4998                 m_pLayoutAttachment->addWidget(m_pLabelHDEncryption, 9, 1);
     5066                m_pLayoutAttachment->addWidget(m_pLabelHDEncryption, 11, 1);
    49995067            }
    50005068            /* Prepare encryption field: */
     
    50045072                m_pFieldHDEncryption->setFullSizeSelection(true);
    50055073                m_pFieldHDEncryption->setSizePolicy(QSizePolicy(QSizePolicy::Ignored, QSizePolicy::Minimum));
    5006                 m_pLayoutAttachment->addWidget(m_pFieldHDEncryption, 9, 2);
     5074                m_pLayoutAttachment->addWidget(m_pFieldHDEncryption, 11, 2);
    50075075            }
    50085076
     
    50125080            {
    50135081                m_pLabelCDType->setAlignment(Qt::AlignRight | Qt::AlignVCenter);
    5014                 m_pLayoutAttachment->addWidget(m_pLabelCDType, 10, 1);
     5082                m_pLayoutAttachment->addWidget(m_pLabelCDType, 12, 1);
    50155083            }
    50165084            /* Prepare CD type field: */
     
    50205088                m_pFieldCDType->setFullSizeSelection(true);
    50215089                m_pFieldCDType->setSizePolicy(QSizePolicy(QSizePolicy::Ignored, QSizePolicy::Minimum));
    5022                 m_pLayoutAttachment->addWidget(m_pFieldCDType, 10, 2);
     5090                m_pLayoutAttachment->addWidget(m_pFieldCDType, 12, 2);
    50235091            }
    50245092
     
    50285096            {
    50295097                m_pLabelCDSize->setAlignment(Qt::AlignRight | Qt::AlignVCenter);
    5030                 m_pLayoutAttachment->addWidget(m_pLabelCDSize, 11, 1);
     5098                m_pLayoutAttachment->addWidget(m_pLabelCDSize, 13, 1);
    50315099            }
    50325100            /* Prepare CD size field: */
     
    50365104                m_pFieldCDSize->setFullSizeSelection(true);
    50375105                m_pFieldCDSize->setSizePolicy(QSizePolicy(QSizePolicy::Ignored, QSizePolicy::Minimum));
    5038                 m_pLayoutAttachment->addWidget(m_pFieldCDSize, 11, 2);
     5106                m_pLayoutAttachment->addWidget(m_pFieldCDSize, 13, 2);
     5107            }
     5108
     5109            /* Prepare CD location label: */
     5110            m_pLabelCDLocation = new QLabel(pWidgetAttachment);
     5111            if (m_pLabelCDLocation)
     5112            {
     5113                m_pLabelCDLocation->setAlignment(Qt::AlignRight | Qt::AlignVCenter);
     5114                m_pLayoutAttachment->addWidget(m_pLabelCDLocation, 14, 1);
     5115            }
     5116            /* Prepare CD location field: */
     5117            m_pFieldCDLocation = new QILabel(pWidgetAttachment);
     5118            if (m_pFieldCDLocation)
     5119            {
     5120                m_pFieldCDLocation->setFullSizeSelection(true);
     5121                m_pFieldCDLocation->setSizePolicy(QSizePolicy(QSizePolicy::Ignored, QSizePolicy::Minimum));
     5122                m_pLayoutAttachment->addWidget(m_pFieldCDLocation, 14, 2);
     5123            }
     5124
     5125            /* Prepare CD usage label: */
     5126            m_pLabelCDUsage = new QLabel(pWidgetAttachment);
     5127            if (m_pLabelCDUsage)
     5128            {
     5129                m_pLabelCDUsage->setAlignment(Qt::AlignRight | Qt::AlignVCenter);
     5130                m_pLayoutAttachment->addWidget(m_pLabelCDUsage, 15, 1);
     5131            }
     5132            /* Prepare CD usage field: */
     5133            m_pFieldCDUsage = new QILabel(pWidgetAttachment);
     5134            if (m_pFieldCDUsage)
     5135            {
     5136                m_pFieldCDUsage->setFullSizeSelection(true);
     5137                m_pFieldCDUsage->setSizePolicy(QSizePolicy(QSizePolicy::Ignored, QSizePolicy::Minimum));
     5138                m_pLayoutAttachment->addWidget(m_pFieldCDUsage, 15, 2);
    50395139            }
    50405140
     
    50445144            {
    50455145                m_pLabelFDType->setAlignment(Qt::AlignRight | Qt::AlignVCenter);
    5046                 m_pLayoutAttachment->addWidget(m_pLabelFDType, 12, 1);
     5146                m_pLayoutAttachment->addWidget(m_pLabelFDType, 16, 1);
    50475147            }
    50485148            /* Prepare FD type field: */
     
    50525152                m_pFieldFDType->setFullSizeSelection(true);
    50535153                m_pFieldFDType->setSizePolicy(QSizePolicy(QSizePolicy::Ignored, QSizePolicy::Minimum));
    5054                 m_pLayoutAttachment->addWidget(m_pFieldFDType, 12, 2);
     5154                m_pLayoutAttachment->addWidget(m_pFieldFDType, 16, 2);
    50555155            }
    50565156
     
    50605160            {
    50615161                m_pLabelFDSize->setAlignment(Qt::AlignRight | Qt::AlignVCenter);
    5062                 m_pLayoutAttachment->addWidget(m_pLabelFDSize, 13, 1);
     5162                m_pLayoutAttachment->addWidget(m_pLabelFDSize, 17, 1);
    50635163            }
    50645164            /* Prepare FD size field: */
     
    50685168                m_pFieldFDSize->setFullSizeSelection(true);
    50695169                m_pFieldFDSize->setSizePolicy(QSizePolicy(QSizePolicy::Ignored, QSizePolicy::Minimum));
    5070                 m_pLayoutAttachment->addWidget(m_pFieldFDSize, 13, 2);
    5071             }
    5072 
    5073             /* Prepare location label: */
    5074             m_pLabelLocation = new QLabel(pWidgetAttachment);
    5075             if (m_pLabelLocation)
    5076             {
    5077                 m_pLabelLocation->setAlignment(Qt::AlignRight | Qt::AlignVCenter);
    5078                 m_pLayoutAttachment->addWidget(m_pLabelLocation, 14, 1);
    5079             }
    5080             /* Prepare location field: */
    5081             m_pFieldLocation = new QILabel(pWidgetAttachment);
    5082             if (m_pFieldLocation)
    5083             {
    5084                 m_pFieldLocation->setFullSizeSelection(true);
    5085                 m_pFieldLocation->setSizePolicy(QSizePolicy(QSizePolicy::Ignored, QSizePolicy::Minimum));
    5086                 m_pLayoutAttachment->addWidget(m_pFieldLocation, 14, 2);
    5087             }
    5088 
    5089             /* Prepare usage label: */
    5090             m_pLabelUsage = new QLabel(pWidgetAttachment);
    5091             if (m_pLabelUsage)
    5092             {
    5093                 m_pLabelUsage->setAlignment(Qt::AlignRight | Qt::AlignVCenter);
    5094                 m_pLayoutAttachment->addWidget(m_pLabelUsage, 15, 1);
    5095             }
    5096             /* Prepare usage field: */
    5097             m_pFieldUsage = new QILabel(pWidgetAttachment);
    5098             if (m_pFieldUsage)
    5099             {
    5100                 m_pFieldUsage->setFullSizeSelection(true);
    5101                 m_pFieldUsage->setSizePolicy(QSizePolicy(QSizePolicy::Ignored, QSizePolicy::Minimum));
    5102                 m_pLayoutAttachment->addWidget(m_pFieldUsage, 15, 2);
     5170                m_pLayoutAttachment->addWidget(m_pFieldFDSize, 17, 2);
     5171            }
     5172
     5173            /* Prepare FD location label: */
     5174            m_pLabelFDLocation = new QLabel(pWidgetAttachment);
     5175            if (m_pLabelFDLocation)
     5176            {
     5177                m_pLabelFDLocation->setAlignment(Qt::AlignRight | Qt::AlignVCenter);
     5178                m_pLayoutAttachment->addWidget(m_pLabelFDLocation, 18, 1);
     5179            }
     5180            /* Prepare FD location field: */
     5181            m_pFieldFDLocation = new QILabel(pWidgetAttachment);
     5182            if (m_pFieldFDLocation)
     5183            {
     5184                m_pFieldFDLocation->setFullSizeSelection(true);
     5185                m_pFieldFDLocation->setSizePolicy(QSizePolicy(QSizePolicy::Ignored, QSizePolicy::Minimum));
     5186                m_pLayoutAttachment->addWidget(m_pFieldFDLocation, 18, 2);
     5187            }
     5188
     5189            /* Prepare FD usage label: */
     5190            m_pLabelFDUsage = new QLabel(pWidgetAttachment);
     5191            if (m_pLabelFDUsage)
     5192            {
     5193                m_pLabelFDUsage->setAlignment(Qt::AlignRight | Qt::AlignVCenter);
     5194                m_pLayoutAttachment->addWidget(m_pLabelFDUsage, 19, 1);
     5195            }
     5196            /* Prepare FD usage field: */
     5197            m_pFieldFDUsage = new QILabel(pWidgetAttachment);
     5198            if (m_pFieldFDUsage)
     5199            {
     5200                m_pFieldFDUsage->setFullSizeSelection(true);
     5201                m_pFieldFDUsage->setSizePolicy(QSizePolicy(QSizePolicy::Ignored, QSizePolicy::Minimum));
     5202                m_pLayoutAttachment->addWidget(m_pFieldFDUsage, 19, 2);
    51035203            }
    51045204
  • trunk/src/VBox/Frontends/VirtualBox/src/settings/editors/UIStorageSettingsEditor.h

    r106047 r106048  
    517517        /** Holds the HD details field instance. */
    518518        QILabel          *m_pFieldHDDetails;
     519        /** Holds the HD location label instance. */
     520        QLabel           *m_pLabelHDLocation;
     521        /** Holds the HD location field instance. */
     522        QILabel          *m_pFieldHDLocation;
     523        /** Holds the HD usage label instance. */
     524        QLabel           *m_pLabelHDUsage;
     525        /** Holds the HD usage field instance. */
     526        QILabel          *m_pFieldHDUsage;
    519527        /** Holds the HD encryption label instance. */
    520528        QLabel           *m_pLabelHDEncryption;
     
    529537        /** Holds the CD size field instance. */
    530538        QILabel          *m_pFieldCDSize;
     539        /** Holds the CD location label instance. */
     540        QLabel           *m_pLabelCDLocation;
     541        /** Holds the CD location field instance. */
     542        QILabel          *m_pFieldCDLocation;
     543        /** Holds the CD usage label instance. */
     544        QLabel           *m_pLabelCDUsage;
     545        /** Holds the CD usage field instance. */
     546        QILabel          *m_pFieldCDUsage;
    531547        /** Holds the FD type label instance. */
    532548        QLabel           *m_pLabelFDType;
     
    537553        /** Holds the FD size field instance. */
    538554        QILabel          *m_pFieldFDSize;
    539         /** Holds the location label instance. */
    540         QLabel           *m_pLabelLocation;
    541         /** Holds the location field instance. */
    542         QILabel          *m_pFieldLocation;
    543         /** Holds the usage label instance. */
    544         QLabel           *m_pLabelUsage;
    545         /** Holds the usage field instance. */
    546         QILabel          *m_pFieldUsage;
     555        /** Holds the FD location label instance. */
     556        QLabel           *m_pLabelFDLocation;
     557        /** Holds the FD location field instance. */
     558        QILabel          *m_pFieldFDLocation;
     559        /** Holds the FD usage label instance. */
     560        QLabel           *m_pLabelFDUsage;
     561        /** Holds the FD usage field instance. */
     562        QILabel          *m_pFieldFDUsage;
    547563    /** @} */
    548564};
Note: See TracChangeset for help on using the changeset viewer.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette