VirtualBox

source: vbox/trunk/src/VBox/Frontends/VirtualBox/src/extensions/QIInputDialog.h@ 104158

Last change on this file since 104158 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: QIInputDialog.h 98103 2023-01-17 14:15:46Z vboxsync $ */
2/** @file
3 * VBox Qt GUI - Qt extensions: QIInputDialog class declaration.
4 */
5
6/*
7 * Copyright (C) 2008-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_QIInputDialog_h
29#define FEQT_INCLUDED_SRC_extensions_QIInputDialog_h
30#ifndef RT_WITHOUT_PRAGMA_ONCE
31# pragma once
32#endif
33
34/* Qt includes: */
35#include <QDialog>
36#include <QPointer>
37
38/* GUI includes: */
39#include "QIWithRetranslateUI.h"
40#include "UILibraryDefs.h"
41
42/* Forward declarations: */
43class QLabel;
44class QLineEdit;
45class QIDialogButtonBox;
46
47/** QDialog extension providing the GUI with
48 * the advanced input dialog capabilities. */
49class SHARED_LIBRARY_STUFF QIInputDialog : public QDialog
50{
51 Q_OBJECT;
52
53public:
54
55 /** Constructs the dialog passing @a pParent and @a enmFlags to the base-class. */
56 QIInputDialog(QWidget *pParent = 0, Qt::WindowFlags enmFlags = Qt::WindowFlags());
57
58 /** Returns label text. */
59 QString labelText() const;
60 /** Undefines label text. */
61 void resetLabelText();
62 /** Defines label @a strText. */
63 void setLabelText(const QString &strText);
64
65 /** Returns text value. */
66 QString textValue() const;
67 /** Defines @a strText value. */
68 void setTextValue(const QString &strText);
69
70protected:
71
72 /** Handles translation event. */
73 virtual void retranslateUi();
74
75private slots:
76
77 /** Handles text value change. */
78 void sltTextChanged();
79
80private:
81
82 /** Prepared all. */
83 void prepare();
84
85 /** Holds whether label text redefined. */
86 bool m_fDefaultLabelTextRedefined;
87
88 /** Holds the label instance. */
89 QLabel *m_pLabel;
90 /** Holds the text value editor instance. */
91 QLineEdit *m_pTextValueEditor;
92 /** Holds the button-box instance. */
93 QIDialogButtonBox *m_pButtonBox;
94};
95
96/** Safe pointer to the QIInputDialog class. */
97typedef QPointer<QIInputDialog> QISafePointerInputDialog;
98
99#endif /* !FEQT_INCLUDED_SRC_extensions_QIInputDialog_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