VirtualBox

Changeset 650 in vbox for trunk/src


Ignore:
Timestamp:
Feb 5, 2007 9:09:50 PM (18 years ago)
Author:
vboxsync
Message:

FE/Qt: New auto-resize and adjust icons; new tooltips for status icons in the VM console window's status line.

Location:
trunk/src/VBox/Frontends/VirtualBox
Files:
2 deleted
5 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Frontends/VirtualBox/VBoxUI.pro

    r567 r650  
    125125        images/adjust_win_size_16px.png \
    126126        images/adjust_win_size_disabled_16px.png \
    127         images/auto_resize_16px.png \
    128         images/auto_resize_disabled_16px.png \
     127        images/auto_resize_on_16px.png \
     128        images/auto_resize_on_disabled_16px.png \
     129        images/auto_resize_off_16px.png \
     130        images/auto_resize_off_disabled_16px.png \
    129131        images/exit_16px.png \
    130132        images/fd_unmount_16px.png \
  • trunk/src/VBox/Frontends/VirtualBox/include/VBoxConsoleWnd.h

    r382 r650  
    215215    QIStateIndicator *hd_light, *cd_light, *fd_light, *net_light, *usb_light;
    216216    QIStateIndicator *mouse_state, *hostkey_state;
     217    QIStateIndicator *autoresize_state;
    217218    QHBox *hostkey_hbox;
    218219    QLabel *hostkey_name;
  • trunk/src/VBox/Frontends/VirtualBox/src/VBoxConsoleWnd.cpp

    r618 r650  
    184184    vmAutoresizeGuestAction = new QAction (runningActions, "vmAutoresizeGuestAction");
    185185    vmAutoresizeGuestAction->setIconSet (
    186         VBoxGlobal::iconSet ("auto_resize_16px.png", "auto_resize_disabled_16px.png"));
     186        VBoxGlobal::iconSet ("auto_resize_on_16px.png", "auto_resize_on_disabled_16px.png"));
    187187    vmAutoresizeGuestAction->setToggleAction (true);
    188188
     
    372372    usb_light->setStateIcon (CEnums::DeviceWriting, QPixmap::fromMimeSource ("usb_write_16px.png"));
    373373    usb_light->setStateIcon (CEnums::InvalidActivity, QPixmap::fromMimeSource ("usb_disabled_16px.png"));
     374    /* auto resize state */
     375    (new QFrame (indicatorBox))->setFrameStyle (QFrame::VLine | QFrame::Sunken);
     376    autoresize_state = new QIStateIndicator (1, indicatorBox, "autoresize_state", WNoAutoErase);
     377    autoresize_state->setStateIcon (0, QPixmap::fromMimeSource ("auto_resize_off_disabled_16px.png"));
     378    autoresize_state->setStateIcon (1, QPixmap::fromMimeSource ("auto_resize_off_16px.png"));
     379    autoresize_state->setStateIcon (2, QPixmap::fromMimeSource ("auto_resize_on_disabled_16px.png"));
     380    autoresize_state->setStateIcon (3, QPixmap::fromMimeSource ("auto_resize_on_16px.png"));
    374381    /* mouse */
    375     (new QFrame (indicatorBox))->setFrameStyle (QFrame::VLine | QFrame::Sunken);
    376382    mouse_state = new QIStateIndicator (0, indicatorBox, "mouse_state", WNoAutoErase);
    377383    mouse_state->setStateIcon (0, QPixmap::fromMimeSource ("mouse_disabled_16px.png"));
     
    381387    mouse_state->setStateIcon (4, QPixmap::fromMimeSource ("mouse_seamless_disabled_16px.png"));
    382388    /* host key */
    383     (new QFrame (indicatorBox))->setFrameStyle (QFrame::VLine | QFrame::Sunken);
    384389    hostkey_hbox = new QHBox (indicatorBox, "hostkey_hbox");
    385390    hostkey_hbox->setSpacing (3);
     
    389394    hostkey_state->setStateIcon (2, QPixmap::fromMimeSource ("hostkey_pressed_16px.png"));
    390395    hostkey_state->setStateIcon (3, QPixmap::fromMimeSource ("hostkey_captured_pressed_16px.png"));
    391     hostkey_name = new QLabel (
    392         QIHotKeyEdit::keyName (vboxGlobal().settings().hostKey()), hostkey_hbox, "hostkey_name"
    393     );
     396    hostkey_name = new QLabel (QIHotKeyEdit::keyName (vboxGlobal().settings().hostKey()),
     397                               hostkey_hbox, "hostkey_name");
    394398    /* add to statusbar */
    395399    statusBar()->addWidget (indicatorBox, 0, true);
     
    11501154    /* status bar widgets */
    11511155
     1156    QToolTip::add (autoresize_state,
     1157        tr ("Indicates whether the guest display auto-resize function is On "
     1158            "(<img src=auto_resize_on_16px.png/>) or Off (<img src=auto_resize_off_16px.png/>)"));
    11521159    QToolTip::add (mouse_state,
    1153         tr ("Indicates whether the host mouse pointer is captured by the guest OS"));
     1160        tr ("Indicates whether the host mouse pointer is captured by the guest OS:<br>"
     1161            "<nobr><img src=mouse_disabled_16px.png/>&nbsp;&nbsp;poinyrt is not captured</nobr><br>"
     1162            "<nobr><img src=mouse_16px.png/>&nbsp;&nbsp;pointer is captured</nobr><br>"
     1163            "<nobr><img src=mouse_seamless_16px.png/>&nbsp;&nbsp;mouse integration (MI) is On</nobr><br>"
     1164            "<nobr><img src=mouse_can_seamless_16px.png/>&nbsp;&nbsp;MI is Off, pointer is captured</nobr><br>"
     1165            "<nobr><img src=mouse_seamless_disabled_16px.png/>&nbsp;&nbsp;MI is Off, pointer is not captured</nobr>"));
    11541166    QToolTip::add (hostkey_state,
    1155         tr ("Indicates whether the keyboard is captured by the guest OS"));
     1167        tr ("Indicates whether the keyboard is captured by the guest OS "
     1168            "(<img src=hostkey_captured_16px.png/>) or not (<img src=hostkey_16px.png/>)"));
    11561169    QToolTip::add (hostkey_name,
    11571170        tr ("Shows the currently assigned host key"));
     
    14531466void VBoxConsoleWnd::vmAutoresizeGuest (bool on)
    14541467{
    1455     if (console)
    1456         console->setAutoresizeGuest (on);
     1468    if (!console)
     1469        return;
     1470
     1471    /* Currently, we use only "off" and "on" icons. Later,
     1472     * we may want to use disabled versions of icons when no guest additions
     1473     * are available (to indicate that this function is ineffective). */
     1474    autoresize_state->setState (on ? 3 : 1);
     1475
     1476    console->setAutoresizeGuest (on);
    14571477}
    14581478
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