VirtualBox

source: vbox/trunk/src/VBox/Frontends/VirtualBox/src/extensions/QIDialogButtonBox.h@ 35740

Last change on this file since 35740 was 30356, checked in by vboxsync, 14 years ago

FE/Qt4: added a new segmented button type; code cleanup

  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
File size: 1.8 KB
Line 
1/** @file
2 *
3 * VBox frontends: Qt GUI ("VirtualBox"):
4 * VirtualBox Qt extensions: QIDialogButtonBox class declaration
5 */
6
7/*
8 * Copyright (C) 2008 Oracle Corporation
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
19#ifndef __QIDialogButtonBox_h__
20#define __QIDialogButtonBox_h__
21
22#include "QIWithRetranslateUI.h"
23
24/* Qt includes */
25#include <QDialogButtonBox>
26#include <QPointer>
27
28class QBoxLayout;
29
30class UIHelpButton;
31
32class QIDialogButtonBox: public QIWithRetranslateUI<QDialogButtonBox>
33{
34public:
35 QIDialogButtonBox (QWidget *aParent = 0) :QIWithRetranslateUI<QDialogButtonBox> (aParent) {}
36 QIDialogButtonBox (Qt::Orientation aOrientation, QWidget *aParent = 0) :QIWithRetranslateUI<QDialogButtonBox> (aParent) { setOrientation (aOrientation); }
37 QIDialogButtonBox (StandardButtons aButtons, Qt::Orientation aOrientation = Qt::Horizontal, QWidget *aParent = 0);
38
39 QPushButton *button (StandardButton aWhich) const;
40
41 QPushButton *addButton (const QString &aText, ButtonRole aRole);
42 QPushButton *addButton (StandardButton aButton);
43
44 void setStandardButtons (StandardButtons aButtons);
45
46 void addExtraWidget (QWidget *aWidget);
47 void addExtraLayout (QLayout *aLayout);
48
49protected:
50
51 QBoxLayout *boxLayout() const;
52 int findEmptySpace (QBoxLayout *aLayout) const;
53
54 void retranslateUi();
55
56private:
57
58 QPointer<UIHelpButton> mHelpButton;
59};
60
61#endif /* __QIDialogButtonBox_h__ */
62
Note: See TracBrowser for help on using the repository browser.

© 2023 Oracle
ContactPrivacy policyTerms of Use