Skip to content
Permalink
Browse files
rename qml library to QgsQuick
  • Loading branch information
PeterPetrik committed May 4, 2018
1 parent b1bf9b2 commit aed3939cbd6407ab9c2b6bb839669faed3fe9754
@@ -67,7 +67,7 @@ ELSE(MSVC)
SET_SOURCE_FILES_PROPERTIES(${QGIS_QUICK_PLUGIN_MOC_SRCS} PROPERTIES COMPILE_FLAGS "-Wno-deprecated-declarations" )
ENDIF(MSVC)

SET(QGIS_QUICK_PLUGIN_RUNTIME_DIR ${QGIS_OUTPUT_DIRECTORY}/${QGIS_QML_SUBDIR}/QgisQuick)
SET(QGIS_QUICK_PLUGIN_RUNTIME_DIR ${QGIS_OUTPUT_DIRECTORY}/${QGIS_QML_SUBDIR}/QgsQuick)

ADD_LIBRARY(qgis_quick_plugin MODULE
${QGIS_QUICK_PLUGIN_SRC}
@@ -93,25 +93,25 @@ IF(QMLPLUGINDUMP_FOUND)
# To create typeinfo file, no qml files must be in the directory, otherwise
# bunch of "QObject: Cannot create children for a parent that is in a different thread." errors
# appear and typeinfo file is not generated
SET(QGIS_QUICK_TYPEINFO_GENERATE_DIR ${CMAKE_CURRENT_BINARY_DIR}/QgisQuick)
SET(QGIS_QUICK_TYPEINFO_GENERATE_DIR ${CMAKE_CURRENT_BINARY_DIR}/QgsQuick)

# Extract QML Types Info from our QML plugin. This is useful for development with Qt Creator as it allows
# Qt Creator understand also the C++ classes registered in the plugin and thus available in QML code
SET(QGIS_QUICK_PLUGIN_TYPEINFO ${QGIS_QUICK_PLUGIN_RUNTIME_DIR}/qgisquick.qmltypes)
SET(QGIS_QUICK_PLUGIN_TYPEINFO ${QGIS_QUICK_PLUGIN_RUNTIME_DIR}/qgsquick.qmltypes)
ADD_CUSTOM_COMMAND(
TARGET qgis_quick_plugin
COMMAND ${CMAKE_COMMAND} -E make_directory ${QGIS_QUICK_TYPEINFO_GENERATE_DIR}
COMMAND ${CMAKE_COMMAND} -E copy ${CMAKE_CURRENT_SOURCE_DIR}/qmldir ${QGIS_QUICK_TYPEINFO_GENERATE_DIR}
COMMAND ${CMAKE_COMMAND} -E copy $<TARGET_FILE:qgis_quick_plugin> ${QGIS_QUICK_TYPEINFO_GENERATE_DIR}
COMMAND ${QMLPLUGINDUMP_EXECUTABLE}
ARGS QgisQuick 0.1 . -v --output ${QGIS_QUICK_PLUGIN_TYPEINFO}
ARGS QgsQuick 0.1 . -v --output ${QGIS_QUICK_PLUGIN_TYPEINFO}
WORKING_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}"
POST_BUILD
)
ENDIF()

# Installation
SET(QUICK_PLUGIN_INSTALL_DIR ${QGIS_QML_DIR}/QgisQuick)
SET(QUICK_PLUGIN_INSTALL_DIR ${QGIS_QML_DIR}/QgsQuick)
INSTALL(TARGETS qgis_quick_plugin
RUNTIME DESTINATION ${QUICK_PLUGIN_INSTALL_DIR}
LIBRARY DESTINATION ${QUICK_PLUGIN_INSTALL_DIR}
@@ -16,7 +16,7 @@
import QtQuick 2.3
import QtQuick.Controls 2.2
import QtQml 2.2
import QgisQuick 0.1 as QgsQuick
import QgsQuick 0.1 as QgsQuick

Item {
id: mapArea
@@ -41,7 +41,7 @@ static QObject *_utilsProvider( QQmlEngine *engine, QJSEngine *scriptEngine )
return new QgsQuickUtils(); // the object will be owned by QML engine and destroyed by the engine on exit
}

void QgisQuickPlugin::registerTypes( const char *uri )
void QgsQuickPlugin::registerTypes( const char *uri )
{
qRegisterMetaType< QList<QgsMapLayer *> >( "QList<QgsMapLayer*>" );
qRegisterMetaType< QgsAttributes > ( "QgsAttributes" );
@@ -25,7 +25,7 @@
*
* \since QGIS 3.2
*/
class QgisQuickPlugin : public QQmlExtensionPlugin
class QgsQuickPlugin : public QQmlExtensionPlugin
{
Q_OBJECT
Q_PLUGIN_METADATA( IID "org.qt-project.Qt.QQmlExtensionInterface" )
@@ -10,9 +10,9 @@
# (at your option) any later version.


module QgisQuick
module QgsQuick
plugin qgis_quick_plugin

MapCanvas 0.1 qgsquickmapcanvas.qml

typeinfo qgisquick.qmltypes
typeinfo qgsquick.qmltypes
@@ -14,7 +14,7 @@
***************************************************************************/
import QtQuick 2.7
import QtQuick.Controls 2.2
import QgisQuick 0.1 as QgsQuick
import QgsQuick 0.1 as QgsQuick
import "."

ApplicationWindow {

0 comments on commit aed3939

Please sign in to comment.