- Timestamp:
- Aug 14, 2012 5:38:46 PM (12 years ago)
- Location:
- trunk/src/VBox/Frontends/VirtualBox/src/selector/graphics/details
- Files:
-
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Frontends/VirtualBox/src/selector/graphics/details/UIGDetailsElement.h
r42795 r42813 49 49 50 50 signals: 51 52 /* Notifier: Prepare stuff: */ 53 void sigElementUpdateDone(); 51 54 52 55 /* Notifiers: Hover stuff: */ -
trunk/src/VBox/Frontends/VirtualBox/src/selector/graphics/details/UIGDetailsElements.cpp
r42755 r42813 77 77 { 78 78 if (text() != newText) 79 {80 79 setText(newText); 81 model()->updateLayout();82 update();83 }84 80 cleanupThread(); 81 emit sigElementUpdateDone(); 85 82 } 86 83 … … 224 221 { 225 222 m_pPreview->setMachine(machine()); 223 emit sigElementUpdateDone(); 226 224 } 227 225 -
trunk/src/VBox/Frontends/VirtualBox/src/selector/graphics/details/UIGDetailsGroup.cpp
r42678 r42813 160 160 } 161 161 162 void UIGDetailsGroup::sltNext Done(QString strGroupId)162 void UIGDetailsGroup::sltNextStep(QString strGroupId) 163 163 { 164 164 /* Clear step: */ … … 256 256 m_pStep = new UIPrepareStep(this, strGroupId); 257 257 connect(pSet, SIGNAL(sigSetCreationDone()), m_pStep, SLOT(sltStepDone()), Qt::QueuedConnection); 258 connect(m_pStep, SIGNAL(sigStepDone(const QString&)), this, SLOT(sltNext Done(const QString&)), Qt::QueuedConnection);258 connect(m_pStep, SIGNAL(sigStepDone(const QString&)), this, SLOT(sltNextStep(const QString&)), Qt::QueuedConnection); 259 259 /* Configure set: */ 260 260 pSet->configure(m_items[m_iStep], m_settings, m_items.size() == 1); 261 /* Update model: */ 262 model()->updateLayout(); 263 } 264 } 265 261 } 262 } 263 -
trunk/src/VBox/Frontends/VirtualBox/src/selector/graphics/details/UIGDetailsGroup.h
r42608 r42813 67 67 /* Handlers: Prepare stuff: */ 68 68 void sltFirstStep(QString strGroupId); 69 void sltNext Done(QString strGroupId);69 void sltNextStep(QString strGroupId); 70 70 71 71 private: -
trunk/src/VBox/Frontends/VirtualBox/src/selector/graphics/details/UIGDetailsSet.cpp
r42768 r42813 32 32 UIGDetailsSet::UIGDetailsSet(UIGDetailsItem *pParent) 33 33 : UIGDetailsItem(pParent) 34 , m_pStep(0) 34 35 , m_iStep(-1) 35 36 , m_iLastStep(-1) … … 43 44 /* Prepare connections: */ 44 45 connect(this, SIGNAL(sigStartFirstStep(QString)), this, SLOT(sltFirstStep(QString)), Qt::QueuedConnection); 45 connect(this, SIGNAL(sigElementPrepared(QString)), this, SLOT(sltNextStep(QString)), Qt::QueuedConnection);46 46 connect(this, SIGNAL(sigSetPrepared()), this, SLOT(sltSetPrepared()), Qt::QueuedConnection); 47 47 connect(gVBoxEvents, SIGNAL(sigMachineStateChange(QString, KMachineState)), this, SLOT(sltMachineStateChange(QString))); … … 79 79 void UIGDetailsSet::sltFirstStep(QString strSetId) 80 80 { 81 /* Clear step: */ 82 delete m_pStep; 83 m_pStep = 0; 84 81 85 /* Was that a requested set? */ 82 86 if (strSetId != m_strSetId) … … 90 94 void UIGDetailsSet::sltNextStep(QString strSetId) 91 95 { 96 /* Clear step: */ 97 delete m_pStep; 98 m_pStep = 0; 99 92 100 /* Was that a requested set? */ 93 101 if (strSetId != m_strSetId) … … 477 485 } 478 486 487 /* Clear step: */ 488 delete m_pStep; 489 m_pStep = 0; 490 479 491 /* Prepare first element: */ 480 492 m_strSetId = QUuid::createUuid().toString(); … … 498 510 /* Check if element is present already: */ 499 511 UIGDetailsElement *pElement = element(elementType); 500 /* Create if necessary: */ 512 /* Create element if necessary: */ 513 bool fJustCreated = false; 501 514 if (!pElement) 515 { 516 fJustCreated = true; 502 517 pElement = createElement(elementType, fOpen); 503 /* Prepare element: */ 518 } 519 520 /* Show element if necessary: */ 504 521 if (fVisible && !pElement->isVisible()) 522 { 505 523 pElement->show(); 524 model()->updateLayout(); 525 } 526 /* Hide element if necessary: */ 506 527 else if (!fVisible && pElement->isVisible()) 528 { 507 529 pElement->hide(); 530 model()->updateLayout(); 531 } 532 /* Update model if necessary: */ 533 else if (fJustCreated) 534 model()->updateLayout(); 535 536 /* For visible element: */ 508 537 if (pElement->isVisible()) 538 { 539 /* Create prepare step: */ 540 m_pStep = new UIPrepareStep(this, strSetId); 541 connect(pElement, SIGNAL(sigElementUpdateDone()), m_pStep, SLOT(sltStepDone()), Qt::QueuedConnection); 542 connect(m_pStep, SIGNAL(sigStepDone(const QString&)), this, SLOT(sltNextStep(const QString&)), Qt::QueuedConnection); 543 544 /* Update element: */ 509 545 pElement->updateAppearance(); 510 model()->updateLayout(); 511 /* Mark element prepared: */ 512 emit sigElementPrepared(strSetId); 546 } 547 /* For invisible element: */ 548 else 549 { 550 /* Just go to the next step: */ 551 sltNextStep(strSetId); 552 } 513 553 } 514 554 /* Step number out of bounds: */ … … 516 556 { 517 557 /* Mark whole set prepared: */ 558 model()->updateLayout(); 559 foreach (UIGDetailsItem *pElement, items()) 560 pElement->update(); 518 561 emit sigSetPrepared(); 519 562 } -
trunk/src/VBox/Frontends/VirtualBox/src/selector/graphics/details/UIGDetailsSet.h
r42722 r42813 41 41 /* Notifiers: Prepare stuff: */ 42 42 void sigStartFirstStep(QString strSetId); 43 void sigElementPrepared(QString strSetId);44 43 void sigSetPrepared(); 45 44 void sigSetCreationDone(); … … 112 111 113 112 /* Prepare variables: */ 113 UIPrepareStep *m_pStep; 114 114 int m_iStep; 115 115 int m_iLastStep;
Note:
See TracChangeset
for help on using the changeset viewer.