| 1 | #include <QGuiApplication> |
| 2 | #include <QtQuick> |
| 3 | #include <MazDB.h> |
| 4 | #include <MazDBBatch.h> |
| 5 | #include <MazOptions.h> |
| 6 | #include <MazDBListModel.h> |
| 7 | #include "MazDBSettings.h" |
| 8 | #include "MazDBSortProxy.h" |
| 9 | #include "MazDBQueryEngine.h" |
| 10 | #include "MazDBQuery.h" |
| 11 | #include "Mace.h" |
| 12 | |
| 13 | int main(int argc, char** argv) |
| 14 | { |
| 15 | QGuiApplication app(argc, argv); |
| 16 | |
| 17 | // @uri MazDB |
| 18 | qmlRegisterType<MazDB>("MazDB", 1, 0, "MazDB"); |
| 19 | qmlRegisterType<MazDBListModel>("MazDB", 1, 0, "MazDBListModel"); |
| 20 | qmlRegisterType<MazDBSettings>("MazDB", 1, 0, "MazDBSettings"); |
| 21 | qmlRegisterType<MazDBSortProxy>("MazDB", 1, 0, "MazDBSortProxy"); |
| 22 | qmlRegisterType<MazDBQueryEngine>("MazDB", 1, 0, "MazDBQueryEngine"); |
| 23 | qmlRegisterType<MazDBQuery>("MazDB", 1, 0, "MazDBQuery"); |
| 24 | qmlRegisterType<WhereQuery>("MazDB", 1, 0, "WHERE"); |
| 25 | qmlRegisterType<AndQuery>("MazDB", 1, 0, "AND"); |
| 26 | qmlRegisterType<OrQuery>("MazDB", 1, 0, "OR"); |
| 27 | qmlRegisterUncreatableType<MazOptions>("MazDB", 1, 0, "MazOptions", QObject::tr("Cannot create separate instance of Options")); |
| 28 | qmlRegisterUncreatableType<MazDBBatch>("MazDB", 1, 0, "MazDBBatch", QObject::tr("Cannot create separate instance of Batch")); |
| 29 | qmlRegisterUncreatableType<QueryBase>("MazDB", 1, 0, "Query", QObject::tr("Cannot create separate instance of QueryBase")); |
| 30 | |
| 31 | |
| 32 | Mace::Runner runner; |
| 33 | runner.include(QML_TESTS_PATH); |
| 34 | return runner.run(app.arguments()); |
| 35 | } |