1 | /* $Id: UITextTable.h 98103 2023-01-17 14:15:46Z vboxsync $ */
|
---|
2 | /** @file
|
---|
3 | * VBox Qt GUI - UITextTable class declaration.
|
---|
4 | */
|
---|
5 |
|
---|
6 | /*
|
---|
7 | * Copyright (C) 2012-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_globals_UITextTable_h
|
---|
29 | #define FEQT_INCLUDED_SRC_globals_UITextTable_h
|
---|
30 | #ifndef RT_WITHOUT_PRAGMA_ONCE
|
---|
31 | # pragma once
|
---|
32 | #endif
|
---|
33 |
|
---|
34 | /* Qt includes: */
|
---|
35 | #include <QObject>
|
---|
36 | #include <QString>
|
---|
37 |
|
---|
38 | /* GUI includes: */
|
---|
39 | #include "UILibraryDefs.h"
|
---|
40 |
|
---|
41 | /** QObject extension used as an
|
---|
42 | * accessible wrapper for QString pairs. */
|
---|
43 | class SHARED_LIBRARY_STUFF UITextTableLine : public QObject
|
---|
44 | {
|
---|
45 | Q_OBJECT;
|
---|
46 |
|
---|
47 | public:
|
---|
48 |
|
---|
49 | /** Constructs text-table line passing @a pParent to the base-class.
|
---|
50 | * @param str1 Brings the 1st table string.
|
---|
51 | * @param str2 Brings the 2nd table string. */
|
---|
52 | UITextTableLine(const QString &str1, const QString &str2, QObject *pParent = 0);
|
---|
53 |
|
---|
54 | /** Constructs text-table line on the basis of passed @a other. */
|
---|
55 | UITextTableLine(const UITextTableLine &other);
|
---|
56 |
|
---|
57 | /** Assigns @a other to this. */
|
---|
58 | UITextTableLine &operator=(const UITextTableLine &other);
|
---|
59 |
|
---|
60 | /** Compares @a other to this. */
|
---|
61 | bool operator==(const UITextTableLine &other) const;
|
---|
62 |
|
---|
63 | /** Defines 1st table @a strString. */
|
---|
64 | void set1(const QString &strString) { m_str1 = strString; }
|
---|
65 | /** Returns 1st table string. */
|
---|
66 | const QString &string1() const { return m_str1; }
|
---|
67 |
|
---|
68 | /** Defines 2nd table @a strString. */
|
---|
69 | void set2(const QString &strString) { m_str2 = strString; }
|
---|
70 | /** Returns 2nd table string. */
|
---|
71 | const QString &string2() const { return m_str2; }
|
---|
72 |
|
---|
73 | private:
|
---|
74 |
|
---|
75 | /** Holds the 1st table string. */
|
---|
76 | QString m_str1;
|
---|
77 | /** Holds the 2nd table string. */
|
---|
78 | QString m_str2;
|
---|
79 | };
|
---|
80 |
|
---|
81 | /** Defines the list of UITextTableLine instances. */
|
---|
82 | typedef QList<UITextTableLine> UITextTable;
|
---|
83 | Q_DECLARE_METATYPE(UITextTable);
|
---|
84 |
|
---|
85 | #endif /* !FEQT_INCLUDED_SRC_globals_UITextTable_h */
|
---|