- Timestamp:
- Aug 9, 2012 11:51:30 PM (12 years ago)
- Location:
- trunk/src/VBox/Frontends/VirtualBox/src/selector
- Files:
-
- 14 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Frontends/VirtualBox/src/selector/UISelectorWindow.cpp
r42722 r42734 1351 1351 connect(m_pChooser, SIGNAL(sigSelectionChanged()), this, SLOT(sltCurrentVMItemChanged()), Qt::QueuedConnection); 1352 1352 connect(m_pChooser, SIGNAL(sigSlidingStarted()), m_pDetails, SIGNAL(sigSlidingStarted())); 1353 connect(m_pChooser, SIGNAL(sigToggleStarted()), m_pDetails, SIGNAL(sigToggleStarted())); 1354 connect(m_pChooser, SIGNAL(sigToggleFinished()), m_pDetails, SIGNAL(sigToggleFinished())); 1353 1355 connect(m_pChooser, SIGNAL(sigGroupSavingStarted()), this, SLOT(sltGroupSavingUpdate())); 1354 1356 connect(m_pChooser, SIGNAL(sigGroupSavingFinished()), this, SLOT(sltGroupSavingUpdate())); -
trunk/src/VBox/Frontends/VirtualBox/src/selector/graphics/chooser/UIGChooser.cpp
r42722 r42734 118 118 connect(m_pChooserModel, SIGNAL(sigSelectionChanged()), this, SIGNAL(sigSelectionChanged())); 119 119 connect(m_pChooserModel, SIGNAL(sigSlidingStarted()), this, SIGNAL(sigSlidingStarted())); 120 connect(m_pChooserModel, SIGNAL(sigToggleStarted()), this, SIGNAL(sigToggleStarted())); 121 connect(m_pChooserModel, SIGNAL(sigToggleFinished()), this, SIGNAL(sigToggleFinished())); 120 122 connect(m_pChooserModel, SIGNAL(sigGroupSavingStarted()), this, SIGNAL(sigGroupSavingStarted())); 121 123 connect(m_pChooserModel, SIGNAL(sigGroupSavingFinished()), this, SIGNAL(sigGroupSavingFinished())); -
trunk/src/VBox/Frontends/VirtualBox/src/selector/graphics/chooser/UIGChooser.h
r42722 r42734 46 46 void sigSlidingStarted(); 47 47 48 /* Notifiers: Toggle stuff: */ 49 void sigToggleStarted(); 50 void sigToggleFinished(); 51 48 52 /* Notifiers: Group saving stuff: */ 49 53 void sigGroupSavingStarted(); -
trunk/src/VBox/Frontends/VirtualBox/src/selector/graphics/chooser/UIGChooserItem.cpp
r42689 r42734 35 35 #include "UIGChooserItemMachine.h" 36 36 37 UIGChooserItem::UIGChooserItem(UIGChooserItem *pParent )37 UIGChooserItem::UIGChooserItem(UIGChooserItem *pParent, bool fTemporary) 38 38 : m_fRoot(!pParent) 39 , m_fTemporary(fTemporary) 39 40 , m_pParent(pParent) 40 41 , m_dragTokenPlace(DragToken_Off) … … 182 183 { 183 184 return m_dragTokenPlace; 185 } 186 187 188 bool UIGChooserItem::isTemporary() const 189 { 190 return m_fTemporary; 184 191 } 185 192 -
trunk/src/VBox/Frontends/VirtualBox/src/selector/graphics/chooser/UIGChooserItem.h
r42678 r42734 63 63 64 64 /* Constructor: */ 65 UIGChooserItem(UIGChooserItem *pParent );65 UIGChooserItem(UIGChooserItem *pParent, bool fTemporary); 66 66 67 67 /* API: Cast stuff: */ … … 110 110 DragToken dragTokenPlace() const; 111 111 112 /* API: Toggle stuff: */ 113 bool isTemporary() const; 114 112 115 protected: 113 116 … … 148 151 /* Variables: */ 149 152 bool m_fRoot; 153 bool m_fTemporary; 150 154 UIGChooserItem *m_pParent; 151 155 DragToken m_dragTokenPlace; -
trunk/src/VBox/Frontends/VirtualBox/src/selector/graphics/chooser/UIGChooserItemGroup.cpp
r42722 r42734 37 37 38 38 UIGChooserItemGroup::UIGChooserItemGroup(QGraphicsScene *pScene) 39 : UIGChooserItem(0 )39 : UIGChooserItem(0, false) 40 40 , m_fClosed(false) 41 41 , m_pToggleButton(0) … … 59 59 UIGChooserItemGroup *pCopyFrom, 60 60 bool fMainRoot) 61 : UIGChooserItem(0 )61 : UIGChooserItem(0, true) 62 62 , m_strName(pCopyFrom->name()) 63 63 , m_fClosed(pCopyFrom->closed()) … … 86 86 bool fOpened /* = false */, 87 87 int iPosition /* = -1 */) 88 : UIGChooserItem(pParent )88 : UIGChooserItem(pParent, pParent->isTemporary()) 89 89 , m_strName(strName) 90 90 , m_fClosed(!fOpened) … … 105 105 parentItem()->addItem(this, iPosition); 106 106 setZValue(parentItem()->zValue() + 1); 107 connect(this, SIGNAL(sigToggleStarted()), model(), SIGNAL(sigToggleStarted())); 108 connect(this, SIGNAL(sigToggleFinished()), model(), SIGNAL(sigToggleFinished())); 107 109 } 108 110 … … 110 112 UIGChooserItemGroup *pCopyFrom, 111 113 int iPosition /* = -1 */) 112 : UIGChooserItem(pParent )114 : UIGChooserItem(pParent, pParent->isTemporary()) 113 115 , m_strName(pCopyFrom->name()) 114 116 , m_fClosed(pCopyFrom->closed()) … … 129 131 parentItem()->addItem(this, iPosition); 130 132 setZValue(parentItem()->zValue() + 1); 133 connect(this, SIGNAL(sigToggleStarted()), model(), SIGNAL(sigToggleStarted())); 134 connect(this, SIGNAL(sigToggleFinished()), model(), SIGNAL(sigToggleFinished())); 131 135 132 136 /* Copy content to 'this': */ … … 230 234 return; 231 235 236 /* Toggle started: */ 237 if (!isTemporary()) 238 emit sigToggleStarted(); 239 232 240 /* Setup animation: */ 233 241 updateAnimationParameters(); … … 263 271 /* Relayout model: */ 264 272 model()->updateLayout(); 273 274 /* Toggle finished: */ 275 if (!isTemporary()) 276 emit sigToggleFinished(); 265 277 } 266 278 -
trunk/src/VBox/Frontends/VirtualBox/src/selector/graphics/chooser/UIGChooserItemGroup.h
r42678 r42734 36 36 Q_OBJECT; 37 37 Q_PROPERTY(int additionalHeight READ additionalHeight WRITE setAdditionalHeight); 38 39 signals: 40 41 /* Notifiers: Toggle stuff: */ 42 void sigToggleStarted(); 43 void sigToggleFinished(); 38 44 39 45 public: -
trunk/src/VBox/Frontends/VirtualBox/src/selector/graphics/chooser/UIGChooserItemMachine.cpp
r42722 r42734 44 44 const CMachine &machine, 45 45 int iPosition /* = -1 */) 46 : UIGChooserItem(pParent )46 : UIGChooserItem(pParent, pParent->isTemporary()) 47 47 , UIVMItem(machine) 48 48 , m_pToolBar(0) … … 65 65 UIGChooserItemMachine *pCopyFrom, 66 66 int iPosition /* = -1 */) 67 : UIGChooserItem(pParent )67 : UIGChooserItem(pParent, pParent->isTemporary()) 68 68 , UIVMItem(pCopyFrom->machine()) 69 69 , m_pToolBar(0) -
trunk/src/VBox/Frontends/VirtualBox/src/selector/graphics/chooser/UIGChooserModel.cpp
r42722 r42734 341 341 if (pPreviousFocusItem) 342 342 { 343 pPreviousFocusItem->disconnect(this);343 disconnect(pPreviousFocusItem, SIGNAL(destroyed(QObject*)), this, SLOT(sltFocusItemDestroyed())); 344 344 pPreviousFocusItem->update(); 345 345 } -
trunk/src/VBox/Frontends/VirtualBox/src/selector/graphics/chooser/UIGChooserModel.h
r42722 r42734 71 71 /* Notifier: Sliding start: */ 72 72 void sigSlidingStarted(); 73 74 /* Notifiers: Toggle stuff: */ 75 void sigToggleStarted(); 76 void sigToggleFinished(); 73 77 74 78 /* Notifiers: Group saving stuff: */ -
trunk/src/VBox/Frontends/VirtualBox/src/selector/graphics/details/UIGDetails.cpp
r42547 r42734 69 69 connect(this, SIGNAL(sigSlidingStarted()), 70 70 m_pDetailsModel, SLOT(sltHandleSlidingStarted())); 71 connect(this, SIGNAL(sigToggleStarted()), 72 m_pDetailsModel, SLOT(sltHandleToggleStarted())); 73 connect(this, SIGNAL(sigToggleFinished()), 74 m_pDetailsModel, SLOT(sltHandleToggleFinished())); 71 75 72 76 /* Selector-view connections: */ -
trunk/src/VBox/Frontends/VirtualBox/src/selector/graphics/details/UIGDetails.h
r42547 r42734 42 42 void sigSlidingStarted(); 43 43 44 /* Notifiers: Toggle stuff: */ 45 void sigToggleStarted(); 46 void sigToggleFinished(); 47 44 48 public: 45 49 -
trunk/src/VBox/Frontends/VirtualBox/src/selector/graphics/details/UIGDetailsModel.cpp
r42608 r42734 161 161 } 162 162 163 void UIGDetailsModel::sltHandleToggleStarted() 164 { 165 m_pRoot->stopPopulatingItems(); 166 } 167 168 void UIGDetailsModel::sltHandleToggleFinished() 169 { 170 m_pRoot->updateItems(); 171 } 172 163 173 QVariant UIGDetailsModel::data(int iKey) const 164 174 { -
trunk/src/VBox/Frontends/VirtualBox/src/selector/graphics/details/UIGDetailsModel.h
r42547 r42734 85 85 void sltHandleSlidingStarted(); 86 86 87 /* Handlers: Togle stuff in chooser: */ 88 void sltHandleToggleStarted(); 89 void sltHandleToggleFinished(); 90 87 91 private: 88 92
Note:
See TracChangeset
for help on using the changeset viewer.