VirtualBox

Changeset 42734 in vbox for trunk


Ignore:
Timestamp:
Aug 9, 2012 11:51:30 PM (12 years ago)
Author:
vboxsync
Message:

FE/Qt: 6234: Support for VM groups: Pause details-view update for the time expand/collapse animation is active.

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  
    13511351    connect(m_pChooser, SIGNAL(sigSelectionChanged()), this, SLOT(sltCurrentVMItemChanged()), Qt::QueuedConnection);
    13521352    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()));
    13531355    connect(m_pChooser, SIGNAL(sigGroupSavingStarted()), this, SLOT(sltGroupSavingUpdate()));
    13541356    connect(m_pChooser, SIGNAL(sigGroupSavingFinished()), this, SLOT(sltGroupSavingUpdate()));
  • trunk/src/VBox/Frontends/VirtualBox/src/selector/graphics/chooser/UIGChooser.cpp

    r42722 r42734  
    118118    connect(m_pChooserModel, SIGNAL(sigSelectionChanged()), this, SIGNAL(sigSelectionChanged()));
    119119    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()));
    120122    connect(m_pChooserModel, SIGNAL(sigGroupSavingStarted()), this, SIGNAL(sigGroupSavingStarted()));
    121123    connect(m_pChooserModel, SIGNAL(sigGroupSavingFinished()), this, SIGNAL(sigGroupSavingFinished()));
  • trunk/src/VBox/Frontends/VirtualBox/src/selector/graphics/chooser/UIGChooser.h

    r42722 r42734  
    4646    void sigSlidingStarted();
    4747
     48    /* Notifiers: Toggle stuff: */
     49    void sigToggleStarted();
     50    void sigToggleFinished();
     51
    4852    /* Notifiers: Group saving stuff: */
    4953    void sigGroupSavingStarted();
  • trunk/src/VBox/Frontends/VirtualBox/src/selector/graphics/chooser/UIGChooserItem.cpp

    r42689 r42734  
    3535#include "UIGChooserItemMachine.h"
    3636
    37 UIGChooserItem::UIGChooserItem(UIGChooserItem *pParent)
     37UIGChooserItem::UIGChooserItem(UIGChooserItem *pParent, bool fTemporary)
    3838    : m_fRoot(!pParent)
     39    , m_fTemporary(fTemporary)
    3940    , m_pParent(pParent)
    4041    , m_dragTokenPlace(DragToken_Off)
     
    182183{
    183184    return m_dragTokenPlace;
     185}
     186
     187
     188bool UIGChooserItem::isTemporary() const
     189{
     190    return m_fTemporary;
    184191}
    185192
  • trunk/src/VBox/Frontends/VirtualBox/src/selector/graphics/chooser/UIGChooserItem.h

    r42678 r42734  
    6363
    6464    /* Constructor: */
    65     UIGChooserItem(UIGChooserItem *pParent);
     65    UIGChooserItem(UIGChooserItem *pParent, bool fTemporary);
    6666
    6767    /* API: Cast stuff: */
     
    110110    DragToken dragTokenPlace() const;
    111111
     112    /* API: Toggle stuff: */
     113    bool isTemporary() const;
     114
    112115protected:
    113116
     
    148151    /* Variables: */
    149152    bool m_fRoot;
     153    bool m_fTemporary;
    150154    UIGChooserItem *m_pParent;
    151155    DragToken m_dragTokenPlace;
  • trunk/src/VBox/Frontends/VirtualBox/src/selector/graphics/chooser/UIGChooserItemGroup.cpp

    r42722 r42734  
    3737
    3838UIGChooserItemGroup::UIGChooserItemGroup(QGraphicsScene *pScene)
    39     : UIGChooserItem(0)
     39    : UIGChooserItem(0, false)
    4040    , m_fClosed(false)
    4141    , m_pToggleButton(0)
     
    5959                                         UIGChooserItemGroup *pCopyFrom,
    6060                                         bool fMainRoot)
    61     : UIGChooserItem(0)
     61    : UIGChooserItem(0, true)
    6262    , m_strName(pCopyFrom->name())
    6363    , m_fClosed(pCopyFrom->closed())
     
    8686                                         bool fOpened /* = false */,
    8787                                         int iPosition /* = -1 */)
    88     : UIGChooserItem(pParent)
     88    : UIGChooserItem(pParent, pParent->isTemporary())
    8989    , m_strName(strName)
    9090    , m_fClosed(!fOpened)
     
    105105    parentItem()->addItem(this, iPosition);
    106106    setZValue(parentItem()->zValue() + 1);
     107    connect(this, SIGNAL(sigToggleStarted()), model(), SIGNAL(sigToggleStarted()));
     108    connect(this, SIGNAL(sigToggleFinished()), model(), SIGNAL(sigToggleFinished()));
    107109}
    108110
     
    110112                                         UIGChooserItemGroup *pCopyFrom,
    111113                                         int iPosition /* = -1 */)
    112     : UIGChooserItem(pParent)
     114    : UIGChooserItem(pParent, pParent->isTemporary())
    113115    , m_strName(pCopyFrom->name())
    114116    , m_fClosed(pCopyFrom->closed())
     
    129131    parentItem()->addItem(this, iPosition);
    130132    setZValue(parentItem()->zValue() + 1);
     133    connect(this, SIGNAL(sigToggleStarted()), model(), SIGNAL(sigToggleStarted()));
     134    connect(this, SIGNAL(sigToggleFinished()), model(), SIGNAL(sigToggleFinished()));
    131135
    132136    /* Copy content to 'this': */
     
    230234        return;
    231235
     236    /* Toggle started: */
     237    if (!isTemporary())
     238        emit sigToggleStarted();
     239
    232240    /* Setup animation: */
    233241    updateAnimationParameters();
     
    263271    /* Relayout model: */
    264272    model()->updateLayout();
     273
     274    /* Toggle finished: */
     275    if (!isTemporary())
     276        emit sigToggleFinished();
    265277}
    266278
  • trunk/src/VBox/Frontends/VirtualBox/src/selector/graphics/chooser/UIGChooserItemGroup.h

    r42678 r42734  
    3636    Q_OBJECT;
    3737    Q_PROPERTY(int additionalHeight READ additionalHeight WRITE setAdditionalHeight);
     38
     39signals:
     40
     41    /* Notifiers: Toggle stuff: */
     42    void sigToggleStarted();
     43    void sigToggleFinished();
    3844
    3945public:
  • trunk/src/VBox/Frontends/VirtualBox/src/selector/graphics/chooser/UIGChooserItemMachine.cpp

    r42722 r42734  
    4444                                             const CMachine &machine,
    4545                                             int iPosition /* = -1 */)
    46     : UIGChooserItem(pParent)
     46    : UIGChooserItem(pParent, pParent->isTemporary())
    4747    , UIVMItem(machine)
    4848    , m_pToolBar(0)
     
    6565                                             UIGChooserItemMachine *pCopyFrom,
    6666                                             int iPosition /* = -1 */)
    67     : UIGChooserItem(pParent)
     67    : UIGChooserItem(pParent, pParent->isTemporary())
    6868    , UIVMItem(pCopyFrom->machine())
    6969    , m_pToolBar(0)
  • trunk/src/VBox/Frontends/VirtualBox/src/selector/graphics/chooser/UIGChooserModel.cpp

    r42722 r42734  
    341341        if (pPreviousFocusItem)
    342342        {
    343             pPreviousFocusItem->disconnect(this);
     343            disconnect(pPreviousFocusItem, SIGNAL(destroyed(QObject*)), this, SLOT(sltFocusItemDestroyed()));
    344344            pPreviousFocusItem->update();
    345345        }
  • trunk/src/VBox/Frontends/VirtualBox/src/selector/graphics/chooser/UIGChooserModel.h

    r42722 r42734  
    7171    /* Notifier: Sliding start: */
    7272    void sigSlidingStarted();
     73
     74    /* Notifiers: Toggle stuff: */
     75    void sigToggleStarted();
     76    void sigToggleFinished();
    7377
    7478    /* Notifiers: Group saving stuff: */
  • trunk/src/VBox/Frontends/VirtualBox/src/selector/graphics/details/UIGDetails.cpp

    r42547 r42734  
    6969    connect(this, SIGNAL(sigSlidingStarted()),
    7070            m_pDetailsModel, SLOT(sltHandleSlidingStarted()));
     71    connect(this, SIGNAL(sigToggleStarted()),
     72            m_pDetailsModel, SLOT(sltHandleToggleStarted()));
     73    connect(this, SIGNAL(sigToggleFinished()),
     74            m_pDetailsModel, SLOT(sltHandleToggleFinished()));
    7175
    7276    /* Selector-view connections: */
  • trunk/src/VBox/Frontends/VirtualBox/src/selector/graphics/details/UIGDetails.h

    r42547 r42734  
    4242    void sigSlidingStarted();
    4343
     44    /* Notifiers: Toggle stuff: */
     45    void sigToggleStarted();
     46    void sigToggleFinished();
     47
    4448public:
    4549
  • trunk/src/VBox/Frontends/VirtualBox/src/selector/graphics/details/UIGDetailsModel.cpp

    r42608 r42734  
    161161}
    162162
     163void UIGDetailsModel::sltHandleToggleStarted()
     164{
     165    m_pRoot->stopPopulatingItems();
     166}
     167
     168void UIGDetailsModel::sltHandleToggleFinished()
     169{
     170    m_pRoot->updateItems();
     171}
     172
    163173QVariant UIGDetailsModel::data(int iKey) const
    164174{
  • trunk/src/VBox/Frontends/VirtualBox/src/selector/graphics/details/UIGDetailsModel.h

    r42547 r42734  
    8585    void sltHandleSlidingStarted();
    8686
     87    /* Handlers: Togle stuff in chooser: */
     88    void sltHandleToggleStarted();
     89    void sltHandleToggleFinished();
     90
    8791private:
    8892
Note: See TracChangeset for help on using the changeset viewer.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette