[55401] | 1 | /* $Id: UITextTable.h 98103 2023-01-17 14:15:46Z vboxsync $ */
|
---|
[42529] | 2 | /** @file
|
---|
[77432] | 3 | * VBox Qt GUI - UITextTable class declaration.
|
---|
[42529] | 4 | */
|
---|
| 5 |
|
---|
| 6 | /*
|
---|
[98103] | 7 | * Copyright (C) 2012-2023 Oracle and/or its affiliates.
|
---|
[42529] | 8 | *
|
---|
[96407] | 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
|
---|
[42529] | 26 | */
|
---|
| 27 |
|
---|
[77433] | 28 | #ifndef FEQT_INCLUDED_SRC_globals_UITextTable_h
|
---|
| 29 | #define FEQT_INCLUDED_SRC_globals_UITextTable_h
|
---|
[76532] | 30 | #ifndef RT_WITHOUT_PRAGMA_ONCE
|
---|
| 31 | # pragma once
|
---|
| 32 | #endif
|
---|
[42529] | 33 |
|
---|
[77435] | 34 | /* Qt includes: */
|
---|
| 35 | #include <QObject>
|
---|
| 36 | #include <QString>
|
---|
| 37 |
|
---|
[42529] | 38 | /* GUI includes: */
|
---|
[77435] | 39 | #include "UILibraryDefs.h"
|
---|
[42529] | 40 |
|
---|
[63767] | 41 | /** QObject extension used as an
|
---|
| 42 | * accessible wrapper for QString pairs. */
|
---|
[77432] | 43 | class SHARED_LIBRARY_STUFF UITextTableLine : public QObject
|
---|
[63767] | 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. */
|
---|
[77435] | 52 | UITextTableLine(const QString &str1, const QString &str2, QObject *pParent = 0);
|
---|
[63767] | 53 |
|
---|
| 54 | /** Constructs text-table line on the basis of passed @a other. */
|
---|
[77435] | 55 | UITextTableLine(const UITextTableLine &other);
|
---|
[63767] | 56 |
|
---|
| 57 | /** Assigns @a other to this. */
|
---|
[77435] | 58 | UITextTableLine &operator=(const UITextTableLine &other);
|
---|
[63767] | 59 |
|
---|
| 60 | /** Compares @a other to this. */
|
---|
[77435] | 61 | bool operator==(const UITextTableLine &other) const;
|
---|
[63767] | 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. */
|
---|
[42529] | 82 | typedef QList<UITextTableLine> UITextTable;
|
---|
| 83 | Q_DECLARE_METATYPE(UITextTable);
|
---|
| 84 |
|
---|
[77433] | 85 | #endif /* !FEQT_INCLUDED_SRC_globals_UITextTable_h */
|
---|