plasma-framework/scriptengines/javascript/CMakeLists.txt
Sebastian Kügler d9612651cb ToolBox bindings for declarative containments
This adds the necessary bits, actions handling, showing / hiding of
toolbox and a hooks for config interface and add widgets.

The interesting bits:

Toolbox separate on the scene

For declarative containments, we add a declarativewidget on top of the
view which loads the "org.kde.toolbox" package. The toolbox can differ
per platform, layout of toolbox and containment can not "leak" into each
other.

ToolBox import

The most important and interesting bit is the list of actions the
ToolBox exposes, it's collected from corona, containment. The latter is
actually problematic, since we don't get access to the actions
internally provided by Containment
(ContainmentPrivate::addDefaultActions).
Containment::setToolBox(AbstractToolBox) being protected, we cannot
register our declarative ToolBoxProxy implementation to the containment,
so we have to wire up settings and addwidgets separately. Sorting of the
actions is "random", and expected to be done by the QML toolbox
implementation, based on objectName strings.

REVIEW:107232
2012-11-07 17:21:26 +01:00

172 lines
5.8 KiB
CMake

# APPLET
if(KDE_PLATFORM_FEATURE_BINARY_COMPATIBLE_FEATURE_REDUCTION)
set(PLASMA_NO_KDEWEBKIT TRUE)
set(PLASMA_NO_KNEWSTUFF TRUE)
set(PLASMA_NO_SOLID TRUE)
set(PLASMA_NO_KIO TRUE)
endif(KDE_PLATFORM_FEATURE_BINARY_COMPATIBLE_FEATURE_REDUCTION)
set(simple_javascript_engine_SRCS
common/extension_launchapp.cpp
common/extension_io.cpp
common/guiscriptenv.cpp
common/javascriptaddonpackagestructure.cpp
declarative/toolboxproxy.cpp
declarative/appletcontainer.cpp
plasmoid/abstractjsappletscript.cpp
plasmoid/appletauthorization.cpp
plasmoid/jsappletinterface.cpp
plasmoid/simplejavascriptapplet.cpp
plasmoid/themedsvg.cpp
simplebindings/animationgroup.cpp
simplebindings/anchorlayout.cpp
simplebindings/dataenginereceiver.cpp
simplebindings/bytearrayclass.cpp
simplebindings/bytearrayprototype.cpp
simplebindings/color.cpp
simplebindings/dataengine.cpp
simplebindings/easingcurve.cpp
simplebindings/font.cpp
simplebindings/filedialogproxy.cpp
simplebindings/graphicsitem.cpp
simplebindings/icon.cpp
simplebindings/i18n.cpp
simplebindings/linearlayout.cpp
simplebindings/gridlayout.cpp
simplebindings/painter.cpp
simplebindings/pen.cpp
simplebindings/pixmap.cpp
simplebindings/point.cpp
simplebindings/rect.cpp
simplebindings/qscriptbookkeeping.cpp
simplebindings/size.cpp
simplebindings/sizepolicy.cpp
simplebindings/timer.cpp
simplebindings/uiloader.cpp
simplebindings/url.cpp
)
include_directories(${PHONON_INCLUDES} ${CMAKE_CURRENT_SOURCE_DIR}/common)
kde4_add_plugin(plasma_appletscript_simple_javascript ${simple_javascript_engine_SRCS})
target_link_libraries(plasma_appletscript_simple_javascript
${KDE4_KDECORE_LIBS}
${KDE4_KIO_LIBS}
${KDE4_PLASMA_LIBS}
${QT_QTDECLARATIVE_LIBRARY}
${QT_QTSCRIPT_LIBRARY}
${QT_QTUITOOLS_LIBRARY}
${QT_QTXML_LIBRARY}
)
install(TARGETS plasma_appletscript_simple_javascript DESTINATION ${PLUGIN_INSTALL_DIR})
install(FILES data/plasma-scriptengine-applet-simple-javascript.desktop DESTINATION ${SERVICES_INSTALL_DIR} )
# RUNNER
set(javascript_runner_engine_SRCS
common/extension_launchapp.cpp
common/extension_io.cpp
common/javascriptaddonpackagestructure.cpp
common/scriptenv.cpp
runner/javascriptrunner.cpp
simplebindings/i18n.cpp
)
kde4_add_plugin(plasma_runnerscript_javascript ${javascript_runner_engine_SRCS})
target_link_libraries(plasma_runnerscript_javascript
${KDE4_KDECORE_LIBS}
${KDE4_KIO_LIBS}
${KDE4_PLASMA_LIBS}
${QT_QTSCRIPT_LIBRARY})
install(TARGETS plasma_runnerscript_javascript DESTINATION ${PLUGIN_INSTALL_DIR})
install(FILES data/plasma-scriptengine-runner-javascript.desktop DESTINATION ${SERVICES_INSTALL_DIR})
# DATAENGINE
set(javascript_dataengine_engine_SRCS
common/extension_launchapp.cpp
common/extension_io.cpp
common/javascriptaddonpackagestructure.cpp
common/scriptenv.cpp
dataengine/javascriptdataengine.cpp
dataengine/javascriptservice.cpp
simplebindings/dataengine.cpp
simplebindings/i18n.cpp
simplebindings/qscriptnonguibookkeeping.cpp
)
kde4_add_plugin(plasma_dataenginescript_javascript ${javascript_dataengine_engine_SRCS})
target_link_libraries(plasma_dataenginescript_javascript
${KDE4_KDECORE_LIBS}
${KDE4_KIO_LIBS}
${KDE4_PLASMA_LIBS}
${QT_QTSCRIPT_LIBRARY})
install(TARGETS plasma_dataenginescript_javascript DESTINATION ${PLUGIN_INSTALL_DIR})
install(FILES data/plasma-scriptengine-dataengine-javascript.desktop DESTINATION ${SERVICES_INSTALL_DIR})
# ADDONS
set(javascript_addon_packagestructure_SRCS
common/addonpackageplugin.cpp
common/javascriptaddonpackagestructure.cpp
)
kde4_add_plugin(plasma_packagestructure_javascriptaddon ${javascript_addon_packagestructure_SRCS})
target_link_libraries(plasma_packagestructure_javascriptaddon ${KDE4_PLASMA_LIBS})
install(TARGETS plasma_packagestructure_javascriptaddon DESTINATION ${PLUGIN_INSTALL_DIR})
install(FILES data/plasma-packagestructure-javascript-addon.desktop DESTINATION ${SERVICES_INSTALL_DIR})
install(FILES data/plasma-javascriptaddon.desktop DESTINATION ${SERVICETYPES_INSTALL_DIR})
#DECLARATIVE APPLET
set(declarative_appletscript_SRCS
common/extension_launchapp.cpp
common/extension_io.cpp
common/javascriptaddonpackagestructure.cpp
common/declarativescriptenv.cpp
declarative/toolboxproxy.cpp
declarative/appletcontainer.cpp
declarative/declarativeitemcontainer.cpp
declarative/packageaccessmanager.cpp
declarative/packageaccessmanagerfactory.cpp
plasmoid/abstractjsappletscript.cpp
plasmoid/appletauthorization.cpp
plasmoid/appletinterface.cpp
plasmoid/declarativeappletscript.cpp
plasmoid/themedsvg.cpp
simplebindings/bytearrayclass.cpp
simplebindings/bytearrayprototype.cpp
simplebindings/dataengine.cpp
simplebindings/dataenginereceiver.cpp
simplebindings/filedialogproxy.cpp
simplebindings/qscriptbookkeeping.cpp
simplebindings/url.cpp
simplebindings/point.cpp
)
include_directories(${PHONON_INCLUDES} ${CMAKE_CURRENT_SOURCE_DIR}/common)
kde4_add_plugin(plasma_appletscript_declarative ${declarative_appletscript_SRCS})
target_link_libraries(plasma_appletscript_declarative
${KDE4_PLASMA_LIBS}
${KDE4_KIO_LIBS}
${QT_QTSCRIPT_LIBRARY}
${QT_QTDECLARATIVE_LIBRARY}
${QT_QTUITOOLS_LIBRARY}
)
install(TARGETS plasma_appletscript_declarative DESTINATION ${PLUGIN_INSTALL_DIR})
install(FILES data/plasma-scriptengine-applet-declarative.desktop DESTINATION ${SERVICES_INSTALL_DIR})