[libkorigin Index] [libkorigin Heirarchy]
ImportFilter BaseClass More...
#include </home/mh/korigin/korigin/doc/tmp/import.h>
This class defines the interface of all import filters. The importfilter must return its name, its optionsslot, and the table opened from the disk.
There are also members to store and get the latest used directory as well as the default directory.
Very cool structure: only this file has to be included by the main program. All filters have to be compiled to an object file and this object file has then to be linked to the main executable. They dont need to be included at any positon!!! So leave their includefiles where they are. Dont copy them to the korigin include directory.
Write new import filters by inheriting the class importfilter and defining all virtual declared functions. Watch importASCII for an example.
This is the main ImportFilter procedure. It is called by centre and worksheet.
return the popupmenu build from all found import filters.
returns a options popup built from all found import filters. Already connected to the appropriate slots.
of course each class has to have one
the same like for the constructor
get Description of the filter. This is the text being displayed everywhere where the filter will be called in the main program, for example in the Popup and FileDialog.
a routine which should build a tabdialog and fill it with life. That means asking for the FileFilter, or specific import file format.
all import filters only display files the a specific file extension in the File dialogs. You have to return something like "*.html".
This is the main function of import Filter. It will be called from the main program and reads a specific file from disk.
return the latest used directory (the directory used on the last import command). This should be the default directory the first time this function is called in a session.
set the latest used directory.
return default directory. Needed by the options dialog which builds a dialog for setting the default directory. The default directory is the first directory used when importing a specific file in a session. All filters should have their own directory.
set the default directory.
| Kdoc |