1/****************************************************************************
2**
3** Copyright (C) 2016 The Qt Company Ltd.
4** Contact: https://www.qt.io/licensing/
5**
6** This file is part of the tools applications of the Qt Toolkit.
7**
8** $QT_BEGIN_LICENSE:GPL-EXCEPT$
9** Commercial License Usage
10** Licensees holding valid commercial Qt licenses may use this file in
11** accordance with the commercial license agreement provided with the
12** Software or, alternatively, in accordance with the terms contained in
13** a written agreement between you and The Qt Company. For licensing terms
14** and conditions see https://www.qt.io/terms-conditions. For further
15** information use the contact form at https://www.qt.io/contact-us.
16**
17** GNU General Public License Usage
18** Alternatively, this file may be used under the terms of the GNU
19** General Public License version 3 as published by the Free Software
20** Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
21** included in the packaging of this file. Please review the following
22** information to ensure the GNU General Public License requirements will
23** be met: https://www.gnu.org/licenses/gpl-3.0.html.
24**
25** $QT_END_LICENSE$
26**
27****************************************************************************/
28
29#ifndef TREEWALKER_H
30#define TREEWALKER_H
31
32#include <qlist.h>
33
34QT_BEGIN_NAMESPACE
35
36class DomUI;
37class DomLayoutDefault;
38class DomLayoutFunction;
39class DomTabStops;
40class DomLayout;
41class DomLayoutItem;
42class DomWidget;
43class DomSpacer;
44class DomColor;
45class DomColorGroup;
46class DomPalette;
47class DomFont;
48class DomPoint;
49class DomRect;
50class DomSizePolicy;
51class DomSize;
52class DomDate;
53class DomTime;
54class DomDateTime;
55class DomProperty;
56class DomCustomWidgets;
57class DomCustomWidget;
58class DomAction;
59class DomActionGroup;
60class DomActionRef;
61class DomImages;
62class DomImage;
63class DomItem;
64class DomIncludes;
65class DomInclude;
66class DomString;
67class DomResourcePixmap;
68class DomResources;
69class DomResource;
70class DomConnections;
71class DomConnection;
72class DomConnectionHints;
73class DomConnectionHint;
74class DomScript;
75class DomButtonGroups;
76class DomButtonGroup;
77
78struct TreeWalker
79{
80 Q_DISABLE_COPY_MOVE(TreeWalker)
81
82 TreeWalker() = default;
83 inline virtual ~TreeWalker() = default;
84
85 virtual void acceptUI(DomUI *ui);
86 virtual void acceptLayoutDefault(DomLayoutDefault *layoutDefault);
87 virtual void acceptLayoutFunction(DomLayoutFunction *layoutFunction);
88 virtual void acceptTabStops(DomTabStops *tabStops);
89 virtual void acceptCustomWidgets(DomCustomWidgets *customWidgets);
90 virtual void acceptCustomWidget(DomCustomWidget *customWidget);
91 virtual void acceptLayout(DomLayout *layout);
92 virtual void acceptLayoutItem(DomLayoutItem *layoutItem);
93 virtual void acceptWidget(DomWidget *widget);
94 virtual void acceptSpacer(DomSpacer *spacer);
95 virtual void acceptColor(DomColor *color);
96 virtual void acceptColorGroup(DomColorGroup *colorGroup);
97 virtual void acceptPalette(DomPalette *palette);
98 virtual void acceptFont(DomFont *font);
99 virtual void acceptPoint(DomPoint *point);
100 virtual void acceptRect(DomRect *rect);
101 virtual void acceptSizePolicy(DomSizePolicy *sizePolicy);
102 virtual void acceptSize(DomSize *size);
103 virtual void acceptDate(DomDate *date);
104 virtual void acceptTime(DomTime *time);
105 virtual void acceptDateTime(DomDateTime *dateTime);
106 virtual void acceptProperty(DomProperty *property);
107 using DomWidgets = QList<DomWidget *>;
108 virtual void acceptIncludes(DomIncludes *includes);
109 virtual void acceptInclude(DomInclude *incl);
110 virtual void acceptAction(DomAction *action);
111 virtual void acceptActionGroup(DomActionGroup *actionGroup);
112 virtual void acceptActionRef(DomActionRef *actionRef);
113 virtual void acceptConnections(DomConnections *connections);
114 virtual void acceptConnection(DomConnection *connection);
115 virtual void acceptConnectionHints(DomConnectionHints *connectionHints);
116 virtual void acceptConnectionHint(DomConnectionHint *connectionHint);
117 virtual void acceptButtonGroups(const DomButtonGroups *buttonGroups);
118 virtual void acceptButtonGroup(const DomButtonGroup *buttonGroup);
119};
120
121QT_END_NAMESPACE
122
123#endif // TREEWALKER_H
124