1// Copyright (C) 2016 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 TREEWALKER_H
5#define TREEWALKER_H
6
7#include <qlist.h>
8
9QT_BEGIN_NAMESPACE
10
11class DomUI;
12class DomLayoutDefault;
13class DomLayoutFunction;
14class DomTabStops;
15class DomLayout;
16class DomLayoutItem;
17class DomWidget;
18class DomSpacer;
19class DomColor;
20class DomColorGroup;
21class DomPalette;
22class DomFont;
23class DomPoint;
24class DomRect;
25class DomSizePolicy;
26class DomSize;
27class DomDate;
28class DomTime;
29class DomDateTime;
30class DomProperty;
31class DomCustomWidgets;
32class DomCustomWidget;
33class DomAction;
34class DomActionGroup;
35class DomActionRef;
36class DomImages;
37class DomImage;
38class DomItem;
39class DomIncludes;
40class DomInclude;
41class DomString;
42class DomResourcePixmap;
43class DomResources;
44class DomResource;
45class DomConnections;
46class DomConnection;
47class DomConnectionHints;
48class DomConnectionHint;
49class DomScript;
50class DomButtonGroups;
51class DomButtonGroup;
52
53struct TreeWalker
54{
55 Q_DISABLE_COPY_MOVE(TreeWalker)
56
57 TreeWalker() = default;
58 inline virtual ~TreeWalker() = default;
59
60 virtual void acceptUI(DomUI *ui);
61 virtual void acceptLayoutDefault(DomLayoutDefault *layoutDefault);
62 virtual void acceptLayoutFunction(DomLayoutFunction *layoutFunction);
63 virtual void acceptTabStops(DomTabStops *tabStops);
64 virtual void acceptCustomWidgets(DomCustomWidgets *customWidgets);
65 virtual void acceptCustomWidget(DomCustomWidget *customWidget);
66 virtual void acceptLayout(DomLayout *layout);
67 virtual void acceptLayoutItem(DomLayoutItem *layoutItem);
68 virtual void acceptWidget(DomWidget *widget);
69 virtual void acceptSpacer(DomSpacer *spacer);
70 virtual void acceptColor(DomColor *color);
71 virtual void acceptColorGroup(DomColorGroup *colorGroup);
72 virtual void acceptPalette(DomPalette *palette);
73 virtual void acceptFont(DomFont *font);
74 virtual void acceptPoint(DomPoint *point);
75 virtual void acceptRect(DomRect *rect);
76 virtual void acceptSizePolicy(DomSizePolicy *sizePolicy);
77 virtual void acceptSize(DomSize *size);
78 virtual void acceptDate(DomDate *date);
79 virtual void acceptTime(DomTime *time);
80 virtual void acceptDateTime(DomDateTime *dateTime);
81 virtual void acceptProperty(DomProperty *property);
82 using DomWidgets = QList<DomWidget *>;
83 virtual void acceptIncludes(DomIncludes *includes);
84 virtual void acceptInclude(DomInclude *incl);
85 virtual void acceptAction(DomAction *action);
86 virtual void acceptActionGroup(DomActionGroup *actionGroup);
87 virtual void acceptActionRef(DomActionRef *actionRef);
88 virtual void acceptConnections(DomConnections *connections);
89 virtual void acceptConnection(DomConnection *connection);
90 virtual void acceptConnectionHints(DomConnectionHints *connectionHints);
91 virtual void acceptConnectionHint(DomConnectionHint *connectionHint);
92 virtual void acceptButtonGroups(const DomButtonGroups *buttonGroups);
93 virtual void acceptButtonGroup(const DomButtonGroup *buttonGroup);
94};
95
96QT_END_NAMESPACE
97
98#endif // TREEWALKER_H
99

source code of qtbase/src/tools/uic/treewalker.h