VirtualBox

Changeset 44011 in vbox


Ignore:
Timestamp:
Dec 3, 2012 2:04:52 PM (12 years ago)
Author:
vboxsync
Message:

FE/Qt: VM group UI: Details-view: Group-item cleanup (part 3).

Location:
trunk/src/VBox/Frontends/VirtualBox/src/selector/graphics/details
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Frontends/VirtualBox/src/selector/graphics/details/UIGDetailsGroup.cpp

    r44010 r44011  
    4040}
    4141
    42 void UIGDetailsGroup::setItems(const QList<UIVMItem*> &items)
    43 {
    44     prepareSets(items);
     42void UIGDetailsGroup::setItems(const QList<UIVMItem*> &machineItems)
     43{
     44    /* Remember new items: */
     45    m_machineItems = machineItems;
     46
     47    /* Cleanup superflous sets: */
     48    while (m_items.size() > m_machineItems.size())
     49        delete m_items.last();
     50
     51    /* Update items: */
     52    updateItems();
    4553}
    4654
    4755void UIGDetailsGroup::updateItems()
    4856{
    49     updateSets();
     57    /* Load settings: */
     58    loadSettings();
     59
     60    /* Clear step: */
     61    delete m_pStep;
     62    m_pStep = 0;
     63
     64    /* Generate new group-id: */
     65    m_strGroupId = QUuid::createUuid().toString();
     66
     67    /* Prepare first set: */
     68    emit sigStartFirstStep(m_strGroupId);
    5069}
    5170
     
    177196}
    178197
    179 void UIGDetailsGroup::prepareSets(const QList<UIVMItem*> &machineItems)
    180 {
    181     /* Remember new items: */
    182     m_machineItems = machineItems;
    183 
    184     /* Cleanup superflous sets: */
    185     while (m_items.size() > m_machineItems.size())
    186         delete m_items.last();
    187 
    188     /* Update sets: */
    189     updateSets();
    190 }
    191 
    192 void UIGDetailsGroup::updateSets()
    193 {
    194     /* Load settings: */
    195     loadSettings();
    196 
    197     /* Clear step: */
    198     delete m_pStep;
    199     m_pStep = 0;
    200 
    201     /* Generate new group-id: */
    202     m_strGroupId = QUuid::createUuid().toString();
    203 
    204     /* Prepare first set: */
    205     emit sigStartFirstStep(m_strGroupId);
    206 }
    207 
    208198void UIGDetailsGroup::prepareSet(QString strGroupId)
    209199{
  • trunk/src/VBox/Frontends/VirtualBox/src/selector/graphics/details/UIGDetailsGroup.h

    r44010 r44011  
    4848
    4949    /* API: Prepare stuff: */
    50     void setItems(const QList<UIVMItem*> &items);
     50    void setItems(const QList<UIVMItem*> &machineItems);
    5151    void updateItems();
    5252    void stopPopulatingItems();
     
    8181    void prepareConnections();
    8282    void loadSettings();
    83     void prepareSets(const QList<UIVMItem*> &items);
    84     void updateSets();
    8583    void prepareSet(QString strGroupId);
    8684
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