VirtualBox

source: vbox/trunk/src/VBox/Frontends/VirtualBox/src/widgets/UILineTextEdit.h@ 103977

Last change on this file since 103977 was 103977, checked in by vboxsync, 2 months ago

Apply RT_OVERRIDE/NS_OVERRIDE where required to shut up clang.

  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
File size: 2.4 KB
Line 
1/* $Id: UILineTextEdit.h 103977 2024-03-21 02:04:52Z vboxsync $ */
2/** @file
3 * VBox Qt GUI - UILineTextEdit class declaration.
4 */
5
6/*
7 * Copyright (C) 2009-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_UILineTextEdit_h
29#define FEQT_INCLUDED_SRC_widgets_UILineTextEdit_h
30#ifndef RT_WITHOUT_PRAGMA_ONCE
31# pragma once
32#endif
33
34/* VBox includes */
35#include "QIDialog.h"
36#include "QIWithRetranslateUI.h"
37
38/* Qt includes */
39#include <QPushButton>
40
41/* Qt forward declarations */
42class QTextEdit;
43class QDialogButtonBox;
44
45////////////////////////////////////////////////////////////////////////////////
46// UITextEditor
47
48class UITextEditor: public QIWithRetranslateUI<QIDialog>
49{
50 Q_OBJECT;
51
52public:
53 UITextEditor(QWidget *pParent = NULL);
54
55 void setText(const QString& strText);
56 QString text() const;
57
58protected:
59 virtual void retranslateUi() RT_OVERRIDE;
60
61private slots:
62 void open() RT_OVERRIDE;
63
64private:
65 /* Private member vars */
66 QTextEdit *m_pTextEdit;
67 QDialogButtonBox *m_pButtonBox;
68 QPushButton *m_pOpenButton;
69};
70
71////////////////////////////////////////////////////////////////////////////////
72// UILineTextEdit
73
74class UILineTextEdit: public QIWithRetranslateUI<QPushButton>
75{
76 Q_OBJECT;
77
78signals:
79
80 /* Notifier: Editing stuff: */
81 void sigFinished(QWidget *pThis);
82
83public:
84 UILineTextEdit(QWidget *pParent = NULL);
85
86 void setText(const QString& strText) { m_strText = strText; }
87 QString text() const { return m_strText; }
88
89protected:
90 virtual void retranslateUi() RT_OVERRIDE;
91
92private slots:
93 void edit();
94
95private:
96 /* Private member vars */
97 QString m_strText;
98};
99
100#endif /* !FEQT_INCLUDED_SRC_widgets_UILineTextEdit_h */
101
Note: See TracBrowser for help on using the repository browser.

© 2023 Oracle
ContactPrivacy policyTerms of Use