- Timestamp:
- Oct 29, 2021 2:53:35 PM (3 years ago)
- Location:
- trunk/src/VBox/Frontends/VirtualBox/src/cloud/machinesettings
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Frontends/VirtualBox/src/cloud/machinesettings/UICloudMachineSettingsDialog.cpp
r84014 r92152 22 22 /* GUI includes: */ 23 23 #include "QIDialogButtonBox.h" 24 #include "UIMessageCenter.h"25 24 #include "UICloudMachineSettingsDialog.h" 26 25 #include "UICloudMachineSettingsDialogPage.h" 27 26 #include "UICloudNetworkingStuff.h" 27 #include "UINotificationCenter.h" 28 28 29 29 /* COM includes: */ … … 36 36 , m_pPage(0) 37 37 , m_pButtonBox(0) 38 , m_pNotificationCenter(0) 38 39 { 39 40 prepare(); 41 } 42 43 UICloudMachineSettingsDialog::~UICloudMachineSettingsDialog() 44 { 45 cleanup(); 40 46 } 41 47 … … 100 106 void UICloudMachineSettingsDialog::prepare() 101 107 { 108 /* Prepare local notification-center (parent to be assigned in the end): */ 109 m_pNotificationCenter = new UINotificationCenter(0); 110 102 111 /* Prepare layout: */ 103 112 QVBoxLayout *pLayout = new QVBoxLayout(this); … … 128 137 } 129 138 139 /* Assign notification-center parent (after everything else is done): */ 140 m_pNotificationCenter->setParent(this); 141 130 142 /* Apply language settings: */ 131 143 retranslateUi(); 132 144 } 145 146 void UICloudMachineSettingsDialog::cleanup() 147 { 148 /* Cleanup local notification-center: */ 149 delete m_pNotificationCenter; 150 m_pNotificationCenter = 0; 151 } -
trunk/src/VBox/Frontends/VirtualBox/src/cloud/machinesettings/UICloudMachineSettingsDialog.h
r84010 r92152 37 37 /* Forward declarations: */ 38 38 class QIDialogButtonBox; 39 class UINotificationCenter; 39 40 40 41 /** Cloud machine settings dialog. */ … … 47 48 /** Constructs @a comCloudMachine settings dialog passing @a pParent to the base-class. */ 48 49 UICloudMachineSettingsDialog(QWidget *pParent, const CCloudMachine &comCloudMachine); 50 /** Destructs cloud machine settings dialog. */ 51 virtual ~UICloudMachineSettingsDialog() /* override final */; 52 53 /** Returns local notification-center reference. */ 54 UINotificationCenter *notificationCenter() const { return m_pNotificationCenter; } 49 55 50 56 public slots: … … 73 79 /** Prepares all. */ 74 80 void prepare(); 81 /** Cleanups all. */ 82 void cleanup(); 75 83 76 84 /** Holds the cloud machine object reference. */ … … 85 93 /** Holds the dialog button-box instance. */ 86 94 QIDialogButtonBox *m_pButtonBox; 95 96 /** Holds the local notification-center instance. */ 97 UINotificationCenter *m_pNotificationCenter; 87 98 }; 88 99 -
trunk/src/VBox/Frontends/VirtualBox/src/cloud/machinesettings/UICloudMachineSettingsDialogPage.cpp
r84018 r92152 21 21 22 22 /* GUI includes: */ 23 #include "UICloudMachineSettingsDialog.h" 23 24 #include "UICloudMachineSettingsDialogPage.h" 24 25 … … 27 28 28 29 29 UICloudMachineSettingsDialogPage::UICloudMachineSettingsDialogPage(QWidget *pParent, bool fFullScale /* = true */) 30 UICloudMachineSettingsDialogPage::UICloudMachineSettingsDialogPage(QWidget *pParent, 31 bool fFullScale /* = true */) 30 32 : QWidget(pParent) 33 , m_pParent(qobject_cast<UICloudMachineSettingsDialog*>(pParent)) 31 34 , m_fFullScale(fFullScale) 32 35 { … … 61 64 62 65 /* Prepare form editor widget: */ 63 m_pFormEditor = new UIFormEditorWidget(this );66 m_pFormEditor = new UIFormEditorWidget(this, m_pParent ? m_pParent->notificationCenter() : 0); 64 67 if (m_pFormEditor) 65 68 { -
trunk/src/VBox/Frontends/VirtualBox/src/cloud/machinesettings/UICloudMachineSettingsDialogPage.h
r84018 r92152 32 32 #include "COMEnums.h" 33 33 #include "CForm.h" 34 35 /* Forward declarations: */ 36 class UICloudMachineSettingsDialog; 34 37 35 38 /** Cloud machine settings dialog page. */ … … 72 75 void updateEditor(); 73 76 77 /** Holds the parent cloud machine settings dialog reference. */ 78 UICloudMachineSettingsDialog *m_pParent; 79 74 80 /** Holds whether this page is full-scale and should reflect at least 12 fields. */ 75 81 bool m_fFullScale;
Note:
See TracChangeset
for help on using the changeset viewer.