VirtualBox

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

Last change on this file was 106061, checked in by vboxsync, 4 weeks ago

Copyright year updates by scm.

  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
File size: 2.2 KB
RevLine 
[55401]1/* $Id: UIMenuToolBar.h 106061 2024-09-16 14:03:52Z vboxsync $ */
[25178]2/** @file
[67060]3 * VBox Qt GUI - UIMenuToolBar class declaration.
[25178]4 */
5
6/*
[106061]7 * Copyright (C) 2017-2024 Oracle and/or its affiliates.
[25178]8 *
[96407]9 * This file is part of VirtualBox base platform packages, as
10 * available from https://www.virtualbox.org.
11 *
12 * This program is free software; you can redistribute it and/or
13 * modify it under the terms of the GNU General Public License
14 * as published by the Free Software Foundation, in version 3 of the
15 * License.
16 *
17 * This program is distributed in the hope that it will be useful, but
18 * WITHOUT ANY WARRANTY; without even the implied warranty of
19 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
20 * General Public License for more details.
21 *
22 * You should have received a copy of the GNU General Public License
23 * along with this program; if not, see <https://www.gnu.org/licenses>.
24 *
25 * SPDX-License-Identifier: GPL-3.0-only
[25178]26 */
27
[76581]28#ifndef FEQT_INCLUDED_SRC_widgets_UIMenuToolBar_h
29#define FEQT_INCLUDED_SRC_widgets_UIMenuToolBar_h
[76532]30#ifndef RT_WITHOUT_PRAGMA_ONCE
31# pragma once
32#endif
[25178]33
[46193]34/* Qt includes: */
[67060]35#include <QWidget>
[25178]36
[46193]37/* Forward declarations: */
[67060]38class UIMenuToolBarPrivate;
[25178]39
[67060]40
[86233]41/** QWidget wrapper for QIToolBar extension
[67060]42 * holding single drop-down menu of actions. */
43class UIMenuToolBar : public QWidget
[25178]44{
[51937]45 Q_OBJECT;
46
[25178]47public:
48
[67060]49 /** Menu toolbar alignment types. */
50 enum AlignmentType
51 {
52 AlignmentType_TopLeft,
53 AlignmentType_TopRight,
54 AlignmentType_BottomLeft,
55 AlignmentType_BottomRight,
56 };
[25178]57
[67060]58 /** Constructs menu-toolbar wrapper. */
59 UIMenuToolBar(QWidget *pParent = 0);
[46193]60
[67060]61 /** Defines toolbar alignment @a enmType. */
62 void setAlignmentType(AlignmentType enmType);
[29975]63
[67060]64 /** Defines toolbar icon @a size. */
65 void setIconSize(const QSize &size);
66
67 /** Defines toolbar menu action. */
68 void setMenuAction(QAction *pAction);
69
70 /** Defines toolbar tool button @a enmStyle. */
71 void setToolButtonStyle(Qt::ToolButtonStyle enmStyle);
72
73 /** Returns toolbar widget for passed @a pAction. */
74 QWidget *widgetForAction(QAction *pAction) const;
75
[25178]76private:
77
[67060]78 /** Prepares all. */
[51937]79 void prepare();
80
[67060]81 /** Holds the menu-toolbar instance. */
82 UIMenuToolBarPrivate *m_pToolbar;
[25178]83};
84
[76581]85#endif /* !FEQT_INCLUDED_SRC_widgets_UIMenuToolBar_h */
[67060]86
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