VirtualBox

source: vbox/trunk/src/VBox/Frontends/VirtualBox/src/extensions/QIDialogContainer.h@ 100347

Last change on this file since 100347 was 98103, checked in by vboxsync, 2 years 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.7 KB
Line 
1/* $Id: QIDialogContainer.h 98103 2023-01-17 14:15:46Z vboxsync $ */
2/** @file
3 * VBox Qt GUI - Qt extensions: QIDialogContainer class declaration.
4 */
5
6/*
7 * Copyright (C) 2019-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_extensions_QIDialogContainer_h
29#define FEQT_INCLUDED_SRC_extensions_QIDialogContainer_h
30#ifndef RT_WITHOUT_PRAGMA_ONCE
31# pragma once
32#endif
33
34/* Qt includes: */
35#include <QDialog>
36
37/* GUI includes: */
38#include "QIWithRetranslateUI.h"
39#include "UILibraryDefs.h"
40
41/* Forward declarations: */
42class QGridLayout;
43class QLabel;
44class QProgressBar;
45class QWidget;
46class QIDialogButtonBox;
47
48/** QDialog sub-class used as executable input container for passed widget.
49 * Should be used as popup or modal dialog wrapping functionality of the passed widget. */
50class SHARED_LIBRARY_STUFF QIDialogContainer : public QIWithRetranslateUI2<QDialog>
51{
52 Q_OBJECT;
53
54public:
55
56 /** Constructs QIDialogContainer passing @a pParent & @a enmFlags to the base-class. */
57 QIDialogContainer(QWidget *pParent = 0, Qt::WindowFlags enmFlags = Qt::WindowFlags());
58
59 /** Defines containing @a pWidget. */
60 void setWidget(QWidget *pWidget);
61
62public slots:
63
64 /** Activates window. */
65 void sltActivateWindow() { activateWindow(); }
66
67 /** Sets progress-bar to be @a fHidden. */
68 void setProgressBarHidden(bool fHidden);
69
70 /** Sets Ok button to be @a fEnabled. */
71 void setOkButtonEnabled(bool fEnabled);
72
73protected:
74
75 /** Handles translation event. */
76 virtual void retranslateUi() RT_OVERRIDE;
77
78private:
79
80 /** Prepares all. */
81 void prepare();
82
83 /** Holds the layout instance. */
84 QGridLayout *m_pLayout;
85 /** Holds the widget reference. */
86 QWidget *m_pWidget;
87 /** Holds the progress-bar instance. */
88 QLabel *m_pProgressLabel;
89 /** Holds the progress-bar instance. */
90 QProgressBar *m_pProgressBar;
91 /** Holds the button-box instance. */
92 QIDialogButtonBox *m_pButtonBox;
93};
94
95#endif /* !FEQT_INCLUDED_SRC_extensions_QIDialogContainer_h */
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