VirtualBox

Changeset 4022 in vbox for trunk


Ignore:
Timestamp:
Aug 3, 2007 1:40:57 PM (17 years ago)
Author:
vboxsync
Message:

Update for shared folder LED

File:
1 edited

Legend:

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

    r3971 r4022  
    754754    usb_light->setStateIcon (CEnums::DeviceWriting, QPixmap::fromMimeSource ("usb_write_16px.png"));
    755755    usb_light->setStateIcon (CEnums::InvalidActivity, QPixmap::fromMimeSource ("usb_disabled_16px.png"));
    756     /// @todo add proper read/write states for shared folders when it is implemented
    757     sf_state = new QIStateIndicator (0, indicatorBox, "sf_state", WNoAutoErase);
    758     sf_state->setStateIcon (0, QPixmap::fromMimeSource ("shared_folder_16px.png"));
    759     sf_state->setStateIcon (1, QPixmap::fromMimeSource ("shared_folder_disabled_16px.png"));
     756    /** @todo missing pictures for read & write shared folder states */
     757    sf_light = new QIStateIndicator (CEnums::DeviceIdle, indicatorBox, "sf_light", WNoAutoErase);
     758    sf_light->setStateIcon (CEnums::DeviceIdle, QPixmap::fromMimeSource ("shared_folder_16px.png"));
     759    sf_light->setStateIcon (CEnums::DeviceReading, QPixmap::fromMimeSource ("shared_folder_read_16px.png"));
     760    sf_light->setStateIcon (CEnums::DeviceWriting, QPixmap::fromMimeSource ("shared_folder_write_16px.png"));
     761    sf_light->setStateIcon (CEnums::InvalidActivity, QPixmap::fromMimeSource ("shared_folder_disabled_16px.png"));
    760762
    761763    (new QFrame (indicatorBox))->setFrameStyle (QFrame::VLine | QFrame::Sunken);
     
    876878    connect (usb_light, SIGNAL (contextMenuRequested (QIStateIndicator *, QContextMenuEvent *)),
    877879             this, SLOT (showIndicatorContextMenu (QIStateIndicator *, QContextMenuEvent *)));
    878     connect (sf_state, SIGNAL (contextMenuRequested (QIStateIndicator *, QContextMenuEvent *)),
     880    connect (sf_light, SIGNAL (contextMenuRequested (QIStateIndicator *, QContextMenuEvent *)),
    879881             this, SLOT (showIndicatorContextMenu (QIStateIndicator *, QContextMenuEvent *)));
    880882    connect (net_light, SIGNAL (contextMenuRequested (QIStateIndicator *, QContextMenuEvent *)),
     
    10991101        devicesSFDialogAction->setVisible (false);
    11001102        devicesMenu->setItemVisible (devicesSFMenuSeparatorId, false);
    1101         sf_state->setHidden (true);
     1103        sf_light->setHidden (true);
    11021104    }
    11031105
     
    18001802            "capture state. It can also be used in combination with other keys "
    18011803            "to quickly perform actions from the main menu." ));
    1802     QToolTip::add (sf_state,
     1804    QToolTip::add (sf_light,
    18031805/// @todo add later, when activity is actually reported
    18041806//        tr ("Indicates the activity of shared folders."));
     
    29062908    }
    29072909    else
    2908     if (ind == sf_state)
     2910    if (ind == sf_light)
    29092911    {
    29102912        devicesSharedFolders->exec (e->globalPos());
     
    29492951            if (usb_light->state() != st)
    29502952                usb_light->setState (st);
     2953        }
     2954        if (sf_light->state() != CEnums::InvalidActivity) {
     2955            st = cconsole.GetDeviceActivity (CEnums::SharedFolderDevice);
     2956            if (sf_light->state() != st)
     2957                sf_light->setState (st);
    29512958        }
    29522959    }
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