VirtualBox

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

Last change on this file was 104358, checked in by vboxsync, 4 weeks ago

FE/Qt. bugref:10622. More refactoring around the retranslation functionality.

  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
File size: 2.3 KB
Line 
1/* $Id: UILineTextEdit.h 104358 2024-04-18 05:33:40Z 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
37/* Qt includes */
38#include <QPushButton>
39
40/* Qt forward declarations */
41class QTextEdit;
42class QDialogButtonBox;
43
44////////////////////////////////////////////////////////////////////////////////
45// UITextEditor
46
47class UITextEditor: public QIDialog
48{
49 Q_OBJECT;
50
51public:
52 UITextEditor(QWidget *pParent = NULL);
53
54 void setText(const QString& strText);
55 QString text() const;
56
57private slots:
58
59 void sltRetranslateUI();
60 void open() RT_OVERRIDE;
61
62private:
63 /* Private member vars */
64 QTextEdit *m_pTextEdit;
65 QDialogButtonBox *m_pButtonBox;
66 QPushButton *m_pOpenButton;
67};
68
69////////////////////////////////////////////////////////////////////////////////
70// UILineTextEdit
71
72class UILineTextEdit: public QPushButton
73{
74 Q_OBJECT;
75
76signals:
77
78 /* Notifier: Editing stuff: */
79 void sigFinished(QWidget *pThis);
80
81public:
82 UILineTextEdit(QWidget *pParent = NULL);
83
84 void setText(const QString& strText) { m_strText = strText; }
85 QString text() const { return m_strText; }
86
87private slots:
88
89 void sltRetranslateUI();
90 void edit();
91
92private:
93 /* Private member vars */
94 QString m_strText;
95};
96
97#endif /* !FEQT_INCLUDED_SRC_widgets_UILineTextEdit_h */
Note: See TracBrowser for help on using the repository browser.

© 2023 Oracle
ContactPrivacy policyTerms of Use