Changeset 83907 in vbox for trunk/src/VBox/Frontends
- Timestamp:
- Apr 21, 2020 5:45:43 PM (5 years ago)
- svn:sync-xref-src-repo-rev:
- 137444
- Location:
- trunk/src/VBox/Frontends/VirtualBox/src/manager
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Frontends/VirtualBox/src/manager/UIVirtualMachineItemCloud.cpp
r83755 r83907 59 59 { 60 60 QTimer::singleShot(fDelayed ? 10000 : 0, this, SLOT(sltCreateGetCloudInstanceInfoTask())); 61 }62 63 void UIVirtualMachineItemCloud::pause(QWidget *pParent)64 {65 pauseOrResume(true /* pause? */, pParent);66 }67 68 void UIVirtualMachineItemCloud::resume(QWidget *pParent)69 {70 pauseOrResume(false /* pause? */, pParent);71 }72 73 void UIVirtualMachineItemCloud::pauseOrResume(bool fPause, QWidget *pParent)74 {75 /* Execute async method: */76 CProgress comProgress;77 if (fPause)78 comProgress = m_comCloudMachine.PowerDown();79 else80 comProgress = m_comCloudMachine.PowerUp();81 if (!m_comCloudMachine.isOk())82 msgCenter().cannotAcquireCloudMachineParameter(m_comCloudMachine);83 else84 {85 /* Show progress: */86 /// @todo use proper pause icon87 if (fPause)88 msgCenter().showModalProgressDialog(comProgress, UICommon::tr("Pause instance ..."),89 ":/progress_reading_appliance_90px.png", pParent, 0);90 else91 msgCenter().showModalProgressDialog(comProgress, UICommon::tr("Start instance ..."),92 ":/progress_start_90px.png", pParent, 0);93 if (!comProgress.isOk() || comProgress.GetResultCode() != 0)94 msgCenter().cannotAcquireCloudClientParameter(comProgress);95 else96 updateInfoAsync(false /* delayed? */);97 }98 61 } 99 62 -
trunk/src/VBox/Frontends/VirtualBox/src/manager/UIVirtualMachineItemCloud.h
r83755 r83907 74 74 /** Updates cloud VM info async way, @a fDelayed if requested or instant otherwise. */ 75 75 void updateInfoAsync(bool fDelayed); 76 77 /** Puts cloud VM on pause.78 * @param pWidget Brings parent widget to show messages according to. */79 void pause(QWidget *pParent);80 /** Resumes cloud VM execution.81 * @param pWidget Brings parent widget to show messages according to. */82 void resume(QWidget *pParent);83 /** Wrapper to handle two tasks above.84 * @param fPause Brings whether cloud VM should be paused or resumed otherwise.85 * @param pWidget Brings parent widget to show messages according to. */86 void pauseOrResume(bool fPause, QWidget *pParent);87 76 /** @} */ 88 77
Note:
See TracChangeset
for help on using the changeset viewer.