Changeset 100094 in vbox
- Timestamp:
- Jun 7, 2023 1:30:53 PM (18 months ago)
- Location:
- trunk/src/VBox/Frontends/VirtualBox/src
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Frontends/VirtualBox/src/globals/UICommon.cpp
r100064 r100094 1675 1675 break; 1676 1676 case UIMediumDeviceType_DVD: 1677 uMediumId = UIVisoCreator Widget::createViso(pActionPool, pParent, strDefaultFolder, strMachineName);1677 uMediumId = UIVisoCreatorDialog::createViso(pActionPool, pParent, strDefaultFolder, strMachineName); 1678 1678 break; 1679 1679 case UIMediumDeviceType_Floppy: … … 1908 1908 } 1909 1909 else if(target.type == UIMediumTarget::UIMediumTargetType_CreateAdHocVISO) 1910 uMediumID = UIVisoCreator Widget::createViso(pActionPool, windowManager().mainWindowShown(),1910 uMediumID = UIVisoCreatorDialog::createViso(pActionPool, windowManager().mainWindowShown(), 1911 1911 strMachineFolder, comConstMachine.GetName()); 1912 1912 -
trunk/src/VBox/Frontends/VirtualBox/src/medium/viso/UIVisoCreator.cpp
r100093 r100094 28 28 /* Qt includes: */ 29 29 #include <QGridLayout> 30 #include <QLabel> 30 31 #include <QMenuBar> 31 32 #include <QPushButton> 32 33 #include <QStyle> 34 #include <QStatusBar> 33 35 #include <QTextStream> 34 36 … … 62 64 63 65 UIVisoCreatorWidget::UIVisoCreatorWidget(UIActionPool *pActionPool, QWidget *pParent, 64 bool fShowToolBar, const QString& strMachineName /* = QString() */)66 bool fShowToolBar, const QString& strMachineName /* = QString() */) 65 67 : QIWithRetranslateUI<QWidget>(pParent) 66 68 , m_pActionConfiguration(0) … … 78 80 , m_pVerticalToolBar(0) 79 81 , m_pMainMenu(0) 80 , m_strMachineName(strMachineName)81 82 , m_pCreatorOptionsPanel(0) 82 83 , m_pConfigurationPanel(0) … … 528 529 529 530 /* static */ 530 QUuid UIVisoCreator Widget::createViso(UIActionPool *pActionPool, QWidget *pParent,531 QUuid UIVisoCreatorDialog::createViso(UIActionPool *pActionPool, QWidget *pParent, 531 532 const QString &strDefaultFolder /* = QString() */, 532 533 const QString &strMachineName /* = QString() */) … … 585 586 UIVisoCreatorDialog::UIVisoCreatorDialog(UIActionPool *pActionPool, QWidget *pParent, const QString& strMachineName /* = QString() */) 586 587 : QIWithRetranslateUI<QIWithRestorableGeometry<QIMainDialog> >(pParent) 587 , m_strMachineName(strMachineName)588 588 , m_pVisoCreatorWidget(0) 589 589 , m_pButtonBox(0) 590 , m_pStatusBar(0) 591 , m_pStatusLabel(0) 590 592 , m_pActionPool(pActionPool) 591 593 , m_iGeometrySaveTimerId(-1) … … 594 596 we manage escape key here with special casing: */ 595 597 setRejectByEscape(false); 596 prepareWidgets( );598 prepareWidgets(strMachineName); 597 599 prepareConnections(); 598 600 loadSettings(); … … 633 635 } 634 636 635 void UIVisoCreatorDialog::prepareWidgets( )637 void UIVisoCreatorDialog::prepareWidgets(const QString &strMachineName) 636 638 { 637 639 QWidget *pCentralWidget = new QWidget; … … 641 643 642 644 643 m_pVisoCreatorWidget = new UIVisoCreatorWidget(m_pActionPool, this, true /* show toolbar */, m_strMachineName);645 m_pVisoCreatorWidget = new UIVisoCreatorWidget(m_pActionPool, this, true /* show toolbar */, strMachineName); 644 646 if (m_pVisoCreatorWidget) 645 647 { … … 665 667 666 668 uiCommon().setHelpKeyword(m_pButtonBox->button(QIDialogButtonBox::Help), "create-optical-disk-image"); 669 } 670 671 m_pStatusLabel = new QLabel; 672 m_pStatusBar = new QStatusBar(this); 673 if (m_pButtonBox && m_pStatusLabel) 674 { 675 pMainLayout->addWidget(m_pStatusBar); 676 m_pStatusBar->addPermanentWidget(m_pStatusLabel); 667 677 } 668 678 retranslateUi(); -
trunk/src/VBox/Frontends/VirtualBox/src/medium/viso/UIVisoCreator.h
r100093 r100094 43 43 44 44 /* Forward declarations: */ 45 class QGridLayout; 46 class QLabel; 45 47 class QMenu; 46 class Q GridLayout;48 class QStatusBar; 47 49 class QIDialogButtonBox; 48 class UIDialogPanel;49 50 class QIToolBar; 50 51 class UIActionPool; 52 class UIDialogPanel; 51 53 class UIVisoHostBrowser; 52 54 class UIVisoContentBrowser; … … 65 67 void sigSetCancelButtonShortCut(QKeySequence keySequence); 66 68 void sigVisoNameChanged(const QString &strVisoName); 69 void sigVisoFilePathChanged(const QString &strPath); 67 70 68 71 public: … … 79 82 void setCurrentPath(const QString &strPath); 80 83 QMenu *menu() const; 81 82 /** Creates a VISO by using the VISO creator dialog.83 * @param pParent Passes the dialog parent.84 * @param strDefaultFolder Passes the folder to save the VISO file.85 * @param strMachineName Passes the name of the machine,86 * returns the UUID of the created medium or a null QUuid. */87 static QUuid createViso(UIActionPool *pActionPool, QWidget *pParent,88 const QString &strDefaultFolder = QString(),89 const QString &strMachineName = QString());90 84 91 85 #ifdef VBOX_WS_MAC … … 176 170 BrowserOptions m_browserOptions; 177 171 QMenu *m_pMainMenu; 178 QString m_strMachineName;179 172 UIVisoCreatorOptionsPanel *m_pCreatorOptionsPanel; 180 173 UIVisoConfigurationPanel *m_pConfigurationPanel; … … 200 193 void setCurrentPath(const QString &strPath); 201 194 195 /** Creates a VISO by using the VISO creator dialog. 196 * @param pParent Passes the dialog parent. 197 * @param strDefaultFolder Passes the folder to save the VISO file. 198 * @param strMachineName Passes the name of the machine, 199 * returns the UUID of the created medium or a null QUuid. */ 200 static QUuid createViso(UIActionPool *pActionPool, QWidget *pParent, 201 const QString &strDefaultFolder = QString(), 202 const QString &strMachineName = QString()); 203 202 204 protected: 203 205 … … 210 212 211 213 private: 212 void prepareWidgets( );214 void prepareWidgets(const QString &strMachineName); 213 215 void prepareConnections(); 214 216 virtual void retranslateUi() final override; … … 217 219 void updateWindowTitle(); 218 220 219 QString m_strMachineName;220 221 UIVisoCreatorWidget *m_pVisoCreatorWidget; 221 QIDialogButtonBox *m_pButtonBox; 222 QIDialogButtonBox *m_pButtonBox; 223 QStatusBar *m_pStatusBar; 224 QLabel *m_pStatusLabel; 222 225 QPointer<UIActionPool> m_pActionPool; 223 226 int m_iGeometrySaveTimerId;
Note:
See TracChangeset
for help on using the changeset viewer.