april  1.0.0
...
 All Classes Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
april::Gui::WorldQScene Class Reference

A world in a QGraphicsScene. More...

#include <worldqscene.h>

+ Inheritance diagram for april::Gui::WorldQScene:

Public Member Functions

 WorldQScene (QObject *parent=NULL)
 constructor;
virtual ~WorldQScene (void)
 destructor;
Worldworld (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

Detailed Description

A world in a QGraphicsScene.

Constructor & Destructor Documentation

WorldQScene::WorldQScene ( QObject *  parent = NULL)

constructor;

Todo:
switch for showing this

Member Function Documentation

bool WorldQScene::loadWorld ( World w,
QString &  s_err 
)

loads provided world

The call fails if the current world is running.

Parameters
wThe world to load
s_errReturn the errors in this parameter
Returns
true if the new world was loaded
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.

Parameters
s_fileThe file to load
s_errReturn the errors in this parameter
Returns
true if the new world was loaded

The documentation for this class was generated from the following files: