Browse Source

added ds core imports, fixed qmldir deps

pull/2/head
Skycoder42 7 years ago
parent
commit
ad714e8154
  1. 8
      src/imports/imports.pro
  2. 2
      src/imports/mvvmcore/plugins.qmltypes
  3. 1
      src/imports/mvvmcore/qmldir
  4. 34
      src/imports/mvvmdatasynccore/mvvmdatasynccore.pro
  5. 164
      src/imports/mvvmdatasynccore/plugins.qmltypes
  6. 6
      src/imports/mvvmdatasynccore/qmldir
  7. 27
      src/imports/mvvmdatasynccore/qtmvvmdatasynccore_plugin.cpp
  8. 16
      src/imports/mvvmdatasynccore/qtmvvmdatasynccore_plugin.h
  9. 69
      src/imports/mvvmquick/plugins.qmltypes
  10. 4
      src/imports/mvvmquick/qmldir

8
src/imports/imports.pro

@ -1,5 +1,9 @@
TEMPLATE = subdirs
SUBDIRS += \
mvvmquick \
mvvmcore
mvvmquick \
mvvmcore
qtHaveModule(datasync) {
SUBDIRS += mvvmdatasynccore
}

2
src/imports/mvvmcore/plugins.qmltypes

@ -7,7 +7,7 @@ import QtQuick.tooling 1.2
// 'qmlplugindump -nonrelocatable de.skycoder42.QtMvvm.Core 1.0'
Module {
dependencies: ["QtQuick 2.8"]
dependencies: ["QtQml 2.2"]
Component {
name: "QtMvvm::MessageConfig"
exports: ["de.skycoder42.QtMvvm.Core/MessageConfig 1.0"]

1
src/imports/mvvmcore/qmldir

@ -2,3 +2,4 @@ module de.skycoder42.QtMvvm.Core
plugin declarative_mvvmcore
classname QtMvvmCoreDeclarativeModule
typeinfo plugins.qmltypes
depends QtQml 2.2

34
src/imports/mvvmdatasynccore/mvvmdatasynccore.pro

@ -0,0 +1,34 @@
QT += core qml quick mvvmdatasynccore
CXX_MODULE = mvvmdatasynccore
TARGETPATH = de/skycoder42/QtMvvm/DataSync/Core
TARGET = declarative_mvvmdatasynccore
IMPORT_VERSION = $$MODULE_VERSION_IMPORT
DEFINES += "VERSION_MAJOR=$$MODULE_VERSION_MAJOR"
DEFINES += "VERSION_MINOR=$$MODULE_VERSION_MINOR"
HEADERS += \
qtmvvmdatasynccore_plugin.h
SOURCES += \
qtmvvmdatasynccore_plugin.cpp
OTHER_FILES += qmldir
generate_qmltypes {
typeextra1.target = qmltypes
typeextra1.depends += export LD_LIBRARY_PATH := "$$shadowed($$dirname(_QMAKE_CONF_))/lib/:$(LD_LIBRARY_PATH)"
typeextra2.target = qmltypes
typeextra2.depends += export QML2_IMPORT_PATH := "$$shadowed($$dirname(_QMAKE_CONF_))/qml/"
QMAKE_EXTRA_TARGETS += typeextra1 typeextra2
}
CONFIG += qmlcache
load(qml_plugin)
generate_qmltypes {
qmltypes.depends = ../../../qml/$$TARGETPATH/$(TARGET) #overwrite the target deps
mfirst.target = all
mfirst.depends += qmltypes
QMAKE_EXTRA_TARGETS += mfirst
}

164
src/imports/mvvmdatasynccore/plugins.qmltypes

@ -0,0 +1,164 @@
import QtQuick.tooling 1.2
// This file describes the plugin-supplied types contained in the library.
// It is used for QML tooling purposes only.
//
// This file was auto-generated by:
// 'qmlplugindump -nonrelocatable de.skycoder42.QtMvvm.DataSync.Core 1.0'
Module {
dependencies: [
"QtQml 2.2",
"QtQml.Models 2.3",
"de.skycoder42.QtMvvm.Core 1.0"
]
Component {
name: "QtMvvm::AccountModel"
prototype: "QAbstractListModel"
exports: ["de.skycoder42.QtMvvm.DataSync.Core/AccountModel 1.0"]
exportMetaObjectRevisions: [0]
Enum {
name: "Roles"
values: {
"NameRole": 0,
"FingerPrintRole": 257
}
}
Method { name: "reload" }
Method {
name: "setup"
Parameter { name: "accountManager"; type: "QtDataSync::AccountManager"; isPointer: true }
Parameter { name: "syncManager"; type: "QtDataSync::SyncManager"; isPointer: true }
}
Method {
name: "removeDevice"
type: "bool"
Parameter { name: "index"; type: "QModelIndex" }
}
Method {
name: "removeDevice"
type: "bool"
Parameter { name: "row"; type: "int" }
}
}
Component {
name: "QtMvvm::DataSyncViewModel"
prototype: "QtMvvm::ViewModel"
exports: ["de.skycoder42.QtMvvm.DataSync.Core/DataSyncViewModel 1.0"]
isCreatable: false
exportMetaObjectRevisions: [0]
Property {
name: "syncManager"
type: "QtDataSync::SyncManager"
isReadonly: true
isPointer: true
}
Property {
name: "accountManager"
type: "QtDataSync::AccountManager"
isReadonly: true
isPointer: true
}
Property { name: "colorMap"; type: "ColorMap" }
Property { name: "statusString"; type: "string"; isReadonly: true }
Property { name: "accountModel"; type: "QtMvvm::AccountModel"; isReadonly: true; isPointer: true }
Signal {
name: "syncManagerChanged"
Parameter { name: "syncManager"; type: "QtDataSync::SyncManager"; isPointer: true }
}
Signal {
name: "accountManagerChanged"
Parameter { name: "accountManager"; type: "QtDataSync::AccountManager"; isPointer: true }
}
Signal {
name: "colorMapChanged"
Parameter { name: "colorMap"; type: "ColorMap" }
}
Signal { name: "ready" }
Method { name: "syncOrConnect" }
Method { name: "showDeviceInfo" }
Method { name: "startExport" }
Method { name: "startImport" }
Method { name: "performReset" }
Method { name: "changeRemote" }
Method { name: "startNetworkExchange" }
Method {
name: "setColorMap"
Parameter { name: "colorMap"; type: "ColorMap" }
}
Method { name: "resetColorMap" }
Method {
name: "formatFingerPrint"
type: "string"
Parameter { name: "fingerPrint"; type: "QByteArray" }
}
}
Component {
name: "QtMvvm::ExchangeDevicesModel"
prototype: "QAbstractListModel"
exports: [
"de.skycoder42.QtMvvm.DataSync.Core/ExchangeDevicesModel 1.0"
]
exportMetaObjectRevisions: [0]
Enum {
name: "Roles"
values: {
"NameRole": 0,
"HostRole": 257,
"PortRole": 258,
"AddressRole": 259
}
}
Method {
name: "setup"
Parameter { name: "exchangeManager"; type: "QtDataSync::UserExchangeManager"; isPointer: true }
}
Method {
name: "infoAt"
type: "QtDataSync::UserInfo"
Parameter { name: "index"; type: "int" }
}
}
Component {
name: "QtMvvm::NetworkExchangeViewModel"
prototype: "QtMvvm::ViewModel"
exports: [
"de.skycoder42.QtMvvm.DataSync.Core/NetworkExchangeViewModel 1.0"
]
isCreatable: false
exportMetaObjectRevisions: [0]
Property { name: "port"; type: "ushort" }
Property { name: "deviceName"; type: "string" }
Property { name: "active"; type: "bool" }
Property { name: "deviceModel"; type: "ExchangeDevicesModel"; isReadonly: true; isPointer: true }
Signal { name: "ready" }
Signal {
name: "portChanged"
Parameter { name: "port"; type: "ushort" }
}
Signal {
name: "deviceNameChanged"
Parameter { name: "deviceName"; type: "string" }
}
Signal {
name: "activeChanged"
Parameter { name: "active"; type: "bool" }
}
Method {
name: "exportTo"
Parameter { name: "index"; type: "int" }
}
Method {
name: "setPort"
Parameter { name: "port"; type: "ushort" }
}
Method {
name: "setDeviceName"
Parameter { name: "deviceName"; type: "string" }
}
Method {
name: "setActive"
Parameter { name: "active"; type: "bool" }
}
}
}

6
src/imports/mvvmdatasynccore/qmldir

@ -0,0 +1,6 @@
module de.skycoder42.QtMvvm.DataSync.Core
plugin declarative_mvvmdatasynccore
classname QtMvvmDataSyncCoreDeclarativeModule
typeinfo plugins.qmltypes
depends QtQml.Models 2.3
depends de.skycoder42.QtMvvm.Core 1.0

27
src/imports/mvvmdatasynccore/qtmvvmdatasynccore_plugin.cpp

@ -0,0 +1,27 @@
#include "qtmvvmdatasynccore_plugin.h"
#include <QtQml>
#include <QtMvvmDataSyncCore/AccountModel>
#include <QtMvvmDataSyncCore/ExchangeDevicesModel>
#include <QtMvvmDataSyncCore/DataSyncViewModel>
#include <QtMvvmDataSyncCore/NetworkExchangeViewModel>
QtMvvmDataSyncCoreDeclarativeModule::QtMvvmDataSyncCoreDeclarativeModule(QObject *parent) :
QQmlExtensionPlugin(parent)
{}
void QtMvvmDataSyncCoreDeclarativeModule::registerTypes(const char *uri)
{
Q_ASSERT(qstrcmp(uri, "de.skycoder42.QtMvvm.DataSync.Core") == 0);
//Version 1.0
qmlRegisterType<QtMvvm::AccountModel>(uri, 1, 0, "AccountModel");
qmlRegisterType<QtMvvm::ExchangeDevicesModel>(uri, 1, 0, "ExchangeDevicesModel");
qmlRegisterUncreatableType<QtMvvm::DataSyncViewModel>(uri, 1, 0, "DataSyncViewModel", QStringLiteral("ViewModels cannot be created from QML"));
qmlRegisterUncreatableType<QtMvvm::NetworkExchangeViewModel>(uri, 1, 0, "NetworkExchangeViewModel", QStringLiteral("ViewModels cannot be created from QML"));
// Check to make shure no module update is forgotten
static_assert(VERSION_MAJOR == 1 && VERSION_MINOR == 0, "QML module version needs to be updated");
}

16
src/imports/mvvmdatasynccore/qtmvvmdatasynccore_plugin.h

@ -0,0 +1,16 @@
#ifndef QTMVVMDATASYNCCORE_PLUGIN_H
#define QTMVVMDATASYNCCORE_PLUGIN_H
#include <QtQml/QQmlExtensionPlugin>
class QtMvvmDataSyncCoreDeclarativeModule : public QQmlExtensionPlugin
{
Q_OBJECT
Q_PLUGIN_METADATA(IID QQmlExtensionInterface_iid)
public:
QtMvvmDataSyncCoreDeclarativeModule(QObject *parent = nullptr);
void registerTypes(const char *uri) override;
};
#endif // QTMVVMDATASYNCCORE_PLUGIN_H

69
src/imports/mvvmquick/plugins.qmltypes

@ -7,7 +7,14 @@ import QtQuick.tooling 1.2
// 'qmlplugindump -nonrelocatable de.skycoder42.QtMvvm.Quick 1.0'
Module {
dependencies: ["QtQuick 2.8"]
dependencies: [
"Qt.labs.platform 1.0",
"QtGraphicalEffects 1.0",
"QtQml 2.2",
"QtQuick 2.8",
"QtQuick.Window 2.1",
"de.skycoder42.QtMvvm.Core 1.0"
]
Component {
name: "QUrlValidator"
prototype: "QValidator"
@ -154,7 +161,7 @@ Module {
}
}
Component {
prototype: "QObject"
prototype: "QQuickPlatformFileDialog"
name: "de.skycoder42.QtMvvm.Quick/FileDialog 1.0"
exports: ["de.skycoder42.QtMvvm.Quick/FileDialog 1.0"]
exportMetaObjectRevisions: [0]
@ -164,43 +171,9 @@ Module {
Property { name: "msgResult"; type: "QtMvvm::MessageResult"; isPointer: true }
Property { name: "mimeTypes"; type: "QVariant" }
Signal { name: "closed" }
Property { name: "fileMode"; type: "FileMode" }
Property { name: "file"; type: "QUrl" }
Property { name: "files"; type: "QList<QUrl>" }
Property { name: "currentFile"; type: "QUrl" }
Property { name: "currentFiles"; type: "QList<QUrl>" }
Property { name: "folder"; type: "QUrl" }
Property { name: "options"; type: "QFileDialogOptions::FileDialogOptions" }
Property { name: "nameFilters"; type: "QStringList" }
Property {
name: "selectedNameFilter"
type: "QQuickPlatformFileNameFilter"
isReadonly: true
isPointer: true
}
Property { name: "defaultSuffix"; type: "string" }
Property { name: "acceptLabel"; type: "string" }
Property { name: "rejectLabel"; type: "string" }
Property { name: "data"; type: "QObject"; isList: true; isReadonly: true }
Property { name: "parentWindow"; type: "QWindow"; isPointer: true }
Property { name: "title"; type: "string" }
Property { name: "flags"; type: "Qt::WindowFlags" }
Property { name: "modality"; type: "Qt::WindowModality" }
Property { name: "visible"; type: "bool" }
Property { name: "result"; type: "int" }
Signal { name: "accepted" }
Signal { name: "rejected" }
Method { name: "open" }
Method { name: "close" }
Method { name: "accept" }
Method { name: "reject" }
Method {
name: "done"
Parameter { name: "result"; type: "int" }
}
}
Component {
prototype: "QObject"
prototype: "QQuickPlatformFolderDialog"
name: "de.skycoder42.QtMvvm.Quick/FolderDialog 1.0"
exports: ["de.skycoder42.QtMvvm.Quick/FolderDialog 1.0"]
exportMetaObjectRevisions: [0]
@ -209,27 +182,5 @@ Module {
Property { name: "msgConfig"; type: "QVariant" }
Property { name: "msgResult"; type: "QtMvvm::MessageResult"; isPointer: true }
Signal { name: "closed" }
Property { name: "folder"; type: "QUrl" }
Property { name: "currentFolder"; type: "QUrl" }
Property { name: "options"; type: "QFileDialogOptions::FileDialogOptions" }
Property { name: "acceptLabel"; type: "string" }
Property { name: "rejectLabel"; type: "string" }
Property { name: "data"; type: "QObject"; isList: true; isReadonly: true }
Property { name: "parentWindow"; type: "QWindow"; isPointer: true }
Property { name: "title"; type: "string" }
Property { name: "flags"; type: "Qt::WindowFlags" }
Property { name: "modality"; type: "Qt::WindowModality" }
Property { name: "visible"; type: "bool" }
Property { name: "result"; type: "int" }
Signal { name: "accepted" }
Signal { name: "rejected" }
Method { name: "open" }
Method { name: "close" }
Method { name: "accept" }
Method { name: "reject" }
Method {
name: "done"
Parameter { name: "result"; type: "int" }
}
}
}

4
src/imports/mvvmquick/qmldir

@ -2,6 +2,10 @@ module de.skycoder42.QtMvvm.Quick
plugin declarative_mvvmquick
classname QtMvvmQuickDeclarativeModule
typeinfo plugins.qmltypes
depends QtQuick 2.10
depends QtGraphicalEffects 1.0
depends Qt.labs.platform 1.0
depends de.skycoder42.QtMvvm.Core 1.0
internal TintIcon TintIcon.qml
internal MsgBoxBase MsgBoxBase.qml

Loading…
Cancel
Save