Browse Source

added qml caching, fixed imports

pull/2/head
Skycoder42 7 years ago
parent
commit
ac7487c739
  1. 1
      src/imports/mvvmcore/mvvmcore.pro
  2. 1
      src/imports/mvvmquick/SettingsView.qml
  3. 5
      src/imports/mvvmquick/mvvmquick.pro
  4. 2
      src/imports/mvvmquick/qmldir
  5. 9
      src/imports/mvvmquick/qtmvvmquick_plugin.cpp
  6. 7
      src/imports/mvvmquick/qtmvvmquick_plugin.qrc
  7. 26
      src/mvvmcore/translations/qtmvvmcore_de.ts
  8. 26
      src/mvvmcore/translations/qtmvvmcore_template.ts
  9. 3
      src/mvvmquick/SettingsView.qml
  10. 3
      src/mvvmquick/qtmvvmquick_module.qrc
  11. 23
      src/mvvmwidgets/translations/qtmvvmwidgets_de.ts
  12. 23
      src/mvvmwidgets/translations/qtmvvmwidgets_template.ts

1
src/imports/mvvmcore/mvvmcore.pro

@ -26,6 +26,7 @@ generate_qmltypes {
QMAKE_EXTRA_TARGETS += typeextra1 typeextra2
}
CONFIG += qmlcache
load(qml_plugin)
generate_qmltypes {

1
src/imports/mvvmquick/SettingsView.qml

@ -27,6 +27,7 @@ Page {
toolTip: qsTr("Go back")
onClicked: {
//TODO close settings view
//TODO remove, not needed
}
}

5
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 {

2
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

9
src/imports/mvvmquick/qtmvvmquick_plugin.cpp

@ -39,12 +39,13 @@ void QtMvvmQuickDeclarativeModule::registerTypes(const char *uri)
qmlRegisterUncreatableType<QtMvvm::InputViewFactory>(uri, 1, 0, "InputViewFactory", QStringLiteral("InputViewFactories can only be created from C++ via the QuickPresenter"));
qmlRegisterSingletonType<QtMvvm::QQmlQuickPresenter>(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<QtMvvm::AndroidFileChooser>(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

7
src/imports/mvvmquick/qtmvvmquick_plugin.qrc

@ -12,11 +12,8 @@
<qresource prefix="/de/skycoder42/qtmvvm/quick/qml">
<file>FileDialog.qml</file>
<file>FolderDialog.qml</file>
<file alias="+android/FileDialog.qml">AndroidFileDialog.qml</file>
<file alias="+android/FolderDialog.qml">AndroidFolderDialog.qml</file>
</qresource>
<qresource prefix="/qtmvvm/views">
<file>SettingsView.qml</file>
<file>AndroidFileDialog.qml</file>
<file>AndroidFolderDialog.qml</file>
</qresource>
<qresource prefix="/de/skycoder42/qtmvvm/icons">
<file alias="settings.svg">icons/ic_settings_white_24px.svg</file>

26
src/mvvmcore/translations/qtmvvmcore_de.ts

@ -39,4 +39,30 @@
<translation type="unfinished"></translation>
</message>
</context>
<context>
<name>QtMvvm::SettingsSetupLoader</name>
<message>
<location filename="../settingssetuploader.cpp" line="+275"/>
<source>General Settings</source>
<translation type="unfinished"></translation>
</message>
<message>
<location line="+8"/>
<source>General</source>
<translation type="unfinished"></translation>
</message>
</context>
<context>
<name>QtMvvm::SettingsViewModel</name>
<message>
<location filename="../settingsviewmodel.cpp" line="+37"/>
<source>Restore Defaults?</source>
<translation type="unfinished"></translation>
</message>
<message>
<location line="+1"/>
<source>All custom changes will be deleted and the defaults restored. &lt;i&gt;This cannot be undone!&lt;/i&gt;</source>
<translation type="unfinished"></translation>
</message>
</context>
</TS>

26
src/mvvmcore/translations/qtmvvmcore_template.ts

@ -39,4 +39,30 @@
<translation type="unfinished"></translation>
</message>
</context>
<context>
<name>QtMvvm::SettingsSetupLoader</name>
<message>
<location filename="../settingssetuploader.cpp" line="+275"/>
<source>General Settings</source>
<translation type="unfinished"></translation>
</message>
<message>
<location line="+8"/>
<source>General</source>
<translation type="unfinished"></translation>
</message>
</context>
<context>
<name>QtMvvm::SettingsViewModel</name>
<message>
<location filename="../settingsviewmodel.cpp" line="+37"/>
<source>Restore Defaults?</source>
<translation type="unfinished"></translation>
</message>
<message>
<location line="+1"/>
<source>All custom changes will be deleted and the defaults restored. &lt;i&gt;This cannot be undone!&lt;/i&gt;</source>
<translation type="unfinished"></translation>
</message>
</context>
</TS>

3
src/mvvmquick/SettingsView.qml

@ -0,0 +1,3 @@
import de.skycoder42.QtMvvm.Quick 1.0 as QtMvvm
QtMvvm.SettingsView {}

3
src/mvvmquick/qtmvvmquick_module.qrc

@ -14,4 +14,7 @@
<file>MsgDelegate.qml</file>
<file>SwitchDelegate.qml</file>
</qresource>
<qresource prefix="/qtmvvm/views">
<file>SettingsView.qml</file>
</qresource>
</RCC>

23
src/mvvmwidgets/translations/qtmvvmwidgets_de.ts

@ -1,10 +1,18 @@
<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE TS>
<TS version="2.1" language="de_DE">
<context>
<name>QtMvvm::SettingsDialogPrivate</name>
<message>
<location filename="../settingsdialog.cpp" line="+221"/>
<source>:</source>
<translation type="unfinished"></translation>
</message>
</context>
<context>
<name>QtMvvm::WidgetsPresenter</name>
<message>
<location filename="../widgetspresenter.cpp" line="+213"/>
<location filename="../widgetspresenter.cpp" line="+214"/>
<source>About</source>
<translation type="unfinished"></translation>
</message>
@ -14,4 +22,17 @@
<translation type="unfinished"></translation>
</message>
</context>
<context>
<name>SettingsDialog</name>
<message>
<location filename="../settingsdialog.ui" line="+14"/>
<source>Settings</source>
<translation type="unfinished"></translation>
</message>
<message>
<location line="+157"/>
<source>Search in settings</source>
<translation type="unfinished"></translation>
</message>
</context>
</TS>

23
src/mvvmwidgets/translations/qtmvvmwidgets_template.ts

@ -1,10 +1,18 @@
<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE TS>
<TS version="2.1">
<context>
<name>QtMvvm::SettingsDialogPrivate</name>
<message>
<location filename="../settingsdialog.cpp" line="+221"/>
<source>:</source>
<translation type="unfinished"></translation>
</message>
</context>
<context>
<name>QtMvvm::WidgetsPresenter</name>
<message>
<location filename="../widgetspresenter.cpp" line="+213"/>
<location filename="../widgetspresenter.cpp" line="+214"/>
<source>About</source>
<translation type="unfinished"></translation>
</message>
@ -14,4 +22,17 @@
<translation type="unfinished"></translation>
</message>
</context>
<context>
<name>SettingsDialog</name>
<message>
<location filename="../settingsdialog.ui" line="+14"/>
<source>Settings</source>
<translation type="unfinished"></translation>
</message>
<message>
<location line="+157"/>
<source>Search in settings</source>
<translation type="unfinished"></translation>
</message>
</context>
</TS>

Loading…
Cancel
Save