VirtualBox

Ignore:
Timestamp:
Dec 2, 2008 3:03:52 PM (16 years ago)
Author:
vboxsync
Message:

Fe/Qt4: Systray: Final implementation for now; it uses a separate process for the tray icon. Disabled tray icon menu by default.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Frontends/VirtualBox4/include/VBoxGlobal.h

    r14706 r14908  
    391391
    392392#ifdef VBOX_GUI_WITH_SYSTRAY
     393class VBoxMainWindowCountChangeEvent : public QEvent
     394{
     395public:
     396    VBoxMainWindowCountChangeEvent (int aCount)
     397        : QEvent ((QEvent::Type) VBoxDefs::MainWindowCountChangeEventType)
     398        , mCount (aCount)
     399        {}
     400
     401    const int mCount;
     402};
     403
    393404class VBoxCanShowTrayIconEvent : public QEvent
    394405{
     
    402413};
    403414
     415class VBoxShowTrayIconEvent : public QEvent
     416{
     417public:
     418    VBoxShowTrayIconEvent (bool aShow)
     419        : QEvent ((QEvent::Type) VBoxDefs::ShowTrayIconEventType)
     420        , mShow (aShow)
     421        {}
     422
     423    const bool mShow;
     424};
     425
    404426class VBoxChangeTrayIconEvent : public QEvent
    405427{
    406428public:
    407     VBoxChangeTrayIconEvent (bool aEnabled)
    408         : QEvent ((QEvent::Type) VBoxDefs::ChangeTrayIconEventType)
    409         , mEnabled (aEnabled)
     429    VBoxChangeTrayIconEvent (bool aChanged)
     430        : QEvent ((QEvent::Type) VBoxDefs::TrayIconChangeEventType)
     431        , mChanged (aChanged)
    410432        {}
    411433
    412     const bool mEnabled;
     434    const bool mChanged;
    413435};
    414436#endif
     
    483505    bool isVMConsoleProcess() const { return !vmUuid.isNull(); }
    484506#ifdef VBOX_GUI_WITH_SYSTRAY
    485     bool hasTrayIcon() const;
    486507    bool isTrayMenu() const;
     508    void setTrayMenu(bool aIsTrayMenu);
     509    void trayIconShowSelector();
    487510    bool trayIconInstall();
    488511#endif
     
    956979    void snapshotChanged (const VBoxSnapshotEvent &e);
    957980#ifdef VBOX_GUI_WITH_SYSTRAY
     981    void mainWindowCountChanged (const VBoxMainWindowCountChangeEvent &e);
    958982    void trayIconCanShow (const VBoxCanShowTrayIconEvent &e);
     983    void trayIconShow (const VBoxShowTrayIconEvent &e);
    959984    void trayIconChanged (const VBoxChangeTrayIconEvent &e);
    960985#endif
     
    10001025
    10011026#ifdef VBOX_GUI_WITH_SYSTRAY
    1002     bool mHasTrayIcon;          /* Is current instance responsible for tray icon? */
    10031027    bool mIsTrayMenu;           /* Tray icon active/desired? */
    10041028#endif
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