FaxMultiPage
3.5.3
FaxMultiPage is a minimal, but well-documented reference implementation of a kviewshell plugin that can serve as a starting point for implementations.
When
FaxMultiPage and the associated files are installed, the kviewshell program can open TIFF-Fax anf G3 fax files, i.e. files of mime types image/fax-g3 or image/tiff.
Only the two classes that are absolutely necessary for a working plugin are implemented. The only other file that is installed are desktop file, which tells kviewshell to use the plugin.
- FaxMultiPage, an implementation of a KMultiPage. In a larger application, this class would contain the GUI elements that the plugin adds to the GUI of the kviewshell. For viewing FAXes, no special GUI elements are required, and this plugin does only the minimal initialization required.
- FaxRenderer, an implementation of a DocumentRenderer. This class is responsible for document loading and rendering.
- kfaxmultipage.desktop and kfaxmultipage_tiff.desktop are desktop entry files that associate the plugin wit image/fax-g3 or image/tiff mime-types. Without these files installed, the file dialog in kviewshell would not show FAX files, and the command line "kvieshell test.g3" would fail with an error dialog "No plugin for image/fax-g3 files installed".