VirtualBox

Changeset 45083 in vbox


Ignore:
Timestamp:
Mar 19, 2013 9:17:08 AM (12 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
84366
Message:

FE/Qt: Wizards: Export appliance: Get rid of QLabel-separators used in expert-mode pages, making look&feel more native and similar to other wizards.

Location:
trunk/src/VBox/Frontends/VirtualBox/src/wizards/exportappliance
Files:
2 edited

Legend:

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

    r45081 r45083  
    2727#include <QLabel>
    2828#include <QCheckBox>
     29#include <QGroupBox>
    2930
    3031/* Local includes: */
     
    3334#include "UIWizardExportAppDefs.h"
    3435#include "VBoxGlobal.h"
    35 #include "QILabelSeparator.h"
    3636#include "VBoxFilePathSelectorWidget.h"
    3737#include "UIApplianceExportEditorWidget.h"
     
    4444        pMainLayout->setContentsMargins(8, 6, 8, 6);
    4545        pMainLayout->setSpacing(10);
    46         m_pVMSelectorLabel = new QILabelSeparator(this);
    47         m_pVMSelector = new QListWidget(this);
    48         {
    49             m_pVMSelector->setAlternatingRowColors(true);
    50             m_pVMSelector->setSelectionMode(QAbstractItemView::ExtendedSelection);
    51             m_pVMSelectorLabel->setBuddy(m_pVMSelector);
    52         }
    53         m_pVMApplianceLabel = new QILabelSeparator(this);
    54         m_pApplianceWidget = new UIApplianceExportEditorWidget(this);
    55         {
    56             m_pApplianceWidget->setMinimumHeight(250);
    57             m_pApplianceWidget->setSizePolicy(QSizePolicy::Preferred, QSizePolicy::MinimumExpanding);
    58             m_pVMApplianceLabel->setBuddy(m_pApplianceWidget);
     46        m_pSelectorCnt = new QGroupBox(this);
     47        {
     48            QVBoxLayout *pSelectorCntLayout = new QVBoxLayout(m_pSelectorCnt);
     49            {
     50                m_pVMSelector = new QListWidget(m_pSelectorCnt);
     51                {
     52                    m_pVMSelector->setAlternatingRowColors(true);
     53                    m_pVMSelector->setSelectionMode(QAbstractItemView::ExtendedSelection);
     54                }
     55                pSelectorCntLayout->addWidget(m_pVMSelector);
     56            }
     57        }
     58        m_pApplianceCnt = new QGroupBox(this);
     59        {
     60            QVBoxLayout *pApplianceCntLayout = new QVBoxLayout(m_pApplianceCnt);
     61            {
     62                m_pApplianceWidget = new UIApplianceExportEditorWidget(m_pApplianceCnt);
     63                {
     64                    m_pApplianceWidget->setMinimumHeight(250);
     65                    m_pApplianceWidget->setSizePolicy(QSizePolicy::Preferred, QSizePolicy::MinimumExpanding);
     66                }
     67                pApplianceCntLayout->addWidget(m_pApplianceWidget);
     68            }
    5969        }
    6070        m_pTypeCnt = new QGroupBox(this);
     
    7181            }
    7282        }
    73         QGridLayout *pSettingsLayout = new QGridLayout;
    74         {
    75             m_pUsernameEditor = new QLineEdit(this);
    76             m_pUsernameLabel = new QLabel(this);
    77             {
    78                 m_pUsernameLabel->setAlignment(Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter);
    79                 m_pUsernameLabel->setBuddy(m_pUsernameEditor);
    80             }
    81             m_pPasswordEditor = new QLineEdit(this);
    82             {
    83                 m_pPasswordEditor->setEchoMode(QLineEdit::Password);
    84             }
    85             m_pPasswordLabel = new QLabel(this);
    86             {
    87                 m_pPasswordLabel->setAlignment(Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter);
    88                 m_pPasswordLabel->setBuddy(m_pPasswordEditor);
    89             }
    90             m_pHostnameEditor = new QLineEdit(this);
    91             m_pHostnameLabel = new QLabel(this);
    92             {
    93                 m_pHostnameLabel->setAlignment(Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter);
    94                 m_pHostnameLabel->setBuddy(m_pHostnameEditor);
    95             }
    96             m_pBucketEditor = new QLineEdit(this);
    97             m_pBucketLabel = new QLabel(this);
    98             {
    99                 m_pBucketLabel->setAlignment(Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter);
    100                 m_pBucketLabel->setBuddy(m_pBucketEditor);
    101             }
    102             m_pFileSelector = new VBoxEmptyFileSelector(this);
    103             {
    104                 m_pFileSelector->setMode(VBoxFilePathSelectorWidget::Mode_File_Save);
    105                 m_pFileSelector->setEditable(true);
    106                 m_pFileSelector->setButtonPosition(VBoxEmptyFileSelector::RightPosition);
    107                 m_pFileSelector->setDefaultSaveExt("ova");
    108             }
    109             m_pFileSelectorLabel = new QLabel(this);
    110             {
    111                 m_pFileSelectorLabel->setAlignment(Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter);
    112                 m_pFileSelectorLabel->setBuddy(m_pFileSelector);
    113             }
    114             pSettingsLayout->addWidget(m_pUsernameLabel, 0, 0);
    115             pSettingsLayout->addWidget(m_pUsernameEditor, 0, 1);
    116             pSettingsLayout->addWidget(m_pPasswordLabel, 1, 0);
    117             pSettingsLayout->addWidget(m_pPasswordEditor, 1, 1);
    118             pSettingsLayout->addWidget(m_pHostnameLabel, 2, 0);
    119             pSettingsLayout->addWidget(m_pHostnameEditor, 2, 1);
    120             pSettingsLayout->addWidget(m_pBucketLabel, 3, 0);
    121             pSettingsLayout->addWidget(m_pBucketEditor, 3, 1);
    122             pSettingsLayout->addWidget(m_pFileSelectorLabel, 4, 0);
    123             pSettingsLayout->addWidget(m_pFileSelector, 4, 1);
    124         }
    125         m_pOVF09Checkbox = new QCheckBox(this);
    126         m_pManifestCheckbox = new QCheckBox(this);
    127         pMainLayout->addWidget(m_pVMSelectorLabel, 0, 0);
    128         pMainLayout->addWidget(m_pVMApplianceLabel, 0, 1);
    129         pMainLayout->addWidget(m_pVMSelector, 1, 0);
    130         pMainLayout->addWidget(m_pApplianceWidget, 1, 1);
    131         pMainLayout->addWidget(m_pTypeCnt, 2, 0, 1, 2);
    132         pMainLayout->addLayout(pSettingsLayout, 3, 0, 1, 2);
    133         pMainLayout->addWidget(m_pOVF09Checkbox, 4, 0, 1, 2);
    134         pMainLayout->addWidget(m_pManifestCheckbox, 5, 0, 1, 2);
     83        m_pSettingsCnt = new QGroupBox(this);
     84        {
     85            QGridLayout *pSettingsLayout = new QGridLayout(m_pSettingsCnt);
     86            {
     87                m_pUsernameEditor = new QLineEdit(m_pSettingsCnt);
     88                m_pUsernameLabel = new QLabel(m_pSettingsCnt);
     89                {
     90                    m_pUsernameLabel->setAlignment(Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter);
     91                    m_pUsernameLabel->setBuddy(m_pUsernameEditor);
     92                }
     93                m_pPasswordEditor = new QLineEdit(m_pSettingsCnt);
     94                {
     95                    m_pPasswordEditor->setEchoMode(QLineEdit::Password);
     96                }
     97                m_pPasswordLabel = new QLabel(m_pSettingsCnt);
     98                {
     99                    m_pPasswordLabel->setAlignment(Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter);
     100                    m_pPasswordLabel->setBuddy(m_pPasswordEditor);
     101                }
     102                m_pHostnameEditor = new QLineEdit(m_pSettingsCnt);
     103                m_pHostnameLabel = new QLabel(m_pSettingsCnt);
     104                {
     105                    m_pHostnameLabel->setAlignment(Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter);
     106                    m_pHostnameLabel->setBuddy(m_pHostnameEditor);
     107                }
     108                m_pBucketEditor = new QLineEdit(m_pSettingsCnt);
     109                m_pBucketLabel = new QLabel(m_pSettingsCnt);
     110                {
     111                    m_pBucketLabel->setAlignment(Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter);
     112                    m_pBucketLabel->setBuddy(m_pBucketEditor);
     113                }
     114                m_pFileSelector = new VBoxEmptyFileSelector(m_pSettingsCnt);
     115                {
     116                    m_pFileSelector->setMode(VBoxFilePathSelectorWidget::Mode_File_Save);
     117                    m_pFileSelector->setEditable(true);
     118                    m_pFileSelector->setButtonPosition(VBoxEmptyFileSelector::RightPosition);
     119                    m_pFileSelector->setDefaultSaveExt("ova");
     120                }
     121                m_pFileSelectorLabel = new QLabel(m_pSettingsCnt);
     122                {
     123                    m_pFileSelectorLabel->setAlignment(Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter);
     124                    m_pFileSelectorLabel->setBuddy(m_pFileSelector);
     125                }
     126                m_pOVF09Checkbox = new QCheckBox(m_pSettingsCnt);
     127                m_pManifestCheckbox = new QCheckBox(m_pSettingsCnt);
     128                pSettingsLayout->addWidget(m_pUsernameLabel, 0, 0);
     129                pSettingsLayout->addWidget(m_pUsernameEditor, 0, 1);
     130                pSettingsLayout->addWidget(m_pPasswordLabel, 1, 0);
     131                pSettingsLayout->addWidget(m_pPasswordEditor, 1, 1);
     132                pSettingsLayout->addWidget(m_pHostnameLabel, 2, 0);
     133                pSettingsLayout->addWidget(m_pHostnameEditor, 2, 1);
     134                pSettingsLayout->addWidget(m_pBucketLabel, 3, 0);
     135                pSettingsLayout->addWidget(m_pBucketEditor, 3, 1);
     136                pSettingsLayout->addWidget(m_pFileSelectorLabel, 4, 0);
     137                pSettingsLayout->addWidget(m_pFileSelector, 4, 1);
     138                pSettingsLayout->addWidget(m_pOVF09Checkbox, 5, 0, 1, 2);
     139                pSettingsLayout->addWidget(m_pManifestCheckbox, 6, 0, 1, 2);
     140            }
     141        }
     142        pMainLayout->addWidget(m_pSelectorCnt, 0, 0);
     143        pMainLayout->addWidget(m_pApplianceCnt, 0, 1);
     144        pMainLayout->addWidget(m_pTypeCnt, 1, 0, 1, 2);
     145        pMainLayout->addWidget(m_pSettingsCnt, 2, 0, 1, 2);
    135146        populateVMSelectorItems(selectedVMNames);
    136147        chooseDefaultStorageType();
     
    190201    m_strDefaultApplianceName = UIWizardExportApp::tr("Appliance");
    191202    /* Translate widgets: */
    192     m_pVMSelectorLabel->setText(UIWizardExportApp::tr("Virtual &machines to export"));
    193     m_pVMApplianceLabel->setText(UIWizardExportApp::tr("Appliance &settings"));
     203    m_pSelectorCnt->setTitle(UIWizardExportApp::tr("Virtual &machines to export"));
     204    m_pApplianceCnt->setTitle(UIWizardExportApp::tr("Appliance &settings"));
    194205    m_pTypeCnt->setTitle(UIWizardExportApp::tr("&Destination"));
     206    m_pSettingsCnt->setTitle(UIWizardExportApp::tr("&Storage settings"));
    195207    m_pTypeLocalFilesystem->setText(UIWizardExportApp::tr("&Local Filesystem "));
    196208    m_pTypeSunCloud->setText(UIWizardExportApp::tr("Sun &Cloud"));
  • trunk/src/VBox/Frontends/VirtualBox/src/wizards/exportappliance/UIWizardExportAppPageExpert.h

    r41372 r45083  
    66
    77/*
    8  * Copyright (C) 2009-2012 Oracle Corporation
     8 * Copyright (C) 2009-2013 Oracle Corporation
    99 *
    1010 * This file is part of VirtualBox Open Source Edition (OSE), as
     
    2727
    2828/* Forward declarations: */
    29 class QILabelSeparator;
     29class QGroupBox;
    3030
    3131/* Expert page of the Export Appliance wizard: */
     
    8787
    8888    /* Widgets: */
    89     QILabelSeparator *m_pVMSelectorLabel;
    90     QILabelSeparator *m_pVMApplianceLabel;
     89    QGroupBox *m_pSelectorCnt;
     90    QGroupBox *m_pApplianceCnt;
     91    QGroupBox *m_pSettingsCnt;
    9192};
    9293
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