#include <interfaces.h>


Public Types | |
| enum | Mode { Clear, Encode, Decode } |
| The root can be in any of these modes. More... | |
Public Member Functions | |
| virtual Mode | getMode ()=0 |
| A status-query method. | |
| virtual QImage | toImage ()=0 |
| Saves current decoding state into a QImage. | |
| virtual bool | encode (const QImage &toEncode, const UpdateInfo &updateInfo=UpdateInfo::none)=0 |
| Encodes an image - returns false on exception, getMode() have to be to be Clear. | |
| virtual void | decodeAct (DecodeAct action, int count=1)=0 |
| Performs a decoding action (e.g. clearing, multiple iteration). | |
| virtual bool | toStream (std::ostream &file)=0 |
| Saves an encoded image into a stream, returns true on success. | |
| virtual bool | fromStream (std::istream &file, int zoom=0)=0 |
Loads image from a file - returns true on success (to be run on in Clear state), can load in bigger size: dimension == orig_dim*2^zoom. | |
| int | toFile (const char *fileName) |
Shorthand: saves an encoded image to a file - returns the number of bytes written or false on failure. | |
| bool | fromFile (const char *fileName, int zoom=0) |
| Shorthand: loads image from a file - returns true on success, see fromStream. | |
| bool | allSettingsToFile (const char *fileName) |
| Saves all settings to a file (incl. child modules), returns true on success. | |
| bool | allSettingsFromFile (const char *fileName) |
| Loads all settings from a file (to be run on a shallow module), returns true on success. | |
Static Public Attributes | |
| static const Uint16 | SettingsMagic = Magic^12345 |
| magic number - integer identifying settings files | |
Definition at line 43 of file interfaces.h.
| enum IRoot::Mode |
The root can be in any of these modes.
| Clear | no action has been done |
| Encode | contains an encoded image |
| Decode | contains an image decoded from a file |
Definition at line 45 of file interfaces.h.
1.5.8