Changeset 72215 in vbox for trunk/src/VBox/Frontends/VirtualBox
- Timestamp:
- May 15, 2018 2:20:58 PM (7 years ago)
- svn:sync-xref-src-repo-rev:
- 122654
- Location:
- trunk/src/VBox/Frontends/VirtualBox/src
- Files:
-
- 10 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Frontends/VirtualBox/src/selector/UISelectorWindow.cpp
r71644 r72215 682 682 /* Use the "safe way" to open stack of Mac OS X Sheets: */ 683 683 QWidget *pWizardParent = windowManager().realParentWindow(this); 684 UISafePointerWizard pWizard = new UIWizardCloneVM(pWizardParent, pItem->machine()); 684 685 const QStringList &machineGroupNames = pItem->groups(); 686 QString strGroup = !machineGroupNames.isEmpty() ? machineGroupNames.at(0) : QString(); 687 UISafePointerWizard pWizard = new UIWizardCloneVM(pWizardParent, pItem->machine(), strGroup); 685 688 windowManager().registerNewParent(pWizard, pWizardParent); 686 689 pWizard->prepare(); … … 2772 2775 return false; 2773 2776 } 2774 -
trunk/src/VBox/Frontends/VirtualBox/src/selector/UISnapshotPane.cpp
r71460 r72215 1838 1838 1839 1839 /* Show Clone VM wizard: */ 1840 UISafePointerWizard pWizard = new UIWizardCloneVM(this, comMachine, comSnapshot);1840 UISafePointerWizard pWizard = new UIWizardCloneVM(this, comMachine, QString(), comSnapshot); 1841 1841 pWizard->prepare(); 1842 1842 pWizard->exec(); … … 1908 1908 1909 1909 #include "UISnapshotPane.moc" 1910 -
trunk/src/VBox/Frontends/VirtualBox/src/selector/UIVMItem.cpp
r71355 r72215 215 215 } 216 216 217 const QStringList& UIVMItem::groups() 218 { 219 return m_groups; 220 } 221 217 222 bool UIVMItem::recache() 218 223 { … … 241 246 if (m_pixmap.isNull()) 242 247 m_pixmap = vboxGlobal().vmGuestOSTypePixmapDefault(m_strOSTypeId, &m_logicalPixmapSize); 248 249 m_groups = m_machine.GetGroups().toList(); 243 250 244 251 if ( m_machineState == KMachineState_PoweredOff … … 291 298 292 299 m_pixmap = vboxGlobal().vmGuestOSTypePixmapDefault("Other", &m_logicalPixmapSize); 293 300 m_groups.clear(); 294 301 m_pid = (ULONG) ~0; 295 302 /// @todo Remove. See @c todo in #switchTo() below. … … 543 550 return m_type; 544 551 } 545 -
trunk/src/VBox/Frontends/VirtualBox/src/selector/UIVMItem.h
r69500 r72215 65 65 66 66 QString settingsFile() const { return m_strSettingsFile; } 67 67 const QStringList &groups(); 68 68 bool recache(); 69 69 … … 111 111 bool m_fHasDetails; 112 112 113 QStringList m_groups; 113 114 /** Holds configuration access level. */ 114 115 ConfigurationAccessLevel m_configurationAccessLevel; … … 140 141 141 142 #endif /* __UIVMItem_h__ */ 142 -
trunk/src/VBox/Frontends/VirtualBox/src/wizards/clonevm/UIWizardCloneVM.cpp
r72199 r72215 36 36 37 37 38 UIWizardCloneVM::UIWizardCloneVM(QWidget *pParent, const CMachine &machine, CSnapshot snapshot /* = CSnapshot() */) 38 UIWizardCloneVM::UIWizardCloneVM(QWidget *pParent, const CMachine &machine, 39 const QString &strGroup, CSnapshot snapshot /* = CSnapshot() */) 39 40 : UIWizard(pParent, WizardType_CloneVM) 40 41 , m_machine(machine) 41 42 , m_snapshot(snapshot) 43 , m_strGroup(strGroup) 42 44 { 43 45 #ifndef VBOX_WS_MAC … … 54 56 /* Get the clone name: */ 55 57 QString strName = field("cloneName").toString(); 56 /* Get the clone path: */ 57 QString strPath = field("clonePath").toString(); 58 /* Get the clone setting file path: */ 58 59 QString strSettingsFile = field("cloneFilePath").toString(); 59 60 … … 185 186 case WizardMode_Basic: 186 187 { 187 setPage(Page1, new UIWizardCloneVMPageBasic1(m_machine.GetName(), strDefaultMachineFolder ));188 setPage(Page1, new UIWizardCloneVMPageBasic1(m_machine.GetName(), strDefaultMachineFolder, m_strGroup)); 188 189 setPage(Page2, new UIWizardCloneVMPageBasic2(m_snapshot.isNull())); 189 190 if (m_machine.GetSnapshotCount() > 0) … … 196 197 strDefaultMachineFolder, 197 198 m_snapshot.isNull(), 198 m_snapshot.isNull() ? false : m_snapshot.GetChildrenCount() > 0)); 199 m_snapshot.isNull() ? false : m_snapshot.GetChildrenCount() > 0, 200 m_strGroup)); 199 201 break; 200 202 } -
trunk/src/VBox/Frontends/VirtualBox/src/wizards/clonevm/UIWizardCloneVM.h
r69500 r72215 49 49 50 50 /* Constructor: */ 51 UIWizardCloneVM(QWidget *pParent, const CMachine &machine, CSnapshot snapshot = CSnapshot()); 51 UIWizardCloneVM(QWidget *pParent, const CMachine &machine, 52 const QString &strGroup, CSnapshot snapshot = CSnapshot()); 52 53 53 54 protected: … … 70 71 71 72 /* Variables: */ 72 CMachine m_machine;73 CMachine m_machine; 73 74 CSnapshot m_snapshot; 75 QString m_strGroup; 74 76 }; 75 77 76 78 #endif // __UIWizardCloneVM_h__ 77 -
trunk/src/VBox/Frontends/VirtualBox/src/wizards/clonevm/UIWizardCloneVMPageBasic1.cpp
r72199 r72215 38 38 39 39 40 UIWizardCloneVMPage1::UIWizardCloneVMPage1(const QString &strOriginalName, const QString &strDefaultPath )40 UIWizardCloneVMPage1::UIWizardCloneVMPage1(const QString &strOriginalName, const QString &strDefaultPath, const QString &strGroup) 41 41 : m_strOriginalName(strOriginalName) 42 42 , m_strDefaultPath(strDefaultPath) 43 , m_strGroup(strGroup) 43 44 { 44 45 } … … 88 89 CVirtualBox vbox = vboxGlobal().virtualBox(); 89 90 setCloneFilePath(vbox.ComposeMachineFilename(m_pNamePathSelector->name(), 90 QString::null,91 m_strGroup, 91 92 QString::null, 92 93 m_pNamePathSelector->path())); … … 97 98 } 98 99 99 UIWizardCloneVMPageBasic1::UIWizardCloneVMPageBasic1(const QString &strOriginalName, const QString &strDefaultPath )100 : UIWizardCloneVMPage1(strOriginalName, strDefaultPath )100 UIWizardCloneVMPageBasic1::UIWizardCloneVMPageBasic1(const QString &strOriginalName, const QString &strDefaultPath, const QString &strGroup) 101 : UIWizardCloneVMPage1(strOriginalName, strDefaultPath, strGroup) 101 102 { 102 103 /* Create widgets: */ … … 135 136 /* Register fields: */ 136 137 registerField("cloneName", this, "cloneName"); 137 registerField("clone Path", this, "clonePath");138 registerField("cloneFilePath", this, "cloneFilePath"); 138 139 registerField("reinitMACs", this, "reinitMACs"); 139 140 } -
trunk/src/VBox/Frontends/VirtualBox/src/wizards/clonevm/UIWizardCloneVMPageBasic1.h
r72199 r72215 33 33 protected: 34 34 35 UIWizardCloneVMPage1(const QString &strOriginalName, const QString &strDefaultPath );35 UIWizardCloneVMPage1(const QString &strOriginalName, const QString &strDefaultPath, const QString &strGroup); 36 36 37 37 QString cloneName() const; … … 50 50 QString m_strOriginalName; 51 51 QString m_strDefaultPath; 52 QString m_strGroup; 52 53 /** Full, non-native path of the clone machines setting file. Generated by CVirtualBox::ComposeMachineFilename(...) */ 53 54 QString m_strCloneFilePath; … … 65 66 Q_OBJECT; 66 67 Q_PROPERTY(QString cloneName READ cloneName WRITE setCloneName); 67 Q_PROPERTY(QString clonePath READ clonePath WRITE setClonePath);68 68 Q_PROPERTY(QString cloneFilePath READ cloneFilePath WRITE setCloneFilePath); 69 69 Q_PROPERTY(bool reinitMACs READ isReinitMACsChecked); … … 71 71 public: 72 72 73 UIWizardCloneVMPageBasic1(const QString &strOriginalName, const QString &strDefaultPath );73 UIWizardCloneVMPageBasic1(const QString &strOriginalName, const QString &strDefaultPath, const QString &strGroup); 74 74 75 75 private slots: -
trunk/src/VBox/Frontends/VirtualBox/src/wizards/clonevm/UIWizardCloneVMPageExpert.cpp
r72199 r72215 36 36 37 37 38 UIWizardCloneVMPageExpert::UIWizardCloneVMPageExpert(const QString &strOriginalName, const QString &strDefaultPath, bool fAdditionalInfo, bool fShowChildsOption) 39 : UIWizardCloneVMPage1(strOriginalName, strDefaultPath) 38 UIWizardCloneVMPageExpert::UIWizardCloneVMPageExpert(const QString &strOriginalName, const QString &strDefaultPath, 39 bool fAdditionalInfo, bool fShowChildsOption, const QString &strGroup) 40 : UIWizardCloneVMPage1(strOriginalName, strDefaultPath, strGroup) 40 41 , UIWizardCloneVMPage2(fAdditionalInfo) 41 42 , UIWizardCloneVMPage3(fShowChildsOption) … … 117 118 /* Register fields: */ 118 119 registerField("cloneName", this, "cloneName"); 119 registerField("clone Path", this, "clonePath");120 registerField("cloneFilePath", this, "cloneFilePath"); 120 121 registerField("reinitMACs", this, "reinitMACs"); 121 122 registerField("linkedClone", this, "linkedClone"); -
trunk/src/VBox/Frontends/VirtualBox/src/wizards/clonevm/UIWizardCloneVMPageExpert.h
r72199 r72215 35 35 Q_OBJECT; 36 36 Q_PROPERTY(QString cloneName READ cloneName WRITE setCloneName); 37 Q_PROPERTY(QString clone Path READ clonePath WRITE setClonePath);37 Q_PROPERTY(QString cloneFilePath READ cloneFilePath WRITE setCloneFilePath); 38 38 Q_PROPERTY(bool reinitMACs READ isReinitMACsChecked); 39 39 Q_PROPERTY(bool linkedClone READ isLinkedClone); … … 44 44 /* Constructor: */ 45 45 UIWizardCloneVMPageExpert(const QString &strOriginalName, const QString &strDefaultPath, 46 bool fAdditionalInfo, bool fShowChildsOption );46 bool fAdditionalInfo, bool fShowChildsOption, const QString &strGroup); 47 47 48 48 private slots:
Note:
See TracChangeset
for help on using the changeset viewer.