Changeset 70837 in vbox
- Timestamp:
- Jan 31, 2018 2:59:02 PM (7 years ago)
- svn:sync-xref-src-repo-rev:
- 120645
- Location:
- trunk/src/VBox/Frontends/VirtualBox
- Files:
-
- 2 edited
- 2 copied
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Frontends/VirtualBox/Makefile.kmk
r70706 r70837 506 506 src/runtime/information/UIInformationConfiguration.h \ 507 507 src/runtime/information/UIInformationDataItem.h \ 508 src/runtime/information/UIInformationGuestSession.h \ 508 509 src/runtime/information/UIInformationItem.h \ 509 510 src/runtime/information/UIInformationModel.h \ … … 833 834 src/runtime/information/UIInformationConfiguration.cpp \ 834 835 src/runtime/information/UIInformationDataItem.cpp \ 836 src/runtime/information/UIInformationGuestSession.cpp \ 835 837 src/runtime/information/UIInformationItem.cpp \ 836 838 src/runtime/information/UIInformationModel.cpp \ -
trunk/src/VBox/Frontends/VirtualBox/src/runtime/information/UIInformationGuestSession.cpp
r70833 r70837 1 1 /* $Id$ */ 2 2 /** @file 3 * VBox Qt GUI - UIInformation Configuration class implementation.3 * VBox Qt GUI - UIInformationGuestSession class implementation. 4 4 */ 5 5 … … 25 25 26 26 /* GUI includes: */ 27 # include "UIInformation Configuration.h"27 # include "UIInformationGuestSession.h" 28 28 # include "UIInformationDataItem.h" 29 29 # include "UIInformationItem.h" … … 35 35 36 36 37 UIInformation Configuration::UIInformationConfiguration(QWidget *pParent, const CMachine &machine, const CConsole &console)37 UIInformationGuestSession::UIInformationGuestSession(QWidget *pParent, const CMachine &machine, const CConsole &console) 38 38 : QWidget(pParent) 39 39 , m_machine(machine) 40 40 , m_console(console) 41 41 , m_pMainLayout(0) 42 , m_pModel(0)43 , m_pView(0)44 42 { 45 /* Prepare layout: */46 43 prepareLayout(); 47 48 /* Prepare model: */49 prepareModel();50 51 /* Prepare view: */52 prepareView();53 44 } 54 45 55 void UIInformation Configuration::prepareLayout()46 void UIInformationGuestSession::prepareLayout() 56 47 { 57 48 /* Create layout: */ 58 49 m_pMainLayout = new QVBoxLayout(this); 59 AssertPtrReturnVoid(m_pMainLayout);50 if (m_pMainLayout) 60 51 { 61 52 /* Configure layout: */ … … 63 54 } 64 55 } 65 66 void UIInformationConfiguration::prepareModel()67 {68 /* Create information-model: */69 m_pModel = new UIInformationModel(this, m_machine, m_console);70 AssertPtrReturnVoid(m_pModel);71 {72 /* Create general data-item: */73 UIInformationDataItem *pGeneral = new UIInformationDataGeneral(m_machine, m_console, m_pModel);74 AssertPtrReturnVoid(pGeneral);75 {76 /* Add general data-item to model: */77 m_pModel->addItem(pGeneral);78 }79 80 /* Create system data-item: */81 UIInformationDataItem *pSystem = new UIInformationDataSystem(m_machine, m_console, m_pModel);82 AssertPtrReturnVoid(pSystem);83 {84 /* Add system data-item to model: */85 m_pModel->addItem(pSystem);86 }87 88 /* Create display data-item: */89 UIInformationDataItem *pDisplay = new UIInformationDataDisplay(m_machine, m_console, m_pModel);90 AssertPtrReturnVoid(pDisplay);91 {92 /* Add display data-item to model: */93 m_pModel->addItem(pDisplay);94 }95 96 /* Create storage data-item: */97 UIInformationDataItem *pStorage = new UIInformationDataStorage(m_machine, m_console, m_pModel);98 AssertPtrReturnVoid(pStorage);99 {100 /* Add storage data-item to model: */101 m_pModel->addItem(pStorage);102 }103 104 /* Create audio data-item: */105 UIInformationDataItem *pAudio = new UIInformationDataAudio(m_machine, m_console, m_pModel);106 AssertPtrReturnVoid(pAudio);107 {108 /* Add audio data-item to model: */109 m_pModel->addItem(pAudio);110 }111 112 /* Create network data-item: */113 UIInformationDataItem *pNetwork = new UIInformationDataNetwork(m_machine, m_console, m_pModel);114 AssertPtrReturnVoid(pNetwork);115 {116 /* Add network data-item to model: */117 m_pModel->addItem(pNetwork);118 }119 120 /* Create serial-ports data-item: */121 UIInformationDataItem *pSerialPorts = new UIInformationDataSerialPorts(m_machine, m_console, m_pModel);122 AssertPtrReturnVoid(pSerialPorts);123 {124 /* Add serial-ports data-item to model: */125 m_pModel->addItem(pSerialPorts);126 }127 128 /* Create usb data-item: */129 UIInformationDataItem *pUSB = new UIInformationDataUSB(m_machine, m_console, m_pModel);130 AssertPtrReturnVoid(pUSB);131 {132 /* Add usb data-item to model: */133 m_pModel->addItem(pUSB);134 }135 136 /* Create shared-folders data-item: */137 UIInformationDataItem *pSharedFolders = new UIInformationDataSharedFolders(m_machine, m_console, m_pModel);138 AssertPtrReturnVoid(pSharedFolders);139 {140 /* Add shared-folders data-item to model: */141 m_pModel->addItem(pSharedFolders);142 }143 }144 }145 146 void UIInformationConfiguration::prepareView()147 {148 /* Create information-view: */149 m_pView = new UIInformationView;150 AssertPtrReturnVoid(m_pView);151 {152 /* Configure information-view: */153 m_pView->setResizeMode(QListView::Adjust);154 155 /* Create information-delegate item: */156 UIInformationItem *pItem = new UIInformationItem(m_pView);157 AssertPtrReturnVoid(pItem);158 {159 /* Set item-delegate for information-view: */160 m_pView->setItemDelegate(pItem);161 }162 /* Connect data changed signal: */163 connect(m_pModel, SIGNAL(dataChanged(const QModelIndex &, const QModelIndex &)),164 m_pView, SLOT(updateData(const QModelIndex &, const QModelIndex &)));165 166 /* Set model for view: */167 m_pView->setModel(m_pModel);168 /* Add information-view to the layout: */169 m_pMainLayout->addWidget(m_pView);170 }171 }172 -
trunk/src/VBox/Frontends/VirtualBox/src/runtime/information/UIInformationGuestSession.h
r70833 r70837 16 16 */ 17 17 18 #ifndef ___UIInformation Configuration_h___19 #define ___UIInformation Configuration_h___18 #ifndef ___UIInformationGuestSession_h___ 19 #define ___UIInformationGuestSession_h___ 20 20 21 21 /* Qt includes: */ … … 34 34 35 35 /** QWidget extension 36 * providing GUI with configuration-informationtab in session-information window. */37 class UIInformation Configuration : public QWidget36 * providing GUI with guest session information and control tab in session-information window. */ 37 class UIInformationGuestSession : public QWidget 38 38 { 39 39 Q_OBJECT; … … 41 41 public: 42 42 43 /** Constructs information-tab passing @a pParent to the QWidget base-class constructor. 44 * @param machine is machine reference. 45 * @param console is machine console reference. */ 46 UIInformationConfiguration(QWidget *pParent, const CMachine &machine, const CConsole &console); 43 UIInformationGuestSession(QWidget *pParent, const CMachine &machine, const CConsole &console); 47 44 48 45 private: 49 46 50 /** Prepares layout. */51 47 void prepareLayout(); 52 48 53 /** Prepares model. */ 54 void prepareModel(); 55 56 /** Prepares view. */ 57 void prepareView(); 58 59 /** Holds the machine instance. */ 60 CMachine m_machine; 61 /** Holds the console instance. */ 62 CConsole m_console; 63 /** Holds the instance of layout we create. */ 64 QVBoxLayout *m_pMainLayout; 65 /** Holds the instance of model we create. */ 66 UIInformationModel *m_pModel; 67 /** Holds the instance of view we create. */ 68 UIInformationView *m_pView; 49 CMachine m_machine; 50 CConsole m_console; 51 QVBoxLayout * m_pMainLayout; 69 52 }; 70 53 71 #endif /* !___UIInformationConfiguration_h___ */ 72 54 #endif /* !___UIInformationGuestSession_h___ */ -
trunk/src/VBox/Frontends/VirtualBox/src/runtime/information/UIVMInformationDialog.cpp
r69500 r70837 227 227 UIInformationConfiguration *pInformationConfigurationWidget = 228 228 new UIInformationConfiguration(this, m_pMachineWindow->machine(), m_pMachineWindow->console()); 229 AssertPtrReturnVoid(pInformationConfigurationWidget);229 if (pInformationConfigurationWidget) 230 230 { 231 231 m_tabs.insert(0, pInformationConfigurationWidget); … … 236 236 UIInformationRuntime *pInformationRuntimeWidget = 237 237 new UIInformationRuntime(this, m_pMachineWindow->machine(), m_pMachineWindow->console()); 238 AssertPtrReturnVoid(pInformationRuntimeWidget);238 if (pInformationRuntimeWidget) 239 239 { 240 240 m_tabs.insert(1, pInformationRuntimeWidget); … … 302 302 saveSettings(); 303 303 } 304
Note:
See TracChangeset
for help on using the changeset viewer.