VirtualBox

Ignore:
Timestamp:
Aug 18, 2020 11:50:33 AM (4 years ago)
Author:
vboxsync
Message:

FE/Qt: bugref:9812: VM settings: Prepare cascade cleanup for General page.

Location:
trunk/src/VBox/Frontends/VirtualBox/src
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Frontends/VirtualBox/src/manager/details/UIDetailsElement.cpp

    r84910 r85817  
    277277        strCategory = QString("#%1").arg(gpConverter->toInternalString(m_enmType));
    278278    else if (m_enmType == DetailsElementType_Description)
    279         strCategory = QString("#%1%%mTeDescription").arg(gpConverter->toInternalString(m_enmType));
     279        strCategory = QString("#%1%%m_pEditorDescription").arg(gpConverter->toInternalString(m_enmType));
    280280    emit sigLinkClicked(strCategory, QString(), machine().GetId());
    281281}
  • trunk/src/VBox/Frontends/VirtualBox/src/settings/machine/UIMachineSettingsGeneral.cpp

    r85751 r85817  
    125125    , m_fEncryptionPasswordChanged(false)
    126126    , m_pCache(0)
    127     , m_pNameAndSystemEditor(0)
    128     , mPsSnapshot(0)
    129     , mCbClipboard(0)
     127    , m_pTabWidget(0)
     128    , m_pTabBasic(0)
     129    , m_pEditorNameAndSystem(0)
     130    , m_pTabAdvanced(0)
     131    , m_pLabelSnapshotFolder(0)
     132    , m_pEditorSnapshotFolder(0)
     133    , m_pLabelClipboard(0)
     134    , m_pComboClipboard(0)
     135    , m_pLabelDragAndDrop(0)
     136    , m_pComboDragAndDrop(0)
     137    , m_pTabDescription(0)
     138    , m_pEditorDescription(0)
     139    , m_pTabEncryption(0)
     140    , m_pCheckBoxEncryption(0)
     141    , m_pWidgetEncryptionSettings(0)
     142    , m_pLabelCipher(0)
    130143    , m_pComboCipher(0)
    131     , mCbDragAndDrop(0)
    132     , mTeDescription(0)
     144    , m_pLabelEncryptionPassword(0)
    133145    , m_pEditorEncryptionPassword(0)
     146    , m_pLabelEncryptionPasswordConfirm(0)
    134147    , m_pEditorEncryptionPasswordConfirm(0)
    135     , m_pCheckBoxEncryption(0)
    136     , m_pTabWidgetGeneral(0)
    137     , m_pTabBasic(0)
    138     , m_pTabDescription(0)
    139     , m_pTabAdvanced(0)
    140     , m_pTabEncryption(0)
    141     , m_pWidgetEncryption(0)
    142     , m_pLabelDragAndDrop(0)
    143     , m_pLabelCipher(0)
    144     , m_pLabelSnapshot(0)
    145     , m_pLabelClipboard(0)
    146     , m_pLabelPassword1(0)
    147     , m_pLabelPassword2(0)
    148148{
    149149    /* Prepare: */
     
    159159CGuestOSType UIMachineSettingsGeneral::guestOSType() const
    160160{
    161     AssertPtrReturn(m_pNameAndSystemEditor, CGuestOSType());
    162     return m_pNameAndSystemEditor->type();
     161    AssertPtrReturn(m_pEditorNameAndSystem, CGuestOSType());
     162    return m_pEditorNameAndSystem->type();
    163163}
    164164
    165165bool UIMachineSettingsGeneral::is64BitOSTypeSelected() const
    166166{
    167     AssertPtrReturn(m_pNameAndSystemEditor, false);
    168     return   m_pNameAndSystemEditor->type().isNotNull()
    169            ? m_pNameAndSystemEditor->type().GetIs64Bit()
     167    AssertPtrReturn(m_pEditorNameAndSystem, false);
     168    return   m_pEditorNameAndSystem->type().isNotNull()
     169           ? m_pEditorNameAndSystem->type().GetIs64Bit()
    170170           : false;
    171171}
     
    268268
    269269    /* Load old 'Basic' data from the cache: */
    270     AssertPtrReturnVoid(m_pNameAndSystemEditor);
    271     m_pNameAndSystemEditor->setName(oldGeneralData.m_strName);
    272     m_pNameAndSystemEditor->setTypeId(oldGeneralData.m_strGuestOsTypeId);
     270    AssertPtrReturnVoid(m_pEditorNameAndSystem);
     271    m_pEditorNameAndSystem->setName(oldGeneralData.m_strName);
     272    m_pEditorNameAndSystem->setTypeId(oldGeneralData.m_strGuestOsTypeId);
    273273
    274274    /* Load old 'Advanced' data from the cache: */
    275     AssertPtrReturnVoid(mPsSnapshot);
    276     AssertPtrReturnVoid(mCbClipboard);
    277     AssertPtrReturnVoid(mCbDragAndDrop);
    278     mPsSnapshot->setPath(oldGeneralData.m_strSnapshotsFolder);
    279     mPsSnapshot->setHomeDir(oldGeneralData.m_strSnapshotsHomeDir);
    280     const int iClipboardModePosition = mCbClipboard->findData(oldGeneralData.m_clipboardMode);
    281     mCbClipboard->setCurrentIndex(iClipboardModePosition == -1 ? 0 : iClipboardModePosition);
    282     const int iDnDModePosition = mCbDragAndDrop->findData(oldGeneralData.m_dndMode);
    283     mCbDragAndDrop->setCurrentIndex(iDnDModePosition == -1 ? 0 : iDnDModePosition);
     275    AssertPtrReturnVoid(m_pEditorSnapshotFolder);
     276    AssertPtrReturnVoid(m_pComboClipboard);
     277    AssertPtrReturnVoid(m_pComboDragAndDrop);
     278    m_pEditorSnapshotFolder->setPath(oldGeneralData.m_strSnapshotsFolder);
     279    m_pEditorSnapshotFolder->setHomeDir(oldGeneralData.m_strSnapshotsHomeDir);
     280    const int iClipboardModePosition = m_pComboClipboard->findData(oldGeneralData.m_clipboardMode);
     281    m_pComboClipboard->setCurrentIndex(iClipboardModePosition == -1 ? 0 : iClipboardModePosition);
     282    const int iDnDModePosition = m_pComboDragAndDrop->findData(oldGeneralData.m_dndMode);
     283    m_pComboDragAndDrop->setCurrentIndex(iDnDModePosition == -1 ? 0 : iDnDModePosition);
    284284
    285285    /* Load old 'Description' data from the cache: */
    286     AssertPtrReturnVoid(mTeDescription);
    287     mTeDescription->setPlainText(oldGeneralData.m_strDescription);
     286    AssertPtrReturnVoid(m_pEditorDescription);
     287    m_pEditorDescription->setPlainText(oldGeneralData.m_strDescription);
    288288
    289289    /* Load old 'Encryption' data from the cache: */
     
    308308
    309309    /* Gather new 'Basic' data: */
    310     AssertPtrReturnVoid(m_pNameAndSystemEditor);
    311     newGeneralData.m_strName = m_pNameAndSystemEditor->name();
    312     newGeneralData.m_strGuestOsTypeId = m_pNameAndSystemEditor->typeId();
     310    AssertPtrReturnVoid(m_pEditorNameAndSystem);
     311    newGeneralData.m_strName = m_pEditorNameAndSystem->name();
     312    newGeneralData.m_strGuestOsTypeId = m_pEditorNameAndSystem->typeId();
    313313
    314314    /* Gather new 'Advanced' data: */
    315     AssertPtrReturnVoid(mPsSnapshot);
    316     AssertPtrReturnVoid(mCbClipboard);
    317     AssertPtrReturnVoid(mCbDragAndDrop);
    318     newGeneralData.m_strSnapshotsFolder = mPsSnapshot->path();
    319     newGeneralData.m_clipboardMode = mCbClipboard->currentData().value<KClipboardMode>();
    320     newGeneralData.m_dndMode = mCbDragAndDrop->currentData().value<KDnDMode>();
     315    AssertPtrReturnVoid(m_pEditorSnapshotFolder);
     316    AssertPtrReturnVoid(m_pComboClipboard);
     317    AssertPtrReturnVoid(m_pComboDragAndDrop);
     318    newGeneralData.m_strSnapshotsFolder = m_pEditorSnapshotFolder->path();
     319    newGeneralData.m_clipboardMode = m_pComboClipboard->currentData().value<KClipboardMode>();
     320    newGeneralData.m_dndMode = m_pComboDragAndDrop->currentData().value<KDnDMode>();
    321321
    322322    /* Gather new 'Description' data: */
    323     AssertPtrReturnVoid(mTeDescription);
    324     newGeneralData.m_strDescription = mTeDescription->toPlainText().isEmpty() ?
    325                                       QString::null : mTeDescription->toPlainText();
     323    AssertPtrReturnVoid(m_pEditorDescription);
     324    newGeneralData.m_strDescription = m_pEditorDescription->toPlainText().isEmpty() ?
     325                                      QString::null : m_pEditorDescription->toPlainText();
    326326
    327327    /* Gather new 'Encryption' data: */
     
    383383
    384384    /* 'Basic' tab validations: */
    385     message.first = UICommon::removeAccelMark(m_pTabWidgetGeneral->tabText(0));
     385    message.first = UICommon::removeAccelMark(m_pTabWidget->tabText(0));
    386386    message.second.clear();
    387387
    388388    /* VM name validation: */
    389     AssertPtrReturn(m_pNameAndSystemEditor, false);
    390     if (m_pNameAndSystemEditor->name().trimmed().isEmpty())
     389    AssertPtrReturn(m_pEditorNameAndSystem, false);
     390    if (m_pEditorNameAndSystem->name().trimmed().isEmpty())
    391391    {
    392392        message.second << tr("No name specified for the virtual machine.");
     
    407407
    408408    /* 'Encryption' tab validations: */
    409     message.first = UICommon::removeAccelMark(m_pTabWidgetGeneral->tabText(3));
     409    message.first = UICommon::removeAccelMark(m_pTabWidget->tabText(3));
    410410    message.second.clear();
    411411
     
    465465    /* 'Basic' tab: */
    466466    AssertPtrReturnVoid(pWidget);
    467     AssertPtrReturnVoid(m_pTabWidgetGeneral);
    468     AssertPtrReturnVoid(m_pTabWidgetGeneral->focusProxy());
    469     AssertPtrReturnVoid(m_pNameAndSystemEditor);
    470     setTabOrder(pWidget, m_pTabWidgetGeneral->focusProxy());
    471     setTabOrder(m_pTabWidgetGeneral->focusProxy(), m_pNameAndSystemEditor);
     467    AssertPtrReturnVoid(m_pTabWidget);
     468    AssertPtrReturnVoid(m_pTabWidget->focusProxy());
     469    AssertPtrReturnVoid(m_pEditorNameAndSystem);
     470    setTabOrder(pWidget, m_pTabWidget->focusProxy());
     471    setTabOrder(m_pTabWidget->focusProxy(), m_pEditorNameAndSystem);
    472472
    473473    /* 'Advanced' tab: */
    474     AssertPtrReturnVoid(mPsSnapshot);
    475     AssertPtrReturnVoid(mCbClipboard);
    476     AssertPtrReturnVoid(mCbDragAndDrop);
    477     setTabOrder(m_pNameAndSystemEditor, mPsSnapshot);
    478     setTabOrder(mPsSnapshot, mCbClipboard);
    479     setTabOrder(mCbClipboard, mCbDragAndDrop);
     474    AssertPtrReturnVoid(m_pEditorSnapshotFolder);
     475    AssertPtrReturnVoid(m_pComboClipboard);
     476    AssertPtrReturnVoid(m_pComboDragAndDrop);
     477    setTabOrder(m_pEditorNameAndSystem, m_pEditorSnapshotFolder);
     478    setTabOrder(m_pEditorSnapshotFolder, m_pComboClipboard);
     479    setTabOrder(m_pComboClipboard, m_pComboDragAndDrop);
    480480
    481481    /* 'Description' tab: */
    482     AssertPtrReturnVoid(mTeDescription);
    483     setTabOrder(mCbDragAndDrop, mTeDescription);
     482    AssertPtrReturnVoid(m_pEditorDescription);
     483    setTabOrder(m_pComboDragAndDrop, m_pEditorDescription);
    484484}
    485485
    486486void UIMachineSettingsGeneral::retranslateUi()
    487487{
    488     m_pTabWidgetGeneral->setTabText(m_pTabWidgetGeneral->indexOf(m_pTabBasic), QApplication::translate("UIMachineSettingsGeneral", "Basi&c"));
    489     m_pLabelSnapshot->setText(QApplication::translate("UIMachineSettingsGeneral", "S&napshot Folder:"));
     488    m_pTabWidget->setTabText(m_pTabWidget->indexOf(m_pTabBasic), QApplication::translate("UIMachineSettingsGeneral", "Basi&c"));
     489    m_pLabelSnapshotFolder->setText(QApplication::translate("UIMachineSettingsGeneral", "S&napshot Folder:"));
    490490    m_pLabelClipboard->setText(QApplication::translate("UIMachineSettingsGeneral", "&Shared Clipboard:"));
    491     mCbClipboard->setWhatsThis(QApplication::translate("UIMachineSettingsGeneral", "Selects which clipboard data will be copied "
     491    m_pComboClipboard->setWhatsThis(QApplication::translate("UIMachineSettingsGeneral", "Selects which clipboard data will be copied "
    492492                                                       "between the guest and the host OS. This feature requires Guest Additions "
    493493                                                       "to be installed in the guest OS."));
    494494    m_pLabelDragAndDrop->setText(QApplication::translate("UIMachineSettingsGeneral", "D&rag'n'Drop:"));
    495     mCbDragAndDrop->setWhatsThis(QApplication::translate("UIMachineSettingsGeneral", "Selects which data will be copied between "
     495    m_pComboDragAndDrop->setWhatsThis(QApplication::translate("UIMachineSettingsGeneral", "Selects which data will be copied between "
    496496                                                         "the guest and the host OS by drag'n'drop. This feature requires Guest "
    497497                                                         "Additions to be installed in the guest OS."));
    498     m_pTabWidgetGeneral->setTabText(m_pTabWidgetGeneral->indexOf(m_pTabAdvanced), QApplication::translate("UIMachineSettingsGeneral", "A&dvanced"));
    499     mTeDescription->setWhatsThis(QApplication::translate("UIMachineSettingsGeneral", "Holds the description of the virtual machine. "
     498    m_pTabWidget->setTabText(m_pTabWidget->indexOf(m_pTabAdvanced), QApplication::translate("UIMachineSettingsGeneral", "A&dvanced"));
     499    m_pEditorDescription->setWhatsThis(QApplication::translate("UIMachineSettingsGeneral", "Holds the description of the virtual machine. "
    500500                                                         "The description field is useful for commenting on configuration details "
    501501                                                         "of the installed guest OS."));
    502     m_pTabWidgetGeneral->setTabText(m_pTabWidgetGeneral->indexOf(m_pTabDescription), QApplication::translate("UIMachineSettingsGeneral", "D&escription"));
     502    m_pTabWidget->setTabText(m_pTabWidget->indexOf(m_pTabDescription), QApplication::translate("UIMachineSettingsGeneral", "D&escription"));
    503503    m_pCheckBoxEncryption->setWhatsThis(QApplication::translate("UIMachineSettingsGeneral", "When checked, disks attached to this "
    504504                                                                "virtual machine will be encrypted."));
     
    507507    m_pComboCipher->setWhatsThis(QApplication::translate("UIMachineSettingsGeneral", "Selects the cipher to be used for encrypting "
    508508                                                         "the virtual machine disks."));
    509     m_pLabelPassword1->setText(QApplication::translate("UIMachineSettingsGeneral", "E&nter New Password:"));
     509    m_pLabelEncryptionPassword->setText(QApplication::translate("UIMachineSettingsGeneral", "E&nter New Password:"));
    510510    m_pEditorEncryptionPassword->setWhatsThis(QApplication::translate("UIMachineSettingsGeneral", "Holds the encryption password "
    511511                                                                      "for disks attached to this virtual machine."));
    512     m_pLabelPassword2->setText(QApplication::translate("UIMachineSettingsGeneral", "C&onfirm New Password:"));
     512    m_pLabelEncryptionPasswordConfirm->setText(QApplication::translate("UIMachineSettingsGeneral", "C&onfirm New Password:"));
    513513    m_pEditorEncryptionPasswordConfirm->setWhatsThis(QApplication::translate("UIMachineSettingsGeneral", "Confirms the disk encryption password."));
    514     m_pTabWidgetGeneral->setTabText(m_pTabWidgetGeneral->indexOf(m_pTabEncryption), QApplication::translate("UIMachineSettingsGeneral", "Disk Enc&ryption"));
     514    m_pTabWidget->setTabText(m_pTabWidget->indexOf(m_pTabEncryption), QApplication::translate("UIMachineSettingsGeneral", "Disk Enc&ryption"));
    515515
    516516    /* Translate path selector: */
    517     AssertPtrReturnVoid(mPsSnapshot);
    518     mPsSnapshot->setWhatsThis(tr("Holds the path where snapshots of this "
     517    AssertPtrReturnVoid(m_pEditorSnapshotFolder);
     518    m_pEditorSnapshotFolder->setWhatsThis(tr("Holds the path where snapshots of this "
    519519                                 "virtual machine will be stored. Be aware that "
    520520                                 "snapshots can take quite a lot of storage space."));
    521521
    522522    /* Translate Clipboard mode combo: */
    523     AssertPtrReturnVoid(mCbClipboard);
    524     for (int iIndex = 0; iIndex < mCbClipboard->count(); ++iIndex)
    525     {
    526         const KClipboardMode enmType = mCbClipboard->currentData().value<KClipboardMode>();
    527         mCbClipboard->setItemText(iIndex, gpConverter->toString(enmType));
     523    AssertPtrReturnVoid(m_pComboClipboard);
     524    for (int iIndex = 0; iIndex < m_pComboClipboard->count(); ++iIndex)
     525    {
     526        const KClipboardMode enmType = m_pComboClipboard->currentData().value<KClipboardMode>();
     527        m_pComboClipboard->setItemText(iIndex, gpConverter->toString(enmType));
    528528    }
    529529
    530530    /* Translate Drag'n'drop mode combo: */
    531     AssertPtrReturnVoid(mCbDragAndDrop);
    532     for (int iIndex = 0; iIndex < mCbDragAndDrop->count(); ++iIndex)
    533     {
    534         const KDnDMode enmType = mCbDragAndDrop->currentData().value<KDnDMode>();
    535         mCbDragAndDrop->setItemText(iIndex, gpConverter->toString(enmType));
     531    AssertPtrReturnVoid(m_pComboDragAndDrop);
     532    for (int iIndex = 0; iIndex < m_pComboDragAndDrop->count(); ++iIndex)
     533    {
     534        const KDnDMode enmType = m_pComboDragAndDrop->currentData().value<KDnDMode>();
     535        m_pComboDragAndDrop->setItemText(iIndex, gpConverter->toString(enmType));
    536536    }
    537537
     
    544544{
    545545    /* Polish 'Basic' availability: */
    546     AssertPtrReturnVoid(m_pNameAndSystemEditor);
    547     m_pNameAndSystemEditor->setNameStuffEnabled(isMachineOffline() || isMachineSaved());
    548     m_pNameAndSystemEditor->setPathStuffEnabled(isMachineOffline());
    549     m_pNameAndSystemEditor->setOSTypeStuffEnabled(isMachineOffline());
     546    AssertPtrReturnVoid(m_pEditorNameAndSystem);
     547    m_pEditorNameAndSystem->setNameStuffEnabled(isMachineOffline() || isMachineSaved());
     548    m_pEditorNameAndSystem->setPathStuffEnabled(isMachineOffline());
     549    m_pEditorNameAndSystem->setOSTypeStuffEnabled(isMachineOffline());
    550550
    551551    /* Polish 'Advanced' availability: */
    552     AssertPtrReturnVoid(m_pLabelSnapshot);
    553     AssertPtrReturnVoid(mPsSnapshot);
     552    AssertPtrReturnVoid(m_pLabelSnapshotFolder);
     553    AssertPtrReturnVoid(m_pEditorSnapshotFolder);
    554554    AssertPtrReturnVoid(m_pLabelClipboard);
    555     AssertPtrReturnVoid(mCbClipboard);
     555    AssertPtrReturnVoid(m_pComboClipboard);
    556556    AssertPtrReturnVoid(m_pLabelDragAndDrop);
    557     AssertPtrReturnVoid(mCbDragAndDrop);
    558     m_pLabelSnapshot->setEnabled(isMachineOffline());
    559     mPsSnapshot->setEnabled(isMachineOffline());
     557    AssertPtrReturnVoid(m_pComboDragAndDrop);
     558    m_pLabelSnapshotFolder->setEnabled(isMachineOffline());
     559    m_pEditorSnapshotFolder->setEnabled(isMachineOffline());
    560560    m_pLabelClipboard->setEnabled(isMachineInValidMode());
    561     mCbClipboard->setEnabled(isMachineInValidMode());
     561    m_pComboClipboard->setEnabled(isMachineInValidMode());
    562562    m_pLabelDragAndDrop->setEnabled(isMachineInValidMode());
    563     mCbDragAndDrop->setEnabled(isMachineInValidMode());
     563    m_pComboDragAndDrop->setEnabled(isMachineInValidMode());
    564564
    565565    /* Polish 'Description' availability: */
    566     AssertPtrReturnVoid(mTeDescription);
    567     mTeDescription->setEnabled(isMachineInValidMode());
     566    AssertPtrReturnVoid(m_pEditorDescription);
     567    m_pEditorDescription->setEnabled(isMachineInValidMode());
    568568
    569569    /* Polish 'Encryption' availability: */
    570570    AssertPtrReturnVoid(m_pCheckBoxEncryption);
    571     AssertPtrReturnVoid(m_pWidgetEncryption);
     571    AssertPtrReturnVoid(m_pWidgetEncryptionSettings);
    572572    m_pCheckBoxEncryption->setEnabled(isMachineOffline());
    573     m_pWidgetEncryption->setEnabled(isMachineOffline() && m_pCheckBoxEncryption->isChecked());
     573    m_pWidgetEncryptionSettings->setEnabled(isMachineOffline() && m_pCheckBoxEncryption->isChecked());
    574574}
    575575
    576576void UIMachineSettingsGeneral::prepare()
    577577{
    578     prepareWidgets();
    579 
    580578    /* Prepare cache: */
    581579    m_pCache = new UISettingsCacheMachineGeneral;
    582580    AssertPtrReturnVoid(m_pCache);
    583581
    584     /* Tree-widget created in the .ui file. */
    585     {
    586         /* Prepare 'Basic' tab: */
    587         prepareTabBasic();
    588         /* Prepare 'Description' tab: */
    589         prepareTabDescription();
    590         /* Prepare 'Encryption' tab: */
    591         prepareTabEncryption();
    592         /* Prepare connections: */
    593         prepareConnections();
    594     }
     582    /* Prepare widgets: */
     583    prepareWidgets();
    595584
    596585    /* Apply language settings: */
     
    600589void UIMachineSettingsGeneral::prepareWidgets()
    601590{
    602     QHBoxLayout *mLtMain;
    603 
    604 
    605     QVBoxLayout *mLtBasic;
    606 
    607     QSpacerItem *mSpVer1;
    608 
    609     QVBoxLayout *mLtAdvanced;
    610     QWidget *mWtAdvanced;
    611     QGridLayout *mLtAdvancedItems;
    612 
    613 
    614 
    615 
    616     QSpacerItem *mSpHor1;
    617 
    618 
    619     QSpacerItem *mSpHor2;
    620     QSpacerItem *mSpVer3;
    621 
    622     QVBoxLayout *mLtDescription;
    623     QGridLayout *m_pLayoutEncryption;
    624 
    625     QSpacerItem *spacerItem;
    626     QGridLayout *m_pLayoutEncryptionSettings;
    627 
    628 
    629     QSpacerItem *spacerItem1;
    630 
    631     if (objectName().isEmpty())
    632         setObjectName(QStringLiteral("UIMachineSettingsGeneral"));
    633     resize(350, 250);
    634     mLtMain = new QHBoxLayout(this);
    635     mLtMain->setObjectName(QStringLiteral("mLtMain"));
    636     m_pTabWidgetGeneral = new QITabWidget();
    637     m_pTabWidgetGeneral->setObjectName(QStringLiteral("m_pTabWidgetGeneral"));
    638     m_pTabBasic = new QWidget();
    639     m_pTabBasic->setObjectName(QStringLiteral("m_pTabBasic"));
    640     mLtBasic = new QVBoxLayout(m_pTabBasic);
    641     mLtBasic->setSpacing(0);
    642     mLtBasic->setObjectName(QStringLiteral("mLtBasic"));
    643     m_pNameAndSystemEditor = new UINameAndSystemEditor(m_pTabBasic);
    644     m_pNameAndSystemEditor->setObjectName(QStringLiteral("m_pNameAndSystemEditor"));
    645 
    646     mLtBasic->addWidget(m_pNameAndSystemEditor);
    647 
    648     mSpVer1 = new QSpacerItem(0, 0, QSizePolicy::Minimum, QSizePolicy::Expanding);
    649 
    650     mLtBasic->addItem(mSpVer1);
    651 
    652     m_pTabWidgetGeneral->addTab(m_pTabBasic, QString());
    653     m_pTabAdvanced = new QWidget();
    654     m_pTabAdvanced->setObjectName(QStringLiteral("m_pTabAdvanced"));
    655     mLtAdvanced = new QVBoxLayout(m_pTabAdvanced);
    656     mLtAdvanced->setSpacing(0);
    657     mLtAdvanced->setObjectName(QStringLiteral("mLtAdvanced"));
    658     mWtAdvanced = new QWidget(m_pTabAdvanced);
    659     mWtAdvanced->setObjectName(QStringLiteral("mWtAdvanced"));
    660     mLtAdvancedItems = new QGridLayout(mWtAdvanced);
    661     mLtAdvancedItems->setContentsMargins(0, 0, 0, 0);
    662     mLtAdvancedItems->setObjectName(QStringLiteral("mLtAdvancedItems"));
    663     m_pLabelSnapshot = new QLabel(mWtAdvanced);
    664     m_pLabelSnapshot->setObjectName(QStringLiteral("m_pLabelSnapshot"));
    665     m_pLabelSnapshot->setAlignment(Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter);
    666 
    667     mLtAdvancedItems->addWidget(m_pLabelSnapshot, 0, 0, 1, 1);
    668 
    669     mPsSnapshot = new UIFilePathSelector(mWtAdvanced);
    670     mPsSnapshot->setObjectName(QStringLiteral("mPsSnapshot"));
    671     QSizePolicy sizePolicy(QSizePolicy::MinimumExpanding, QSizePolicy::Fixed);
    672     sizePolicy.setHorizontalStretch(0);
    673     sizePolicy.setVerticalStretch(0);
    674     sizePolicy.setHeightForWidth(mPsSnapshot->sizePolicy().hasHeightForWidth());
    675     mPsSnapshot->setSizePolicy(sizePolicy);
    676 
    677     mLtAdvancedItems->addWidget(mPsSnapshot, 0, 1, 1, 2);
    678 
    679     m_pLabelClipboard = new QLabel(mWtAdvanced);
    680     m_pLabelClipboard->setObjectName(QStringLiteral("m_pLabelClipboard"));
    681     m_pLabelClipboard->setAlignment(Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter);
    682 
    683     mLtAdvancedItems->addWidget(m_pLabelClipboard, 1, 0, 1, 1);
    684 
    685     mCbClipboard = new QComboBox(mWtAdvanced);
    686     mCbClipboard->setObjectName(QStringLiteral("mCbClipboard"));
    687     QSizePolicy sizePolicy1(QSizePolicy::Fixed, QSizePolicy::Fixed);
    688     sizePolicy1.setHorizontalStretch(0);
    689     sizePolicy1.setVerticalStretch(0);
    690     sizePolicy1.setHeightForWidth(mCbClipboard->sizePolicy().hasHeightForWidth());
    691     mCbClipboard->setSizePolicy(sizePolicy1);
    692 
    693     mLtAdvancedItems->addWidget(mCbClipboard, 1, 1, 1, 1);
    694 
    695     mSpHor1 = new QSpacerItem(0, 0, QSizePolicy::Expanding, QSizePolicy::Minimum);
    696 
    697     mLtAdvancedItems->addItem(mSpHor1, 1, 2, 1, 1);
    698 
    699     m_pLabelDragAndDrop = new QLabel(mWtAdvanced);
    700     m_pLabelDragAndDrop->setObjectName(QStringLiteral("m_pLabelDragAndDrop"));
    701     m_pLabelDragAndDrop->setAlignment(Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter);
    702 
    703     mLtAdvancedItems->addWidget(m_pLabelDragAndDrop, 2, 0, 1, 1);
    704 
    705     mCbDragAndDrop = new QComboBox(mWtAdvanced);
    706     mCbDragAndDrop->setObjectName(QStringLiteral("mCbDragAndDrop"));
    707     sizePolicy1.setHeightForWidth(mCbDragAndDrop->sizePolicy().hasHeightForWidth());
    708     mCbDragAndDrop->setSizePolicy(sizePolicy1);
    709 
    710     mLtAdvancedItems->addWidget(mCbDragAndDrop, 2, 1, 1, 1);
    711 
    712     mSpHor2 = new QSpacerItem(0, 0, QSizePolicy::Expanding, QSizePolicy::Minimum);
    713 
    714     mLtAdvancedItems->addItem(mSpHor2, 2, 2, 1, 1);
    715 
    716 
    717     mLtAdvanced->addWidget(mWtAdvanced);
    718 
    719     mSpVer3 = new QSpacerItem(0, 0, QSizePolicy::Minimum, QSizePolicy::Expanding);
    720 
    721     mLtAdvanced->addItem(mSpVer3);
    722 
    723     m_pTabWidgetGeneral->addTab(m_pTabAdvanced, QString());
    724     m_pTabDescription = new QWidget();
    725     m_pTabDescription->setObjectName(QStringLiteral("m_pTabDescription"));
    726     mLtDescription = new QVBoxLayout(m_pTabDescription);
    727     mLtDescription->setSpacing(0);
    728     mLtDescription->setObjectName(QStringLiteral("mLtDescription"));
    729     mTeDescription = new QTextEdit(m_pTabDescription);
    730     mTeDescription->setObjectName(QStringLiteral("mTeDescription"));
    731     mTeDescription->setAcceptRichText(false);
    732 
    733     mLtDescription->addWidget(mTeDescription);
    734 
    735     m_pTabWidgetGeneral->addTab(m_pTabDescription, QString());
    736     m_pTabEncryption = new QWidget();
    737     m_pTabEncryption->setObjectName(QStringLiteral("m_pTabEncryption"));
    738     m_pLayoutEncryption = new QGridLayout(m_pTabEncryption);
    739     m_pLayoutEncryption->setObjectName(QStringLiteral("m_pLayoutEncryption"));
    740     m_pCheckBoxEncryption = new QCheckBox(m_pTabEncryption);
    741     m_pCheckBoxEncryption->setObjectName(QStringLiteral("m_pCheckBoxEncryption"));
    742 
    743     m_pLayoutEncryption->addWidget(m_pCheckBoxEncryption, 0, 0, 1, 2);
    744 
    745     spacerItem = new QSpacerItem(20, 0, QSizePolicy::Fixed, QSizePolicy::Minimum);
    746 
    747     m_pLayoutEncryption->addItem(spacerItem, 1, 0, 1, 1);
    748 
    749     m_pWidgetEncryption = new QWidget(m_pTabEncryption);
    750     m_pWidgetEncryption->setObjectName(QStringLiteral("m_pWidgetEncryption"));
    751     QSizePolicy sizePolicy2(QSizePolicy::MinimumExpanding, QSizePolicy::Fixed);
    752     sizePolicy2.setHorizontalStretch(1);
    753     sizePolicy2.setVerticalStretch(0);
    754     sizePolicy2.setHeightForWidth(m_pWidgetEncryption->sizePolicy().hasHeightForWidth());
    755     m_pWidgetEncryption->setSizePolicy(sizePolicy2);
    756     m_pLayoutEncryptionSettings = new QGridLayout(m_pWidgetEncryption);
    757     m_pLayoutEncryptionSettings->setObjectName(QStringLiteral("m_pLayoutEncryptionSettings"));
    758     m_pLayoutEncryptionSettings->setContentsMargins(0, 0, 0, 0);
    759     m_pLabelCipher = new QLabel(m_pWidgetEncryption);
    760     m_pLabelCipher->setObjectName(QStringLiteral("m_pLabelCipher"));
    761     m_pLabelCipher->setAlignment(Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter);
    762 
    763     m_pLayoutEncryptionSettings->addWidget(m_pLabelCipher, 0, 0, 1, 1);
    764 
    765     m_pComboCipher = new QComboBox(m_pWidgetEncryption);
    766     m_pComboCipher->setObjectName(QStringLiteral("m_pComboCipher"));
    767 
    768     m_pLayoutEncryptionSettings->addWidget(m_pComboCipher, 0, 1, 1, 1);
    769 
    770     m_pLabelPassword1 = new QLabel(m_pWidgetEncryption);
    771     m_pLabelPassword1->setObjectName(QStringLiteral("m_pLabelPassword1"));
    772     m_pLabelPassword1->setAlignment(Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter);
    773 
    774     m_pLayoutEncryptionSettings->addWidget(m_pLabelPassword1, 1, 0, 1, 1);
    775 
    776     m_pEditorEncryptionPassword = new QLineEdit(m_pWidgetEncryption);
    777     m_pEditorEncryptionPassword->setObjectName(QStringLiteral("m_pEditorEncryptionPassword"));
    778 
    779     m_pLayoutEncryptionSettings->addWidget(m_pEditorEncryptionPassword, 1, 1, 1, 1);
    780 
    781     m_pLabelPassword2 = new QLabel(m_pWidgetEncryption);
    782     m_pLabelPassword2->setObjectName(QStringLiteral("m_pLabelPassword2"));
    783     m_pLabelPassword2->setAlignment(Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter);
    784 
    785     m_pLayoutEncryptionSettings->addWidget(m_pLabelPassword2, 2, 0, 1, 1);
    786 
    787     m_pEditorEncryptionPasswordConfirm = new QLineEdit(m_pWidgetEncryption);
    788     m_pEditorEncryptionPasswordConfirm->setObjectName(QStringLiteral("m_pEditorEncryptionPasswordConfirm"));
    789 
    790     m_pLayoutEncryptionSettings->addWidget(m_pEditorEncryptionPasswordConfirm, 2, 1, 1, 1);
    791 
    792 
    793     m_pLayoutEncryption->addWidget(m_pWidgetEncryption, 1, 1, 1, 1);
    794 
    795     spacerItem1 = new QSpacerItem(0, 0, QSizePolicy::Minimum, QSizePolicy::Expanding);
    796 
    797     m_pLayoutEncryption->addItem(spacerItem1, 2, 1, 1, 1);
    798 
    799     m_pTabWidgetGeneral->addTab(m_pTabEncryption, QString());
    800 
    801     mLtMain->addWidget(m_pTabWidgetGeneral);
    802 
    803     m_pLabelSnapshot->setBuddy(mPsSnapshot);
    804     m_pLabelClipboard->setBuddy(mCbClipboard);
    805     m_pLabelDragAndDrop->setBuddy(mCbDragAndDrop);
    806     m_pLabelCipher->setBuddy(m_pComboCipher);
    807     m_pLabelPassword1->setBuddy(m_pEditorEncryptionPassword);
    808     m_pLabelPassword2->setBuddy(m_pEditorEncryptionPasswordConfirm);
    809 
    810 
    811     QObject::connect(m_pCheckBoxEncryption, SIGNAL(toggled(bool)), m_pWidgetEncryption, SLOT(setEnabled(bool)));
    812 
    813     m_pTabWidgetGeneral->setCurrentIndex(0);
     591    /* Prepare main layout: */
     592    QHBoxLayout *pLayoutMain = new QHBoxLayout(this);
     593    if (pLayoutMain)
     594    {
     595        /* Prepare tab-widget: */
     596        m_pTabWidget = new QITabWidget(this);
     597
     598        /* Prepare each tab separately: */
     599        prepareTabBasic();
     600        prepareTabAdvanced();
     601        prepareTabDescription();
     602        prepareTabEncryption();
     603        prepareConnections();
     604
     605        pLayoutMain->addWidget(m_pTabWidget);
     606    }
    814607}
    815608
    816609void UIMachineSettingsGeneral::prepareTabBasic()
    817610{
    818     /* Tab and it's layout created in the .ui file. */
    819     {
    820         /* Name and OS Type widget created in the .ui file. */
    821         AssertPtrReturnVoid(m_pNameAndSystemEditor);
    822         {
    823             /* Configure widget: */
    824             m_pNameAndSystemEditor->setNameFieldValidator(".+");
    825         }
     611    /* Prepare Basic tab: */
     612    m_pTabBasic = new QWidget;
     613    if (m_pTabBasic)
     614    {
     615        /* Prepare Basic tab layout: */
     616        QVBoxLayout *pLayoutBasic = new QVBoxLayout(m_pTabBasic);
     617        if (pLayoutBasic)
     618        {
     619            /* Prepare name and system editor: */
     620            m_pEditorNameAndSystem = new UINameAndSystemEditor(m_pTabBasic);
     621            if (m_pEditorNameAndSystem)
     622            {
     623                m_pEditorNameAndSystem->setNameFieldValidator(".+");
     624                pLayoutBasic->addWidget(m_pEditorNameAndSystem);
     625            }
     626
     627            /* Add vertical strech: */
     628            pLayoutBasic->addStretch();
     629        }
     630
     631        m_pTabWidget->addTab(m_pTabBasic, QString());
     632    }
     633}
     634
     635void UIMachineSettingsGeneral::prepareTabAdvanced()
     636{
     637    /* Prepare Advanced tab: */
     638    m_pTabAdvanced = new QWidget;
     639    if (m_pTabAdvanced)
     640    {
     641        /* Prepare Advanced tab layout: */
     642        QGridLayout *pLayoutAdvanced = new QGridLayout(m_pTabAdvanced);
     643        if (pLayoutAdvanced)
     644        {
     645            pLayoutAdvanced->setColumnStretch(2, 1);
     646            pLayoutAdvanced->setRowStretch(3, 1);
     647
     648            /* Prepare snapshot folder label: */
     649            m_pLabelSnapshotFolder = new QLabel(m_pTabAdvanced);
     650            if (m_pLabelSnapshotFolder)
     651            {
     652                m_pLabelSnapshotFolder->setAlignment(Qt::AlignRight | Qt::AlignVCenter);
     653                pLayoutAdvanced->addWidget(m_pLabelSnapshotFolder, 0, 0, 1, 1);
     654            }
     655            /* Prepare snapshot folder editor: */
     656            m_pEditorSnapshotFolder = new UIFilePathSelector(m_pTabAdvanced);
     657            if (m_pEditorSnapshotFolder)
     658            {
     659                if (m_pLabelSnapshotFolder)
     660                    m_pLabelSnapshotFolder->setBuddy(m_pEditorSnapshotFolder);
     661                pLayoutAdvanced->addWidget(m_pEditorSnapshotFolder, 0, 1, 1, 2);
     662            }
     663
     664            /* Prepare clipboard label: */
     665            m_pLabelClipboard = new QLabel(m_pTabAdvanced);
     666            if (m_pLabelClipboard)
     667            {
     668                m_pLabelClipboard->setAlignment(Qt::AlignRight | Qt::AlignVCenter);
     669                pLayoutAdvanced->addWidget(m_pLabelClipboard, 1, 0, 1, 1);
     670            }
     671            /* Prepare clipboard combo: */
     672            m_pComboClipboard = new QComboBox(m_pTabAdvanced);
     673            if (m_pComboClipboard)
     674            {
     675                if (m_pLabelClipboard)
     676                    m_pLabelClipboard->setBuddy(m_pComboClipboard);
     677                pLayoutAdvanced->addWidget(m_pComboClipboard, 1, 1, 1, 1);
     678            }
     679
     680            /* Prepare drag&drop label: */
     681            m_pLabelDragAndDrop = new QLabel(m_pTabAdvanced);
     682            if (m_pLabelDragAndDrop)
     683            {
     684                m_pLabelDragAndDrop->setAlignment(Qt::AlignRight | Qt::AlignVCenter);
     685                pLayoutAdvanced->addWidget(m_pLabelDragAndDrop, 2, 0, 1, 1);
     686            }
     687            /* Prepare drag&drop combo: */
     688            m_pComboDragAndDrop = new QComboBox(m_pTabAdvanced);
     689            if (m_pComboDragAndDrop)
     690            {
     691                if (m_pLabelDragAndDrop)
     692                    m_pLabelDragAndDrop->setBuddy(m_pComboDragAndDrop);
     693                pLayoutAdvanced->addWidget(m_pComboDragAndDrop, 2, 1, 1, 1);
     694            }
     695        }
     696
     697        m_pTabWidget->addTab(m_pTabAdvanced, QString());
    826698    }
    827699}
     
    829701void UIMachineSettingsGeneral::prepareTabDescription()
    830702{
    831     /* Tab and it's layout created in the .ui file. */
    832     {
    833         /* Description Text editor created in the .ui file. */
    834         AssertPtrReturnVoid(mTeDescription);
    835         {
    836             /* Configure editor: */
     703    /* Prepare Description tab: */
     704    m_pTabDescription = new QWidget;
     705    if (m_pTabDescription)
     706    {
     707        /* Prepare Description tab layout: */
     708        QVBoxLayout *pLayoutDescription = new QVBoxLayout(m_pTabDescription);
     709        if (pLayoutDescription)
     710        {
     711            /* Prepare description editor: */
     712            m_pEditorDescription = new QTextEdit(m_pTabDescription);
     713            if (m_pEditorDescription)
     714            {
     715                m_pEditorDescription->setObjectName(QStringLiteral("m_pEditorDescription"));
     716                m_pEditorDescription->setAcceptRichText(false);
    837717#ifdef VBOX_WS_MAC
    838             mTeDescription->setMinimumHeight(150);
     718                m_pEditorDescription->setMinimumHeight(150);
    839719#endif
    840         }
     720
     721                pLayoutDescription->addWidget(m_pEditorDescription);
     722            }
     723        }
     724
     725        m_pTabWidget->addTab(m_pTabDescription, QString());
    841726    }
    842727}
     
    844729void UIMachineSettingsGeneral::prepareTabEncryption()
    845730{
    846     /* Tab and it's layout created in the .ui file. */
    847     {
    848         /* Encryption Cipher combo-box created in the .ui file. */
    849         AssertPtrReturnVoid(m_pComboCipher);
    850         {
    851             /* Configure combo-box: */
    852             m_encryptionCiphers << QString()
    853                                 << "AES-XTS256-PLAIN64"
    854                                 << "AES-XTS128-PLAIN64";
    855             m_pComboCipher->addItems(m_encryptionCiphers);
    856         }
    857 
    858         /* Encryption Password editor created in the .ui file. */
    859         AssertPtrReturnVoid(m_pEditorEncryptionPassword);
    860         {
    861             /* Configure editor: */
    862             m_pEditorEncryptionPassword->setEchoMode(QLineEdit::Password);
    863         }
    864 
    865         /* Encryption Password Confirmation editor created in the .ui file. */
    866         AssertPtrReturnVoid(m_pEditorEncryptionPasswordConfirm);
    867         {
    868             /* Configure editor: */
    869             m_pEditorEncryptionPasswordConfirm->setEchoMode(QLineEdit::Password);
    870         }
     731    /* Prepare Encryption tab: */
     732    m_pTabEncryption = new QWidget;
     733    if (m_pTabEncryption)
     734    {
     735        /* Prepare Encryption tab layout: */
     736        QGridLayout *pLayoutEncryption = new QGridLayout(m_pTabEncryption);
     737        if (pLayoutEncryption)
     738        {
     739            pLayoutEncryption->setRowStretch(2, 1);
     740
     741            /* Prepare encryption check-box: */
     742            m_pCheckBoxEncryption = new QCheckBox(m_pTabEncryption);
     743            if (m_pCheckBoxEncryption)
     744                pLayoutEncryption->addWidget(m_pCheckBoxEncryption, 0, 0, 1, 2);
     745
     746            /* Prepare 20-px shifting spacer: */
     747            QSpacerItem *pSpacerItem = new QSpacerItem(20, 0, QSizePolicy::Fixed, QSizePolicy::Minimum);
     748            if (pSpacerItem)
     749                pLayoutEncryption->addItem(pSpacerItem, 1, 0, 1, 1);
     750
     751            /* Prepare encryption settings widget: */
     752            m_pWidgetEncryptionSettings = new QWidget(m_pTabEncryption);
     753            if (m_pWidgetEncryptionSettings)
     754            {
     755                /* Prepare encryption settings widget layout: */
     756                QGridLayout *m_pLayoutEncryptionSettings = new QGridLayout(m_pWidgetEncryptionSettings);
     757                if (m_pLayoutEncryptionSettings)
     758                {
     759                    m_pLayoutEncryptionSettings->setContentsMargins(0, 0, 0, 0);
     760
     761                    /* Prepare encryption cipher label: */
     762                    m_pLabelCipher = new QLabel(m_pWidgetEncryptionSettings);
     763                    if (m_pLabelCipher)
     764                    {
     765                        m_pLabelCipher->setAlignment(Qt::AlignRight|Qt::AlignVCenter);
     766                        m_pLayoutEncryptionSettings->addWidget(m_pLabelCipher, 0, 0, 1, 1);
     767                    }
     768                    /* Prepare encryption cipher combo: */
     769                    m_pComboCipher = new QComboBox(m_pWidgetEncryptionSettings);
     770                    if (m_pComboCipher)
     771                    {
     772                        m_encryptionCiphers << QString()
     773                                            << "AES-XTS256-PLAIN64"
     774                                            << "AES-XTS128-PLAIN64";
     775                        m_pComboCipher->addItems(m_encryptionCiphers);
     776                        if (m_pLabelCipher)
     777                            m_pLabelCipher->setBuddy(m_pComboCipher);
     778                        m_pLayoutEncryptionSettings->addWidget(m_pComboCipher, 0, 1, 1, 1);
     779                    }
     780
     781                    /* Prepare encryption password label: */
     782                    m_pLabelEncryptionPassword = new QLabel(m_pWidgetEncryptionSettings);
     783                    if (m_pLabelEncryptionPassword)
     784                    {
     785                        m_pLabelEncryptionPassword->setAlignment(Qt::AlignRight|Qt::AlignVCenter);
     786                        m_pLayoutEncryptionSettings->addWidget(m_pLabelEncryptionPassword, 1, 0, 1, 1);
     787                    }
     788                    /* Prepare encryption password editor: */
     789                    m_pEditorEncryptionPassword = new QLineEdit(m_pWidgetEncryptionSettings);
     790                    if (m_pEditorEncryptionPassword)
     791                    {
     792                        m_pEditorEncryptionPassword->setEchoMode(QLineEdit::Password);
     793                        if (m_pLabelEncryptionPassword)
     794                            m_pLabelEncryptionPassword->setBuddy(m_pEditorEncryptionPassword);
     795                        m_pLayoutEncryptionSettings->addWidget(m_pEditorEncryptionPassword, 1, 1, 1, 1);
     796                    }
     797
     798                    /* Prepare encryption confirm password label: */
     799                    m_pLabelEncryptionPasswordConfirm = new QLabel(m_pWidgetEncryptionSettings);
     800                    if (m_pLabelEncryptionPasswordConfirm)
     801                    {
     802                        m_pLabelEncryptionPasswordConfirm->setAlignment(Qt::AlignRight|Qt::AlignVCenter);
     803                        m_pLayoutEncryptionSettings->addWidget(m_pLabelEncryptionPasswordConfirm, 2, 0, 1, 1);
     804                    }
     805                    /* Prepare encryption confirm password editor: */
     806                    m_pEditorEncryptionPasswordConfirm = new QLineEdit(m_pWidgetEncryptionSettings);
     807                    if (m_pEditorEncryptionPasswordConfirm)
     808                    {
     809                        m_pEditorEncryptionPasswordConfirm->setEchoMode(QLineEdit::Password);
     810                        if (m_pLabelEncryptionPasswordConfirm)
     811                            m_pLabelEncryptionPasswordConfirm->setBuddy(m_pEditorEncryptionPasswordConfirm);
     812                        m_pLayoutEncryptionSettings->addWidget(m_pEditorEncryptionPasswordConfirm, 2, 1, 1, 1);
     813                    }
     814                }
     815
     816                pLayoutEncryption->addWidget(m_pWidgetEncryptionSettings, 1, 1, 1, 1);
     817            }
     818        }
     819
     820        m_pTabWidget->addTab(m_pTabEncryption, QString());
    871821    }
    872822}
     
    875825{
    876826    /* Configure 'Basic' connections: */
    877     connect(m_pNameAndSystemEditor, &UINameAndSystemEditor::sigOsTypeChanged,
     827    connect(m_pEditorNameAndSystem, &UINameAndSystemEditor::sigOsTypeChanged,
    878828            this, &UIMachineSettingsGeneral::revalidate);
    879     connect(m_pNameAndSystemEditor, &UINameAndSystemEditor::sigNameChanged,
     829    connect(m_pEditorNameAndSystem, &UINameAndSystemEditor::sigNameChanged,
    880830            this, &UIMachineSettingsGeneral::revalidate);
    881831
    882832    /* Configure 'Encryption' connections: */
     833    connect(m_pCheckBoxEncryption, &QCheckBox::toggled,
     834            m_pWidgetEncryptionSettings, &QWidget::setEnabled);
    883835    connect(m_pCheckBoxEncryption, &QCheckBox::toggled,
    884836            this, &UIMachineSettingsGeneral::revalidate);
     
    907859{
    908860    /* Clipboard mode combo-box created in the .ui file. */
    909     AssertPtrReturnVoid(mCbClipboard);
     861    AssertPtrReturnVoid(m_pComboClipboard);
    910862    {
    911863        /* Clear combo first of all: */
    912         mCbClipboard->clear();
     864        m_pComboClipboard->clear();
    913865
    914866        /* Load currently supported Clipboard modes: */
     
    922874        /* Populate combo finally: */
    923875        foreach (const KClipboardMode &enmMode, clipboardModes)
    924             mCbClipboard->addItem(gpConverter->toString(enmMode), QVariant::fromValue(enmMode));
     876            m_pComboClipboard->addItem(gpConverter->toString(enmMode), QVariant::fromValue(enmMode));
    925877    }
    926878}
     
    929881{
    930882    /* DnD mode combo-box created in the .ui file. */
    931     AssertPtrReturnVoid(mCbDragAndDrop);
     883    AssertPtrReturnVoid(m_pComboDragAndDrop);
    932884    {
    933885        /* Clear combo first of all: */
    934         mCbDragAndDrop->clear();
     886        m_pComboDragAndDrop->clear();
    935887
    936888        /* Load currently supported DnD modes: */
     
    944896        /* Populate combo finally: */
    945897        foreach (const KDnDMode &enmMode, dndModes)
    946             mCbDragAndDrop->addItem(gpConverter->toString(enmMode), QVariant::fromValue(enmMode));
     898            m_pComboDragAndDrop->addItem(gpConverter->toString(enmMode), QVariant::fromValue(enmMode));
    947899    }
    948900}
  • trunk/src/VBox/Frontends/VirtualBox/src/settings/machine/UIMachineSettingsGeneral.h

    r85751 r85817  
    104104    /** Prepares 'Basic' tab. */
    105105    void prepareTabBasic();
     106    /** Prepares 'Advanced' tab. */
     107    void prepareTabAdvanced();
    106108    /** Prepares 'Description' tab. */
    107109    void prepareTabDescription();
     
    147149    /** Holds the page data cache instance. */
    148150    UISettingsCacheMachineGeneral *m_pCache;
     151
    149152    /** @name Widgets
    150153     * @{ */
    151        UINameAndSystemEditor *m_pNameAndSystemEditor;
    152        UIFilePathSelector *mPsSnapshot;
    153        QComboBox *mCbClipboard;
    154        QComboBox *m_pComboCipher;
    155        QComboBox *mCbDragAndDrop;
    156        QTextEdit *mTeDescription;
    157        QLineEdit *m_pEditorEncryptionPassword;
    158        QLineEdit *m_pEditorEncryptionPasswordConfirm;
    159        QCheckBox *m_pCheckBoxEncryption;
    160        QITabWidget *m_pTabWidgetGeneral;
    161        QWidget *m_pTabBasic;
    162        QWidget *m_pTabDescription;
    163        QWidget *m_pTabAdvanced;
    164        QWidget *m_pTabEncryption;
    165        QWidget *m_pWidgetEncryption;
    166        QLabel *m_pLabelDragAndDrop;
    167        QLabel *m_pLabelCipher;
    168        QLabel *m_pLabelSnapshot;
    169        QLabel *m_pLabelClipboard;
    170        QLabel *m_pLabelPassword1;
    171        QLabel *m_pLabelPassword2;
     154        /** Holds the tab-widget instance. */
     155        QITabWidget *m_pTabWidget;
     156
     157        /** Holds the 'Basic' tab instance. */
     158        QWidget               *m_pTabBasic;
     159        /** Holds the name and system editor instance. */
     160        UINameAndSystemEditor *m_pEditorNameAndSystem;
     161
     162        /** Holds the 'Advanced' tab instance. */
     163        QWidget            *m_pTabAdvanced;
     164        /** Holds the snapshot folder label instance. */
     165        QLabel             *m_pLabelSnapshotFolder;
     166        /** Holds the snapshot folder editor instance. */
     167        UIFilePathSelector *m_pEditorSnapshotFolder;
     168        /** Holds the shared clipboard label instance. */
     169        QLabel             *m_pLabelClipboard;
     170        /** Holds the shared clipboard combo instance. */
     171        QComboBox          *m_pComboClipboard;
     172        /** Holds the drag and drop label instance. */
     173        QLabel             *m_pLabelDragAndDrop;
     174        /** Holds the drag and drop combo instance. */
     175        QComboBox          *m_pComboDragAndDrop;
     176
     177        /** Holds the 'Description' tab instance. */
     178        QWidget   *m_pTabDescription;
     179        /** Holds the description editor instance. */
     180        QTextEdit *m_pEditorDescription;
     181
     182        /** Holds the 'Encryption' tab instance. */
     183        QWidget   *m_pTabEncryption;
     184        /** Holds the encryption check-box instance. */
     185        QCheckBox *m_pCheckBoxEncryption;
     186        /** Holds the encryption widget instance. */
     187        QWidget   *m_pWidgetEncryptionSettings;
     188        /** Holds the cipher label instance. */
     189        QLabel    *m_pLabelCipher;
     190        /** Holds the cipher combo instance. */
     191        QComboBox *m_pComboCipher;
     192        /** Holds the enter password label instance. */
     193        QLabel    *m_pLabelEncryptionPassword;
     194        /** Holds the enter password editor instance. */
     195        QLineEdit *m_pEditorEncryptionPassword;
     196        /** Holds the confirm password label instance. */
     197        QLabel    *m_pLabelEncryptionPasswordConfirm;
     198        /** Holds the confirm password editor instance. */
     199        QLineEdit *m_pEditorEncryptionPasswordConfirm;
    172200    /** @} */
    173201};
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