VirtualBox

Ignore:
Timestamp:
May 5, 2010 1:55:28 PM (15 years ago)
Author:
vboxsync
Message:

FE/Qt: 3948: Mini-ToolBar for Full-screen & Seamless modes should now have correct positioning and mouse-hovering.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Frontends/VirtualBox/src/widgets/VBoxMiniToolBar.h

    r28800 r29083  
    66
    77/*
    8  * Copyright (C) 2009 Oracle Corporation
     8 * Copyright (C) 2009-2010 Oracle Corporation
    99 *
    1010 * This file is part of VirtualBox Open Source Edition (OSE), as
     
    2020#define __VBoxMiniToolBar_h__
    2121
    22 /* VBox includes */
    23 #include <VBoxToolBar.h>
    24 
    25 /* Qt includes */
     22/* Global includes */
    2623#include <QBasicTimer>
    2724
     25/* Local includes */
     26#include "VBoxToolBar.h"
     27
     28/* Global forwards */
    2829class QLabel;
    2930class QMenu;
     
    4546    };
    4647
    47     VBoxMiniToolBar (QWidget *aParent, Alignment aAlignment, bool aIsActive, bool aAutoHide);
     48    VBoxMiniToolBar(QWidget *pParent, Alignment alignment, bool fActive, bool fAutoHide);
    4849
    49     VBoxMiniToolBar& operator<< (QList <QMenu*> aMenus);
     50    VBoxMiniToolBar& operator<<(QList<QMenu*> menus);
    5051
    51     void setSeamlessMode (bool aIsSeamless);
    52     void setDisplayText (const QString &aText);
     52    void setSeamlessMode(bool fSeamless);
     53    void setDisplayText(const QString &strText);
    5354
    5455    bool isAutoHide() const;
    5556
    56     void updateDisplay (bool aShow, bool aSetHideFlag);
     57    void updateDisplay(bool fShow, bool fSetHideFlag);
    5758
    5859signals:
     
    6465protected:
    6566
    66     void mouseMoveEvent (QMouseEvent *aEvent);
    67     void timerEvent (QTimerEvent *aEvent);
    68     void showEvent (QShowEvent *aEvent);
    69     void paintEvent (QPaintEvent *aEvent);
    7067    bool eventFilter(QObject *pObj, QEvent *pEvent);
     68    void mouseMoveEvent(QMouseEvent *pEvent);
     69    void timerEvent(QTimerEvent *pEvent);
     70    void showEvent(QShowEvent *pEvent);
     71    void paintEvent(QPaintEvent *pEvent);
    7172
    7273private slots:
    7374
    74     void togglePushpin (bool aOn);
     75    void togglePushpin(bool fOn);
    7576
    7677private:
     
    7980    void recreateMask();
    8081    void moveToBase();
    81     QPoint mapFromScreen (const QPoint &aPoint);
     82    void setMouseTrackingEnabled(bool fEnabled);
    8283
    83     QAction *mAutoHideAct;
    84     QLabel *mDisplayLabel;
     84    QAction *m_pAutoHideAction;
     85    QLabel *m_pDisplayLabel;
     86    QAction *m_pRestoreAction;
     87    QAction *m_pCloseAction;
    8588
    86     QBasicTimer mScrollTimer;
    87     QBasicTimer mAutoScrollTimer;
     89    QBasicTimer m_scrollTimer;
     90    QBasicTimer m_autoScrollTimer;
    8891
    89     bool mActive;
    90     bool mPolished;
    91     bool mSeamless;
    92     bool mAutoHide;
    93     bool mSlideToScreen;
    94     bool mHideAfterSlide;
     92    bool m_fActive;
     93    bool m_fPolished;
     94    bool m_fSeamless;
     95    bool m_fAutoHide;
     96    bool m_fSlideToScreen;
     97    bool m_fHideAfterSlide;
    9598
    96     int mAutoHideCounter;
    97     int mPositionX;
    98     int mPositionY;
     99    int m_iAutoHideCounter;
     100    int m_iPositionX;
     101    int m_iPositionY;
    99102
    100103    /* Lists of used spacers */
    101     QList <QWidget*> mMargins;
    102     QList <QWidget*> mSpacings;
    103     QList <QWidget*> mLabelMargins;
     104    QList<QWidget*> m_Margins;
     105    QList<QWidget*> m_Spacings;
     106    QList<QWidget*> m_LabelMargins;
    104107
    105108    /* Menu insert position */
    106     QAction *mInsertPosition;
     109    QAction *m_pInsertPosition;
    107110
    108111    /* Tool-bar alignment */
    109     Alignment mAlignment;
     112    Alignment m_alignment;
    110113
    111114    /* Wether to animate showing/hiding the toolbar */
    112     bool mAnimated;
     115    bool m_fAnimated;
    113116
    114117    /* Interval (in milli seconds) for scrolling the toolbar, default is 20 msec */
    115     int mScrollDelay;
     118    int m_iScrollDelay;
    116119
    117120    /* The wait time while the cursor is not over the window after this amount of time (in msec),
    118121     * the toolbar will auto hide if autohide is on. The default is 100msec. */
    119     int mAutoScrollDelay;
     122    int m_iAutoScrollDelay;
    120123
    121     /* Number of total steps before hiding. If it is 10 then wait 10 (steps) * 100ms (mAutoScrollDelay) = 1000ms delay.
     124    /* Number of total steps before hiding. If it is 10 then wait 10 (steps) * 100ms (m_iAutoScrollDelay) = 1000ms delay.
    122125     * The default is 10. */
    123     int mAutoHideTotalCounter;
     126    int m_iAutoHideTotalCounter;
    124127};
    125128
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