Changeset 45083 in vbox
- Timestamp:
- Mar 19, 2013 9:17:08 AM (12 years ago)
- svn:sync-xref-src-repo-rev:
- 84366
- 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 27 27 #include <QLabel> 28 28 #include <QCheckBox> 29 #include <QGroupBox> 29 30 30 31 /* Local includes: */ … … 33 34 #include "UIWizardExportAppDefs.h" 34 35 #include "VBoxGlobal.h" 35 #include "QILabelSeparator.h"36 36 #include "VBoxFilePathSelectorWidget.h" 37 37 #include "UIApplianceExportEditorWidget.h" … … 44 44 pMainLayout->setContentsMargins(8, 6, 8, 6); 45 45 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 } 59 69 } 60 70 m_pTypeCnt = new QGroupBox(this); … … 71 81 } 72 82 } 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); 135 146 populateVMSelectorItems(selectedVMNames); 136 147 chooseDefaultStorageType(); … … 190 201 m_strDefaultApplianceName = UIWizardExportApp::tr("Appliance"); 191 202 /* Translate widgets: */ 192 m_p VMSelectorLabel->setText(UIWizardExportApp::tr("Virtual &machines to export"));193 m_p VMApplianceLabel->setText(UIWizardExportApp::tr("Appliance &settings"));203 m_pSelectorCnt->setTitle(UIWizardExportApp::tr("Virtual &machines to export")); 204 m_pApplianceCnt->setTitle(UIWizardExportApp::tr("Appliance &settings")); 194 205 m_pTypeCnt->setTitle(UIWizardExportApp::tr("&Destination")); 206 m_pSettingsCnt->setTitle(UIWizardExportApp::tr("&Storage settings")); 195 207 m_pTypeLocalFilesystem->setText(UIWizardExportApp::tr("&Local Filesystem ")); 196 208 m_pTypeSunCloud->setText(UIWizardExportApp::tr("Sun &Cloud")); -
trunk/src/VBox/Frontends/VirtualBox/src/wizards/exportappliance/UIWizardExportAppPageExpert.h
r41372 r45083 6 6 7 7 /* 8 * Copyright (C) 2009-201 2Oracle Corporation8 * Copyright (C) 2009-2013 Oracle Corporation 9 9 * 10 10 * This file is part of VirtualBox Open Source Edition (OSE), as … … 27 27 28 28 /* Forward declarations: */ 29 class Q ILabelSeparator;29 class QGroupBox; 30 30 31 31 /* Expert page of the Export Appliance wizard: */ … … 87 87 88 88 /* Widgets: */ 89 QILabelSeparator *m_pVMSelectorLabel; 90 QILabelSeparator *m_pVMApplianceLabel; 89 QGroupBox *m_pSelectorCnt; 90 QGroupBox *m_pApplianceCnt; 91 QGroupBox *m_pSettingsCnt; 91 92 }; 92 93
Note:
See TracChangeset
for help on using the changeset viewer.