1 | // Copyright (C) 2021 The Qt Company Ltd. |
2 | // SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0 |
3 | |
4 | #ifndef HEADERNODE_H |
5 | #define |
6 | |
7 | #include "aggregate.h" |
8 | |
9 | #include <QtCore/qglobal.h> |
10 | #include <QtCore/qstring.h> |
11 | |
12 | QT_BEGIN_NAMESPACE |
13 | |
14 | class : public Aggregate |
15 | { |
16 | public: |
17 | (Aggregate *parent, const QString &name); |
18 | [[nodiscard]] bool () const override; |
19 | [[nodiscard]] bool () const override { return true; } |
20 | [[nodiscard]] bool () const override { return true; } |
21 | [[nodiscard]] QString () const override { return (m_title.isEmpty() ? name() : m_title); } |
22 | [[nodiscard]] QString () const override { return m_subtitle; } |
23 | [[nodiscard]] QString () const override |
24 | { |
25 | return (m_title.isEmpty() ? name() : name() + " - " + m_title); |
26 | } |
27 | bool (const QString &title) override |
28 | { |
29 | m_title = title; |
30 | return true; |
31 | } |
32 | bool (const QString &subtitle) override |
33 | { |
34 | m_subtitle = subtitle; |
35 | return true; |
36 | } |
37 | [[nodiscard]] bool () const; |
38 | |
39 | private: |
40 | QString {}; |
41 | QString {}; |
42 | }; |
43 | |
44 | QT_END_NAMESPACE |
45 | |
46 | #endif // HEADERNODE_H |
47 | |