- Timestamp:
- Nov 16, 2016 2:22:05 PM (8 years ago)
- Location:
- trunk/src/VBox/Frontends/VirtualBox
- Files:
-
- 1 deleted
- 7 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Frontends/VirtualBox/VBoxUI.pro
r63838 r64683 48 48 src/settings/machine/UIMachineSettingsSF.ui \ 49 49 src/settings/machine/UIMachineSettingsSFDetails.ui \ 50 src/settings/machine/UIMachineSettingsInterface.ui \ 51 src/widgets/UIApplianceEditorWidget.ui 50 src/settings/machine/UIMachineSettingsInterface.ui 52 51 53 52 TRANSLATIONS = \ -
trunk/src/VBox/Frontends/VirtualBox/src/widgets/UIApplianceEditorWidget.cpp
r63567 r64683 25 25 # include <QHeaderView> 26 26 # include <QLineEdit> 27 # include <QTextEdit>28 27 # include <QSpinBox> 29 28 # include <QComboBox> 30 29 # include <QDir> 30 # include <QTreeView> 31 # include <QCheckBox> 32 # include <QLabel> 33 # include <QTextEdit> 31 34 32 35 /* GUI includes: */ … … 1119 1122 initSystemSettings(); 1120 1123 1121 /* Apply UI decorations */ 1122 Ui::UIApplianceEditorWidget::setupUi(this); 1123 1124 /* Make the tree looking nicer */ 1125 m_pTvSettings->setRootIsDecorated(false); 1126 m_pTvSettings->setAlternatingRowColors(true); 1127 m_pTvSettings->setAllColumnsShowFocus(true); 1128 m_pTvSettings->header()->setStretchLastSection(true); 1129 #if QT_VERSION >= 0x050000 1130 m_pTvSettings->header()->setSectionResizeMode(QHeaderView::ResizeToContents); 1131 #else /* QT_VERSION < 0x050000 */ 1132 m_pTvSettings->header()->setResizeMode(QHeaderView::ResizeToContents); 1133 #endif /* QT_VERSION < 0x050000 */ 1134 1135 /* Hidden by default */ 1136 m_pReinitMACsCheckBox->setHidden(true); 1137 1138 /* Applying language settings */ 1124 /* Create layout: */ 1125 QVBoxLayout *pLayout = new QVBoxLayout(this); 1126 { 1127 /* Configure information layout: */ 1128 pLayout->setContentsMargins(0, 0, 0, 0); 1129 1130 /* Create information pane: */ 1131 m_pPaneInformation = new QWidget; 1132 { 1133 /* Create information layout: */ 1134 QVBoxLayout *pLayoutInformation = new QVBoxLayout(m_pPaneInformation); 1135 { 1136 /* Configure information layout: */ 1137 pLayoutInformation->setContentsMargins(0, 0, 0, 0); 1138 1139 /* Create tree-view: */ 1140 m_pTreeViewSettings = new QTreeView; 1141 { 1142 /* Configure tree-view: */ 1143 m_pTreeViewSettings->setRootIsDecorated(false); 1144 m_pTreeViewSettings->setAlternatingRowColors(true); 1145 m_pTreeViewSettings->setAllColumnsShowFocus(true); 1146 m_pTreeViewSettings->header()->setStretchLastSection(true); 1147 m_pTreeViewSettings->setSizePolicy(QSizePolicy::Expanding, QSizePolicy::MinimumExpanding); 1148 #if QT_VERSION < 0x050000 1149 m_pTreeViewSettings->header()->setResizeMode(QHeaderView::ResizeToContents); 1150 #else 1151 m_pTreeViewSettings->header()->setSectionResizeMode(QHeaderView::ResizeToContents); 1152 #endif 1153 1154 /* Add tree-view into information layout: */ 1155 pLayoutInformation->addWidget(m_pTreeViewSettings); 1156 } 1157 1158 /* Create check-box: */ 1159 m_pCheckBoxReinitMACs = new QCheckBox; 1160 { 1161 /* Configure check-box: */ 1162 m_pCheckBoxReinitMACs->setHidden(true); 1163 1164 /* Add tree-view into information layout: */ 1165 pLayoutInformation->addWidget(m_pCheckBoxReinitMACs); 1166 } 1167 } 1168 1169 /* Add information pane into layout: */ 1170 pLayout->addWidget(m_pPaneInformation); 1171 } 1172 1173 /* Create warning pane: */ 1174 m_pPaneWarning = new QWidget; 1175 { 1176 /* Configure warning pane: */ 1177 m_pPaneWarning->hide(); 1178 m_pPaneWarning->setSizePolicy(QSizePolicy::Preferred, QSizePolicy::Fixed); 1179 1180 /* Create warning layout: */ 1181 QVBoxLayout *pLayoutWarning = new QVBoxLayout(m_pPaneWarning); 1182 { 1183 /* Configure warning layout: */ 1184 pLayoutWarning->setContentsMargins(0, 0, 0, 0); 1185 1186 /* Create label: */ 1187 m_pLabelWarning = new QLabel; 1188 { 1189 /* Add label into warning layout: */ 1190 pLayoutWarning->addWidget(m_pLabelWarning); 1191 } 1192 1193 /* Create text-edit: */ 1194 m_pTextEditWarning = new QTextEdit; 1195 { 1196 /* Configure text-edit: */ 1197 m_pTextEditWarning->setReadOnly(true); 1198 m_pTextEditWarning->setMaximumHeight(50); 1199 m_pTextEditWarning->setAutoFormatting(QTextEdit::AutoBulletList); 1200 1201 /* Add text-edit into warning layout: */ 1202 pLayoutWarning->addWidget(m_pTextEditWarning); 1203 } 1204 } 1205 1206 /* Add warning pane into layout: */ 1207 pLayout->addWidget(m_pPaneWarning); 1208 } 1209 } 1210 1211 /* Translate finally: */ 1139 1212 retranslateUi(); 1140 1213 } … … 1147 1220 void UIApplianceEditorWidget::retranslateUi() 1148 1221 { 1149 /* Translate uic generated strings */ 1150 Ui::UIApplianceEditorWidget::retranslateUi(this); 1222 /* Translate information pane check-box: */ 1223 m_pCheckBoxReinitMACs->setText(tr("&Reinitialize the MAC address of all network cards")); 1224 m_pCheckBoxReinitMACs->setToolTip(tr("When checked a new unique MAC address will assigned to all configured network cards.")); 1225 1226 /* Translate warning pane label: */ 1227 m_pLabelWarning->setText(tr("Warnings:")); 1151 1228 } 1152 1229 -
trunk/src/VBox/Frontends/VirtualBox/src/widgets/UIApplianceEditorWidget.h
r62493 r64683 24 24 25 25 /* GUI includes: */ 26 #include "UIApplianceEditorWidget.gen.h"27 26 #include "QIWithRetranslateUI.h" 28 27 … … 33 32 /* Forward declarations: */ 34 33 class ModelItem; 34 class QWidget; 35 class QTreeView; 36 class QCheckBox; 37 class QLabel; 38 class QTextEdit; 35 39 36 40 //////////////////////////////////////////////////////////////////////////////// … … 251 255 // UIApplianceEditorWidget 252 256 253 class UIApplianceEditorWidget: public QIWithRetranslateUI<QWidget>, 254 public Ui::UIApplianceEditorWidget 257 class UIApplianceEditorWidget: public QIWithRetranslateUI<QWidget> 255 258 { 256 259 Q_OBJECT; … … 276 279 CAppliance *m_pAppliance; 277 280 VirtualSystemModel *m_pModel; 281 282 /** Holds the information pane instance. */ 283 QWidget *m_pPaneInformation; 284 /** Holds the settings tree-view instance. */ 285 QTreeView *m_pTreeViewSettings; 286 /** Holds the 'reinit MACs' check-box instance. */ 287 QCheckBox *m_pCheckBoxReinitMACs; 288 289 /** Holds the warning pane instance. */ 290 QWidget *m_pPaneWarning; 291 /** Holds the warning label instance. */ 292 QLabel *m_pLabelWarning; 293 /** Holds the warning browser instance. */ 294 QTextEdit *m_pTextEditWarning; 278 295 279 296 private: -
trunk/src/VBox/Frontends/VirtualBox/src/widgets/UIApplianceExportEditorWidget.cpp
r62493 r64683 19 19 # include <precomp.h> 20 20 #else /* !VBOX_WITH_PRECOMPILED_HEADERS */ 21 22 /* Qt includes: */ 23 # include <QTextEdit> 24 # include <QTreeView> 21 25 22 26 /* GUI includes: */ … … 91 95 92 96 /* Set our own model */ 93 m_pT vSettings->setModel(pProxy);97 m_pTreeViewSettings->setModel(pProxy); 94 98 /* Set our own delegate */ 95 m_pT vSettings->setItemDelegate(pDelegate);99 m_pTreeViewSettings->setItemDelegate(pDelegate); 96 100 /* For now we hide the original column. This data is displayed as tooltip 97 101 also. */ 98 m_pT vSettings->setColumnHidden(OriginalValueSection, true);99 m_pT vSettings->expandAll();102 m_pTreeViewSettings->setColumnHidden(OriginalValueSection, true); 103 m_pTreeViewSettings->expandAll(); 100 104 101 105 /* Check for warnings & if there are one display them. */ … … 105 109 { 106 110 foreach (const QString& text, warnings) 107 m WarningTextEdit->append("- " + text);111 m_pTextEditWarning->append("- " + text); 108 112 fWarningsEnabled = true; 109 113 } 110 m_p WarningWidget->setVisible(fWarningsEnabled);114 m_pPaneWarning->setVisible(fWarningsEnabled); 111 115 } 112 116 -
trunk/src/VBox/Frontends/VirtualBox/src/widgets/UIApplianceImportEditorWidget.cpp
r62493 r64683 19 19 # include <precomp.h> 20 20 #else /* !VBOX_WITH_PRECOMPILED_HEADERS */ 21 22 /* Qt includes: */ 23 # include <QCheckBox> 24 # include <QTextEdit> 25 # include <QTreeView> 21 26 22 27 /* GUI includes: */ … … 51 56 { 52 57 /* Show the MAC check box */ 53 m_p ReinitMACsCheckBox->setHidden(false);58 m_pCheckBoxReinitMACs->setHidden(false); 54 59 } 55 60 … … 96 101 97 102 /* Set our own model */ 98 m_pT vSettings->setModel(pProxy);103 m_pTreeViewSettings->setModel(pProxy); 99 104 /* Set our own delegate */ 100 m_pT vSettings->setItemDelegate(pDelegate);105 m_pTreeViewSettings->setItemDelegate(pDelegate); 101 106 /* For now we hide the original column. This data is displayed as tooltip 102 107 also. */ 103 m_pT vSettings->setColumnHidden(OriginalValueSection, true);104 m_pT vSettings->expandAll();108 m_pTreeViewSettings->setColumnHidden(OriginalValueSection, true); 109 m_pTreeViewSettings->expandAll(); 105 110 106 111 /* Check for warnings & if there are one display them. */ … … 110 115 { 111 116 foreach (const QString& text, warnings) 112 m WarningTextEdit->append("- " + text);117 m_pTextEditWarning->append("- " + text); 113 118 fWarningsEnabled = true; 114 119 } 115 m_p WarningWidget->setVisible(fWarningsEnabled);120 m_pPaneWarning->setVisible(fWarningsEnabled); 116 121 } 117 122 } … … 145 150 CProgress progress; 146 151 QVector<KImportOptions> options; 147 if (!m_p ReinitMACsCheckBox->isChecked())152 if (!m_pCheckBoxReinitMACs->isChecked()) 148 153 options.append(KImportOptions_KeepAllMACs); 149 154 progress = m_pAppliance->ImportMachines(options); -
trunk/src/VBox/Frontends/VirtualBox/src/wizards/importappliance/UIWizardImportApp.cpp
r62493 r64683 22 22 /* Global includes: */ 23 23 # include <QDialogButtonBox> 24 # include <QLabel> 24 25 # include <QPushButton> 26 # include <QTextEdit> 25 27 # include <QTextStream> 26 28 -
trunk/src/VBox/Frontends/VirtualBox/src/wizards/importappliance/UIWizardImportAppPageBasic2.cpp
r62279 r64683 25 25 # include <QPushButton> 26 26 # include <QPointer> 27 # include <QLabel> 27 28 28 29 /* Local includes: */
Note:
See TracChangeset
for help on using the changeset viewer.