A world in a QGraphicsScene. More...
#include <worldqscene.h>
Public Member Functions | |
WorldQScene (QObject *parent=NULL) | |
constructor; | |
virtual | ~WorldQScene (void) |
destructor; | |
World * | world (void) const |
underlying world object | |
bool | hasWorld (void) const |
has a world or is empty | |
bool | openWorld (const QString &s_file, QString &s_err) |
open a world from a file | |
bool | closeWorld (QString &s_err) |
close current world; fails if the world is running | |
bool | loadWorld (World *w, QString &s_err) |
loads provided world | |
bool | save (QString &s_err) |
save to current file; if none is associated user is asked | |
bool | saveAs (QString &s_err) |
save to current file; if none is associated user is asked | |
const QString & | associatedFile (void) const |
associated file | |
bool | hasAssociatedFile (void) const |
has associated file |
A world in a QGraphicsScene.
WorldQScene::WorldQScene | ( | QObject * | parent = NULL | ) |
constructor;
bool WorldQScene::loadWorld | ( | World * | w, |
QString & | s_err | ||
) |
loads provided world
The call fails if the current world is running.
w | The world to load |
s_err | Return the errors in this parameter |
bool WorldQScene::openWorld | ( | const QString & | s_file, |
QString & | s_err | ||
) |
open a world from a file
The program loads new world and, if succesfull, discards discards current world, if any. The call fails if the world is running.
s_file | The file to load |
s_err | Return the errors in this parameter |