diff --git a/src/imports/mvvmcore/mvvmcore.pro b/src/imports/mvvmcore/mvvmcore.pro index ac4f2f9..6a42e54 100644 --- a/src/imports/mvvmcore/mvvmcore.pro +++ b/src/imports/mvvmcore/mvvmcore.pro @@ -26,6 +26,7 @@ generate_qmltypes { QMAKE_EXTRA_TARGETS += typeextra1 typeextra2 } +CONFIG += qmlcache load(qml_plugin) generate_qmltypes { diff --git a/src/imports/mvvmquick/SettingsView.qml b/src/imports/mvvmquick/SettingsView.qml index 36385e9..27fbc3a 100644 --- a/src/imports/mvvmquick/SettingsView.qml +++ b/src/imports/mvvmquick/SettingsView.qml @@ -27,6 +27,7 @@ Page { toolTip: qsTr("Go back") onClicked: { //TODO close settings view + //TODO remove, not needed } } diff --git a/src/imports/mvvmquick/mvvmquick.pro b/src/imports/mvvmquick/mvvmquick.pro index a7cef50..5f5c3ee 100644 --- a/src/imports/mvvmquick/mvvmquick.pro +++ b/src/imports/mvvmquick/mvvmquick.pro @@ -30,8 +30,8 @@ QML_FILES += \ PresentingDrawer.qml \ ListSection.qml \ SectionListView.qml \ - OverviewListView.qml - + OverviewListView.qml \ + SettingsView.qml RESOURCES += \ qtmvvmquick_plugin.qrc @@ -52,6 +52,7 @@ generate_qmltypes { QMAKE_EXTRA_TARGETS += typeextra1 typeextra2 } +CONFIG += qmlcache load(qml_plugin) generate_qmltypes { diff --git a/src/imports/mvvmquick/qmldir b/src/imports/mvvmquick/qmldir index 10061e3..31c3331 100644 --- a/src/imports/mvvmquick/qmldir +++ b/src/imports/mvvmquick/qmldir @@ -20,4 +20,6 @@ PopupPresenter 1.0 PopupPresenter.qml DialogPresenter 1.0 DialogPresenter.qml PresentingDrawer 1.0 PresentingDrawer.qml +SettingsView 1.0 SettingsView.qml + QtMvvmApp 1.0 QtMvvmApp.qml diff --git a/src/imports/mvvmquick/qtmvvmquick_plugin.cpp b/src/imports/mvvmquick/qtmvvmquick_plugin.cpp index 2cdd6ea..ed87732 100644 --- a/src/imports/mvvmquick/qtmvvmquick_plugin.cpp +++ b/src/imports/mvvmquick/qtmvvmquick_plugin.cpp @@ -39,12 +39,13 @@ void QtMvvmQuickDeclarativeModule::registerTypes(const char *uri) qmlRegisterUncreatableType(uri, 1, 0, "InputViewFactory", QStringLiteral("InputViewFactories can only be created from C++ via the QuickPresenter")); qmlRegisterSingletonType(uri, 1, 0, "QuickPresenter", createQuickPresenterQmlSingleton); - qmlRegisterType(QUrl(QStringLiteral("qrc:/de/skycoder42/qtmvvm/quick/qml/FileDialog.qml")), uri, 1, 0, "FileDialog"); - qmlRegisterType(QUrl(QStringLiteral("qrc:/de/skycoder42/qtmvvm/quick/qml/FolderDialog.qml")), uri, 1, 0, "FolderDialog"); - qmlRegisterType(QUrl(QStringLiteral("qrc:/qtmvvm/views/SettingsView.qml")), uri, 1, 0, "SettingsView"); - #ifdef Q_OS_ANDROID qmlRegisterType(uri, 1, 0, "FileChooser"); + qmlRegisterType(QUrl(QStringLiteral("qrc:/de/skycoder42/qtmvvm/quick/qml/AndroidFileDialog.qml")), uri, 1, 0, "FileDialog"); + qmlRegisterType(QUrl(QStringLiteral("qrc:/de/skycoder42/qtmvvm/quick/qml/AndroidFolderDialog.qml")), uri, 1, 0, "FolderDialog"); +#else + qmlRegisterType(QUrl(QStringLiteral("qrc:/de/skycoder42/qtmvvm/quick/qml/FileDialog.qml")), uri, 1, 0, "FileDialog"); + qmlRegisterType(QUrl(QStringLiteral("qrc:/de/skycoder42/qtmvvm/quick/qml/FolderDialog.qml")), uri, 1, 0, "FolderDialog"); #endif // Check to make shure no module update is forgotten diff --git a/src/imports/mvvmquick/qtmvvmquick_plugin.qrc b/src/imports/mvvmquick/qtmvvmquick_plugin.qrc index 7525ebf..fd84621 100644 --- a/src/imports/mvvmquick/qtmvvmquick_plugin.qrc +++ b/src/imports/mvvmquick/qtmvvmquick_plugin.qrc @@ -12,11 +12,8 @@ FileDialog.qml FolderDialog.qml - AndroidFileDialog.qml - AndroidFolderDialog.qml - - - SettingsView.qml + AndroidFileDialog.qml + AndroidFolderDialog.qml icons/ic_settings_white_24px.svg diff --git a/src/mvvmcore/translations/qtmvvmcore_de.ts b/src/mvvmcore/translations/qtmvvmcore_de.ts index 0091134..8193e46 100644 --- a/src/mvvmcore/translations/qtmvvmcore_de.ts +++ b/src/mvvmcore/translations/qtmvvmcore_de.ts @@ -39,4 +39,30 @@ + + QtMvvm::SettingsSetupLoader + + + General Settings + + + + + General + + + + + QtMvvm::SettingsViewModel + + + Restore Defaults? + + + + + All custom changes will be deleted and the defaults restored. <i>This cannot be undone!</i> + + + diff --git a/src/mvvmcore/translations/qtmvvmcore_template.ts b/src/mvvmcore/translations/qtmvvmcore_template.ts index 2cfa47a..eb0cb5e 100644 --- a/src/mvvmcore/translations/qtmvvmcore_template.ts +++ b/src/mvvmcore/translations/qtmvvmcore_template.ts @@ -39,4 +39,30 @@ + + QtMvvm::SettingsSetupLoader + + + General Settings + + + + + General + + + + + QtMvvm::SettingsViewModel + + + Restore Defaults? + + + + + All custom changes will be deleted and the defaults restored. <i>This cannot be undone!</i> + + + diff --git a/src/mvvmquick/SettingsView.qml b/src/mvvmquick/SettingsView.qml new file mode 100644 index 0000000..1a765a2 --- /dev/null +++ b/src/mvvmquick/SettingsView.qml @@ -0,0 +1,3 @@ +import de.skycoder42.QtMvvm.Quick 1.0 as QtMvvm + +QtMvvm.SettingsView {} diff --git a/src/mvvmquick/qtmvvmquick_module.qrc b/src/mvvmquick/qtmvvmquick_module.qrc index 50aeb76..1efe95e 100644 --- a/src/mvvmquick/qtmvvmquick_module.qrc +++ b/src/mvvmquick/qtmvvmquick_module.qrc @@ -14,4 +14,7 @@ MsgDelegate.qml SwitchDelegate.qml + + SettingsView.qml + diff --git a/src/mvvmwidgets/translations/qtmvvmwidgets_de.ts b/src/mvvmwidgets/translations/qtmvvmwidgets_de.ts index de529ef..77c5253 100644 --- a/src/mvvmwidgets/translations/qtmvvmwidgets_de.ts +++ b/src/mvvmwidgets/translations/qtmvvmwidgets_de.ts @@ -1,10 +1,18 @@ + + QtMvvm::SettingsDialogPrivate + + + : + + + QtMvvm::WidgetsPresenter - + About @@ -14,4 +22,17 @@ + + SettingsDialog + + + Settings + + + + + Search in settingsā€¦ + + + diff --git a/src/mvvmwidgets/translations/qtmvvmwidgets_template.ts b/src/mvvmwidgets/translations/qtmvvmwidgets_template.ts index 05ca5f3..1293f4c 100644 --- a/src/mvvmwidgets/translations/qtmvvmwidgets_template.ts +++ b/src/mvvmwidgets/translations/qtmvvmwidgets_template.ts @@ -1,10 +1,18 @@ + + QtMvvm::SettingsDialogPrivate + + + : + + + QtMvvm::WidgetsPresenter - + About @@ -14,4 +22,17 @@ + + SettingsDialog + + + Settings + + + + + Search in settingsā€¦ + + +