VirtualBox

Changeset 67470 in vbox for trunk/src


Ignore:
Timestamp:
Jun 19, 2017 12:18:14 PM (8 years ago)
Author:
vboxsync
Message:

FE/Qt: bugref:8901: Selector UI: Tools pane: Snapshot pane: Split snapshot related Main event handling into separate handlers, which will be implemented soon.

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

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Frontends/VirtualBox/src/selector/UISnapshotPane.cpp

    r67424 r67470  
    624624}
    625625
    626 void UISnapshotPane::sltHandleSnapshotChange(QString strMachineId)
     626void UISnapshotPane::sltHandleSnapshotTake(QString strMachineId, QString strSnapshotId)
    627627{
    628628    /* Make sure it's our VM: */
    629629    if (strMachineId != m_strMachineId)
    630630        return;
     631
     632    LogRel(("GUI: Updating snapshot tree after TAKING snapshot with MachineID={%s}, SnapshotID={%s}...\n",
     633            strMachineId.toUtf8().constData(), strSnapshotId.toUtf8().constData()));
     634
     635    // TODO: Refresh only necessary bits.
     636    /* Refresh everything: */
     637    refreshAll();
     638}
     639
     640void UISnapshotPane::sltHandleSnapshotDelete(QString strMachineId, QString strSnapshotId)
     641{
     642    /* Make sure it's our VM: */
     643    if (strMachineId != m_strMachineId)
     644        return;
     645
     646    LogRel(("GUI: Updating snapshot tree after DELETING snapshot with MachineID={%s}, SnapshotID={%s}...\n",
     647            strMachineId.toUtf8().constData(), strSnapshotId.toUtf8().constData()));
     648
     649    // TODO: Refresh only necessary bits.
     650    /* Refresh everything: */
     651    refreshAll();
     652}
     653
     654void UISnapshotPane::sltHandleSnapshotChange(QString strMachineId, QString strSnapshotId)
     655{
     656    /* Make sure it's our VM: */
     657    if (strMachineId != m_strMachineId)
     658        return;
     659
     660    LogRel(("GUI: Updating snapshot tree after CHANGING snapshot with MachineID={%s}, SnapshotID={%s}...\n",
     661            strMachineId.toUtf8().constData(), strSnapshotId.toUtf8().constData()));
     662
     663    // TODO: Refresh only necessary bits.
     664    /* Refresh everything: */
     665    refreshAll();
     666}
     667
     668void UISnapshotPane::sltHandleSnapshotRestore(QString strMachineId, QString strSnapshotId)
     669{
     670    /* Make sure it's our VM: */
     671    if (strMachineId != m_strMachineId)
     672        return;
     673
     674    LogRel(("GUI: Updating snapshot tree after RESTORING snapshot with MachineID={%s}, SnapshotID={%s}...\n",
     675            strMachineId.toUtf8().constData(), strSnapshotId.toUtf8().constData()));
    631676
    632677    // TODO: Refresh only necessary bits.
     
    857902            this, &UISnapshotPane::sltHandleSessionStateChange);
    858903    connect(gVBoxEvents, &UIVirtualBoxEventHandler::sigSnapshotTake,
    859             this, &UISnapshotPane::sltHandleSnapshotChange);
     904            this, &UISnapshotPane::sltHandleSnapshotTake);
    860905    connect(gVBoxEvents, &UIVirtualBoxEventHandler::sigSnapshotDelete,
    861             this, &UISnapshotPane::sltHandleSnapshotChange);
     906            this, &UISnapshotPane::sltHandleSnapshotDelete);
    862907    connect(gVBoxEvents, &UIVirtualBoxEventHandler::sigSnapshotChange,
    863908            this, &UISnapshotPane::sltHandleSnapshotChange);
    864909    connect(gVBoxEvents, &UIVirtualBoxEventHandler::sigSnapshotRestore,
    865             this, &UISnapshotPane::sltHandleSnapshotChange);
     910            this, &UISnapshotPane::sltHandleSnapshotRestore);
    866911
    867912    /* Create read-write locker: */
  • trunk/src/VBox/Frontends/VirtualBox/src/selector/UISnapshotPane.h

    r67424 r67470  
    9393        void sltHandleSessionStateChange(QString strMachineId, KSessionState enmState);
    9494
    95         /** Handles any snapshot change for machine with @a strMachineId. */
    96         void sltHandleSnapshotChange(QString strMachineId);
     95        /** Handles snapshot take event for machine with @a strMachineId. */
     96        void sltHandleSnapshotTake(QString strMachineId, QString strSnapshotId);
     97        /** Handles snapshot delete event for machine with @a strMachineId. */
     98        void sltHandleSnapshotDelete(QString strMachineId, QString strSnapshotId);
     99        /** Handles snapshot change event for machine with @a strMachineId. */
     100        void sltHandleSnapshotChange(QString strMachineId, QString strSnapshotId);
     101        /** Handles snapshot restore event for machine with @a strMachineId. */
     102        void sltHandleSnapshotRestore(QString strMachineId, QString strSnapshotId);
    97103    /** @} */
    98104
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