Changeset 107291 in vbox for trunk/src/VBox/Frontends
- Timestamp:
- Dec 11, 2024 4:36:52 PM (5 weeks ago)
- Location:
- trunk/src/VBox/Frontends/VirtualBox/src/manager
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Frontends/VirtualBox/src/manager/UIToolPaneGlobal.cpp
r107290 r107291 29 29 #include <QApplication> 30 30 #include <QStackedLayout> 31 #include <QUuid> 31 32 #ifndef VBOX_WS_MAC 32 33 # include <QStyle> 33 34 #endif 34 #include <QUuid>35 35 36 36 /* GUI includes */ 37 #include "UIActionPoolManager.h"38 37 #include "UICommon.h" 39 38 #include "UICloudProfileManager.h" … … 61 60 , m_fActive(false) 62 61 { 63 /* Prepare: */64 62 prepare(); 65 63 } … … 67 65 UIToolPaneGlobal::~UIToolPaneGlobal() 68 66 { 69 /* Cleanup: */70 67 cleanup(); 71 68 } … … 92 89 bool UIToolPaneGlobal::isToolOpened(UIToolType enmType) const 93 90 { 94 /* Search through the stacked widgets: */95 91 for (int iIndex = 0; iIndex < m_pLayout->count(); ++iIndex) 96 92 if (m_pLayout->widget(iIndex)->property("ToolType").value<UIToolType>() == enmType) … … 123 119 /* Create Desktop pane: */ 124 120 m_pPaneWelcome = new UIWelcomePane; 125 if (m_pPaneWelcome)121 AssertPtrReturnVoid(m_pPaneWelcome); 126 122 { 127 123 /* Configure pane: */ … … 140 136 AssertPtrReturnVoid(m_pPaneExtensions); 141 137 { 138 /* Configure pane: */ 139 m_pPaneExtensions->setProperty("ToolType", QVariant::fromValue(UIToolType_Extensions)); 142 140 #ifndef VBOX_WS_MAC 143 141 const int iMargin = qApp->style()->pixelMetric(QStyle::PM_LayoutLeftMargin) / 4; 144 142 m_pPaneExtensions->setContentsMargins(iMargin, 0, iMargin, 0); 145 143 #endif 146 147 /* Configure pane: */148 m_pPaneExtensions->setProperty("ToolType", QVariant::fromValue(UIToolType_Extensions));149 144 150 145 /* Add into layout: */ … … 160 155 AssertPtrReturnVoid(m_pPaneMedia); 161 156 { 162 #ifndef VBOX_WS_MAC163 const int iMargin = qApp->style()->pixelMetric(QStyle::PM_LayoutLeftMargin) / 4;164 m_pPaneMedia->setContentsMargins(iMargin, 0, iMargin, 0);165 #endif166 167 157 /* Configure pane: */ 168 158 m_pPaneMedia->setProperty("ToolType", QVariant::fromValue(UIToolType_Media)); … … 171 161 connect(m_pPaneMedia, &UIMediumManagerWidget::sigCopyMedium, 172 162 this, &UIToolPaneGlobal::sigCopyMedium); 163 #ifndef VBOX_WS_MAC 164 const int iMargin = qApp->style()->pixelMetric(QStyle::PM_LayoutLeftMargin) / 4; 165 m_pPaneMedia->setContentsMargins(iMargin, 0, iMargin, 0); 166 #endif 173 167 174 168 /* Add into layout: */ … … 184 178 AssertPtrReturnVoid(m_pPaneNetwork); 185 179 { 180 /* Configure pane: */ 181 m_pPaneNetwork->setProperty("ToolType", QVariant::fromValue(UIToolType_Network)); 186 182 #ifndef VBOX_WS_MAC 187 183 const int iMargin = qApp->style()->pixelMetric(QStyle::PM_LayoutLeftMargin) / 4; 188 184 m_pPaneNetwork->setContentsMargins(iMargin, 0, iMargin, 0); 189 185 #endif 190 191 /* Configure pane: */192 m_pPaneNetwork->setProperty("ToolType", QVariant::fromValue(UIToolType_Network));193 186 194 187 /* Add into layout: */ … … 204 197 AssertPtrReturnVoid(m_pPaneCloud); 205 198 { 199 /* Configure pane: */ 200 m_pPaneCloud->setProperty("ToolType", QVariant::fromValue(UIToolType_Cloud)); 206 201 #ifndef VBOX_WS_MAC 207 202 const int iMargin = qApp->style()->pixelMetric(QStyle::PM_LayoutLeftMargin) / 4; 208 203 m_pPaneCloud->setContentsMargins(iMargin, 0, iMargin, 0); 209 204 #endif 210 211 /* Configure pane: */212 m_pPaneCloud->setProperty("ToolType", QVariant::fromValue(UIToolType_Cloud));213 205 214 206 /* Add into layout: */ … … 224 216 AssertPtrReturnVoid(m_pPaneActivities); 225 217 { 226 #ifndef VBOX_WS_MAC227 const int iMargin = qApp->style()->pixelMetric(QStyle::PM_LayoutLeftMargin) / 4;228 m_pPaneActivities->setContentsMargins(iMargin, 0, iMargin, 0);229 #endif230 231 218 /* Configure pane: */ 232 219 m_pPaneActivities->setProperty("ToolType", QVariant::fromValue(UIToolType_Activities)); … … 234 221 this, &UIToolPaneGlobal::sigSwitchToMachineActivityPane); 235 222 m_pPaneActivities->setCloudMachineItems(m_cloudItems); 223 #ifndef VBOX_WS_MAC 224 const int iMargin = qApp->style()->pixelMetric(QStyle::PM_LayoutLeftMargin) / 4; 225 m_pPaneActivities->setContentsMargins(iMargin, 0, iMargin, 0); 226 #endif 236 227 237 228 /* Add into layout: */ … … 239 230 m_pLayout->setCurrentWidget(m_pPaneActivities); 240 231 } 241 242 232 break; 243 233 } -
trunk/src/VBox/Frontends/VirtualBox/src/manager/UIToolPaneGlobal.h
r107290 r107291 39 39 40 40 /* Forward declarations: */ 41 class QHBoxLayout;42 41 class QStackedLayout; 43 42 class QUuid; 44 class QVBoxLayout;45 43 class UIActionPool; 46 44 class UICloudProfileManagerWidget; … … 51 49 class UIVirtualMachineItemCloud; 52 50 class UIWelcomePane; 53 class CMachine;54 51 55 52
Note:
See TracChangeset
for help on using the changeset viewer.