Qt
Internal/Contributor docs for the Qt SDK. <b>Note:</b> These are NOT official API docs; those are found <a href='https://doc.qt.io/'>here</a>.
Loading...
Searching...
No Matches
writeincludesbase.h
Go to the documentation of this file.
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 WRITEINCLUDES_BASE_H
5#define WRITEINCLUDES_BASE_H
6
7#include <treewalker.h>
8
9#include <QtCore/qset.h>
10#include <QtCore/qstring.h>
11
13
14class DomCustomWidget;
15class Uic;
16
18{
19 const char *klass;
20 const char *module;
21 const char *header;
22};
23
25{
26 const ClassInfoEntry *begin() const { return m_begin; }
27 const ClassInfoEntry *end() const { return m_end; }
28
31};
32
34
36{
37public:
38 explicit WriteIncludesBase(Uic *uic);
39
40 void acceptUI(DomUI *node) override;
41 void acceptWidget(DomWidget *node) override;
42 void acceptLayout(DomLayout *node) override;
43 void acceptSpacer(DomSpacer *node) override;
44 void acceptProperty(DomProperty *node) override;
45
46 //
47 // actions
48 //
49 void acceptActionGroup(DomActionGroup *node) override;
50 void acceptAction(DomAction *node) override;
51 void acceptActionRef(DomActionRef *node) override;
52
53 //
54 // custom widgets
55 //
56 void acceptCustomWidget(DomCustomWidget *node) override;
57
58protected:
59 void add(const QString &className, const DomCustomWidget *dcw = nullptr);
60
61 virtual void doAdd(const QString &className, const DomCustomWidget *dcw = nullptr) = 0;
62
63 const Uic *uic() const { return m_uic; }
64 Uic *uic() { return m_uic; }
65
66private:
67 QSet<QString> m_knownClasses;
68 Uic *m_uic;
69 bool m_laidOut = false;
70};
71
73
74#endif // WRITEINCLUDES_BASE_H
Definition ui4.h:116
\macro QT_RESTRICTED_CAST_FROM_ASCII
Definition qstring.h:129
Definition uic.h:30
virtual void doAdd(const QString &className, const DomCustomWidget *dcw=nullptr)=0
void acceptActionRef(DomActionRef *node) override
void acceptSpacer(DomSpacer *node) override
void acceptCustomWidget(DomCustomWidget *node) override
void add(const QString &className, const DomCustomWidget *dcw=nullptr)
const Uic * uic() const
void acceptUI(DomUI *node) override
void acceptLayout(DomLayout *node) override
void acceptWidget(DomWidget *node) override
void acceptActionGroup(DomActionGroup *node) override
void acceptAction(DomAction *node) override
void acceptProperty(DomProperty *node) override
Combined button and popup list for selecting options.
const char className[16]
[1]
Definition qwizard.cpp:100
const ClassInfoEntry * end() const
const ClassInfoEntry * begin() const
const ClassInfoEntry * m_end
const ClassInfoEntry * m_begin
const char * klass
const char *const char * header
ClassInfoEntries classInfoEntries()