| 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 CPPWRITEDECLARATION_H |
| 5 | #define CPPWRITEDECLARATION_H |
| 6 | |
| 7 | #include "treewalker.h" |
| 8 | |
| 9 | QT_BEGIN_NAMESPACE |
| 10 | |
| 11 | class QTextStream; |
| 12 | class Driver; |
| 13 | class Uic; |
| 14 | |
| 15 | struct Option; |
| 16 | |
| 17 | namespace CPP { |
| 18 | |
| 19 | struct WriteDeclaration : public TreeWalker |
| 20 | { |
| 21 | WriteDeclaration(Uic *uic); |
| 22 | |
| 23 | void acceptUI(DomUI *node) override; |
| 24 | void acceptWidget(DomWidget *node) override; |
| 25 | void acceptSpacer(DomSpacer *node) override; |
| 26 | void acceptLayout(DomLayout *node) override; |
| 27 | void acceptActionGroup(DomActionGroup *node) override; |
| 28 | void acceptAction(DomAction *node) override; |
| 29 | void acceptButtonGroup(const DomButtonGroup *buttonGroup) override; |
| 30 | |
| 31 | private: |
| 32 | Uic *m_uic; |
| 33 | Driver *m_driver; |
| 34 | QTextStream &m_output; |
| 35 | const Option &m_option; |
| 36 | }; |
| 37 | |
| 38 | } // namespace CPP |
| 39 | |
| 40 | QT_END_NAMESPACE |
| 41 | |
| 42 | #endif // CPPWRITEDECLARATION_H |
| 43 |
