Changeset 88599 in vbox for trunk/src/VBox/Frontends
- Timestamp:
- Apr 20, 2021 9:13:59 AM (4 years ago)
- Location:
- trunk/src/VBox/Frontends/VirtualBox
- Files:
-
- 11 edited
- 2 moved
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Frontends/VirtualBox/Makefile.kmk
r88598 r88599 911 911 src/wizards/newvd/UIWizardNewVDPageFileType.h \ 912 912 src/wizards/newvd/UIWizardNewVDPageVariant.h \ 913 src/wizards/newvd/UIWizardNewVDPage Basic3.h \913 src/wizards/newvd/UIWizardNewVDPageSizeLocation.h \ 914 914 src/wizards/newvd/UIWizardNewVDPageExpert.h 915 915 … … 1449 1449 src/wizards/newvd/UIWizardNewVDPageFileType.cpp \ 1450 1450 src/wizards/newvd/UIWizardNewVDPageVariant.cpp \ 1451 src/wizards/newvd/UIWizardNewVDPage Basic3.cpp \1451 src/wizards/newvd/UIWizardNewVDPageSizeLocation.cpp \ 1452 1452 src/wizards/newvd/UIWizardNewVDPageExpert.cpp 1453 1453 -
trunk/src/VBox/Frontends/VirtualBox/src/wizards/newvd/UIWizardNewVD.cpp
r88598 r88599 24 24 #include "UIWizardNewVDPageFileType.h" 25 25 #include "UIWizardNewVDPageVariant.h" 26 #include "UIWizardNewVDPage Basic3.h"26 #include "UIWizardNewVDPageSizeLocation.h" 27 27 #include "UIWizardNewVDPageExpert.h" 28 28 #include "UIMessageCenter.h" … … 128 128 setPage(Page1, new UIWizardNewVDPageFileType); 129 129 setPage(Page2, new UIWizardNewVDPageVariant); 130 setPage(Page3, new UIWizardNewVDPage Basic3(m_strDefaultName, m_strDefaultPath, m_uDefaultSize));130 setPage(Page3, new UIWizardNewVDPageSizeLocation(m_strDefaultName, m_strDefaultPath, m_uDefaultSize)); 131 131 break; 132 132 } -
trunk/src/VBox/Frontends/VirtualBox/src/wizards/newvd/UIWizardNewVD.h
r82968 r88599 68 68 69 69 /* Who will be able to create virtual-disk: */ 70 friend class UIWizardNewVDPage Basic3;70 friend class UIWizardNewVDPageSizeLocation; 71 71 friend class UIWizardNewVDPageExpert; 72 72 -
trunk/src/VBox/Frontends/VirtualBox/src/wizards/newvd/UIWizardNewVDPageExpert.cpp
r88598 r88599 46 46 47 47 UIWizardNewVDPageExpert::UIWizardNewVDPageExpert(const QString &strDefaultName, const QString &strDefaultPath, qulonglong uDefaultSize) 48 : UIWizardNewVDPage 3(strDefaultName, strDefaultPath)48 : UIWizardNewVDPageBaseSizeLocation(strDefaultName, strDefaultPath) 49 49 , m_pFormatGroupBox(0) 50 50 , m_pVariantGroupBox(0) … … 155 155 UIWizardNewVDPageBaseFileType::retranslateWidgets(); 156 156 UIWizardNewVDPageBaseVariant::retranslateWidgets(); 157 UIWizardNewVDPage 3::retranslateWidgets();157 UIWizardNewVDPageBaseSizeLocation::retranslateWidgets(); 158 158 /* Translate widgets: */ 159 159 if (m_pLocationGroupBox) … … 217 217 218 218 /* Make sure we are passing FAT size limitation: */ 219 fResult = UIWizardNewVDPage 3::checkFATSizeLimitation(fieldImp("mediumVariant").toULongLong(),219 fResult = UIWizardNewVDPageBaseSizeLocation::checkFATSizeLimitation(fieldImp("mediumVariant").toULongLong(), 220 220 fieldImp("mediumPath").toString(), 221 221 fieldImp("mediumSize").toULongLong()); -
trunk/src/VBox/Frontends/VirtualBox/src/wizards/newvd/UIWizardNewVDPageExpert.h
r88598 r88599 25 25 #include "UIWizardNewVDPageFileType.h" 26 26 #include "UIWizardNewVDPageVariant.h" 27 #include "UIWizardNewVDPage Basic3.h"27 #include "UIWizardNewVDPageSizeLocation.h" 28 28 29 29 /* Forward declarations: */ … … 34 34 public UIWizardNewVDPageBaseFileType, 35 35 public UIWizardNewVDPageBaseVariant, 36 public UIWizardNewVDPage 336 public UIWizardNewVDPageBaseSizeLocation 37 37 { 38 38 Q_OBJECT; -
trunk/src/VBox/Frontends/VirtualBox/src/wizards/newvd/UIWizardNewVDPageFileType.cpp
r88597 r88599 24 24 #include "UIConverter.h" 25 25 #include "UIWizardNewVDPageFileType.h" 26 #include "UIWizardNewVDPage Basic3.h"26 #include "UIWizardNewVDPageSizeLocation.h" 27 27 #include "UIWizardNewVD.h" 28 28 #include "UICommon.h" … … 73 73 m_formatNames << medFormat.GetName(); 74 74 m_pFormatButtonGroup->addButton(pFormatButton, m_formatNames.size() - 1); 75 m_formatExtensions << UIWizardNewVDPage 3::defaultExtension(medFormat);75 m_formatExtensions << UIWizardNewVDPageBaseSizeLocation::defaultExtension(medFormat); 76 76 } 77 77 } -
trunk/src/VBox/Frontends/VirtualBox/src/wizards/newvd/UIWizardNewVDPageSizeLocation.cpp
r88598 r88599 1 1 /* $Id$ */ 2 2 /** @file 3 * VBox Qt GUI - UIWizardNewVDPage Basic3class implementation.3 * VBox Qt GUI - UIWizardNewVDPageSizeLocation class implementation. 4 4 */ 5 5 … … 27 27 28 28 /* GUI includes: */ 29 #include "UIWizardNewVDPage Basic3.h"29 #include "UIWizardNewVDPageSizeLocation.h" 30 30 #include "UIWizardNewVD.h" 31 31 #include "UICommon.h" … … 47 47 48 48 49 UIWizardNewVDPage 3::UIWizardNewVDPage3(const QString &strDefaultName, const QString &strDefaultPath)49 UIWizardNewVDPageBaseSizeLocation::UIWizardNewVDPageBaseSizeLocation(const QString &strDefaultName, const QString &strDefaultPath) 50 50 : m_strDefaultName(strDefaultName.isEmpty() ? QString("NewVirtualDisk1") : strDefaultName) 51 51 , m_strDefaultPath(strDefaultPath) … … 61 61 } 62 62 63 UIWizardNewVDPage 3::UIWizardNewVDPage3()63 UIWizardNewVDPageBaseSizeLocation::UIWizardNewVDPageBaseSizeLocation() 64 64 : m_uMediumSizeMin(_4M) 65 65 , m_uMediumSizeMax(uiCommon().virtualBox().GetSystemProperties().GetInfoVDSize()) … … 73 73 } 74 74 75 void UIWizardNewVDPage 3::onSelectLocationButtonClicked()75 void UIWizardNewVDPageBaseSizeLocation::onSelectLocationButtonClicked() 76 76 { 77 77 /* Get current folder and filename: */ … … 130 130 131 131 /* static */ 132 QString UIWizardNewVDPage 3::toFileName(const QString &strName, const QString &strExtension)132 QString UIWizardNewVDPageBaseSizeLocation::toFileName(const QString &strName, const QString &strExtension) 133 133 { 134 134 /* Convert passed name to native separators (it can be full, actually): */ … … 149 149 150 150 /* static */ 151 QString UIWizardNewVDPage 3::absoluteFilePath(const QString &strFileName, const QString &strPath)151 QString UIWizardNewVDPageBaseSizeLocation::absoluteFilePath(const QString &strFileName, const QString &strPath) 152 152 { 153 153 /* Wrap file-info around received file name: */ … … 164 164 165 165 /*static */ 166 QString UIWizardNewVDPage 3::absoluteFilePath(const QString &strFileName, const QString &strPath, const QString &strExtension)166 QString UIWizardNewVDPageBaseSizeLocation::absoluteFilePath(const QString &strFileName, const QString &strPath, const QString &strExtension) 167 167 { 168 168 QString strFilePath = absoluteFilePath(strFileName, strPath); … … 173 173 174 174 /* static */ 175 QString UIWizardNewVDPage 3::defaultExtension(const CMediumFormat &mediumFormatRef)175 QString UIWizardNewVDPageBaseSizeLocation::defaultExtension(const CMediumFormat &mediumFormatRef) 176 176 { 177 177 if (!mediumFormatRef.isNull()) … … 191 191 192 192 /* static */ 193 bool UIWizardNewVDPage 3::checkFATSizeLimitation(const qulonglong uVariant, const QString &strMediumPath, const qulonglong uSize)193 bool UIWizardNewVDPageBaseSizeLocation::checkFATSizeLimitation(const qulonglong uVariant, const QString &strMediumPath, const qulonglong uSize) 194 194 { 195 195 /* If the hard disk is split into 2GB parts then no need to make further checks: */ … … 213 213 } 214 214 215 QString UIWizardNewVDPage 3::mediumPath() const215 QString UIWizardNewVDPageBaseSizeLocation::mediumPath() const 216 216 { 217 217 if (!m_pLocationEditor) … … 220 220 } 221 221 222 qulonglong UIWizardNewVDPage 3::mediumSize() const222 qulonglong UIWizardNewVDPageBaseSizeLocation::mediumSize() const 223 223 { 224 224 return m_pMediumSizeEditor ? m_pMediumSizeEditor->mediumSize() : 0; 225 225 } 226 226 227 void UIWizardNewVDPage 3::setMediumSize(qulonglong uMediumSize)227 void UIWizardNewVDPageBaseSizeLocation::setMediumSize(qulonglong uMediumSize) 228 228 { 229 229 if (m_pMediumSizeEditor) … … 232 232 233 233 /* static */ 234 QString UIWizardNewVDPage 3::stripFormatExtension(const QString &strFileName, const QStringList &formatExtensions)234 QString UIWizardNewVDPageBaseSizeLocation::stripFormatExtension(const QString &strFileName, const QStringList &formatExtensions) 235 235 { 236 236 QString result(strFileName); … … 249 249 } 250 250 251 void UIWizardNewVDPage 3::updateLocationEditorAfterFormatChange(const CMediumFormat &mediumFormat, const QStringList &formatExtensions)251 void UIWizardNewVDPageBaseSizeLocation::updateLocationEditorAfterFormatChange(const CMediumFormat &mediumFormat, const QStringList &formatExtensions) 252 252 { 253 253 /* Compose virtual-disk extension: */ … … 268 268 } 269 269 270 void UIWizardNewVDPage 3::retranslateWidgets()270 void UIWizardNewVDPageBaseSizeLocation::retranslateWidgets() 271 271 { 272 272 if (m_pLocationOpenButton) … … 284 284 } 285 285 286 UIWizardNewVDPage Basic3::UIWizardNewVDPageBasic3(const QString &strDefaultName, const QString &strDefaultPath, qulonglong uDefaultSize)287 : UIWizardNewVDPage 3(strDefaultName, strDefaultPath)286 UIWizardNewVDPageSizeLocation::UIWizardNewVDPageSizeLocation(const QString &strDefaultName, const QString &strDefaultPath, qulonglong uDefaultSize) 287 : UIWizardNewVDPageBaseSizeLocation(strDefaultName, strDefaultPath) 288 288 { 289 289 /* Create widgets: */ … … 313 313 314 314 /* Setup connections: */ 315 connect(m_pLocationEditor, &QLineEdit::textChanged, this, &UIWizardNewVDPage Basic3::completeChanged);316 connect(m_pLocationOpenButton, &QIToolButton::clicked, this, &UIWizardNewVDPage Basic3::sltSelectLocationButtonClicked);317 connect(m_pMediumSizeEditor, &UIMediumSizeEditor::sigSizeChanged, this, &UIWizardNewVDPage Basic3::completeChanged);315 connect(m_pLocationEditor, &QLineEdit::textChanged, this, &UIWizardNewVDPageSizeLocation::completeChanged); 316 connect(m_pLocationOpenButton, &QIToolButton::clicked, this, &UIWizardNewVDPageSizeLocation::sltSelectLocationButtonClicked); 317 connect(m_pMediumSizeEditor, &UIMediumSizeEditor::sigSizeChanged, this, &UIWizardNewVDPageSizeLocation::completeChanged); 318 318 319 319 /* Register fields: */ … … 322 322 } 323 323 324 void UIWizardNewVDPage Basic3::sltSelectLocationButtonClicked()324 void UIWizardNewVDPageSizeLocation::sltSelectLocationButtonClicked() 325 325 { 326 326 /* Call to base-class: */ … … 328 328 } 329 329 330 void UIWizardNewVDPage Basic3::retranslateUi()330 void UIWizardNewVDPageSizeLocation::retranslateUi() 331 331 { 332 332 retranslateWidgets(); … … 335 335 } 336 336 337 void UIWizardNewVDPage Basic3::initializePage()337 void UIWizardNewVDPageSizeLocation::initializePage() 338 338 { 339 339 /* Translate page: */ … … 347 347 } 348 348 349 bool UIWizardNewVDPage Basic3::isComplete() const349 bool UIWizardNewVDPageSizeLocation::isComplete() const 350 350 { 351 351 if (!m_pLocationEditor) … … 356 356 } 357 357 358 bool UIWizardNewVDPage Basic3::validatePage()358 bool UIWizardNewVDPageSizeLocation::validatePage() 359 359 { 360 360 /* Initial result: */ -
trunk/src/VBox/Frontends/VirtualBox/src/wizards/newvd/UIWizardNewVDPageSizeLocation.h
r88598 r88599 1 1 /* $Id$ */ 2 2 /** @file 3 * VBox Qt GUI - UIWizardNewVDPage Basic3class declaration.3 * VBox Qt GUI - UIWizardNewVDPageSizeLocation class declaration. 4 4 */ 5 5 … … 16 16 */ 17 17 18 #ifndef FEQT_INCLUDED_SRC_wizards_newvd_UIWizardNewVDPage Basic3_h19 #define FEQT_INCLUDED_SRC_wizards_newvd_UIWizardNewVDPage Basic3_h18 #ifndef FEQT_INCLUDED_SRC_wizards_newvd_UIWizardNewVDPageSizeLocation_h 19 #define FEQT_INCLUDED_SRC_wizards_newvd_UIWizardNewVDPageSizeLocation_h 20 20 #ifndef RT_WITHOUT_PRAGMA_ONCE 21 21 # pragma once … … 35 35 36 36 /* 3rd page of the New Virtual Hard Drive wizard (base part): */ 37 class SHARED_LIBRARY_STUFF UIWizardNewVDPage 3: public UIWizardPageBase37 class SHARED_LIBRARY_STUFF UIWizardNewVDPageBaseSizeLocation : public UIWizardPageBase 38 38 { 39 39 … … 46 46 protected: 47 47 48 UIWizardNewVDPage 3(const QString &strDefaultName, const QString &strDefaultPath);49 UIWizardNewVDPage 3();48 UIWizardNewVDPageBaseSizeLocation(const QString &strDefaultName, const QString &strDefaultPath); 49 UIWizardNewVDPageBaseSizeLocation(); 50 50 51 51 void onSelectLocationButtonClicked(); … … 89 89 90 90 /* 3rd page of the New Virtual Hard Drive wizard (basic extension): */ 91 class SHARED_LIBRARY_STUFF UIWizardNewVDPage Basic3 : public UIWizardPage, public UIWizardNewVDPage391 class SHARED_LIBRARY_STUFF UIWizardNewVDPageSizeLocation : public UIWizardPage, public UIWizardNewVDPageBaseSizeLocation 92 92 { 93 93 Q_OBJECT; … … 97 97 public: 98 98 99 UIWizardNewVDPage Basic3(const QString &strDefaultName, const QString &strDefaultPath, qulonglong uDefaultSize);99 UIWizardNewVDPageSizeLocation(const QString &strDefaultName, const QString &strDefaultPath, qulonglong uDefaultSize); 100 100 101 101 protected: … … 120 120 121 121 122 #endif /* !FEQT_INCLUDED_SRC_wizards_newvd_UIWizardNewVDPage Basic3_h */122 #endif /* !FEQT_INCLUDED_SRC_wizards_newvd_UIWizardNewVDPageSizeLocation_h */ -
trunk/src/VBox/Frontends/VirtualBox/src/wizards/newvm/UIWizardNewVMPageDisk.cpp
r88598 r88599 311 311 UIWizardNewVDPageBaseFileType::retranslateWidgets(); 312 312 UIWizardNewVDPageBaseVariant::retranslateWidgets(); 313 UIWizardNewVDPage 3::retranslateWidgets();313 UIWizardNewVDPageBaseSizeLocation::retranslateWidgets(); 314 314 } 315 315 … … 399 399 } 400 400 /* Check FAT size limitation of the host hard drive: */ 401 fResult = UIWizardNewVDPage 3::checkFATSizeLimitation(fieldImp("mediumVariant").toULongLong(),401 fResult = UIWizardNewVDPageBaseSizeLocation::checkFATSizeLimitation(fieldImp("mediumVariant").toULongLong(), 402 402 fieldImp("mediumPath").toString(), 403 403 fieldImp("mediumSize").toULongLong()); -
trunk/src/VBox/Frontends/VirtualBox/src/wizards/newvm/UIWizardNewVMPageDisk.h
r88598 r88599 29 29 #include "UIWizardNewVDPageFileType.h" 30 30 #include "UIWizardNewVDPageVariant.h" 31 #include "UIWizardNewVDPage Basic3.h"31 #include "UIWizardNewVDPageSizeLocation.h" 32 32 #include "UIWizardNewVM.h" 33 33 … … 82 82 public UIWizardNewVDPageBaseFileType, 83 83 public UIWizardNewVDPageBaseVariant, 84 public UIWizardNewVDPage 384 public UIWizardNewVDPageBaseSizeLocation 85 85 { 86 86 Q_OBJECT; -
trunk/src/VBox/Frontends/VirtualBox/src/wizards/newvm/UIWizardNewVMPageExpert.cpp
r88598 r88599 160 160 UIWizardNewVDPageBaseFileType::retranslateWidgets(); 161 161 UIWizardNewVDPageBaseVariant::retranslateWidgets(); 162 UIWizardNewVDPage 3::retranslateWidgets();162 UIWizardNewVDPageBaseSizeLocation::retranslateWidgets(); 163 163 164 164 if (m_pToolBox) … … 489 489 } 490 490 /* Check FAT size limitation of the host hard drive: */ 491 fResult = UIWizardNewVDPage 3::checkFATSizeLimitation(fieldImp("mediumVariant").toULongLong(),491 fResult = UIWizardNewVDPageBaseSizeLocation::checkFATSizeLimitation(fieldImp("mediumVariant").toULongLong(), 492 492 fieldImp("mediumPath").toString(), 493 493 fieldImp("mediumSize").toULongLong()); -
trunk/src/VBox/Frontends/VirtualBox/src/wizards/newvm/UIWizardNewVMPageExpert.h
r88598 r88599 30 30 #include "UIWizardNewVMPageHardware.h" 31 31 #include "UIWizardNewVMPageDisk.h" 32 #include "UIWizardNewVDPage Basic3.h"32 #include "UIWizardNewVDPageSizeLocation.h" 33 33 34 34 /* Forward declarations: */ … … 44 44 public UIWizardNewVDPageBaseFileType, 45 45 public UIWizardNewVDPageBaseVariant, 46 public UIWizardNewVDPage 346 public UIWizardNewVDPageBaseSizeLocation 47 47 { 48 48 -
trunk/src/VBox/Frontends/VirtualBox/src/wizards/newvm/UIWizardNewVMPageHardware.cpp
r88577 r88599 29 29 #include "UIWizardNewVM.h" 30 30 #include "UIWizardNewVMPageHardware.h" 31 #include "UIWizardNewVDPage Basic3.h"31 #include "UIWizardNewVDPageSizeLocation.h" 32 32 33 33 /* COM includes: */
Note:
See TracChangeset
for help on using the changeset viewer.