Changeset 99390 in vbox
- Timestamp:
- Apr 13, 2023 3:46:10 PM (20 months ago)
- Location:
- trunk/src/VBox/Frontends/VirtualBox/src
- Files:
-
- 10 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Frontends/VirtualBox/src/manager/UIToolPaneGlobal.cpp
r99389 r99390 166 166 /* Configure pane: */ 167 167 m_pPaneMedia->setProperty("ToolType", QVariant::fromValue(UIToolType_Media)); 168 connect(m_pPaneMedia, &UIMediumManagerWidget::sigCreateMedium, 169 this, &UIToolPaneGlobal::sigCreateMedium); 168 170 connect(m_pPaneMedia, &UIMediumManagerWidget::sigCopyMedium, 169 171 this, &UIToolPaneGlobal::sigCopyMedium); -
trunk/src/VBox/Frontends/VirtualBox/src/manager/UIToolPaneGlobal.h
r99389 r99390 61 61 signals: 62 62 63 /** Notifies listeners about creation procedure was requested. */ 64 void sigCreateMedium(); 63 65 /** Notifies listeners about copy procedure was requested for medium with specified @a uMediumId. */ 64 66 void sigCopyMedium(const QUuid &uMediumId); -
trunk/src/VBox/Frontends/VirtualBox/src/manager/UIVirtualBoxManager.cpp
r99389 r99390 79 79 #include "UIWizardImportApp.h" 80 80 #include "UIWizardNewCloudVM.h" 81 #include "UIWizardNewVD.h" 81 82 #include "UIWizardNewVM.h" 82 83 #ifdef VBOX_GUI_WITH_NETWORK_MANAGER … … 823 824 break; 824 825 } 826 } 827 828 void UIVirtualBoxManager::sltCreateMedium() 829 { 830 /* Open Create VD Wizard: */ 831 sltOpenWizard(WizardType_NewVD); 825 832 } 826 833 … … 1039 1046 m_wizards[enmType] = new UIWizardAddCloudVM(this, m_pWidget->fullGroupName()); 1040 1047 break; 1048 case WizardType_NewVD: 1049 { 1050 const QString strFolder = uiCommon().defaultFolderPathForType(UIMediumDeviceType_HardDisk); 1051 const QString strDiskName = uiCommon().findUniqueFileName(strFolder, "NewVirtualDisk"); 1052 const CGuestOSType comGuestOSType = uiCommon().virtualBox().GetGuestOSType("Other"); 1053 const qulonglong uDiskSize = comGuestOSType.GetRecommendedHDD(); 1054 m_wizards[enmType] = new UIWizardNewVD(this, 1055 strDiskName, 1056 strFolder, 1057 uDiskSize); 1058 break; 1059 } 1041 1060 case WizardType_CloneVD: 1042 1061 m_wizards[enmType] = new UIWizardCloneVD(this, m_uMediumId); … … 2279 2298 connect(m_pWidget, &UIVirtualBoxManagerWidget::sigToolTypeChange, 2280 2299 this, &UIVirtualBoxManager::sltHandleToolTypeChange); 2300 connect(m_pWidget, &UIVirtualBoxManagerWidget::sigCreateMedium, 2301 this, &UIVirtualBoxManager::sltCreateMedium); 2281 2302 connect(m_pWidget, &UIVirtualBoxManagerWidget::sigCopyMedium, 2282 2303 this, &UIVirtualBoxManager::sltCopyMedium); -
trunk/src/VBox/Frontends/VirtualBox/src/manager/UIVirtualBoxManager.h
r99389 r99390 157 157 void sltHandleToolTypeChange(); 158 158 159 /** Handles create medium request. */ 160 void sltCreateMedium(); 159 161 /** Handles copy medium request. */ 160 162 void sltCopyMedium(const QUuid &uMediumId); -
trunk/src/VBox/Frontends/VirtualBox/src/manager/UIVirtualBoxManagerWidget.cpp
r99389 r99390 672 672 if (m_pPaneChooser->isGlobalItemSelected()) 673 673 m_pPaneToolsGlobal->setActive(true); 674 connect(m_pPaneToolsGlobal, &UIToolPaneGlobal::sigCreateMedium, 675 this, &UIVirtualBoxManagerWidget::sigCreateMedium); 674 676 connect(m_pPaneToolsGlobal, &UIToolPaneGlobal::sigCopyMedium, 675 677 this, &UIVirtualBoxManagerWidget::sigCopyMedium); -
trunk/src/VBox/Frontends/VirtualBox/src/manager/UIVirtualBoxManagerWidget.h
r99389 r99390 104 104 /** @name Tools / Media pane stuff. 105 105 * @{ */ 106 /** Notifies listeners about creation procedure was requested. */ 107 void sigCreateMedium(); 106 108 /** Notifies listeners about copy procedure was requested for medium with specified @a uMediumId. */ 107 109 void sigCopyMedium(const QUuid &uMediumId); -
trunk/src/VBox/Frontends/VirtualBox/src/medium/UIMediumManager.cpp
r99389 r99390 472 472 void UIMediumManagerWidget::sltCreateMedium() 473 473 { 474 uiCommon().openMediumCreatorDialog(m_pActionPool, this, currentMediumType()); 474 /* What's with current medium type? */ 475 const UIMediumDeviceType enmMediumType = currentMediumType(); 476 477 /* Ask listener to start hard-disk creation: */ 478 if (enmMediumType == UIMediumDeviceType_HardDisk) 479 emit sigCreateMedium(); 480 else 481 uiCommon().openMediumCreatorDialog(m_pActionPool, this, currentMediumType()); 475 482 } 476 483 -
trunk/src/VBox/Frontends/VirtualBox/src/medium/UIMediumManager.h
r99389 r99390 113 113 signals: 114 114 115 /** Notifies listeners about creation procedure was requested. */ 116 void sigCreateMedium(); 115 117 /** Notifies listeners about copy procedure was requested for medium with specified @a uMediumId. */ 116 118 void sigCopyMedium(const QUuid &uMediumId); -
trunk/src/VBox/Frontends/VirtualBox/src/wizards/newvd/UIWizardNewVD.cpp
r98103 r99390 39 39 const QString &strDefaultName, 40 40 const QString &strDefaultPath, 41 qulonglong uDefaultSize, 42 WizardMode mode) 43 : UINativeWizard(pParent, WizardType_NewVD, mode, "create-virtual-hard-disk-image" /* help keyword */) 41 qulonglong uDefaultSize) 42 : UINativeWizard(pParent, WizardType_NewVD, WizardMode_Auto, "create-virtual-hard-disk-image" /* help keyword */) 44 43 , m_strDefaultName(strDefaultName) 45 44 , m_strDefaultPath(strDefaultPath) -
trunk/src/VBox/Frontends/VirtualBox/src/wizards/newvd/UIWizardNewVD.h
r98103 r99390 48 48 49 49 UIWizardNewVD(QWidget *pParent, 50 const QString &strDefaultName, const QString &strDefaultPath, 51 qulonglong uDefaultSize, WizardMode mode = WizardMode_Auto); 50 const QString &strDefaultName, 51 const QString &strDefaultPath, 52 qulonglong uDefaultSize); 52 53 53 54 bool createVirtualDisk();
Note:
See TracChangeset
for help on using the changeset viewer.