VirtualBox

source: vbox/trunk/src/VBox/Frontends/VirtualBox/src/widgets/UIMenuToolBar.h@ 82781

Last change on this file since 82781 was 76581, checked in by vboxsync, 5 years ago

Fe/QT: scm header guard alignment.

  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
File size: 2.0 KB
Line 
1/* $Id: UIMenuToolBar.h 76581 2019-01-01 06:24:57Z vboxsync $ */
2/** @file
3 * VBox Qt GUI - UIMenuToolBar class declaration.
4 */
5
6/*
7 * Copyright (C) 2017-2019 Oracle Corporation
8 *
9 * This file is part of VirtualBox Open Source Edition (OSE), as
10 * available from http://www.virtualbox.org. This file is free software;
11 * you can redistribute it and/or modify it under the terms of the GNU
12 * General Public License (GPL) as published by the Free Software
13 * Foundation, in version 2 as it comes in the "COPYING" file of the
14 * VirtualBox OSE distribution. VirtualBox OSE is distributed in the
15 * hope that it will be useful, but WITHOUT ANY WARRANTY of any kind.
16 */
17
18#ifndef FEQT_INCLUDED_SRC_widgets_UIMenuToolBar_h
19#define FEQT_INCLUDED_SRC_widgets_UIMenuToolBar_h
20#ifndef RT_WITHOUT_PRAGMA_ONCE
21# pragma once
22#endif
23
24/* Qt includes: */
25#include <QWidget>
26
27/* Forward declarations: */
28class UIMenuToolBarPrivate;
29
30
31/** QWidget wrapper for UIToolBar extension
32 * holding single drop-down menu of actions. */
33class UIMenuToolBar : public QWidget
34{
35 Q_OBJECT;
36
37public:
38
39 /** Menu toolbar alignment types. */
40 enum AlignmentType
41 {
42 AlignmentType_TopLeft,
43 AlignmentType_TopRight,
44 AlignmentType_BottomLeft,
45 AlignmentType_BottomRight,
46 };
47
48 /** Constructs menu-toolbar wrapper. */
49 UIMenuToolBar(QWidget *pParent = 0);
50
51 /** Defines toolbar alignment @a enmType. */
52 void setAlignmentType(AlignmentType enmType);
53
54 /** Defines toolbar icon @a size. */
55 void setIconSize(const QSize &size);
56
57 /** Defines toolbar menu action. */
58 void setMenuAction(QAction *pAction);
59
60 /** Defines toolbar tool button @a enmStyle. */
61 void setToolButtonStyle(Qt::ToolButtonStyle enmStyle);
62
63 /** Returns toolbar widget for passed @a pAction. */
64 QWidget *widgetForAction(QAction *pAction) const;
65
66private:
67
68 /** Prepares all. */
69 void prepare();
70
71 /** Holds the menu-toolbar instance. */
72 UIMenuToolBarPrivate *m_pToolbar;
73};
74
75#endif /* !FEQT_INCLUDED_SRC_widgets_UIMenuToolBar_h */
76
Note: See TracBrowser for help on using the repository browser.

© 2023 Oracle
ContactPrivacy policyTerms of Use