[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-commits
Subject: koffice/kspread/plugins
From: Sebastian Sauer <mail () dipe ! org>
Date: 2007-01-28 2:38:03
Message-ID: 1169951883.599919.25468.nullmailer () svn ! kde ! org
[Download RAW message or body]
SVN commit 627769 by sebsauer:
Added the odfpyexport.py script to KSpread to produce custom OpenDocuments.
* The script uses the ODFPY python module ( \
http://opendocumentfellowship.org/projects/odfpy ) to produce opendocument text files \
from within the KSpread sheets.
* Needs improvments within next days once the cmake-upgrade + whole recompile is \
done. Shouldn't be difficult to also add export to .g. OpenDoc \
Presentation ;)
* It's just an example how to use Kross+KSpreadScripting to produce easy custom \
opendocuments from within KSpread.
* Fantastic work done on the python-module, Soren. A lot of thanks!
CC_MAIL:soren.roug@eea.europa.eu
FEATURE
M +3 -3 CMakeLists.txt
M +1 -1 scripting/CMakeLists.txt
M +10 -0 scripting/ScriptingModule.cpp
M +6 -0 scripting/ScriptingModule.h
A scripting/ScriptingWidgets.cpp [License: LGPL (v2+)]
A scripting/ScriptingWidgets.h [License: LGPL (v2+)]
M +12 -3 scripting/scripts/CMakeLists.txt
AM scripting/scripts/odfpyexport.py
M +5 -9 scripting/scripts/scripts.rc
D scripting/scripts/unittest.py
--- trunk/koffice/kspread/plugins/CMakeLists.txt #627768:627769
@@ -1,6 +1,6 @@
add_subdirectory( insertcalendar )
add_subdirectory( solver )
-if(KOFFICE_ENABLE_SCRIPTING)
- add_subdirectory(scripting)
-endif(KOFFICE_ENABLE_SCRIPTING)
+#if(KOFFICE_ENABLE_SCRIPTING)
+# add_subdirectory(scripting)
+#endif(KOFFICE_ENABLE_SCRIPTING)
--- trunk/koffice/kspread/plugins/scripting/CMakeLists.txt #627768:627769
@@ -9,7 +9,7 @@
add_subdirectory( scripts )
# the KSpread Scripting KParts::Plugin + Kross module
-set(krossmodulekspread_PART_SRCS ScriptingModule.cpp ScriptingFunction.cpp \
ScriptingPart.cpp) +set(krossmodulekspread_PART_SRCS ScriptingModule.cpp \
ScriptingFunction.cpp ScriptingWidgets.cpp ScriptingPart.cpp) \
kde4_automoc(${krossmodulekspread_PART_SRCS}) kde4_add_plugin(krossmodulekspread \
${krossmodulekspread_PART_SRCS})
--- trunk/koffice/kspread/plugins/scripting/ScriptingModule.cpp #627768:627769
@@ -22,9 +22,11 @@
#include "ScriptingModule.h"
#include "ScriptingFunction.h"
+#include "ScriptingWidgets.h"
#include <QPointer>
#include <QApplication>
+#include <QLayout>
#include <kdebug.h>
#include <Doc.h>
@@ -174,4 +176,12 @@
return doc()->exp0rt(url);
}
+QWidget* ScriptingModule::createSheetsListView(QWidget* parent)
+{
+ ScriptingSheetsListView* listview = new ScriptingSheetsListView(this, parent);
+ if( parent && parent->layout() )
+ parent->layout()->addWidget(listview);
+ return listview;
+}
+
#include "ScriptingModule.moc"
--- trunk/koffice/kspread/plugins/scripting/ScriptingModule.h #627768:627769
@@ -124,6 +124,12 @@
bool importUrl(const QString& url);
bool exportUrl(const QString& url);
+ /**
+ * Create and return a new \a ScriptingSheetsListView widget instance which
+ * could be used to select 0..n sheets from a list of all available sheets.
+ */
+ QWidget* createSheetsListView(QWidget* parent);
+
private:
/// \internal d-pointer class.
class Private;
--- trunk/koffice/kspread/plugins/scripting/scripts/CMakeLists.txt #627768:627769
@@ -1,3 +1,12 @@
-install(FILES scripts.rc DESTINATION ${DATA_INSTALL_DIR}/kspread/scripts)
-install(FILES htmlexport.py htmlexportinfos.ui DESTINATION \
${DATA_INSTALL_DIR}/kspread/scripts/extensions)
-install(FILES functions.py DESTINATION \
${DATA_INSTALL_DIR}/kspread/scripts/functions) +install(FILES
+ scripts.rc
+ DESTINATION ${DATA_INSTALL_DIR}/kspread/scripts)
+
+install(FILES
+ htmlexport.py htmlexportinfos.ui
+ odfpyexport.py
+ DESTINATION ${DATA_INSTALL_DIR}/kspread/scripts/extensions)
+
+install(FILES
+ functions.py
+ DESTINATION ${DATA_INSTALL_DIR}/kspread/scripts/functions)
** trunk/koffice/kspread/plugins/scripting/scripts/odfpyexport.py #property \
svn:executable + *
--- trunk/koffice/kspread/plugins/scripting/scripts/scripts.rc #627768:627769
@@ -5,14 +5,10 @@
comment="Export an OpenDocument Spreadsheet File to a HTML File"
interpreter="python"
file="extensions/htmlexport.py" />
-<!--
- <collection name="functions" text="Functions">
- <script
- name="pyfunctions"
- text="Python Scripting Functions"
- comment="Load the python scripting functions"
+ <script
+ name="odfpyexport"
+ text="OdfPy Export"
+ comment="Export an OpenDocument Spreadsheet File to an OpenDocument \
File" interpreter="python"
- file="functions/functions.py" />
- </collection>
-//-->
+ file="extensions/odfpyexport.py" />
</KrossScripting>
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic