| 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 | #include "validator.h" |
| 5 | #include "driver.h" |
| 6 | #include "ui4.h" |
| 7 | #include "uic.h" |
| 8 | |
| 9 | QT_BEGIN_NAMESPACE |
| 10 | |
| 11 | Validator::Validator(Uic *uic) : |
| 12 | m_driver(uic->driver()) |
| 13 | { |
| 14 | } |
| 15 | |
| 16 | void Validator::acceptUI(DomUI *node) |
| 17 | { |
| 18 | TreeWalker::acceptUI(ui: node); |
| 19 | } |
| 20 | |
| 21 | void Validator::acceptWidget(DomWidget *node) |
| 22 | { |
| 23 | (void) m_driver->findOrInsertWidget(ui_widget: node); |
| 24 | |
| 25 | TreeWalker::acceptWidget(widget: node); |
| 26 | } |
| 27 | |
| 28 | void Validator::acceptLayoutItem(DomLayoutItem *node) |
| 29 | { |
| 30 | (void) m_driver->findOrInsertLayoutItem(ui_layoutItem: node); |
| 31 | |
| 32 | TreeWalker::acceptLayoutItem(layoutItem: node); |
| 33 | } |
| 34 | |
| 35 | void Validator::acceptLayout(DomLayout *node) |
| 36 | { |
| 37 | (void) m_driver->findOrInsertLayout(ui_layout: node); |
| 38 | |
| 39 | TreeWalker::acceptLayout(layout: node); |
| 40 | } |
| 41 | |
| 42 | void Validator::acceptActionGroup(DomActionGroup *node) |
| 43 | { |
| 44 | (void) m_driver->findOrInsertActionGroup(ui_group: node); |
| 45 | |
| 46 | TreeWalker::acceptActionGroup(actionGroup: node); |
| 47 | } |
| 48 | |
| 49 | void Validator::acceptAction(DomAction *node) |
| 50 | { |
| 51 | (void) m_driver->findOrInsertAction(ui_action: node); |
| 52 | |
| 53 | TreeWalker::acceptAction(action: node); |
| 54 | } |
| 55 | |
| 56 | QT_END_NAMESPACE |
| 57 |
