#include <glproject.h>
Public Types | |
| enum | OpenResult { Success, DiskReadError, UnknownDocType, UnknownDocVersion, DocParseError } |
Public Member Functions | |
| GLProject (const QString &title=QString::null, const QString &filename=QString::null) | |
| QString | title () const |
| QString | descText () const |
| QString | docText () const |
| QString | filename () const |
| QPtrList< CmdInstance > * | initCmds () |
| QPtrList< CmdInstance > * | displayCmds () |
| void | setTitle (const QString &title) |
| void | setDescText (const QString &descText) |
| void | setDocText (const QString &docText) |
| void | setFilename (const QString &filename) |
| void | setInitCmds (QPtrList< CmdInstance > &cmds) |
| void | setDisplayCmds (QPtrList< CmdInstance > &cmds) |
| bool | saveFile () |
| OpenResult | openFile (const QString &filename, QPtrList< CmdTreeNode > *tree) |
| QString | toString () |
Static Public Member Functions | |
| QString | fileExtension () |
Private Member Functions | |
| void | insertCmds (QDomDocument &doc, QDomElement &root, QPtrList< CmdInstance > &cmds) |
| QString | getElementText (QDomElement e) const |
| bool | parseCmds (QDomElement &root, QPtrList< CmdInstance > &cmds, QPtrList< CmdTreeNode > *tree) |
Private Attributes | |
| QString | myTitle |
| QString | myDescText |
| QString | myDocText |
| QString | myFilename |
| QPtrList< CmdInstance > | myInitCmds |
| QPtrList< CmdInstance > | myDisplayCmds |
A project consists primarily of a list of initialization command instances and display command instances, both along with their own encapsulated data, including parameter values and their variable instances (again, obviously with their data).
A project also contains fields such as a title, a description and documentation.
A project instance can easily be saved to disk via the GLProject::saveFile() method (using the current filename). It can then be reloaded using the GLProject::openFile() method.
|
|
|
|
||||||||||||
|
Glitch Project Constructor. Note: Auto-delete is enabled here for both myInitCmds and myDisplayCmds, so that when an pointer entry is removed from either list, the object that it is pointing to is also deleted. |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Concatenate the strings from all of the level-0 DOM text nodes of a DOM element. (there should only be one text element though) |
|
|
|
|
||||||||||||||||
|
Used to insert a list of commands into a XML DOM document. |
|
||||||||||||
|
Read a project from disk, with an XML representation. It requires the command tree to lookup the commands from and check for validity. On success, the project instance will contain the file's data and the project's filename will also be set the one specified to the method. |
|
||||||||||||||||
|
Parse the commands from an XML DOM document into a list of command instances. |
|
|
Store a project to disk, with an XML representation. Note: This method WILL overwrite any existing file. Please ensure that the user is happy with overwriting a file BEFORE calling this method. |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Get the XML representation of the project. This is used by the GLProject::saveFile() method. |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1.3.2