All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator Friends Pages
Luminous::QtWindow Class Reference

A window class built on top of Qt. More...

#include <Luminous/QtWindow.hpp>

Inheritance diagram for Luminous::QtWindow:
Luminous::Window

Public Member Functions

virtual void doneCurrent ()
 Clears the OpenGL context for the calling thread.
 
virtual unsigned gpuId () const
 Gets the native GPU id for the OpenGL context of this window.
 
virtual int height () const
 Returns the height of the window. More...
 
virtual bool mainThreadInit ()
 This function can be used to perform any initialization that must be performed in the main-thread. More...
 
virtual void makeCurrent ()
 Sets the OpenGL context for the calling thread.
 
virtual void maximize ()
 Maximize the window.
 
virtual void minimize ()
 Minimize the window.
 
virtual void poll ()
 Update window system (mouse & keyboard) events.
 
virtual Nimble::Vector2i position () const
 Get the window position. More...
 
 QtWindow (const MultiHead::Window &window, const QString &windowTitle)
 Constructs a new window. More...
 
virtual void restore ()
 Restore the window from minimized state.
 
virtual void setHeight (int h)
 Set the height of the window. More...
 
virtual bool setIcon (const QString &filename)
 Sets the icon for the window.
 
virtual void setPosition (Nimble::Vector2i pos)
 Set the window position. More...
 
virtual void setWidth (int w)
 Set the width of the window. More...
 
void showCursor (bool visible)
 Control mouse cursor visibility. More...
 
virtual void swapBuffers ()
 Swap OpenGL buffers.
 
virtual int width () const
 Returns the width of the window. More...
 
- Public Member Functions inherited from Luminous::Window
virtual void deinit ()
 Cleanup any window resources. Default implementation does nothing.
 
WindowEventHookeventHook () const
 Get the event handler for the window. More...
 
virtual void init ()
 This function can be used to perform any initialization that must be executed in the render-thread associated with the window. More...
 
bool isFinished () const
 Queries if the window is closed. More...
 
virtual void setEventHook (WindowEventHook *hook)
 Set the event handler for window events. More...
 
void setFullscreen (bool fullscreen)
 Sets the full-screen mode of the window. More...
 
 Window ()
 Construct an empty window with zero size.
 
virtual ~Window ()
 Destructor.
 

Detailed Description

A window class built on top of Qt.

Constructor & Destructor Documentation

Luminous::QtWindow::QtWindow ( const MultiHead::Window window,
const QString &  windowTitle 
)

Constructs a new window.

Parameters
windowwindow configuration
windowTitlewindow title

Member Function Documentation

virtual int Luminous::QtWindow::height ( ) const
virtual

Returns the height of the window.

Returns
height of the window in pixels

Implements Luminous::Window.

virtual bool Luminous::QtWindow::mainThreadInit ( )
virtual

This function can be used to perform any initialization that must be performed in the main-thread.

Reimplemented from Luminous::Window.

virtual Nimble::Vector2i Luminous::QtWindow::position ( ) const
virtual

Get the window position.

Returns
window position

Implements Luminous::Window.

virtual void Luminous::QtWindow::setHeight ( int  h)
virtual

Set the height of the window.

Parameters
hwindow height in pixels

Implements Luminous::Window.

virtual void Luminous::QtWindow::setPosition ( Nimble::Vector2i  pos)
virtual

Set the window position.

Parameters
poswindow position

Implements Luminous::Window.

virtual void Luminous::QtWindow::setWidth ( int  w)
virtual

Set the width of the window.

Parameters
wwindow width in pixels

Implements Luminous::Window.

void Luminous::QtWindow::showCursor ( bool  visible)
virtual

Control mouse cursor visibility.

Parameters
visibletrue to show cursor; false to hide it

Implements Luminous::Window.

virtual int Luminous::QtWindow::width ( ) const
virtual

Returns the width of the window.

Returns
width of the window in pixels

Implements Luminous::Window.