summaryrefslogtreecommitdiffstats
path: root/kmailcvt/README
diff options
context:
space:
mode:
authortoma <toma@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2009-11-25 17:56:58 +0000
committertoma <toma@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2009-11-25 17:56:58 +0000
commit460c52653ab0dcca6f19a4f492ed2c5e4e963ab0 (patch)
tree67208f7c145782a7e90b123b982ca78d88cc2c87 /kmailcvt/README
downloadtdepim-460c52653ab0dcca6f19a4f492ed2c5e4e963ab0.tar.gz
tdepim-460c52653ab0dcca6f19a4f492ed2c5e4e963ab0.zip
Copy the KDE 3.5 branch to branches/trinity for new KDE 3.5 features.
BUG:215923 git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdepim@1054174 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'kmailcvt/README')
-rw-r--r--kmailcvt/README46
1 files changed, 46 insertions, 0 deletions
diff --git a/kmailcvt/README b/kmailcvt/README
new file mode 100644
index 000000000..dbdf247a8
--- /dev/null
+++ b/kmailcvt/README
@@ -0,0 +1,46 @@
+The KDE Mail Import tool - KMailCVT
+===================================
+
+This directory contains the sources for the kmailcvt program. It communicates
+with KMail via its DCOP interface to add messages.
+
+Writing a filter
+----------------
+
+...is very easy. Create two files filter_myformat.cxx and filter_myformat.hxx
+and add "filter_myformat.cxx" to the end of the kmailcvt_SOURCES line in
+Makefile.am and "filter_myformat.cxx filter_myformat.hxx" to the end of the
+EXTRA_DIST line in Makefile.am. Now run "make -f Makefile.cvs; ./configure" in
+your kdepim source directory.
+
+In the import method of your filter you are passed a FilterInfo object. This has
+the following methods that you may want to use:
+
+ void setFrom( const QString& from ); // Set to file importing from
+ void setTo( const QString& to ); // Set to folder importing into
+ void setCurrent( const QString& current ); // What we are doing
+ void setCurrent( int percent = 0 ); // Set percentage of current file
+ void setOverall( int percent = 0 ); // Set overall percentage
+ void addLog( const QString& log ); // Add a message for the user to see
+ void alert( const QString& message ); // Tell user something has gone wrong
+ QWidget *parent(); // The parent widget
+
+ bool removeDupMsg; // true, if user selected 'remove duplicated messages'
+
+Also, every now and again you should check to see if the shouldTerminate method
+returns true, if it does the user has pressed cancel and your import method
+should return.
+
+To add messages, extract the email (including all headers) into a KTempFile.
+Then use the following:
+
+if(info->removeDupMsg) addMessage( info, folderName, tempfilepath );
+else addMessage_fastImport( info, folderName, tempfilepath );
+
+For a simple example, look at filter_plain
+
+Finally for the filter to appear in the combo box in the wizard you need to edit
+kselfilterpage.cpp and add an appropriate addFilter() function call.
+
+Danny Kukawka, February 2005
+Laurence Anderson, April 2003.