VirtualBox

source: vbox/trunk/src/VBox/Frontends/VirtualBox/include/VBoxMiniToolBar.h@ 20048

Last change on this file since 20048 was 20047, checked in by vboxsync, 16 years ago

FE/Qt4: 3948: Mini-ToolBar for Full-screen & Seamless modes - Initial commit.

  • Property svn:eol-style set to native
  • Property svn:keywords set to Date Revision Author Id
File size: 2.5 KB
Line 
1/** @file
2 *
3 * VBox frontends: Qt GUI ("VirtualBox"):
4 * VBoxMiniToolBar class declaration & implementation. This is the toolbar shown on fullscreen mode.
5 */
6
7/*
8 * Copyright (C) 2006-2007 Sun Microsystems, Inc.
9 *
10 * This file is part of VirtualBox Open Source Edition (OSE), as
11 * available from http://www.virtualbox.org. This file is free software;
12 * you can redistribute it and/or modify it under the terms of the GNU
13 * General Public License (GPL) as published by the Free Software
14 * Foundation, in version 2 as it comes in the "COPYING" file of the
15 * VirtualBox OSE distribution. VirtualBox OSE is distributed in the
16 * hope that it will be useful, but WITHOUT ANY WARRANTY of any kind.
17 *
18 * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa
19 * Clara, CA 95054 USA or visit http://www.sun.com if you need
20 * additional information or have any questions.
21 */
22
23#ifndef __VBoxMiniToolBar_h__
24#define __VBoxMiniToolBar_h__
25
26/* VBox includes */
27#include <VBoxToolBar.h>
28
29/* Qt includes */
30#include <QBasicTimer>
31
32class QLabel;
33class QMenu;
34
35/**
36 * The VBoxMiniToolBar class is a toolbar shown inside full screen mode or seamless mode.
37 * It supports auto hiding and animated sliding up/down.
38 */
39class VBoxMiniToolBar : public VBoxToolBar
40{
41 Q_OBJECT;
42
43public:
44
45 VBoxMiniToolBar (QList <QMenu*> aMenus);
46
47 void updateDisplay (bool aShow, bool aSetHideFlag);
48 void setDisplayText (const QString &aText);
49
50signals:
51
52 void exitAction();
53 void closeAction();
54
55protected:
56
57 void resizeEvent (QResizeEvent *aEvent);
58 void mouseMoveEvent (QMouseEvent *aEvent);
59 void timerEvent (QTimerEvent *aEvent);
60
61private slots:
62
63 void togglePushpin (bool aOn);
64
65private:
66
67 QAction *mAutoHideAct;
68 QLabel *mDisplayLabel;
69
70 QBasicTimer mScrollTimer;
71 QBasicTimer mAutoScrollTimer;
72
73 int mAutoHideCounter;
74 bool mAutoHide;
75 bool mSlideDown;
76 bool mHideAfterSlide;
77
78 /* Wether to animate showing/hiding the toolbar */
79 bool mAnimated;
80
81 /* Interval (in milli seconds) for scrolling the toolbar, default is 20 msec */
82 int mScrollDelay;
83
84 /* The wait time while the cursor is not over the window after this amount of time (in msec),
85 * the toolbar will auto hide if autohide is on. The default is 100msec. */
86 int mAutoScrollDelay;
87
88 /* Number of total steps before hiding. If it is 10 then wait 10 (steps) * 100ms (mAutoScrollDelay) = 1000ms delay.
89 * The default is 10. */
90 int mAutoHideTotalCounter;
91};
92
93#endif // __VBoxMiniToolBar_h__
94
Note: See TracBrowser for help on using the repository browser.

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