Changeset 74044 in vbox
- Timestamp:
- Sep 3, 2018 1:32:53 PM (7 years ago)
- svn:sync-xref-src-repo-rev:
- 124798
- Location:
- trunk/src/VBox/Frontends/VirtualBox/src/manager/details
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Frontends/VirtualBox/src/manager/details/UIDetailsGroup.h
r74042 r74044 49 49 UIDetailsGroup(QGraphicsScene *pScene); 50 50 /** Destructs group item. */ 51 ~UIDetailsGroup();51 virtual ~UIDetailsGroup() /* override */; 52 52 53 53 /** @name Item stuff. -
trunk/src/VBox/Frontends/VirtualBox/src/manager/details/UIDetailsSet.cpp
r73424 r74044 5 5 6 6 /* 7 * Copyright (C) 2012-201 7Oracle Corporation7 * Copyright (C) 2012-2018 Oracle Corporation 8 8 * 9 9 * This file is part of VirtualBox Open Source Edition (OSE), as … … 24 24 25 25 /* GUI includes: */ 26 # include "UIDetailsElements.h" 27 # include "UIDetailsModel.h" 26 28 # include "UIDetailsSet.h" 27 # include "UIDetailsModel.h" 28 # include "UIDetailsElements.h" 29 # include "UIVirtualBoxEventHandler.h" 29 30 # include "UIVirtualMachineItem.h" 30 # include "UIVirtualBoxEventHandler.h"31 31 # include "VBoxGlobal.h" 32 32 … … 41 41 : UIDetailsItem(pParent) 42 42 , m_pMachineItem(0) 43 , m_fFullSet(true) 43 44 , m_fHasDetails(false) 44 45 , m_configurationAccessLevel(ConfigurationAccessLevel_Null) 45 , m_fFullSet(true)46 46 , m_pBuildStep(0) 47 47 , m_iLastStepNumber(-1) … … 127 127 { 128 128 /* Load details settings: */ 129 DetailsElementType e lementType = (DetailsElementType)iStepNumber;129 DetailsElementType enmElementType = (DetailsElementType)iStepNumber; 130 130 /* Should the element be visible? */ 131 bool fVisible = m_settings.contains(e lementType);131 bool fVisible = m_settings.contains(enmElementType); 132 132 /* Should the element be opened? */ 133 bool fOpen = fVisible && m_settings[e lementType];133 bool fOpen = fVisible && m_settings[enmElementType]; 134 134 135 135 /* Check if element is present already: */ 136 UIDetailsElement *pElement = element(e lementType);136 UIDetailsElement *pElement = element(enmElementType); 137 137 if (pElement && fOpen) 138 138 pElement->open(false); … … 142 142 { 143 143 fJustCreated = true; 144 pElement = createElement(e lementType, fOpen);144 pElement = createElement(enmElementType, fOpen); 145 145 } 146 146 … … 198 198 } 199 199 200 void UIDetailsSet::sltMachineStateChange(QString strId)201 {202 /* Is this our VM changed? */203 if (m_machine.GetId() != strId)204 return;205 206 /* Update appearance: */207 rebuildSet();208 }209 210 void UIDetailsSet::sltMachineAttributesChange(QString strId)211 {212 /* Is this our VM changed? */213 if (m_machine.GetId() != strId)214 return;215 216 /* Update appearance: */217 rebuildSet();218 }219 220 void UIDetailsSet::sltUpdateAppearance()221 {222 /* Update appearance: */223 rebuildSet();224 }225 226 200 QString UIDetailsSet::description() const 227 201 { 228 202 return tr("Contains the details of virtual machine '%1'").arg(m_pMachineItem->name()); 229 }230 231 QVariant UIDetailsSet::data(int iKey) const232 {233 /* Provide other members with required data: */234 switch (iKey)235 {236 /* Layout hints: */237 case SetData_Margin: return 0;238 case SetData_Spacing: return QApplication::style()->pixelMetric(QStyle::PM_SmallIconSize) / 5;239 /* Default: */240 default: break;241 }242 return QVariant();243 203 } 244 204 … … 283 243 } 284 244 285 QList<UIDetailsItem*> UIDetailsSet::items(UIDetailsItemType type /* = UIDetailsItemType_Element */) const286 { 287 switch ( type)245 QList<UIDetailsItem*> UIDetailsSet::items(UIDetailsItemType enmType /* = UIDetailsItemType_Element */) const 246 { 247 switch (enmType) 288 248 { 289 249 case UIDetailsItemType_Element: return m_elements.values(); … … 294 254 } 295 255 296 bool UIDetailsSet::hasItems(UIDetailsItemType type /* = UIDetailsItemType_Element */) const297 { 298 switch ( type)256 bool UIDetailsSet::hasItems(UIDetailsItemType enmType /* = UIDetailsItemType_Element */) const 257 { 258 switch (enmType) 299 259 { 300 260 case UIDetailsItemType_Element: return !m_elements.isEmpty(); … … 305 265 } 306 266 307 void UIDetailsSet::clearItems(UIDetailsItemType type /* = UIDetailsItemType_Element */)308 { 309 switch ( type)267 void UIDetailsSet::clearItems(UIDetailsItemType enmType /* = UIDetailsItemType_Element */) 268 { 269 switch (enmType) 310 270 { 311 271 case UIDetailsItemType_Element: … … 329 289 } 330 290 331 UIDetailsElement * UIDetailsSet::element(DetailsElementType elementType) const332 { 333 UIDetailsItem *pItem = m_elements.value(e lementType, 0);291 UIDetailsElement *UIDetailsSet::element(DetailsElementType enmElementType) const 292 { 293 UIDetailsItem *pItem = m_elements.value(enmElementType, 0); 334 294 if (pItem) 335 295 return pItem->toElement(); 336 296 return 0; 337 }338 339 void UIDetailsSet::prepareSet()340 {341 /* Setup size-policy: */342 setSizePolicy(QSizePolicy::Minimum, QSizePolicy::Fixed);343 }344 345 void UIDetailsSet::prepareConnections()346 {347 /* Global-events connections: */348 connect(gVBoxEvents, SIGNAL(sigMachineStateChange(QString, KMachineState)), this, SLOT(sltMachineStateChange(QString)));349 connect(gVBoxEvents, SIGNAL(sigMachineDataChange(QString)), this, SLOT(sltMachineAttributesChange(QString)));350 connect(gVBoxEvents, SIGNAL(sigSessionStateChange(QString, KSessionState)), this, SLOT(sltMachineAttributesChange(QString)));351 connect(gVBoxEvents, SIGNAL(sigSnapshotTake(QString, QString)), this, SLOT(sltMachineAttributesChange(QString)));352 connect(gVBoxEvents, SIGNAL(sigSnapshotDelete(QString, QString)), this, SLOT(sltMachineAttributesChange(QString)));353 connect(gVBoxEvents, SIGNAL(sigSnapshotChange(QString, QString)), this, SLOT(sltMachineAttributesChange(QString)));354 connect(gVBoxEvents, SIGNAL(sigSnapshotRestore(QString, QString)), this, SLOT(sltMachineAttributesChange(QString)));355 356 /* Meidum-enumeration connections: */357 connect(&vboxGlobal(), SIGNAL(sigMediumEnumerationStarted()), this, SLOT(sltUpdateAppearance()));358 connect(&vboxGlobal(), SIGNAL(sigMediumEnumerationFinished()), this, SLOT(sltUpdateAppearance()));359 }360 361 int UIDetailsSet::minimumWidthHint() const362 {363 /* Zero if has no details: */364 if (!hasDetails())365 return 0;366 367 /* Prepare variables: */368 int iMargin = data(SetData_Margin).toInt();369 int iSpacing = data(SetData_Spacing).toInt();370 int iMinimumWidthHint = 0;371 372 /* Take into account all the elements: */373 foreach (UIDetailsItem *pItem, items())374 {375 /* Skip hidden: */376 if (!pItem->isVisible())377 continue;378 379 /* For each particular element: */380 UIDetailsElement *pElement = pItem->toElement();381 switch (pElement->elementType())382 {383 case DetailsElementType_General:384 case DetailsElementType_System:385 case DetailsElementType_Display:386 case DetailsElementType_Storage:387 case DetailsElementType_Audio:388 case DetailsElementType_Network:389 case DetailsElementType_Serial:390 case DetailsElementType_USB:391 case DetailsElementType_SF:392 case DetailsElementType_UI:393 case DetailsElementType_Description:394 {395 iMinimumWidthHint = qMax(iMinimumWidthHint, pItem->minimumWidthHint());396 break;397 }398 case DetailsElementType_Preview:399 {400 UIDetailsItem *pGeneralItem = element(DetailsElementType_General);401 UIDetailsItem *pSystemItem = element(DetailsElementType_System);402 int iGeneralElementWidth = pGeneralItem ? pGeneralItem->minimumWidthHint() : 0;403 int iSystemElementWidth = pSystemItem ? pSystemItem->minimumWidthHint() : 0;404 int iFirstColumnWidth = qMax(iGeneralElementWidth, iSystemElementWidth);405 iMinimumWidthHint = qMax(iMinimumWidthHint, iFirstColumnWidth + iSpacing + pItem->minimumWidthHint());406 break;407 }408 case DetailsElementType_Invalid: AssertFailed(); break; /* Shut up, MSC! */409 }410 }411 412 /* And two margins finally: */413 iMinimumWidthHint += 2 * iMargin;414 415 /* Return result: */416 return iMinimumWidthHint;417 }418 419 int UIDetailsSet::minimumHeightHint() const420 {421 /* Zero if has no details: */422 if (!hasDetails())423 return 0;424 425 /* Prepare variables: */426 int iMargin = data(SetData_Margin).toInt();427 int iSpacing = data(SetData_Spacing).toInt();428 int iMinimumHeightHint = 0;429 430 /* Take into account all the elements: */431 foreach (UIDetailsItem *pItem, items())432 {433 /* Skip hidden: */434 if (!pItem->isVisible())435 continue;436 437 /* For each particular element: */438 UIDetailsElement *pElement = pItem->toElement();439 switch (pElement->elementType())440 {441 case DetailsElementType_General:442 case DetailsElementType_System:443 case DetailsElementType_Display:444 case DetailsElementType_Storage:445 case DetailsElementType_Audio:446 case DetailsElementType_Network:447 case DetailsElementType_Serial:448 case DetailsElementType_USB:449 case DetailsElementType_SF:450 case DetailsElementType_UI:451 case DetailsElementType_Description:452 {453 iMinimumHeightHint += (pItem->minimumHeightHint() + iSpacing);454 break;455 }456 case DetailsElementType_Preview:457 {458 iMinimumHeightHint = qMax(iMinimumHeightHint, pItem->minimumHeightHint() + iSpacing);459 break;460 }461 case DetailsElementType_Invalid: AssertFailed(); break; /* Shut up, MSC! */462 }463 }464 465 /* Minus last spacing: */466 iMinimumHeightHint -= iSpacing;467 468 /* And two margins finally: */469 iMinimumHeightHint += 2 * iMargin;470 471 /* Return result: */472 return iMinimumHeightHint;473 297 } 474 298 … … 553 377 } 554 378 379 int UIDetailsSet::minimumWidthHint() const 380 { 381 /* Zero if has no details: */ 382 if (!hasDetails()) 383 return 0; 384 385 /* Prepare variables: */ 386 int iMargin = data(SetData_Margin).toInt(); 387 int iSpacing = data(SetData_Spacing).toInt(); 388 int iMinimumWidthHint = 0; 389 390 /* Take into account all the elements: */ 391 foreach (UIDetailsItem *pItem, items()) 392 { 393 /* Skip hidden: */ 394 if (!pItem->isVisible()) 395 continue; 396 397 /* For each particular element: */ 398 UIDetailsElement *pElement = pItem->toElement(); 399 switch (pElement->elementType()) 400 { 401 case DetailsElementType_General: 402 case DetailsElementType_System: 403 case DetailsElementType_Display: 404 case DetailsElementType_Storage: 405 case DetailsElementType_Audio: 406 case DetailsElementType_Network: 407 case DetailsElementType_Serial: 408 case DetailsElementType_USB: 409 case DetailsElementType_SF: 410 case DetailsElementType_UI: 411 case DetailsElementType_Description: 412 { 413 iMinimumWidthHint = qMax(iMinimumWidthHint, pItem->minimumWidthHint()); 414 break; 415 } 416 case DetailsElementType_Preview: 417 { 418 UIDetailsItem *pGeneralItem = element(DetailsElementType_General); 419 UIDetailsItem *pSystemItem = element(DetailsElementType_System); 420 int iGeneralElementWidth = pGeneralItem ? pGeneralItem->minimumWidthHint() : 0; 421 int iSystemElementWidth = pSystemItem ? pSystemItem->minimumWidthHint() : 0; 422 int iFirstColumnWidth = qMax(iGeneralElementWidth, iSystemElementWidth); 423 iMinimumWidthHint = qMax(iMinimumWidthHint, iFirstColumnWidth + iSpacing + pItem->minimumWidthHint()); 424 break; 425 } 426 case DetailsElementType_Invalid: AssertFailed(); break; /* Shut up, MSC! */ 427 } 428 } 429 430 /* And two margins finally: */ 431 iMinimumWidthHint += 2 * iMargin; 432 433 /* Return result: */ 434 return iMinimumWidthHint; 435 } 436 437 int UIDetailsSet::minimumHeightHint() const 438 { 439 /* Zero if has no details: */ 440 if (!hasDetails()) 441 return 0; 442 443 /* Prepare variables: */ 444 int iMargin = data(SetData_Margin).toInt(); 445 int iSpacing = data(SetData_Spacing).toInt(); 446 int iMinimumHeightHint = 0; 447 448 /* Take into account all the elements: */ 449 foreach (UIDetailsItem *pItem, items()) 450 { 451 /* Skip hidden: */ 452 if (!pItem->isVisible()) 453 continue; 454 455 /* For each particular element: */ 456 UIDetailsElement *pElement = pItem->toElement(); 457 switch (pElement->elementType()) 458 { 459 case DetailsElementType_General: 460 case DetailsElementType_System: 461 case DetailsElementType_Display: 462 case DetailsElementType_Storage: 463 case DetailsElementType_Audio: 464 case DetailsElementType_Network: 465 case DetailsElementType_Serial: 466 case DetailsElementType_USB: 467 case DetailsElementType_SF: 468 case DetailsElementType_UI: 469 case DetailsElementType_Description: 470 { 471 iMinimumHeightHint += (pItem->minimumHeightHint() + iSpacing); 472 break; 473 } 474 case DetailsElementType_Preview: 475 { 476 iMinimumHeightHint = qMax(iMinimumHeightHint, pItem->minimumHeightHint() + iSpacing); 477 break; 478 } 479 case DetailsElementType_Invalid: AssertFailed(); break; /* Shut up, MSC! */ 480 } 481 } 482 483 /* Minus last spacing: */ 484 iMinimumHeightHint -= iSpacing; 485 486 /* And two margins finally: */ 487 iMinimumHeightHint += 2 * iMargin; 488 489 /* Return result: */ 490 return iMinimumHeightHint; 491 } 492 493 void UIDetailsSet::sltMachineStateChange(QString strId) 494 { 495 /* Is this our VM changed? */ 496 if (m_machine.GetId() != strId) 497 return; 498 499 /* Update appearance: */ 500 rebuildSet(); 501 } 502 503 void UIDetailsSet::sltMachineAttributesChange(QString strId) 504 { 505 /* Is this our VM changed? */ 506 if (m_machine.GetId() != strId) 507 return; 508 509 /* Update appearance: */ 510 rebuildSet(); 511 } 512 513 void UIDetailsSet::sltUpdateAppearance() 514 { 515 /* Update appearance: */ 516 rebuildSet(); 517 } 518 519 void UIDetailsSet::prepareSet() 520 { 521 /* Setup size-policy: */ 522 setSizePolicy(QSizePolicy::Minimum, QSizePolicy::Fixed); 523 } 524 525 void UIDetailsSet::prepareConnections() 526 { 527 /* Global-events connections: */ 528 connect(gVBoxEvents, SIGNAL(sigMachineStateChange(QString, KMachineState)), this, SLOT(sltMachineStateChange(QString))); 529 connect(gVBoxEvents, SIGNAL(sigMachineDataChange(QString)), this, SLOT(sltMachineAttributesChange(QString))); 530 connect(gVBoxEvents, SIGNAL(sigSessionStateChange(QString, KSessionState)), this, SLOT(sltMachineAttributesChange(QString))); 531 connect(gVBoxEvents, SIGNAL(sigSnapshotTake(QString, QString)), this, SLOT(sltMachineAttributesChange(QString))); 532 connect(gVBoxEvents, SIGNAL(sigSnapshotDelete(QString, QString)), this, SLOT(sltMachineAttributesChange(QString))); 533 connect(gVBoxEvents, SIGNAL(sigSnapshotChange(QString, QString)), this, SLOT(sltMachineAttributesChange(QString))); 534 connect(gVBoxEvents, SIGNAL(sigSnapshotRestore(QString, QString)), this, SLOT(sltMachineAttributesChange(QString))); 535 536 /* Meidum-enumeration connections: */ 537 connect(&vboxGlobal(), SIGNAL(sigMediumEnumerationStarted()), this, SLOT(sltUpdateAppearance())); 538 connect(&vboxGlobal(), SIGNAL(sigMediumEnumerationFinished()), this, SLOT(sltUpdateAppearance())); 539 } 540 541 QVariant UIDetailsSet::data(int iKey) const 542 { 543 /* Provide other members with required data: */ 544 switch (iKey) 545 { 546 /* Layout hints: */ 547 case SetData_Margin: return 0; 548 case SetData_Spacing: return QApplication::style()->pixelMetric(QStyle::PM_SmallIconSize) / 5; 549 /* Default: */ 550 default: break; 551 } 552 return QVariant(); 553 } 554 555 555 void UIDetailsSet::rebuildSet() 556 556 { … … 573 573 } 574 574 575 UIDetailsElement * UIDetailsSet::createElement(DetailsElementType elementType, bool fOpen)575 UIDetailsElement *UIDetailsSet::createElement(DetailsElementType enmElementType, bool fOpen) 576 576 { 577 577 /* Element factory: */ 578 switch (e lementType)578 switch (enmElementType) 579 579 { 580 580 case DetailsElementType_General: return new UIDetailsElementGeneral(this, fOpen); … … 594 594 return 0; 595 595 } 596 -
trunk/src/VBox/Frontends/VirtualBox/src/manager/details/UIDetailsSet.h
r73424 r74044 5 5 6 6 /* 7 * Copyright (C) 2012-201 7Oracle Corporation7 * Copyright (C) 2012-2018 Oracle Corporation 8 8 * 9 9 * This file is part of VirtualBox Open Source Edition (OSE), as … … 16 16 */ 17 17 18 #ifndef __ UIDetailsSet_h__19 #define __ UIDetailsSet_h__18 #ifndef ___UIDetailsSet_h___ 19 #define ___UIDetailsSet_h___ 20 20 21 21 /* GUI includes: */ … … 34 34 using namespace UISettingsDefs; 35 35 36 /* Details set 37 * for graphics details model/view architecture: */ 36 /** UIDetailsItem extension implementing group item. */ 38 37 class UIDetailsSet : public UIDetailsItem 39 38 { … … 42 41 public: 43 42 44 /* Graphics-item type:*/43 /** RTTI item type. */ 45 44 enum { Type = UIDetailsItemType_Set }; 46 int type() const { return Type; }47 45 48 /* Constructor/destructor:*/46 /** Constructs set item, passing pParent to the base-class. */ 49 47 UIDetailsSet(UIDetailsItem *pParent); 50 ~UIDetailsSet(); 48 /** Destructs set item. */ 49 virtual ~UIDetailsSet() /* override */; 51 50 52 /* API: Build stuff: */ 53 void buildSet(UIVirtualMachineItem *pMachineItem, bool fFullSet, const QMap<DetailsElementType, bool> &settings); 51 /** @name Item stuff. 52 * @{ */ 53 /** Builds set based on passed @a pMachineItem. 54 * @param fFullSet Brigns whether full set should be built. 55 * @param settings Brings details related settings. */ 56 void buildSet(UIVirtualMachineItem *pMachineItem, bool fFullSet, const QMap<DetailsElementType, bool> &settings); 54 57 55 /* API: Machine stuff: */ 56 const CMachine& machine() const { return m_machine; } 57 bool hasDetails() const { return m_fHasDetails; } 58 /** Returns cached machine. */ 59 const CMachine &machine() const { return m_machine; } 60 /** Returns whether set has cached details. */ 61 bool hasDetails() const { return m_fHasDetails; } 62 /** Returns configuration access level. */ 63 ConfigurationAccessLevel configurationAccessLevel() const { return m_configurationAccessLevel; } 64 /** @} */ 58 65 59 /** Returns configuration access level. */ 60 ConfigurationAccessLevel configurationAccessLevel() const { return m_configurationAccessLevel; } 66 protected slots: 67 68 /** @name Item stuff. 69 * @{ */ 70 /** Handles request about starting step build. 71 * @param strStepId Brings the step ID. 72 * @param iStepNumber Brings the step number. */ 73 /** @} */ 74 virtual void sltBuildStep(QString strStepId, int iStepNumber) /* override */; 75 76 protected: 77 78 /** @name Item stuff. 79 * @{ */ 80 /** Returns RTTI item type. */ 81 virtual int type() const /* override */ { return Type; } 82 83 /** Returns the description of the item. */ 84 virtual QString description() const /* override */; 85 /** @} */ 86 87 /** @name Children stuff. 88 * @{ */ 89 /** Adds child @a pItem. */ 90 void addItem(UIDetailsItem *pItem); 91 /** Removes child @a pItem. */ 92 void removeItem(UIDetailsItem *pItem); 93 94 /** Returns children items of certain @a enmType. */ 95 QList<UIDetailsItem*> items(UIDetailsItemType type = UIDetailsItemType_Element) const; 96 /** Returns whether there are children items of certain @a enmType. */ 97 bool hasItems(UIDetailsItemType type = UIDetailsItemType_Element) const; 98 /** Clears children items of certain @a enmType. */ 99 void clearItems(UIDetailsItemType type = UIDetailsItemType_Element); 100 101 /** Returns details element of certain @a enmElementType. */ 102 UIDetailsElement *element(DetailsElementType enmElementType) const; 103 /** @} */ 104 105 /** @name Layout stuff. 106 * @{ */ 107 /** Updates layout. */ 108 void updateLayout(); 109 110 /** Returns minimum width-hint. */ 111 int minimumWidthHint() const; 112 /** Returns minimum height-hint. */ 113 int minimumHeightHint() const; 114 /** @} */ 61 115 62 116 private slots: 63 117 64 /* Handler: Build stuff: */ 65 void sltBuildStep(QString strStepId, int iStepNumber); 118 /** @name Event-handling stuff. 119 * @{ */ 120 /** Handles machine-state change for item with @a strId. */ 121 void sltMachineStateChange(QString strId); 122 /** Handles machine-attribute change for item with @a strId. */ 123 void sltMachineAttributesChange(QString strId); 124 /** @} */ 66 125 67 /* Handlers: Global event stuff: */ 68 void sltMachineStateChange(QString strId); 69 void sltMachineAttributesChange(QString strId); 70 71 /* Handler: Update stuff: */ 72 void sltUpdateAppearance(); 126 /** @name Item stuff. 127 * @{ */ 128 /** Updates item appearance. */ 129 void sltUpdateAppearance(); 130 /** @} */ 73 131 74 132 private: 75 133 76 /* Data enumerator:*/134 /** Data field types. */ 77 135 enum SetItemData 78 136 { … … 82 140 }; 83 141 84 /** Returns the description of the item. */ 85 virtual QString description() const /* override */; 142 /** @name Prepare/cleanup cascade. 143 * @{ */ 144 /** Prepares set. */ 145 void prepareSet(); 146 /** Prepares connections. */ 147 void prepareConnections(); 148 /** @} */ 86 149 87 /* Data provider: */ 88 QVariant data(int iKey) const; 150 /** @name Item stuff. 151 * @{ */ 152 /** Returns abstractly stored data value for certain @a iKey. */ 153 QVariant data(int iKey) const; 89 154 90 /* Hidden API: Children stuff: */ 91 void addItem(UIDetailsItem *pItem); 92 void removeItem(UIDetailsItem *pItem); 93 QList<UIDetailsItem*> items(UIDetailsItemType type = UIDetailsItemType_Element) const; 94 bool hasItems(UIDetailsItemType type = UIDetailsItemType_Element) const; 95 void clearItems(UIDetailsItemType type = UIDetailsItemType_Element); 96 UIDetailsElement* element(DetailsElementType elementType) const; 155 /** Rebuilds set based on cached machine item. */ 156 void rebuildSet(); 97 157 98 /* Helpers: Prepare stuff:*/99 void prepareSet();100 void prepareConnections();158 /** Creates element of specified @a enmElementType in @a fOpen state. */ 159 UIDetailsElement *createElement(DetailsElementType enmElementType, bool fOpen); 160 /** @} */ 101 161 102 /* Helpers: Layout stuff: */ 103 int minimumWidthHint() const; 104 int minimumHeightHint() const; 105 void updateLayout(); 162 /** @name Item stuff. 163 * @{ */ 164 /** Holds the machine-item this set is built for. */ 165 UIVirtualMachineItem *m_pMachineItem; 166 /** Holds whether whether full set should be built. */ 167 bool m_fFullSet; 168 /** Holds the details related settings. */ 169 QMap<DetailsElementType, bool> m_settings; 106 170 107 /* Helpers: Build stuff: */ 108 void rebuildSet(); 109 UIDetailsElement* createElement(DetailsElementType elementType, bool fOpen); 171 /** Holds the machine reference. */ 172 CMachine m_machine; 173 /** Holds whether set has details. */ 174 bool m_fHasDetails; 175 /** Holds configuration access level. */ 176 ConfigurationAccessLevel m_configurationAccessLevel; 110 177 111 /** Machine-item this set built for. */ 112 UIVirtualMachineItem *m_pMachineItem; 178 /** Holds the build step instance. */ 179 UIPrepareStep *m_pBuildStep; 180 /** Holds the last step number. */ 181 int m_iLastStepNumber; 182 /** Holds the generated set ID. */ 183 QString m_strSetId; 184 /** @} */ 113 185 114 /* Main variables: */ 115 CMachine m_machine; 116 QMap<int, UIDetailsItem*> m_elements; 117 bool m_fHasDetails; 118 119 /** Holds configuration access level. */ 120 ConfigurationAccessLevel m_configurationAccessLevel; 121 122 /* Prepare variables: */ 123 bool m_fFullSet; 124 UIPrepareStep *m_pBuildStep; 125 int m_iLastStepNumber; 126 QString m_strSetId; 127 QMap<DetailsElementType, bool> m_settings; 186 /** @name Children stuff. 187 * @{ */ 188 /** Holds the map of generated detail elements. */ 189 QMap<int, UIDetailsItem*> m_elements; 190 /** @} */ 128 191 }; 129 192 130 #endif /* __UIDetailsSet_h__ */ 131 193 #endif /* !___UIDetailsSet_h___ */
Note:
See TracChangeset
for help on using the changeset viewer.