Changeset 98875 in vbox for trunk/src/VBox/Frontends/VirtualBox
- Timestamp:
- Mar 8, 2023 9:40:48 AM (2 years ago)
- Location:
- trunk/src/VBox/Frontends/VirtualBox/src
- Files:
-
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Frontends/VirtualBox/src/guestctrl/UIGuestControlTreeItem.cpp
r98103 r98875 234 234 void UIGuestSessionTreeItem::sltGuestProcessUnregistered(CGuestProcess guestProcess) 235 235 { 236 if (!UIGuestProcessControlWidget:: m_fDeleteAfterUnregister)236 if (!UIGuestProcessControlWidget::s_fDeleteAfterUnregister) 237 237 return; 238 238 for (int i = 0; i < childCount(); ++i) … … 342 342 processStatus != KProcessStatus_Paused) 343 343 { 344 if (UIGuestProcessControlWidget:: m_fDeleteAfterUnregister)344 if (UIGuestProcessControlWidget::s_fDeleteAfterUnregister) 345 345 this->deleteLater(); 346 346 } -
trunk/src/VBox/Frontends/VirtualBox/src/guestctrl/UIGuestProcessControlDialog.cpp
r98647 r98875 31 31 32 32 /* GUI includes: */ 33 #include "UI DesktopWidgetWatchdog.h"33 #include "UICommon.h" 34 34 #include "UIExtraDataManager.h" 35 35 #include "UIIconPool.h" 36 36 #include "UIGuestControlConsole.h" 37 37 #include "UIGuestProcessControlDialog.h" 38 #include "UICommon.h"39 38 #include "UIMachine.h" 40 39 #include "UISession.h" 41 #ifdef VBOX_WS_MAC42 # include "VBoxUtils-darwin.h"43 #endif44 40 45 41 … … 48 44 *********************************************************************************************************************************/ 49 45 50 UIGuestProcessControlDialogFactory::UIGuestProcessControlDialogFactory(UIMachine *pMachine /* = 0 */) 51 : m_pMachine(pMachine) 46 UIGuestProcessControlDialogFactory::UIGuestProcessControlDialogFactory() 52 47 { 53 48 } … … 55 50 void UIGuestProcessControlDialogFactory::create(QIManagerDialog *&pDialog, QWidget *pCenterWidget) 56 51 { 57 AssertPtrReturnVoid(m_pMachine); 58 pDialog = new UIGuestProcessControlDialog(pCenterWidget, m_pMachine); 52 pDialog = new UIGuestProcessControlDialog(pCenterWidget); 59 53 } 60 54 … … 64 58 *********************************************************************************************************************************/ 65 59 66 UIGuestProcessControlDialog::UIGuestProcessControlDialog(QWidget *pCenterWidget , UIMachine *pMachine)60 UIGuestProcessControlDialog::UIGuestProcessControlDialog(QWidget *pCenterWidget) 67 61 : QIWithRetranslateUI<QIManagerDialog>(pCenterWidget) 68 , m_pMachine(pMachine) 69 , m_pActionPool(m_pMachine->actionPool()) 70 , m_comGuest(m_pMachine->uisession()->guest()) 71 , m_strMachineName(m_pMachine->machineName()) 62 , m_comGuest(gpMachine->uisession()->guest()) 63 , m_strMachineName(gpMachine->machineName()) 72 64 { 73 65 } -
trunk/src/VBox/Frontends/VirtualBox/src/guestctrl/UIGuestProcessControlDialog.h
r98647 r98875 43 43 #include "CGuest.h" 44 44 45 /* Forward declarations: */46 class UIActionPool;47 class UIMachine;48 class UIGuestProcessControlDialog;49 class CGuest;50 51 45 /** QIManagerDialogFactory extension used as a factory for the Guest Control dialog. */ 52 46 class UIGuestProcessControlDialogFactory : public QIManagerDialogFactory … … 54 48 public: 55 49 56 /** Constructs dialog factory. 57 * @param pMachine Brings the machine UI reference to be used by the created dialog. */ 58 UIGuestProcessControlDialogFactory(UIMachine *pMachine = 0); 50 /** Constructs dialog factory. */ 51 UIGuestProcessControlDialogFactory(); 59 52 60 53 protected: … … 63 56 * @param pCenterWidget Passes the widget to center wrt. pCenterWidget. */ 64 57 virtual void create(QIManagerDialog *&pDialog, QWidget *pCenterWidget) RT_OVERRIDE; 65 66 /** Holds the machine UI reference. */67 UIMachine *m_pMachine;68 58 }; 69 70 59 71 60 /** QIManagerDialog extension providing GUI with the dialog displaying guest control releated logs. */ … … 76 65 public: 77 66 78 /** Constructs Guest Control dialog. 79 * @param pMachine Brings the machine UI reference to be used by the created dialog. */ 80 UIGuestProcessControlDialog(QWidget *pCenterWidget, UIMachine *pMachine); 67 /** Constructs Guest Control dialog. */ 68 UIGuestProcessControlDialog(QWidget *pCenterWidget); 81 69 82 70 protected: … … 115 103 private: 116 104 117 UIMachine *m_pMachine; 118 UIActionPool *m_pActionPool; 119 CGuest m_comGuest; 120 QString m_strMachineName; 105 CGuest m_comGuest; 106 QString m_strMachineName; 121 107 }; 122 108 123 124 109 #endif /* !FEQT_INCLUDED_SRC_guestctrl_UIGuestProcessControlDialog_h */ -
trunk/src/VBox/Frontends/VirtualBox/src/guestctrl/UIGuestProcessControlWidget.cpp
r98103 r98875 34 34 #include "QIDialog.h" 35 35 #include "QIDialogButtonBox.h" 36 #include "UIExtraDataManager.h" 36 #include "QIToolBar.h" 37 #include "UICommon.h" 37 38 #include "UIGuestControlConsole.h" 38 #include "UIGuestControlInterface.h"39 39 #include "UIGuestControlTreeItem.h" 40 40 #include "UIGuestProcessControlWidget.h" 41 #include "QIToolBar.h"42 41 #include "UIIconPool.h" 43 #include "UIVMInformationDialog.h"44 #include "UICommon.h"45 42 46 43 /* COM includes: */ … … 48 45 #include "CEventSource.h" 49 46 50 const bool UIGuestProcessControlWidget::m_fDeleteAfterUnregister = false;51 47 52 48 /** A QIDialog child to display properties of a guest session on process. */ 53 49 class UISessionProcessPropertiesDialog : public QIDialog 54 50 { 55 56 51 Q_OBJECT; 57 52 … … 68 63 }; 69 64 70 71 /*********************************************************************************************************************************72 * UIGuestControlTreeWidget definition. *73 *********************************************************************************************************************************/74 65 75 66 class UIGuestControlTreeWidget : public QITreeWidget … … 298 289 * UIGuestProcessControlWidget implementation. * 299 290 *********************************************************************************************************************************/ 291 292 const bool UIGuestProcessControlWidget::s_fDeleteAfterUnregister = false; 300 293 301 294 UIGuestProcessControlWidget::UIGuestProcessControlWidget(EmbedTo enmEmbedding, const CGuest &comGuest, … … 545 538 } 546 539 } 547 if ( m_fDeleteAfterUnregister)540 if (s_fDeleteAfterUnregister) 548 541 delete selectedItem; 549 542 } -
trunk/src/VBox/Frontends/VirtualBox/src/guestctrl/UIGuestProcessControlWidget.h
r98103 r98875 41 41 42 42 /* GUI includes: */ 43 #include "QIWithRetranslateUI.h" 43 44 #include "QIManagerDialog.h" 44 #include "QIWithRetranslateUI.h"45 45 #include "UIMainEventListener.h" 46 46 47 47 /* Forward declarations: */ 48 class QITreeWidget;49 48 class QVBoxLayout; 50 class QSplitter; 51 class UIGuestControlConsole; 52 class UIGuestControlInterface; 53 class UIGuestSessionsEventHandler; 49 class QIToolBar; 54 50 class UIGuestControlTreeWidget; 55 class QIToolBar;56 51 57 52 /** QWidget extension … … 67 62 ~UIGuestProcessControlWidget(); 68 63 /** When true we delete the corresponding tree item as soon as the guest session/process is unregistered. */ 69 static const bool m_fDeleteAfterUnregister;64 static const bool s_fDeleteAfterUnregister; 70 65 71 66 protected: … … 101 96 /** Holds the Qt event listener instance. */ 102 97 ComObjPtr<UIMainEventListenerImpl> m_pQtListener; 98 103 99 /** Holds the COM event listener instance. */ 104 CEventListener m_comEventListener;105 const bool m_fShowToolbar;106 QString m_strMachineName;100 CEventListener m_comEventListener; 101 const bool m_fShowToolbar; 102 QString m_strMachineName; 107 103 }; 108 104 -
trunk/src/VBox/Frontends/VirtualBox/src/runtime/UIMachineLogic.cpp
r98874 r98875 2392 2392 2393 2393 QIManagerDialog *pProcessControlDialog; 2394 UIGuestProcessControlDialogFactory dialogFactory (uimachine());2394 UIGuestProcessControlDialogFactory dialogFactory; 2395 2395 dialogFactory.prepare(pProcessControlDialog, activeMachineWindow()); 2396 2396 if (pProcessControlDialog)
Note:
See TracChangeset
for help on using the changeset viewer.