Main Page   Class Hierarchy   Compound List   File List   Compound Members  

ChannelIOFormat Class Reference

Base-class of all channel format implementations. More...

#include <channelioformat.h>

Inheritance diagram for ChannelIOFormat::

ChannelIOFormatCSV ChannelIOFormatKWinTV2 ChannelIOFormatXML ChannelIOFormatZapping List of all members.

Public Types

enum  Flags { FormatRead = 0x1, FormatWrite = 0x2, FormatReadWrite = FormatRead | FormatWrite }

Public Methods

 ChannelIOFormat (const char *name, int flags=FormatReadWrite)
virtual ~ChannelIOFormat ()
const char * name () const
bool canRead (const char *fmt=0) const
bool canWrite (const char *fmt=0) const
virtual bool handlesFile (const QString &filename, int rflags) const
bool load (ChannelStore *store, const QString &filename, const char *fmt)
bool save (ChannelStore *store, const QString &filename, const char *fmt)
virtual bool load (ChannelStore *store, QIODevice *file, const char *fmt)
virtual bool save (ChannelStore *store, QIODevice *file, const char *fmt)
ChannelFileMetaInfo getMetaInfo (const QString &filename, const char *fmt)
virtual ChannelFileMetaInfo getMetaInfo (QIODevice *file, const char *fmt)

Protected Attributes

PluginDesc _description
ChannelFileMetaInfo metaInfo
QtVision_qtv

Friends

class PluginFactory

Detailed Description

Base-class of all channel format implementations.

Author:
Richard Moore, <rich@kde.org>


Member Enumeration Documentation

enum ChannelIOFormat::Flags
 

Flags indicating the level of support provided by the handler.


Member Function Documentation

const char* ChannelIOFormat::name const [inline]
 

The name of the format.

bool ChannelIOFormat::canRead const char * fmt = 0 const
 

Returns true iff this object can read the specified format.

If no format is specified, then it is assumed that the user wants to know about the one returned by name() .

bool ChannelIOFormat::canWrite const char * fmt = 0 const
 

Returns true iff this object can write the specified format.

See also:
canRead() .

virtual bool ChannelIOFormat::handlesFile const QString & filename,
int rflags
const [virtual]
 

Returns true if this object can handle the specified file.

This function should do a quick test about the file, so the proper format could be easily selected. The default implementation only checks, if a filename ends with the name of the format. If thats not appropriate, then you should override this method. rflags the requested flags

Reimplemented in ChannelIOFormatZapping.

bool ChannelIOFormat::load ChannelStore * store,
const QString & filename,
const char * fmt
 

Load the specified file into the specified store.

Returns true on success, false otherwise.

bool ChannelIOFormat::save ChannelStore * store,
const QString & filename,
const char * fmt
 

Save the specified store into the specified file.

Returns true on success, false otherwise.

virtual bool ChannelIOFormat::load ChannelStore * store,
QIODevice * file,
const char * fmt
[virtual]
 

Load the contents of the specified QIODevice into the specified store.

Returns true on success, false otherwise.

Reimplemented in ChannelIOFormatCSV, ChannelIOFormatKWinTV2, ChannelIOFormatXML, and ChannelIOFormatZapping.

virtual bool ChannelIOFormat::save ChannelStore * store,
QIODevice * file,
const char * fmt
[virtual]
 

Save the contents of the specified store into the specified QIODevice.

Returns true on success, false otherwise.

Reimplemented in ChannelIOFormatCSV, ChannelIOFormatKWinTV2, and ChannelIOFormatXML.

ChannelFileMetaInfo ChannelIOFormat::getMetaInfo const QString & filename,
const char * fmt
 

Load the metainfo for the given file.


The documentation for this class was generated from the following file:
Generated at Thu Jan 30 02:56:02 2003 for QtVision by doxygen1.2.9.1 written by Dimitri van Heesch, © 1997-2001