VirtualBox

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

Last change on this file was 103988, checked in by vboxsync, 3 months ago

FE/Qt. bugref:10624. Adding missing override keywords gcc has found.

  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
File size: 2.0 KB
Line 
1/* $Id: UIGraphicsToolBar.h 103988 2024-03-21 13:49:47Z vboxsync $ */
2/** @file
3 * VBox Qt GUI - UIGraphicsToolBar class declaration.
4 */
5
6/*
7 * Copyright (C) 2012-2023 Oracle and/or its affiliates.
8 *
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
26 */
27
28#ifndef FEQT_INCLUDED_SRC_widgets_graphics_UIGraphicsToolBar_h
29#define FEQT_INCLUDED_SRC_widgets_graphics_UIGraphicsToolBar_h
30#ifndef RT_WITHOUT_PRAGMA_ONCE
31# pragma once
32#endif
33
34/* GUI includes: */
35#include "QIGraphicsWidget.h"
36
37/* Forward declarations: */
38class UIGraphicsButton;
39
40/* Graphics tool-bar: */
41class UIGraphicsToolBar : public QIGraphicsWidget
42{
43 Q_OBJECT;
44
45public:
46
47 /* Constructor: */
48 UIGraphicsToolBar(QIGraphicsWidget *pParent, int iRows, int iColumns);
49
50 /* API: Margin stuff: */
51 int toolBarMargin() const;
52 void setToolBarMargin(int iMargin);
53
54 /* API: Children stuff: */
55 void insertItem(UIGraphicsButton *pButton, int iRow, int iColumn);
56
57 /* API: Layout stuff: */
58 void updateLayout();
59
60protected:
61
62 /* Typedefs: */
63 typedef QPair<int, int> UIGraphicsToolBarIndex;
64
65 /* Helpers: Layout stuff: */
66 QSizeF sizeHint(Qt::SizeHint which, const QSizeF &constraint = QSizeF()) const RT_OVERRIDE RT_FINAL;
67
68private:
69
70 /* Variables: */
71 int m_iMargin;
72 int m_iRows;
73 int m_iColumns;
74 QMap<UIGraphicsToolBarIndex, UIGraphicsButton*> m_buttons;
75};
76
77#endif /* !FEQT_INCLUDED_SRC_widgets_graphics_UIGraphicsToolBar_h */
Note: See TracBrowser for help on using the repository browser.

© 2023 Oracle
ContactPrivacy policyTerms of Use