[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-commits
Subject: KDE/kdelibs/kross/ui
From: Paulo Moura Guedes <moura () kdewebdev ! org>
Date: 2008-03-05 18:26:29
Message-ID: 1204741589.086400.19372.nullmailer () svn ! kde ! org
[Download RAW message or body]
SVN commit 782676 by mojo:
Introduce a new class Kross::ScriptingPlugin wich extends KParts::Plugin with \
aditional logic to load Kross actions in the GUI.
One can create .rc files describing scripting actions that Kross can understand, \
e.g.:
<KrossScripting>
<collection name="file" text="File">
<script
name="dummy_script"
text="Dummy Script"
comment="Dummy Script"
interpreter="python"
file="dummy_script.py" />
</collection>
</KrossScripting>
This plugin class will append this information to its XMLGUI, i.e., will create a new \
action named "Dummy Script" in the "File" menu.
There are to additional slots in this class:
virtual void slotEditScriptActions();
virtual void slotResetScriptActions();
The first one edit or create an user actions file, which will override/extends the \
default script actions. The second one deletes the user actions file, which has the \
effect of falling back to the default script actions (if any)
Later, slotEditScriptActions() function can be improved to offer some kind of visual \
editor similar to Qt Designer.
Besides the possibility of extending applications by exposing a scripting interface, \
this will allow to extend the GUI with scripting actions which, IMHO, is a very \
powerful concept.
CCMAIL: Sebastian Sauer <mail@dipe.org>
M +3 -2 CMakeLists.txt
A plugin.cpp [License: GPL (v2+)]
A plugin.h [License: GPL (v2+)]
--- trunk/KDE/kdelibs/kross/ui/CMakeLists.txt #782675:782676
@@ -9,15 +9,16 @@
set(krossui_LIB_SRCS
model.cpp
view.cpp
+ plugin.cpp
# guiclient.cpp
)
kde4_add_library(krossui SHARED ${krossui_LIB_SRCS})
-target_link_libraries(krossui krosscore ${KDE4_KDEUI_LIBS} ${KDE4_KIO_LIBS})
+target_link_libraries(krossui krosscore ${KDE4_KDEUI_LIBS} ${KDE4_KPARTS_LIBS} \
${KDE4_KIO_LIBS}) set_target_properties(krossui PROPERTIES VERSION \
${GENERIC_LIB_VERSION} SOVERSION ${GENERIC_LIB_SOVERSION}) install(TARGETS krossui \
${INSTALL_TARGETS_DEFAULT_ARGS})
########### install files ###############
#install(FILES guiclient.h model.h view.h DESTINATION \
${INCLUDE_INSTALL_DIR}/kross/ui)
-install(FILES model.h view.h DESTINATION ${INCLUDE_INSTALL_DIR}/kross/ui COMPONENT \
Devel) +install(FILES model.h view.h plugin.h DESTINATION \
${INCLUDE_INSTALL_DIR}/kross/ui COMPONENT Devel)
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic