Main Page | Namespace List | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Class Members | File Members

vgui_qt_adaptor Class Reference

#include <vgui_qt_adaptor.h>

Inheritance diagram for vgui_qt_adaptor:

Inheritance graph
[legend]
List of all members.

Detailed Description

OpenGL canvas in QT as a VGUI adaptor.

Definition at line 28 of file vgui_qt_adaptor.h.

Public Member Functions

 vgui_qt_adaptor (QWidget *parent=0, const char *name=0)
 ~vgui_qt_adaptor ()
void swap_buffers ()
void make_current ()
void post_redraw ()
 Redraw the rendering area.
void post_overlay_redraw ()
void post_idle_request ()
unsigned int get_width () const
 Return width of rendering area.
unsigned int get_height () const
 Return height of rendering area.
void bind_popups (vgui_modifier m, vgui_button b)
 Bind the given modifier/button combination to the popup menu.
void get_popup_bindings (vgui_modifier &m, vgui_button &b) const
 Return the modifier/button which pops up the popup menu.
void set_default_popup (vgui_menu)
vgui_menu get_popup ()
 Return the popup menu for this adaptor.
void paintGL ()
void paintOverlayGL ()
void resizeGL (int w, int h)
void mouseMoveEvent (QMouseEvent *e)
void mousePressEvent (QMouseEvent *e)
void mouseReleaseEvent (QMouseEvent *e)
void keyPressEvent (QKeyEvent *e)
void keyReleaseEvent (QKeyEvent *e)
void wheelEvent (QWheelEvent *e)
vgui_event translate (QMouseEvent *e)
vgui_event translate (QKeyEvent *e)
vgui_event translate (QWheelEvent *e)
 vgui_qt_adaptor (QWidget *parent=0)
 ~vgui_qt_adaptor ()
void swap_buffers ()
void make_current ()
void post_redraw ()
 Redraw the rendering area.
void post_overlay_redraw ()
void post_idle_request ()
unsigned int get_width () const
 Return width of rendering area.
unsigned int get_height () const
 Return height of rendering area.
void bind_popups (vgui_modifier m, vgui_button b)
 Bind the given modifier/button combination to the popup menu.
void get_popup_bindings (vgui_modifier &m, vgui_button &b) const
 Return the modifier/button which pops up the popup menu.
void set_default_popup (vgui_menu)
vgui_menu get_popup ()
 Return the popup menu for this adaptor.
void paintGL ()
void paintOverlayGL ()
void resizeGL (int w, int h)
void mouseMoveEvent (QMouseEvent *e)
void mousePressEvent (QMouseEvent *e)
void mouseReleaseEvent (QMouseEvent *e)
void keyPressEvent (QKeyEvent *e)
void keyReleaseEvent (QKeyEvent *e)
void wheelEvent (QWheelEvent *e)
vgui_event translate (QMouseEvent *e)
vgui_event translate (QKeyEvent *e)
vgui_event translate (QWheelEvent *e)
vgui_tableau_sptr get_tableau () const
 Get the vgui_tableau associated with this vgui_adaptor.
void set_tableau (vgui_tableau_sptr const &t)
 Set the vgui_tableau associated with this vgui_adaptor.
void set_double_buffering (bool b)
 True to use double buffering, false to not use it.
vgui_menu get_total_popup (vgui_popup_params &) const
 Return the concatenation of the adaptor's menu with the tableau's menu.
void config_dialog ()
 Pop up a dialog for changing the popup modifier and button bindings.
void set_popup (vgui_menu const &m)
 Set the popup menu for this adaptor.
void include_in_popup (vgui_menu const &m)
 Add the given menu to the popup menu for this adaptor.
virtual void post_timer (float, int)
int post_timer (float)
virtual void post_message (char const *, void const *)
virtual void post_destroy ()
virtual void kill_timer (int)
 kill an existing timer.
virtual vgui_windowget_window () const

Static Public Member Functions

static vgui_key translate (Qt::Key k)
static vgui_modifier translate (Qt::KeyboardModifiers m)
static Qt::Key translate (vgui_key k)
static Qt::KeyboardModifiers translate (vgui_modifier m)

Public Attributes

unsigned width
 Cached width of adaptor render area.
unsigned height
 Cached height of adaptor render area.
vgui_button popup_button
 Mouse button (used with popup_modifier) which causes the popup menu to appear.
vgui_modifier popup_modifier
 Modifier (used with popup_button) which causes the popup menu to appear.

Static Public Attributes

static vgui_DLLDATA vgui_adaptorcurrent = 0
 This static datum points to the adaptor that last received a mouse event.

Protected Member Functions

void windowActivationChange (bool oldActive)
void windowActivationChange (bool oldActive)

Protected Attributes

bool nested_popups
 Parameters controlling the popup menu style.
bool default_items
bool use_double_buffering
 Whether or not to use double buffering.

Private Slots

void idle_slot ()
void idle_slot ()

Private Member Functions

bool dispatch_to_tableau (const vgui_event &event)
 Dispatches the given event to the tableau.
bool dispatch_to_tableau (const vgui_event &event)
 Dispatches the given event to the tableau.

Private Attributes

vgui_overlay_helperovl_helper
bool use_overlay_helper
bool idle_request_posted_
QTimer * idle_timer_
vgui_overlay_helperovl_helper
QTimer * idle_timer_


Constructor & Destructor Documentation

vgui_qt_adaptor::vgui_qt_adaptor QWidget *  parent = 0,
const char *  name = 0
 

Definition at line 9 of file vgui_qt_adaptor.cxx.

vgui_qt_adaptor::~vgui_qt_adaptor  ) 
 

Definition at line 44 of file vgui_qt_adaptor.cxx.

vgui_qt_adaptor::vgui_qt_adaptor QWidget *  parent = 0  ) 
 

Definition at line 12 of file vgui_qt_adaptor.cxx.

vgui_qt_adaptor::~vgui_qt_adaptor  ) 
 


Member Function Documentation

void vgui_qt_adaptor::bind_popups vgui_modifier  m,
vgui_button  b
[inline, virtual]
 

Bind the given modifier/button combination to the popup menu.

Reimplemented from vgui_adaptor.

Definition at line 56 of file vgui_qt_adaptor.h.

void vgui_qt_adaptor::bind_popups vgui_modifier  m,
vgui_button  b
[inline, virtual]
 

Bind the given modifier/button combination to the popup menu.

Reimplemented from vgui_adaptor.

Definition at line 50 of file vgui_qt_adaptor.h.

void vgui_adaptor::config_dialog  )  [inherited]
 

Pop up a dialog for changing the popup modifier and button bindings.

Definition at line 102 of file vgui_adaptor.cxx.

bool vgui_qt_adaptor::dispatch_to_tableau const vgui_event event  )  [private]
 

Dispatches the given event to the tableau.

This method performs various checks which can be performed generically for all tableaux. It is not the responsibility of this method to take care of overlay handling - the derived class must sort that out.

Reimplemented from vgui_adaptor.

bool vgui_qt_adaptor::dispatch_to_tableau const vgui_event event  )  [private]
 

Dispatches the given event to the tableau.

This method performs various checks which can be performed generically for all tableaux. It is not the responsibility of this method to take care of overlay handling - the derived class must sort that out.

Reimplemented from vgui_adaptor.

Definition at line 54 of file vgui_qt_adaptor.cxx.

unsigned int vgui_qt_adaptor::get_height  )  const [inline, virtual]
 

Return height of rendering area.

*Not* the height of the viewport. There seems to be no OpenGL mechanism for doing this.

Implements vgui_adaptor.

Definition at line 55 of file vgui_qt_adaptor.h.

unsigned int vgui_qt_adaptor::get_height  )  const [inline, virtual]
 

Return height of rendering area.

*Not* the height of the viewport. There seems to be no OpenGL mechanism for doing this.

Implements vgui_adaptor.

Definition at line 49 of file vgui_qt_adaptor.h.

vgui_menu vgui_qt_adaptor::get_popup  )  [inline]
 

Return the popup menu for this adaptor.

Reimplemented from vgui_adaptor.

Definition at line 68 of file vgui_qt_adaptor.h.

vgui_menu vgui_qt_adaptor::get_popup  )  [inline]
 

Return the popup menu for this adaptor.

Reimplemented from vgui_adaptor.

Definition at line 62 of file vgui_qt_adaptor.h.

void vgui_qt_adaptor::get_popup_bindings vgui_modifier m,
vgui_button b
const [inline, virtual]
 

Return the modifier/button which pops up the popup menu.

Reimplemented from vgui_adaptor.

Definition at line 61 of file vgui_qt_adaptor.h.

void vgui_qt_adaptor::get_popup_bindings vgui_modifier m,
vgui_button b
const [inline, virtual]
 

Return the modifier/button which pops up the popup menu.

Reimplemented from vgui_adaptor.

Definition at line 55 of file vgui_qt_adaptor.h.

vgui_tableau_sptr vgui_adaptor::get_tableau  )  const [inherited]
 

Get the vgui_tableau associated with this vgui_adaptor.

Definition at line 64 of file vgui_adaptor.cxx.

vgui_menu vgui_adaptor::get_total_popup vgui_popup_params  )  const [inherited]
 

Return the concatenation of the adaptor's menu with the tableau's menu.

Definition at line 78 of file vgui_adaptor.cxx.

unsigned int vgui_qt_adaptor::get_width  )  const [inline, virtual]
 

Return width of rendering area.

*Not* the width of the viewport. There seems to be no OpenGL mechanism for doing this.

Implements vgui_adaptor.

Definition at line 54 of file vgui_qt_adaptor.h.

unsigned int vgui_qt_adaptor::get_width  )  const [inline, virtual]
 

Return width of rendering area.

*Not* the width of the viewport. There seems to be no OpenGL mechanism for doing this.

Implements vgui_adaptor.

Definition at line 48 of file vgui_qt_adaptor.h.

vgui_window * vgui_adaptor::get_window  )  const [virtual, inherited]
 

Reimplemented in vgui_glut_adaptor, vgui_gtk_adaptor, vgui_gtk2_adaptor, vgui_mfc_adaptor, and vgui_wx_adaptor.

Definition at line 216 of file vgui_adaptor.cxx.

void vgui_qt_adaptor::idle_slot  )  [private, slot]
 

void vgui_qt_adaptor::idle_slot  )  [private, slot]
 

Definition at line 87 of file vgui_qt_adaptor.cxx.

void vgui_adaptor::include_in_popup vgui_menu const &  m  )  [inline, inherited]
 

Add the given menu to the popup menu for this adaptor.

Definition at line 80 of file vgui_adaptor.h.

void vgui_qt_adaptor::keyPressEvent QKeyEvent *  e  ) 
 

void vgui_qt_adaptor::keyPressEvent QKeyEvent *  e  ) 
 

Definition at line 161 of file vgui_qt_adaptor.cxx.

void vgui_qt_adaptor::keyReleaseEvent QKeyEvent *  e  ) 
 

void vgui_qt_adaptor::keyReleaseEvent QKeyEvent *  e  ) 
 

Definition at line 168 of file vgui_qt_adaptor.cxx.

void vgui_adaptor::kill_timer int   )  [virtual, inherited]
 

kill an existing timer.

Reimplemented in vgui_gtk_adaptor, vgui_gtk2_adaptor, vgui_mfc_adaptor, and vgui_wx_adaptor.

Definition at line 260 of file vgui_adaptor.cxx.

void vgui_qt_adaptor::make_current  )  [inline, virtual]
 

Reimplemented from vgui_adaptor.

Definition at line 49 of file vgui_qt_adaptor.h.

void vgui_qt_adaptor::make_current  )  [inline, virtual]
 

Reimplemented from vgui_adaptor.

Definition at line 43 of file vgui_qt_adaptor.h.

void vgui_qt_adaptor::mouseMoveEvent QMouseEvent *  e  ) 
 

void vgui_qt_adaptor::mouseMoveEvent QMouseEvent *  e  ) 
 

Definition at line 122 of file vgui_qt_adaptor.cxx.

void vgui_qt_adaptor::mousePressEvent QMouseEvent *  e  ) 
 

void vgui_qt_adaptor::mousePressEvent QMouseEvent *  e  ) 
 

Definition at line 130 of file vgui_qt_adaptor.cxx.

void vgui_qt_adaptor::mouseReleaseEvent QMouseEvent *  e  ) 
 

void vgui_qt_adaptor::mouseReleaseEvent QMouseEvent *  e  ) 
 

Definition at line 153 of file vgui_qt_adaptor.cxx.

void vgui_qt_adaptor::paintGL  ) 
 

void vgui_qt_adaptor::paintGL  ) 
 

Definition at line 63 of file vgui_qt_adaptor.cxx.

void vgui_qt_adaptor::paintOverlayGL  ) 
 

void vgui_qt_adaptor::paintOverlayGL  ) 
 

Definition at line 100 of file vgui_qt_adaptor.cxx.

void vgui_adaptor::post_destroy  )  [virtual, inherited]
 

Reimplemented in vgui_glut_adaptor, vgui_gtk_adaptor, vgui_gtk2_adaptor, and vgui_wx_adaptor.

Definition at line 274 of file vgui_adaptor.cxx.

void vgui_qt_adaptor::post_idle_request  )  [virtual]
 

Reimplemented from vgui_adaptor.

void vgui_qt_adaptor::post_idle_request  )  [virtual]
 

Reimplemented from vgui_adaptor.

Definition at line 94 of file vgui_qt_adaptor.cxx.

void vgui_adaptor::post_message char const *  ,
void const * 
[virtual, inherited]
 

Reimplemented in vgui_wx_adaptor.

Definition at line 242 of file vgui_adaptor.cxx.

void vgui_qt_adaptor::post_overlay_redraw  )  [virtual]
 

Implements vgui_adaptor.

void vgui_qt_adaptor::post_overlay_redraw  )  [virtual]
 

Implements vgui_adaptor.

Definition at line 73 of file vgui_qt_adaptor.cxx.

void vgui_qt_adaptor::post_redraw  )  [inline, virtual]
 

Redraw the rendering area.

Implements vgui_adaptor.

Definition at line 50 of file vgui_qt_adaptor.h.

void vgui_qt_adaptor::post_redraw  )  [inline, virtual]
 

Redraw the rendering area.

Implements vgui_adaptor.

Definition at line 44 of file vgui_qt_adaptor.h.

int vgui_adaptor::post_timer float   )  [inherited]
 

Definition at line 266 of file vgui_adaptor.cxx.

void vgui_adaptor::post_timer float  ,
int 
[virtual, inherited]
 

Reimplemented in vgui_glut_adaptor, vgui_gtk_adaptor, vgui_gtk2_adaptor, vgui_mfc_adaptor, and vgui_wx_adaptor.

Definition at line 254 of file vgui_adaptor.cxx.

void vgui_qt_adaptor::resizeGL int  w,
int  h
 

void vgui_qt_adaptor::resizeGL int  w,
int  h
 

Definition at line 111 of file vgui_qt_adaptor.cxx.

void vgui_qt_adaptor::set_default_popup vgui_menu   )  [inline]
 

Definition at line 67 of file vgui_qt_adaptor.h.

void vgui_qt_adaptor::set_default_popup vgui_menu   )  [inline]
 

Definition at line 61 of file vgui_qt_adaptor.h.

void vgui_adaptor::set_double_buffering bool  b  )  [inline, inherited]
 

True to use double buffering, false to not use it.

Definition at line 65 of file vgui_adaptor.h.

void vgui_adaptor::set_popup vgui_menu const &  m  )  [inline, inherited]
 

Set the popup menu for this adaptor.

Definition at line 77 of file vgui_adaptor.h.

void vgui_adaptor::set_tableau vgui_tableau_sptr const &  t  )  [inherited]
 

Set the vgui_tableau associated with this vgui_adaptor.

Definition at line 71 of file vgui_adaptor.cxx.

void vgui_qt_adaptor::swap_buffers  )  [inline, virtual]
 

Reimplemented from vgui_adaptor.

Definition at line 44 of file vgui_qt_adaptor.h.

void vgui_qt_adaptor::swap_buffers  )  [inline, virtual]
 

Reimplemented from vgui_adaptor.

Definition at line 38 of file vgui_qt_adaptor.h.

Qt::KeyboardModifiers vgui_qt_adaptor::translate vgui_modifier  m  )  [static]
 

Definition at line 370 of file vgui_qt_adaptor.cxx.

Qt::Key vgui_qt_adaptor::translate vgui_key  k  )  [static]
 

Definition at line 307 of file vgui_qt_adaptor.cxx.

vgui_modifier vgui_qt_adaptor::translate Qt::KeyboardModifiers  m  )  [static]
 

Definition at line 296 of file vgui_qt_adaptor.cxx.

vgui_key vgui_qt_adaptor::translate Qt::Key  k  )  [static]
 

Definition at line 233 of file vgui_qt_adaptor.cxx.

vgui_event vgui_qt_adaptor::translate QWheelEvent *  e  ) 
 

vgui_event vgui_qt_adaptor::translate QKeyEvent *  e  ) 
 

vgui_event vgui_qt_adaptor::translate QMouseEvent *  e  ) 
 

vgui_event vgui_qt_adaptor::translate QWheelEvent *  e  ) 
 

Definition at line 271 of file vgui_qt_adaptor.cxx.

vgui_event vgui_qt_adaptor::translate QKeyEvent *  e  ) 
 

Definition at line 217 of file vgui_qt_adaptor.cxx.

vgui_event vgui_qt_adaptor::translate QMouseEvent *  e  ) 
 

Definition at line 199 of file vgui_qt_adaptor.cxx.

void vgui_qt_adaptor::wheelEvent QWheelEvent *  e  ) 
 

void vgui_qt_adaptor::wheelEvent QWheelEvent *  e  ) 
 

Definition at line 176 of file vgui_qt_adaptor.cxx.

void vgui_qt_adaptor::windowActivationChange bool  oldActive  )  [protected]
 

void vgui_qt_adaptor::windowActivationChange bool  oldActive  )  [protected]
 

Definition at line 187 of file vgui_qt_adaptor.cxx.


Member Data Documentation

vgui_adaptor * vgui_adaptor::current = 0 [static, inherited]
 

This static datum points to the adaptor that last received a mouse event.

It is set to zero if its pointer receives a LEAVE event. It will often point to the adaptor which was current when a popup menu was triggered, which is often what one wants it for.

Definition at line 92 of file vgui_adaptor.h.

bool vgui_adaptor::default_items [protected, inherited]
 

Definition at line 142 of file vgui_adaptor.h.

unsigned vgui_adaptor_mixin::height [inherited]
 

Cached height of adaptor render area.

Definition at line 29 of file vgui_adaptor_mixin.h.

bool vgui_qt_adaptor::idle_request_posted_ [private]
 

Definition at line 85 of file vgui_qt_adaptor.h.

QTimer* vgui_qt_adaptor::idle_timer_ [private]
 

Definition at line 98 of file vgui_qt_adaptor.h.

QTimer* vgui_qt_adaptor::idle_timer_ [private]
 

Definition at line 86 of file vgui_qt_adaptor.h.

bool vgui_adaptor::nested_popups [protected, inherited]
 

Parameters controlling the popup menu style.

These are put onto a popup_params object and passed to tableau::get_popup()

Definition at line 141 of file vgui_adaptor.h.

vgui_overlay_helper* vgui_qt_adaptor::ovl_helper [private]
 

Definition at line 94 of file vgui_qt_adaptor.h.

vgui_overlay_helper* vgui_qt_adaptor::ovl_helper [private]
 

Definition at line 82 of file vgui_qt_adaptor.h.

vgui_button vgui_adaptor_mixin::popup_button [inherited]
 

Mouse button (used with popup_modifier) which causes the popup menu to appear.

Definition at line 34 of file vgui_adaptor_mixin.h.

vgui_modifier vgui_adaptor_mixin::popup_modifier [inherited]
 

Modifier (used with popup_button) which causes the popup menu to appear.

Definition at line 36 of file vgui_adaptor_mixin.h.

bool vgui_adaptor::use_double_buffering [protected, inherited]
 

Whether or not to use double buffering.

Definition at line 145 of file vgui_adaptor.h.

bool vgui_qt_adaptor::use_overlay_helper [private]
 

Definition at line 84 of file vgui_qt_adaptor.h.

unsigned vgui_adaptor_mixin::width [inherited]
 

Cached width of adaptor render area.

Definition at line 27 of file vgui_adaptor_mixin.h.


The documentation for this class was generated from the following files:
Generated on Thu Jan 10 14:42:23 2008 for core/vgui by  doxygen 1.4.4