KFilterBase Class Reference
from PyKDE4.kdecore import *
Detailed Description
This is the base class for compression filters
such as gzip and bzip2. It's pretty much internal.
Don't use directly, use KFilterDev instead.
- Internal:
-
Enumerations |
FilterFlags | { NoHeaders, WithHeaders } |
Result | { Ok, End, Error } |
Methods |
| __init__ (self) |
| __init__ (self, KFilterBase a0) |
KFilterBase.Result | compress (self, bool finish) |
QIODevice | device (self) |
KFilterBase.FilterFlags | filterFlags (self) |
int | inBufferAvailable (self) |
bool | inBufferEmpty (self) |
| init (self, int mode) |
int | mode (self) |
int | outBufferAvailable (self) |
bool | outBufferFull (self) |
bool | readHeader (self) |
| reset (self) |
| setDevice (self, QIODevice dev, bool autodelete=0) |
| setFilterFlags (self, KFilterBase.FilterFlags flags) |
| setInBuffer (self, QString data, long size) |
| setOutBuffer (self, QString data, long maxlen) |
| terminate (self) |
KFilterBase.Result | uncompress (self) |
bool | writeHeader (self, QByteArray filename) |
Static Methods |
KFilterBase | findFilterByFileName (QString fileName) |
KFilterBase | findFilterByMimeType (QString mimeType) |
Method Documentation
- Abstract method:
- This method is abstract and can be overridden but not called directly.
- Internal:
-
Returns the device on which the filter will work.
- Returns:
- the device on which the filter will work
int inBufferAvailable |
( |
|
self ) |
|
- Abstract method:
- This method is abstract and can be overridden but not called directly.
- Internal:
-
bool inBufferEmpty |
( |
|
self ) |
|
- Abstract method:
- This method is abstract and can be overridden but not called directly.
- Internal:
-
- Abstract method:
- This method is abstract and can be overridden but not called directly.
- Internal:
-
int outBufferAvailable |
( |
|
self ) |
|
- Abstract method:
- This method is abstract and can be overridden but not called directly.
- Internal:
-
bool outBufferFull |
( |
|
self ) |
|
- Abstract method:
- This method is abstract and can be overridden but not called directly.
- Internal:
-
setDevice |
( |
self, |
|
|
|
QIODevice |
dev, |
|
|
bool |
autodelete=0 |
|
) |
|
|
|
Sets the device on which the filter will work
- Parameters:
-
| dev | the device on which the filter will work
|
| autodelete | if true, dev is deleted when the filter is deleted
|
setInBuffer |
( |
self, |
|
|
|
QString |
data, |
|
|
long |
size |
|
) |
|
|
|
- Abstract method:
- This method is abstract and can be overridden but not called directly.
- Internal:
-
setOutBuffer |
( |
self, |
|
|
|
QString |
data, |
|
|
long |
maxlen |
|
) |
|
|
|
- Abstract method:
- This method is abstract and can be overridden but not called directly.
- Internal:
-
- Abstract method:
- This method is abstract and can be overridden but not called directly.
- Internal:
-
- Abstract method:
- This method is abstract and can be overridden but not called directly.
- Internal:
-
Static Method Documentation
Call this to create the appropriate filter for the file
named fileName.
- Parameters:
-
| fileName | the name of the file to filter
|
- Returns:
- the filter for the fileName, or 0 if not found
Call this to create the appropriate filter for the mimetype
mimeType. For instance application/x-gzip.
- Parameters:
-
| mimeType | the mime type of the file to filter
|
- Returns:
- the filter for the mimeType, or 0 if not found
Enumeration Documentation
- Internal:
-
- Since:
- 4.3
- Enumerator:
-
NoHeaders = 0 | |
WithHeaders = 1 | |