GostyApp Class Reference

#include <gosty_app.hh>


Public Slots

void OnQuit ()

Public Member Functions

PythonShellGetPyShell ()
GLWinGetGLWin ()
SceneWinGetSceneWin ()
SequenceViewerGetSequenceViewer ()
ToolOptionsWinGetToolOptionsWin ()
void ProcessEvents ()
PerspectiveGetPerspective ()
void AddWidgetToApp (const QString &ident, QWidget *widget)
void RemoveWidgetFromApp (const QString &ident)
void SetAppTitle (const QString &app_title)

Static Public Member Functions

static GostyAppInstance ()


Detailed Description

The gosty app serves as a GUI Manager. It distinguishes between two types of windows: Windows that can only exist once (singletons) and windows with several independent instances of the same class. The first type includes windows such as the 3D Scene and the Python Shell. They can be accessed through one of the getter methods GetPyShell(), GetGLWin(), GetToolOptionsWin(). In Python, these classes are additionally exported as read-only properties py_shell, gl_win. The other class of windows include data viewers, plot viewers and sequence viewers. They can be created for example the CreateDataViewer() method.

The layout of the widgets inside the main window is managed through a perspective.

Definition at line 68 of file gosty_app.hh.


Member Function Documentation

void AddWidgetToApp ( const QString &  ident,
QWidget *  widget 
)

add a custom QWidget to the gosty_app

This method adds a custom widget to OpenStructure. It can be used for example in a python script, so that the widget will not be destroyed, when the script reaches the end. The widget position will be stored, when OpenStructure is being closed. It will be restored the next time, a widget is added with the same identifier.

Parameters:
ident the ident is used to identify a custom widget. It must be unique. Otherwise there might occur an unexpected behaviour.
widget the widget which will be added to the GostyApp

GLWin* GetGLWin (  ) 

get 3d graphics window

The GL window is initialized when this method is first called. All subsequent calls will return the same GLWin instance.

Perspective* GetPerspective (  ) 

get perspective

The perspective is initialized when this method is first called. All subsequent calls will return the same Perspective instance.

PythonShell* GetPyShell (  ) 

get python shell

The Python Shell is initialized when this method is first called. There may at most be one python shell at any given time. Call PythonShell::Show() to display the shell.

SceneWin* GetSceneWin (  ) 

get scene menu

The scene menu window is initialized when this method is first called. All subsequent calls will return the same SceneWin instance.

SequenceViewer* GetSequenceViewer (  ) 

get scene menu

The sequence viewer is initialized when this method is first called. All subsequent calls will return the same SequenceViewer instance.

ToolOptionsWin* GetToolOptionsWin (  ) 

get tool options window

The tool options window is initialized when this method is first called. All subsequent calls will return the same SceneWin instance.

static GostyApp* Instance (  )  [static]

get the GostyApp instance GostyApp is implemented as Singleton. This returns the Instance of GostyApp.

Returns:
the GostyApp instance

void OnQuit (  )  [slot]

This slot must be called when the application is going to be terminated.

void ProcessEvents (  ) 

give the application time to run the mainloop and process events

void RemoveWidgetFromApp ( const QString &  ident  ) 

remove a custom QWidget from the gosty_app

This method removes a custom widget from OpenStructure. If the given ident is not known, nothing happens. Read more about custom widgets at AddWidgetToApp() .

Parameters:
ident the ident of the widget which should be removed. Before the widget is removed, the position will be stored.

void SetAppTitle ( const QString &  app_title  ) 

This methods sets the Title of this Application.

Parameters:
app_title Title that will be displayed in the title bar


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

Generated on Fri Jul 2 14:23:06 2010 for OpenStructure by  doxygen 1.5.8