Changeset View
Changeset View
Standalone View
Standalone View
lib/qml/qmlplugins.cpp
Show All 17 Lines | |||||
18 | * You should have received a copy of the GNU Lesser General Public | 18 | * You should have received a copy of the GNU Lesser General Public | ||
19 | * License along with this library. If not, see <http://www.gnu.org/licenses/>. | 19 | * License along with this library. If not, see <http://www.gnu.org/licenses/>. | ||
20 | * | 20 | * | ||
21 | */ | 21 | */ | ||
22 | 22 | | |||
23 | #include "qmlplugins.h" | 23 | #include "qmlplugins.h" | ||
24 | 24 | | |||
25 | #include "sourcesmodel.h" | 25 | #include "sourcesmodel.h" | ||
26 | #include "resultsmodel.h" | ||||
26 | #include "preview.h" | 27 | #include "preview.h" | ||
27 | #include "draghelper.h" | 28 | #include "draghelper.h" | ||
28 | #include "mousehelper.h" | 29 | #include "mousehelper.h" | ||
29 | 30 | | |||
30 | #include <QQmlEngine> | 31 | #include <QQmlEngine> | ||
31 | 32 | | |||
32 | void QmlPlugins::initializeEngine(QQmlEngine *, const char *) | 33 | void QmlPlugins::initializeEngine(QQmlEngine *, const char *) | ||
33 | { | 34 | { | ||
34 | } | 35 | } | ||
35 | 36 | | |||
36 | void QmlPlugins::registerTypes(const char *uri) | 37 | void QmlPlugins::registerTypes(const char *uri) | ||
37 | { | 38 | { | ||
38 | qmlRegisterType<Milou::SourcesModel> (uri, 0, 1, "SourcesModel"); | 39 | qmlRegisterType<Milou::SourcesModel> (uri, 0, 1, "SourcesModel"); | ||
40 | qmlRegisterType<Milou::ResultsModel>(uri, 0, 3, "ResultsModel"); | ||||
39 | qmlRegisterType<Milou::Preview> (uri, 0, 1, "Preview"); | 41 | qmlRegisterType<Milou::Preview> (uri, 0, 1, "Preview"); | ||
40 | qmlRegisterType<Milou::DragHelper> (uri, 0, 2, "DragHelper"); | 42 | qmlRegisterType<Milou::DragHelper> (uri, 0, 2, "DragHelper"); | ||
41 | qmlRegisterSingletonType<Milou::MouseHelper> (uri, 0, 1, "MouseHelper", | 43 | qmlRegisterSingletonType<Milou::MouseHelper> (uri, 0, 1, "MouseHelper", | ||
42 | [](QQmlEngine*, QJSEngine*) -> QObject* { | 44 | [](QQmlEngine*, QJSEngine*) -> QObject* { | ||
43 | return new Milou::MouseHelper(); | 45 | return new Milou::MouseHelper(); | ||
44 | }); | 46 | }); | ||
45 | } | 47 | } | ||
46 | 48 | |