Emergency 20 Dokumentation  4.2.0
em5::SupervisorWindow Class Reference

Supervisor puppeteer. More...

#include <SupervisorWindow.h>

Inheritance diagram for em5::SupervisorWindow:
qsf::GuiDocument

Public Types

enum  State {
  STATE_FADEIN, STATE_1, STATE_SPEAK, STATE_2,
  STATE_FADEOUT, STATE_3, STATE_STOP
}
 

Public Member Functions

 SupervisorWindow (qsf::GuiContext &guiContext)
 
virtual ~SupervisorWindow ()
 
void setVisibleSupervisor (bool visible)
 Set whether or not a visible supervisor is allowed. More...
 
void play (const std::string &audioPath, bool showVideo)
 Play the audio and show the supervisor. More...
 
void stop ()
 Stop the audio and the supervisor. More...
 
void fadeOut ()
 Fadeout the audio and the supervisor. More...
 
bool isRunning () const
 Return if a supervisor (audio or video) is running. More...
 
void pause ()
 
void resume ()
 
virtual void processEvent (const std::string &eventKey, Rocket::Core::Event &event) override
 
- Public Member Functions inherited from qsf::GuiDocument
 GuiDocument (GuiContext &guiContext)
 Constructor. More...
 
 GuiDocument (GuiContext &guiContext, Rocket::Core::ElementDocument &rocketCoreElementDocument)
 Constructor. More...
 
virtual ~GuiDocument ()
 Destructor. More...
 
GuiContextgetGuiContext () const
 Return the document's owning GUI context. More...
 
Rocket::Core::ElementDocument * getRocketCoreElementDocument () const
 Return the document's libRocket document. More...
 
bool loadByFilename (const std::string &filename)
 Load the document from an RML file. More...
 
void unload ()
 Use this method if you want to change a documents .rml file at runtime. More...
 
void show ()
 Show the document. More...
 
void showFocused ()
 Show the document focused. More...
 
void showModal ()
 Show the document modal. More...
 
void hide ()
 Hide the document. More...
 
bool isVisible () const
 Check if the document is currently visible. More...
 
void setVisible (bool visible)
 Show/hide the document. More...
 
void pullToFront ()
 Pull the document to the front. More...
 
Rocket::Core::Element * findElementById (const std::string &elementId) const
 Find an element inside the document by its case-sensitive ID. More...
 
void registerNewButton (const std::string &buttonId, const std::string &event, const std::string &eventKey)
 Register a new button. More...
 
virtual void toggleVisibility ()
 Toggle visibility. More...
 
virtual void processViewportDimensionsChanged (int width, int height)
 

Static Public Attributes

static float VOLUME_THRESHOLD
 
static float ANIMATION_FADE_TIME
 

Additional Inherited Members

- Static Public Member Functions inherited from qsf::GuiDocument
static Rocket::Core::EventListener * createEventListener (const std::string &eventKey)
 Create an event listener. More...
 
static GuiDocumentgetGuiDocumentByRocketCoreElement (Rocket::Core::Element *element)
 Return a QSF GUI document instance by using a given libRocket element instance. More...
 
- Protected Member Functions inherited from qsf::GuiDocument
void createEmptyDocument ()
 

Detailed Description

Supervisor puppeteer.

Member Enumeration Documentation

Enumerator
STATE_FADEIN 
STATE_1 
STATE_SPEAK 
STATE_2 
STATE_FADEOUT 
STATE_3 
STATE_STOP 

Constructor & Destructor Documentation

em5::SupervisorWindow::SupervisorWindow ( qsf::GuiContext guiContext)
explicit
virtual em5::SupervisorWindow::~SupervisorWindow ( )
virtual

Member Function Documentation

void em5::SupervisorWindow::fadeOut ( )

Fadeout the audio and the supervisor.

bool em5::SupervisorWindow::isRunning ( ) const

Return if a supervisor (audio or video) is running.

void em5::SupervisorWindow::pause ( )
void em5::SupervisorWindow::play ( const std::string &  audioPath,
bool  showVideo 
)

Play the audio and show the supervisor.

Parameters
[in]audioPathAsset path to the audio ressource
[in]showVideoIf we want to show the supervisor video or just have audio
virtual void em5::SupervisorWindow::processEvent ( const std::string &  eventKey,
Rocket::Core::Event &  event 
)
overridevirtual

Reimplemented from qsf::GuiDocument.

void em5::SupervisorWindow::resume ( )
void em5::SupervisorWindow::setVisibleSupervisor ( bool  visible)

Set whether or not a visible supervisor is allowed.

void em5::SupervisorWindow::stop ( )

Stop the audio and the supervisor.

Member Data Documentation

float em5::SupervisorWindow::ANIMATION_FADE_TIME
static
float em5::SupervisorWindow::VOLUME_THRESHOLD
static

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