#include <klfmainwin.h>
Public Member Functions | |
KLFAbstractOutputSaver () | |
virtual | ~KLFAbstractOutputSaver () |
virtual QStringList | supportedMimeFormats ()=0 |
virtual QString | formatTitle (const QString &key)=0 |
virtual QStringList | formatFilePatterns (const QString &key)=0 |
virtual bool | saveToFile (const QString &key, const QString &fileName, const KLFBackend::klfOutput &output)=0 |
A helper interface class to implement more export formats to save output (to file).
Definition at line 82 of file klfmainwin.h.
KLFAbstractOutputSaver::KLFAbstractOutputSaver | ( | ) | [inline] |
Definition at line 85 of file klfmainwin.h.
virtual KLFAbstractOutputSaver::~KLFAbstractOutputSaver | ( | ) | [inline, virtual] |
Definition at line 86 of file klfmainwin.h.
virtual QStringList KLFAbstractOutputSaver::formatFilePatterns | ( | const QString & | key | ) | [pure virtual] |
Returns the file pattern(s) that the files of this format (normally) match. syntax is simple pattern eg. "*.png"
.
The patterns are joined to spaces to form a filter that is given to QFileDialog.
Returns the human-readable, (possibly translated,) label to display in save dialog that the user can select to save in this format.
key | is a mime-type returned by supportedMimeFormats(). |
virtual bool KLFAbstractOutputSaver::saveToFile | ( | const QString & | key, |
const QString & | fileName, | ||
const KLFBackend::klfOutput & | output | ||
) | [pure virtual] |
Actually save to the file fileName
, using the format key
.
The subclass is responsible for notifying the user of possible errors that have occurred.
Overwrite confirmation has already been required (if applicable).
Referenced by KLFMainWin::slotSave().
virtual QStringList KLFAbstractOutputSaver::supportedMimeFormats | ( | ) | [pure virtual] |
Returns a list of mime-types of supported file formats