VirtualBox

Changeset 41399 in vbox


Ignore:
Timestamp:
May 22, 2012 4:03:22 PM (12 years ago)
Author:
vboxsync
Message:

FE/Qt: Clone Virtual Machine wizard: Removing group-boxes from basic mode.

Location:
trunk/src/VBox/Frontends/VirtualBox/src/wizards
Files:
9 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Frontends/VirtualBox/src/wizards/UIWizard.cpp

    r41398 r41399  
    402402    switch (m_type)
    403403    {
     404        case UIWizardType_CloneVM:
     405            dRatio -= 0.4;
     406            break;
    404407        case UIWizardType_NewVD:
    405408        case UIWizardType_CloneVD:
    406409            dRatio += 0.1;
     410            break;
    407411        case UIWizardType_ExportAppliance:
    408412            dRatio += 0.3;
  • trunk/src/VBox/Frontends/VirtualBox/src/wizards/clonevm/UIWizardCloneVMPageBasic1.cpp

    r41372 r41399  
    2020/* Global includes: */
    2121#include <QVBoxLayout>
    22 #include <QGroupBox>
    2322#include <QLineEdit>
    2423#include <QCheckBox>
     
    5655    QVBoxLayout *pMainLayout = new QVBoxLayout(this);
    5756    {
    58         m_pLabel1 = new QIRichTextLabel(this);
    59         m_pNameCnt = new QGroupBox(this);
     57        m_pLabel = new QIRichTextLabel(this);
     58        m_pNameEditor = new QLineEdit(this);
    6059        {
    61             QVBoxLayout *pNameCntLayout = new QVBoxLayout(m_pNameCnt);
    62             {
    63                 m_pNameEditor = new QLineEdit(m_pNameCnt);
    64                 {
    65                     m_pNameEditor->setText(UIWizardCloneVM::tr("%1 Clone").arg(m_strOriginalName));
    66                 }
    67                 pNameCntLayout->addWidget(m_pNameEditor);
    68             }
     60            m_pNameEditor->setText(UIWizardCloneVM::tr("%1 Clone").arg(m_strOriginalName));
    6961        }
    7062        m_pReinitMACsCheckBox = new QCheckBox(this);
    71         pMainLayout->addWidget(m_pLabel1);
    72         pMainLayout->addWidget(m_pNameCnt);
     63        pMainLayout->addWidget(m_pLabel);
     64        pMainLayout->addWidget(m_pNameEditor);
    7365        pMainLayout->addWidget(m_pReinitMACsCheckBox);
    7466        pMainLayout->addStretch();
     
    8981
    9082    /* Translate widgets: */
    91     m_pLabel1->setText(UIWizardCloneVM::tr("<p>Please choose a name for the new virtual machine. "
    92                                            "The new machine will be a clone of the machine <b>%1</b>.</p>")
    93                                            .arg(m_strOriginalName));
    94     m_pNameCnt->setTitle(UIWizardCloneVM::tr("&Name"));
     83    m_pLabel->setText(UIWizardCloneVM::tr("<p>Please choose a name for the new virtual machine. "
     84                                          "The new machine will be a clone of the machine <b>%1</b>.</p>")
     85                                          .arg(m_strOriginalName));
    9586    m_pReinitMACsCheckBox->setToolTip(UIWizardCloneVM::tr("When checked a new unique MAC address will be assigned to all configured network cards."));
    9687    m_pReinitMACsCheckBox->setText(UIWizardCloneVM::tr("&Reinitialize the MAC address of all network cards"));
  • trunk/src/VBox/Frontends/VirtualBox/src/wizards/clonevm/UIWizardCloneVMPageBasic1.h

    r41372 r41399  
    2424
    2525/* Forward declarations: */
    26 class QGroupBox;
    2726class QLineEdit;
    2827class QCheckBox;
     
    4847
    4948    /* Widgets: */
    50     QGroupBox *m_pNameCnt;
    5149    QLineEdit *m_pNameEditor;
    5250    QCheckBox *m_pReinitMACsCheckBox;
     
    7775
    7876    /* Widgets: */
    79     QIRichTextLabel *m_pLabel1;
     77    QIRichTextLabel *m_pLabel;
    8078};
    8179
  • trunk/src/VBox/Frontends/VirtualBox/src/wizards/clonevm/UIWizardCloneVMPageBasic2.cpp

    r41372 r41399  
    2020/* Global includes: */
    2121#include <QVBoxLayout>
    22 #include <QGroupBox>
    2322#include <QRadioButton>
    2423#include <QButtonGroup>
     
    4746    {
    4847        m_pLabel = new QIRichTextLabel(this);
    49         m_pCloneTypeCnt = new QGroupBox(this);
     48        QVBoxLayout *pCloneTypeCntLayout = new QVBoxLayout;
    5049        {
    51             m_pButtonGroup = new QButtonGroup(m_pCloneTypeCnt);
     50            m_pButtonGroup = new QButtonGroup(this);
    5251            {
    53                 QVBoxLayout *pCloneTypeCntLayout = new QVBoxLayout(m_pCloneTypeCnt);
     52                m_pFullCloneRadio = new QRadioButton(this);
    5453                {
    55                     m_pFullCloneRadio = new QRadioButton(m_pCloneTypeCnt);
    56                     {
    57                         m_pFullCloneRadio->setChecked(true);
    58                     }
    59                     m_pLinkedCloneRadio = new QRadioButton(m_pCloneTypeCnt);
    60                     pCloneTypeCntLayout->addWidget(m_pFullCloneRadio);
    61                     pCloneTypeCntLayout->addWidget(m_pLinkedCloneRadio);
     54                    m_pFullCloneRadio->setChecked(true);
    6255                }
     56                m_pLinkedCloneRadio = new QRadioButton(this);
    6357                m_pButtonGroup->addButton(m_pFullCloneRadio);
    6458                m_pButtonGroup->addButton(m_pLinkedCloneRadio);
    6559            }
     60            pCloneTypeCntLayout->addWidget(m_pFullCloneRadio);
     61            pCloneTypeCntLayout->addWidget(m_pLinkedCloneRadio);
    6662        }
    6763        pMainLayout->addWidget(m_pLabel);
    68         pMainLayout->addWidget(m_pCloneTypeCnt);
     64        pMainLayout->addLayout(pCloneTypeCntLayout);
    6965        pMainLayout->addStretch();
    7066    }
     
    105101    m_pLabel->setText(strLabel);
    106102
    107     m_pCloneTypeCnt->setTitle(UIWizardCloneVM::tr("&Type"));
    108103    m_pFullCloneRadio->setText(UIWizardCloneVM::tr("Full clone"));
    109104    m_pLinkedCloneRadio->setText(UIWizardCloneVM::tr("Linked clone"));
  • trunk/src/VBox/Frontends/VirtualBox/src/wizards/clonevm/UIWizardCloneVMPageBasic2.h

    r41021 r41399  
    2424
    2525/* Forward declarations: */
    26 class QGroupBox;
    2726class QButtonGroup;
    2827class QRadioButton;
     
    4443
    4544    /* Widgets: */
    46     QGroupBox *m_pCloneTypeCnt;
    4745    QButtonGroup *m_pButtonGroup;
    4846    QRadioButton *m_pFullCloneRadio;
  • trunk/src/VBox/Frontends/VirtualBox/src/wizards/clonevm/UIWizardCloneVMPageBasic3.cpp

    r41372 r41399  
    2020/* Global includes: */
    2121#include <QVBoxLayout>
    22 #include <QGroupBox>
    2322#include <QRadioButton>
    2423
     
    5958    {
    6059        m_pLabel = new QIRichTextLabel(this);
    61         m_pCloneModeCnt = new QGroupBox(this);
     60        QVBoxLayout *pCloneModeCntLayout = new QVBoxLayout;
    6261        {
    63             QVBoxLayout *pCloneModeCntLayout = new QVBoxLayout(m_pCloneModeCnt);
     62            m_pMachineRadio = new QRadioButton(this);
    6463            {
    65                 m_pMachineRadio = new QRadioButton(m_pCloneModeCnt);
    66                 {
    67                     m_pMachineRadio->setChecked(true);
    68                 }
    69                 m_pMachineAndChildsRadio = new QRadioButton(m_pCloneModeCnt);
    70                 {
    71                     if (!m_fShowChildsOption)
    72                        m_pMachineAndChildsRadio->hide();
    73                 }
    74                 m_pAllRadio = new QRadioButton(m_pCloneModeCnt);
    75                 pCloneModeCntLayout->addWidget(m_pMachineRadio);
    76                 pCloneModeCntLayout->addWidget(m_pMachineAndChildsRadio);
    77                 pCloneModeCntLayout->addWidget(m_pAllRadio);
     64                m_pMachineRadio->setChecked(true);
    7865            }
     66            m_pMachineAndChildsRadio = new QRadioButton(this);
     67            {
     68                if (!m_fShowChildsOption)
     69                   m_pMachineAndChildsRadio->hide();
     70            }
     71            m_pAllRadio = new QRadioButton(this);
     72            pCloneModeCntLayout->addWidget(m_pMachineRadio);
     73            pCloneModeCntLayout->addWidget(m_pMachineAndChildsRadio);
     74            pCloneModeCntLayout->addWidget(m_pAllRadio);
    7975        }
    8076        pMainLayout->addWidget(m_pLabel);
    81         pMainLayout->addWidget(m_pCloneModeCnt);
     77        pMainLayout->addLayout(pCloneModeCntLayout);
    8278        pMainLayout->addStretch();
    8379    }
     
    114110                          .arg(strOpt3));
    115111
    116     m_pCloneModeCnt->setTitle(UIWizardCloneVM::tr("&Mode"));
    117112    m_pMachineRadio->setText(UIWizardCloneVM::tr("Current machine state"));
    118113    m_pMachineAndChildsRadio->setText(UIWizardCloneVM::tr("Current machine and all child states"));
  • trunk/src/VBox/Frontends/VirtualBox/src/wizards/clonevm/UIWizardCloneVMPageBasic3.h

    r41021 r41399  
    2525
    2626/* Forward declaration: */
    27 class QGroupBox;
    2827class QRadioButton;
    2928class QIRichTextLabel;
     
    4544
    4645    /* Widgets: */
    47     QGroupBox *m_pCloneModeCnt;
    4846    QRadioButton *m_pMachineRadio;
    4947    QRadioButton *m_pMachineAndChildsRadio;
  • trunk/src/VBox/Frontends/VirtualBox/src/wizards/clonevm/UIWizardCloneVMPageExpert.cpp

    r41021 r41399  
    1919
    2020/* Global includes: */
    21 #include <QVBoxLayout>
     21#include <QGridLayout>
    2222#include <QButtonGroup>
    2323#include <QGroupBox>
     
    3636{
    3737    /* Create widgets: */
    38     QVBoxLayout *pMainLayout = new QVBoxLayout(this);
     38    QGridLayout *pMainLayout = new QGridLayout(this);
    3939    {
    4040        pMainLayout->setContentsMargins(8, 6, 8, 6);
     
    8888        }
    8989        m_pReinitMACsCheckBox = new QCheckBox(this);
    90         pMainLayout->addWidget(m_pNameCnt);
    91         pMainLayout->addWidget(m_pCloneTypeCnt);
    92         pMainLayout->addWidget(m_pCloneModeCnt);
    93         pMainLayout->addWidget(m_pReinitMACsCheckBox);
    94         pMainLayout->addStretch();
     90        pMainLayout->addWidget(m_pNameCnt, 0, 0, 1, 2);
     91        pMainLayout->addWidget(m_pCloneTypeCnt, 1, 0, Qt::AlignTop);
     92        pMainLayout->addWidget(m_pCloneModeCnt, 1, 1, Qt::AlignTop);
     93        pMainLayout->addWidget(m_pReinitMACsCheckBox, 2, 0, 1, 2);
     94        pMainLayout->setRowStretch(3, 1);
    9595        sltButtonClicked(m_pFullCloneRadio);
    9696    }
  • trunk/src/VBox/Frontends/VirtualBox/src/wizards/clonevm/UIWizardCloneVMPageExpert.h

    r41021 r41399  
    2424#include "UIWizardCloneVMPageBasic2.h"
    2525#include "UIWizardCloneVMPageBasic3.h"
     26
     27/* Forward declarations: */
     28class QGroupBox;
    2629
    2730/* Expert page of the Clone Virtual Machine wizard: */
     
    5861    bool isComplete() const;
    5962    bool validatePage();
     63
     64    /* Widgets: */
     65    QGroupBox *m_pNameCnt;
     66    QGroupBox *m_pCloneTypeCnt;
     67    QGroupBox *m_pCloneModeCnt;
    6068};
    6169
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