VirtualBox

Changeset 55550 in vbox for trunk/src


Ignore:
Timestamp:
Apr 30, 2015 12:58:49 PM (10 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
99916
Message:

FE/Qt: 7791: Selector UI: Pass-through and handle the OnEventSourceChanged event to update actions availability states.

Location:
trunk/src/VBox/Frontends/VirtualBox/src
Files:
6 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Frontends/VirtualBox/src/globals/UIMainEventListener.cpp

    r55543 r55550  
    7878        }
    7979
     80        case KVBoxEventType_OnEventSourceChanged:
     81        {
     82            emit sigEventSourceChange();
     83            break;
     84        }
     85
    8086        case KVBoxEventType_OnMachineStateChanged:
    8187        {
  • trunk/src/VBox/Frontends/VirtualBox/src/globals/UIMainEventListener.h

    r55401 r55550  
    5050    /** Notifies about the VBoxSVC become @a fAvailable. */
    5151    void sigVBoxSVCAvailabilityChange(bool fAvailable);
     52
     53    /** Notifies about event-source state change (listener added or removed). */
     54    void sigEventSourceChange();
    5255
    5356    /** Notifies about @a state change event for the machine with @a strId. */
  • trunk/src/VBox/Frontends/VirtualBox/src/selector/UISelectorWindow.cpp

    r55507 r55550  
    155155}
    156156
     157void UISelectorWindow::sltEventSourceChange()
     158{
     159    /* Update actions: */
     160    updateActionsAppearance();
     161}
     162
    157163void UISelectorWindow::sltStateChanged(QString)
    158164{
     
    15511557
    15521558    /* Global event handlers: */
     1559    connect(gVBoxEvents, SIGNAL(sigEventSourceChange()), this, SLOT(sltEventSourceChange()));
    15531560    connect(gVBoxEvents, SIGNAL(sigMachineStateChange(QString, KMachineState)), this, SLOT(sltStateChanged(QString)));
    15541561    connect(gVBoxEvents, SIGNAL(sigSessionStateChange(QString, KSessionState)), this, SLOT(sltStateChanged(QString)));
  • trunk/src/VBox/Frontends/VirtualBox/src/selector/UISelectorWindow.h

    r55507 r55550  
    5858private slots:
    5959
     60    /** Handles event-source state change (listener added or removed). */
     61    void sltEventSourceChange();
    6062    /* Handlers: Global-event stuff: */
    6163    void sltStateChanged(QString strId);
  • trunk/src/VBox/Frontends/VirtualBox/src/selector/UIVirtualBoxEventHandler.cpp

    r55359 r55550  
    8282    QVector<KVBoxEventType> vboxEvents;
    8383    vboxEvents
     84        << KVBoxEventType_OnEventSourceChanged
    8485        << KVBoxEventType_OnMachineStateChanged
    8586        << KVBoxEventType_OnMachineDataChanged
     
    9697    connect(pListener->getWrapped(), SIGNAL(sigVBoxSVCAvailabilityChange(bool)),
    9798            this, SIGNAL(sigVBoxSVCAvailabilityChange(bool)),
     99            Qt::QueuedConnection);
     100    connect(pListener->getWrapped(), SIGNAL(sigEventSourceChange()),
     101            this, SIGNAL(sigEventSourceChange()),
    98102            Qt::QueuedConnection);
    99103    connect(pListener->getWrapped(), SIGNAL(sigMachineStateChange(QString, KMachineState)),
  • trunk/src/VBox/Frontends/VirtualBox/src/selector/UIVirtualBoxEventHandler.h

    r55401 r55550  
    3232    /** Notifies about the VBoxSVC become @a fAvailable. */
    3333    void sigVBoxSVCAvailabilityChange(bool fAvailable);
     34
     35    /** Notifies about event-source state change (listener added or removed). */
     36    void sigEventSourceChange();
    3437
    3538    /** Notifies about @a state change event for the machine with @a strId. */
Note: See TracChangeset for help on using the changeset viewer.

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