diff options
author | Olivier Tilloy <olivier.tilloy@canonical.com> | 2012-10-05 13:26:10 +0000 |
---|---|---|
committer | Tarmac <> | 2012-10-05 13:26:10 +0000 |
commit | c3fbab270f60fc374bae50e787e0b2046f127a07 (patch) | |
tree | 61d0eae8f1c1e3d23fb6559cb19e920b167b187c /src/QMenuModel | |
parent | 7961150ad1eaa1b3bc62d5215e274a7b58b0ef72 (diff) | |
parent | 696fba50395807c344325af11e71ec74cf370c3d (diff) | |
download | qmenumodel-c3fbab270f60fc374bae50e787e0b2046f127a07.tar.gz qmenumodel-c3fbab270f60fc374bae50e787e0b2046f127a07.tar.bz2 qmenumodel-c3fbab270f60fc374bae50e787e0b2046f127a07.zip |
Tweaks to the structure of the code, and added example code.. Approved by Renato Araujo Oliveira Filho, jenkins.
Diffstat (limited to 'src/QMenuModel')
-rw-r--r-- | src/QMenuModel/CMakeLists.txt | 46 | ||||
-rw-r--r-- | src/QMenuModel/plugin.cpp | 41 | ||||
-rw-r--r-- | src/QMenuModel/plugin.h | 33 | ||||
-rw-r--r-- | src/QMenuModel/qmldir | 1 |
4 files changed, 0 insertions, 121 deletions
diff --git a/src/QMenuModel/CMakeLists.txt b/src/QMenuModel/CMakeLists.txt deleted file mode 100644 index bf3bb5a..0000000 --- a/src/QMenuModel/CMakeLists.txt +++ /dev/null @@ -1,46 +0,0 @@ - -project(qmenumodelqmlplugin) - -set(QMENUMODEL_SRC - plugin.cpp -) - -set(QMENUMODEL_HEADERS - plugin.h -) - -qt4_wrap_cpp(QMENUMODEL_MOC - ${QMENUMODEL_HEADERS} -) - -add_library(qmenumodel MODULE - ${QMENUMODEL_SRC} - ${QMENUMODEL_MOC} -) - -include_directories( - ${CMAKE_CURRENT_SOURCE_DIR} - ${qmenumodelcommon_SOURCE_DIR} - ${QT_INCLUDE_DIR} - ${QT_QTCORE_INCLUDE_DIR} - ${QT_QTGUI_INCLUDE_DIR} - ${QT_QTDECLARATIVE_INCLUDE_DIR} - ${GLIB_INCLUDE_DIRS} - ${GIO_INCLUDE_DIRS} -) - -target_link_libraries(qmenumodel - qmenumodelcommon - ${QT_QTCORE_LIBRARY} - ${QT_QTGUI_LIBRARY} - ${QT_QTDCLARATIVE_LIBRARY} - ${GLIB_LDFLAGS} - ${GIO_LDFLAGS} -) - -execute_process(COMMAND ${CMAKE_COMMAND} -E copy_if_different "${CMAKE_CURRENT_SOURCE_DIR}/qmldir" - "${CMAKE_CURRENT_BINARY_DIR}/qmldir") - -set(QMENUMODEL_INSTALL_PREFIX "${QT_IMPORTS_DIR}/Ubuntu/QMenuModel/") -install(TARGETS qmenumodel DESTINATION ${QMENUMODEL_INSTALL_PREFIX}) -install(FILES qmldir DESTINATION ${QMENUMODEL_INSTALL_PREFIX}) diff --git a/src/QMenuModel/plugin.cpp b/src/QMenuModel/plugin.cpp deleted file mode 100644 index 494dd2c..0000000 --- a/src/QMenuModel/plugin.cpp +++ /dev/null @@ -1,41 +0,0 @@ -/* - * Copyright 2012 Canonical Ltd. - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License as published by - * the Free Software Foundation; version 3. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public License - * along with this program. If not, see <http://www.gnu.org/licenses/>. - * - * Authors: - * Renato Araujo Oliveira Filho <renato@canonical.com> - */ - -#include "plugin.h" -#include "qmenumodel.h" -#include "qdbusmenumodel.h" -#include "qdbusactiongroup.h" -#include "qstateaction.h" - -#include <QtDeclarative> - - -void QMenuModelQmlPlugin::registerTypes(const char *uri) -{ - qmlRegisterUncreatableType<QMenuModel>(uri, 0, 1, "QMenuModel", - "QMenuModel is a interface"); - qmlRegisterUncreatableType<QStateAction>(uri, 0, 1, "QStateAction", - "QStateAction must be created by QDBusActionGroup::action"); - - qmlRegisterType<QDBusMenuModel>(uri, 0, 1, "QDBusMenuModel"); - qmlRegisterType<QDBusActionGroup>(uri, 0, 1, "QDBusActionGroup"); - -} - -Q_EXPORT_PLUGIN2(qmenumodel, QMenuModelQmlPlugin) diff --git a/src/QMenuModel/plugin.h b/src/QMenuModel/plugin.h deleted file mode 100644 index e9d6850..0000000 --- a/src/QMenuModel/plugin.h +++ /dev/null @@ -1,33 +0,0 @@ -/* - * Copyright 2012 Canonical Ltd. - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License as published by - * the Free Software Foundation; version 3. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public License - * along with this program. If not, see <http://www.gnu.org/licenses/>. - * - * Authors: - * Renato Araujo Oliveira Filho <renato@canonical.com> - */ - -#ifndef QMENUMODELQMLPLUGIN_H -#define QMENUMODELQMLPLUGIN_H - -#include <QDeclarativeExtensionPlugin> - - -class QMenuModelQmlPlugin : public QDeclarativeExtensionPlugin -{ - Q_OBJECT -public: - void registerTypes(const char *uri); -}; - -#endif diff --git a/src/QMenuModel/qmldir b/src/QMenuModel/qmldir deleted file mode 100644 index c8f525f..0000000 --- a/src/QMenuModel/qmldir +++ /dev/null @@ -1 +0,0 @@ -plugin qmenumodel |