Main Page | Modules | Namespace List | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Namespace Members | Class Members | File Members | Related Pages

osg::QTWindow Class Reference

QT Window class. See QT Window System Library for a description. More...

#include <OSGQTWindow.h>

Inheritance diagram for osg::QTWindow:

osg::QTWindowBase osg::XWindow osg::XWindowBase osg::Window osg::WindowBase osg::AttachmentContainer osg::FieldContainer List of all members.

Extension handling

bool hasExtension (UInt32 id)
bool hasExtension (const Char8 *s)
void * getFunction (UInt32 id)
void * getFunctionNoCheck (UInt32 id)
void dumpExtensions (void)
GLExtensionFunction getFunctionByName (const Char8 *s)
Real32 getConstantValue (GLenum val)
const Vec2fgetConstantValuev (GLenum val)
const std::vector< std::string > & getRegisteredFunctions (void)
const std::vector< std::string > & getExtensions (void)
const std::vector< std::string > & getIgnoredExtensions (void)
*static void setGLLibraryName (const Char8 *s)
static Int32 getExtensionId (const Char8 *s)
static bool hasCommonExtension (UInt32 id)
static const std::vector<
std::string > & 
getRegisteredExtensions (void)

GL object handling

*void validateGLObject (UInt32 id)
void validateAllGLObjects (void)
GLObjectStatusE getGLObjectStatus (UInt32 id)
void setGLObjectId (UInt32 id, UInt32 id2)
UInt32 getGLObjectId (UInt32 id)
static void refreshGLObject (UInt32 id)
static void reinitializeGLObject (UInt32 id)
static void destroyGLObject (UInt32 id, UInt32 num=1)
static void unpackIdStatus (UInt32 idstatus, UInt32 &id, GLObjectStatusE &status)

GL object handling

void doInitRegisterGLObject (UInt32 id, UInt32 num)
*static void initRegisterGLObject (UInt32 id, UInt32 num)
static UInt32 packIdStatus (UInt32 id, GLObjectStatusE status)

Public Types

enum  { GlWidgetFieldId = Inherited::NextFieldId, NextFieldId = GlWidgetFieldId + 1 }
typedef XWindowPtr Ptr
typedef ArgsCollector< UInt32GLObjectFunctorArgs
typedef TypedVoidFunctor2Base<
PtrCallArg< Window >, GLObjectFunctorArgs
GLObjectFunctor
typedef void(* GLExtensionFunction )(void)
enum  GLObjectStatusE {
  notused = 1, initialize, reinitialize, initialized,
  needrefresh, destroy, finaldestroy
}
enum  { statusShift = 3, statusMask = 7 }

Public Member Functions

Handle Attachments
*void addAttachment (const AttachmentPtr &fieldContainerP, UInt16 binding=0)
void subAttachment (const AttachmentPtr &fieldContainerP, UInt16 binding=0)
AttachmentPtr findAttachment (UInt32 groupId, UInt16 binding=0)
AttachmentPtr findAttachment (const FieldContainerType &type, UInt16 binding=0)
Field Access *SFAttachmentMapgetSFAttachments (void)
Get Instance Type Information
UInt32 getTypeId (void) const
UInt16 getGroupId (void) const
const Char8getTypeName (void) const
Generic Field Access *FieldgetField (UInt32 fieldId)
FieldgetField (const Char8 *fieldName)
Sync
*virtual void changed (BitVector whichField, UInt32 origin)
 react to field changes
Output
*virtual void dump (UInt32 uiIndent=0, const BitVector bvFlags=0) const
 output the instance for debug purposes
Window functions
*virtual void init (void)
 init the window: create the context
Get
*virtual FieldContainerTypegetType (void)
virtual const FieldContainerTypegetType (void) const
virtual UInt32 getContainerSize (void) const
Field Get
*SFOSGQGLWidgetPgetSFGlWidget (void)
OSGQGLWidgetP & getGlWidget (void)
const OSGQGLWidgetP & getGlWidget (void) const
Field Set
*void setGlWidget (const OSGQGLWidgetP &value)
Sync
*virtual void executeSync (FieldContainer &other, const BitVector &whichField)
Binary Access
*virtual UInt32 getBinSize (const BitVector &whichField)
virtual void copyToBin (BinaryDataHandler &pMem, const BitVector &whichField)
virtual void copyFromBin (BinaryDataHandler &pMem, const BitVector &whichField)
Copy
*virtual FieldContainerPtr shallowCopy (void) const
Window system implementation functions
virtual void activate (void)
virtual void deactivate (void)
virtual void swap (void)
Field Get
*SFDisplayPgetSFDisplay (void)
 Get the XWindow::_sfDisplay field.
SFX11WindowgetSFWindow (void)
 Get the XWindow::_sfWindow field.
SFGLXContextgetSFContext (void)
 Get the XWindow::_sfContext field.
DisplayPgetDisplay (void)
 Get the value of the XWindow::_sfDisplay field.
const DisplayPgetDisplay (void) const
 Get the value of the XWindow::_sfDisplay field.
X11WindowgetWindow (void)
 Get the value of the XWindow::_sfWindow field.
const X11WindowgetWindow (void) const
 Get the value of the XWindow::_sfWindow field.
GLXContext & getContext (void)
 Get the value of the XWindow::_sfContext field.
const GLXContext & getContext (void) const
 Get the value of the XWindow::_sfContext field.
Field Set
*void setDisplay (const DisplayP &value)
 Set the value of the XWindow::_sfDisplay field.
void setWindow (const X11Window &value)
 Set the value of the XWindow::_sfWindow field.
void setContext (const GLXContext &value)
 Set the value of the XWindow::_sfContext field.
Viewport handling
*void addPort (const ViewportPtr &portP)
void insertPort (UInt32 portIndex, const ViewportPtr &portP)
void replacePort (UInt32 portIndex, const ViewportPtr &portP)
void replacePortBy (const ViewportPtr &portP, const ViewportPtr &newPortP)
void subPort (const ViewportPtr &portP)
void subPort (UInt32 portIndex)
Size handling
*bool isResizePending (void)
virtual void resize (int width, int height)
virtual void resizeGL (void)
void setSize (UInt16 width, UInt16 height)
Drawing
*virtual void frameInit (void)
virtual void frameExit (void)
virtual void draw (DrawAction *action=NULL)
virtual void drawAllViewports (DrawAction *action=NULL)
virtual void render (RenderActionBase *action=NULL)
virtual void renderAllViewports (RenderActionBase *action=NULL)
Field Get
*SFUInt16getSFWidth (void)
 Get the Window::_sfWidth field.
SFUInt16getSFHeight (void)
 Get the Window::_sfHeight field.
MFViewportPtrgetMFPort (void)
 Get the Window::_mfPort field.
SFBoolgetSFResizePending (void)
 Get the Window::_sfResizePending field.
UInt16getWidth (void)
 Get the value of the Window::_sfWidth field.
const UInt16getWidth (void) const
 Get the value of the Window::_sfWidth field.
UInt16getHeight (void)
 Get the value of the Window::_sfHeight field.
const UInt16getHeight (void) const
 Get the value of the Window::_sfHeight field.
bool & getResizePending (void)
 Get the value of the Window::_sfResizePending field.
const bool & getResizePending (void) const
 Get the value of the Window::_sfResizePending field.
ViewportPtrgetPort (const UInt32 index)
 Get the value of the index element the Window::_mfPort field.
MFViewportPtrgetPort (void)
 Get the Window::_mfPort field.
const MFViewportPtrgetPort (void) const
 Get the Window::_mfPort field.
Field Set
*void setWidth (const UInt16 &value)
 Set the value of the Window::_sfWidth field.
void setHeight (const UInt16 &value)
 Set the value of the Window::_sfHeight field.
void setResizePending (const bool &value)
 Set the value of the Window::_sfResizePending field.
Handle Attachments
*void addAttachment (const AttachmentPtr &fieldContainerP, UInt16 binding=0)
void subAttachment (const AttachmentPtr &fieldContainerP, UInt16 binding=0)
AttachmentPtr findAttachment (UInt32 groupId, UInt16 binding=0)
AttachmentPtr findAttachment (const FieldContainerType &type, UInt16 binding=0)
Field Access *SFAttachmentMapgetSFAttachments (void)
Get Instance Type Information
UInt32 getTypeId (void) const
UInt16 getGroupId (void) const
const Char8getTypeName (void) const
Generic Field Access *FieldgetField (UInt32 fieldId)
FieldgetField (const Char8 *fieldName)
Field Get
*SFDisplayPgetSFDisplay (void)
 Get the XWindow::_sfDisplay field.
SFX11WindowgetSFWindow (void)
 Get the XWindow::_sfWindow field.
SFGLXContextgetSFContext (void)
 Get the XWindow::_sfContext field.
DisplayPgetDisplay (void)
 Get the value of the XWindow::_sfDisplay field.
const DisplayPgetDisplay (void) const
 Get the value of the XWindow::_sfDisplay field.
X11WindowgetWindow (void)
 Get the value of the XWindow::_sfWindow field.
const X11WindowgetWindow (void) const
 Get the value of the XWindow::_sfWindow field.
GLXContext & getContext (void)
 Get the value of the XWindow::_sfContext field.
const GLXContext & getContext (void) const
 Get the value of the XWindow::_sfContext field.
Field Set
*void setDisplay (const DisplayP &value)
 Set the value of the XWindow::_sfDisplay field.
void setWindow (const X11Window &value)
 Set the value of the XWindow::_sfWindow field.
void setContext (const GLXContext &value)
 Set the value of the XWindow::_sfContext field.
Viewport handling
*void addPort (const ViewportPtr &portP)
void insertPort (UInt32 portIndex, const ViewportPtr &portP)
void replacePort (UInt32 portIndex, const ViewportPtr &portP)
void replacePortBy (const ViewportPtr &portP, const ViewportPtr &newPortP)
void subPort (const ViewportPtr &portP)
void subPort (UInt32 portIndex)
Size handling
*bool isResizePending (void)
virtual void resize (int width, int height)
virtual void resizeGL (void)
void setSize (UInt16 width, UInt16 height)
Drawing
*virtual void frameInit (void)
virtual void frameExit (void)
virtual void draw (DrawAction *action=NULL)
virtual void drawAllViewports (DrawAction *action=NULL)
virtual void render (RenderActionBase *action=NULL)
virtual void renderAllViewports (RenderActionBase *action=NULL)
Field Get
*SFUInt16getSFWidth (void)
 Get the Window::_sfWidth field.
SFUInt16getSFHeight (void)
 Get the Window::_sfHeight field.
MFViewportPtrgetMFPort (void)
 Get the Window::_mfPort field.
SFBoolgetSFResizePending (void)
 Get the Window::_sfResizePending field.
UInt16getWidth (void)
 Get the value of the Window::_sfWidth field.
const UInt16getWidth (void) const
 Get the value of the Window::_sfWidth field.
UInt16getHeight (void)
 Get the value of the Window::_sfHeight field.
const UInt16getHeight (void) const
 Get the value of the Window::_sfHeight field.
bool & getResizePending (void)
 Get the value of the Window::_sfResizePending field.
const bool & getResizePending (void) const
 Get the value of the Window::_sfResizePending field.
ViewportPtrgetPort (const UInt32 index)
 Get the value of the index element the Window::_mfPort field.
MFViewportPtrgetPort (void)
 Get the Window::_mfPort field.
const MFViewportPtrgetPort (void) const
 Get the Window::_mfPort field.
Field Set
*void setWidth (const UInt16 &value)
 Set the value of the Window::_sfWidth field.
void setHeight (const UInt16 &value)
 Set the value of the Window::_sfHeight field.
void setResizePending (const bool &value)
 Set the value of the Window::_sfResizePending field.
Handle Attachments
*void addAttachment (const AttachmentPtr &fieldContainerP, UInt16 binding=0)
void subAttachment (const AttachmentPtr &fieldContainerP, UInt16 binding=0)
AttachmentPtr findAttachment (UInt32 groupId, UInt16 binding=0)
AttachmentPtr findAttachment (const FieldContainerType &type, UInt16 binding=0)
Field Access *SFAttachmentMapgetSFAttachments (void)
Get Instance Type Information
UInt32 getTypeId (void) const
UInt16 getGroupId (void) const
const Char8getTypeName (void) const
Generic Field Access *FieldgetField (UInt32 fieldId)
FieldgetField (const Char8 *fieldName)

Static Public Member Functions

Get Class Type Information
static UInt16 getClassGroupId (void)
Class Get
*static FieldContainerTypegetClassType (void)
 access the type of the class
static UInt32 getClassTypeId (void)
 access the numerical type of the class
Construction
*static QTWindowPtr create (void)
 create a new instance of the class
static QTWindowPtr createEmpty (void)
 create an empty new instance of the class, do not copy the prototype
Class Get
*static const char * getClassname (void)
Extension registration
*static UInt32 registerExtension (const Char8 *s)
static void ignoreExtensions (const Char8 *s)
static UInt32 registerFunction (const Char8 *s, Int32 ext=-1)
static void registerConstant (GLenum val)
GL object registration
*static UInt32 registerGLObject (GLObjectFunctor functor, UInt32 num=1)
Get Class Type Information
static UInt16 getClassGroupId (void)
Class Get
*static const char * getClassname (void)
Extension registration
*static UInt32 registerExtension (const Char8 *s)
static void ignoreExtensions (const Char8 *s)
static UInt32 registerFunction (const Char8 *s, Int32 ext=-1)
static void registerConstant (GLenum val)
GL object registration
*static UInt32 registerGLObject (GLObjectFunctor functor, UInt32 num=1)
Get Class Type Information
static UInt16 getClassGroupId (void)

Static Public Attributes

static const osg::BitVector GlWidgetFieldMask
static const osg::BitVector DisplayFieldMask
static const osg::BitVector WindowFieldMask
static const osg::BitVector ContextFieldMask
static const osg::BitVector MTInfluenceMask
static const Real32 unknownConstant = -1e100
static const osg::BitVector WidthFieldMask
static const osg::BitVector HeightFieldMask
static const osg::BitVector PortFieldMask
static const osg::BitVector ResizePendingFieldMask
static const osg::BitVector GlObjectEventCounterFieldMask
static const osg::BitVector GlObjectLastRefreshFieldMask
static const osg::BitVector GlObjectLastReinitializeFieldMask
static const BitVector AttachmentsFieldMask
static const BitVector NextFieldMask
CoredNodePtr helper
static const bool isNodeCore = false
CoredNodePtr helper
static const bool isNodeCore = false

Protected Member Functions

Sync
void executeSyncImpl (AttachmentContainer *pOther, const BitVector &whichField)
Sync
void executeSyncImpl (FieldContainer *pOther, const BitVector &whichField)
Pointer
*AttachmentContainerPtr getPtr (void)
MT Edit
template<class FieldTypeT>
*void beginEditX (const BitVector &whichField, FieldTypeT &field)
template<class FieldTypeT>
void endEditX (const BitVector &whichField, FieldTypeT &field)
MT Construction
*void onCreate (const FieldContainer *source=NULL)
void onCreateAspect (const FieldContainer *aspect0, const FieldContainer *source=NULL)
Constructors
QTWindow (void)
 Constructor.
 QTWindow (const QTWindow &source)
 Copy Constructor.
Destructors
*virtual ~QTWindow (void)
 Destructor.
Sync
*void executeSyncImpl (QTWindowBase *pOther, const BitVector &whichField)
Sync
*void executeSyncImpl (XWindowBase *pOther, const BitVector &whichField)
Sync
*void executeSyncImpl (WindowBase *pOther, const BitVector &whichField)
Sync
void executeSyncImpl (AttachmentContainer *pOther, const BitVector &whichField)
Sync
void executeSyncImpl (FieldContainer *pOther, const BitVector &whichField)
GL setup handling
*virtual void setupGL (void)
MT Construction
*void onCreate (const FieldContainer *source=NULL)
void onCreateAspect (const FieldContainer *aspect0, const FieldContainer *source=NULL)
Field Get
*SFUInt32getSFGlObjectEventCounter (void)
 Get the Window::_sfGlObjectEventCounter field.
MFUInt32getMFGlObjectLastRefresh (void)
 Get the Window::_mfGlObjectLastRefresh field.
MFUInt32getMFGlObjectLastReinitialize (void)
 Get the Window::_mfGlObjectLastReinitialize field.
UInt32getGlObjectEventCounter (void)
 Get the value of the Window::_sfGlObjectEventCounter field.
const UInt32getGlObjectEventCounter (void) const
 Get the value of the Window::_sfGlObjectEventCounter field.
UInt32getGlObjectLastRefresh (UInt32 index)
 Get the value of the index element the Window::_mfGlObjectLastRefresh field.
MFUInt32getGlObjectLastRefresh (void)
 Get the Window::_mfGlObjectLastRefresh field.
const MFUInt32getGlObjectLastRefresh (void) const
 Get the Window::_mfGlObjectLastRefresh field.
UInt32getGlObjectLastReinitialize (UInt32 index)
 Get the value of the index element the Window::_mfGlObjectLastReinitialize field.
MFUInt32getGlObjectLastReinitialize (void)
 Get the Window::_mfGlObjectLastReinitialize field.
const MFUInt32getGlObjectLastReinitialize (void) const
 Get the Window::_mfGlObjectLastReinitialize field.
Field Set
*void setGlObjectEventCounter (const UInt32 &value)
 Set the value of the Window::_sfGlObjectEventCounter field.
Pointer
*AttachmentContainerPtr getPtr (void)
MT Edit
template<class FieldTypeT>
*void beginEditX (const BitVector &whichField, FieldTypeT &field)
template<class FieldTypeT>
void endEditX (const BitVector &whichField, FieldTypeT &field)
Sync
*void executeSyncImpl (WindowBase *pOther, const BitVector &whichField)
Sync
void executeSyncImpl (AttachmentContainer *pOther, const BitVector &whichField)
Sync
void executeSyncImpl (FieldContainer *pOther, const BitVector &whichField)
GL setup handling
*virtual void setupGL (void)
MT Construction
*void onCreate (const FieldContainer *source=NULL)
void onCreateAspect (const FieldContainer *aspect0, const FieldContainer *source=NULL)
Field Get
*SFUInt32getSFGlObjectEventCounter (void)
 Get the Window::_sfGlObjectEventCounter field.
MFUInt32getMFGlObjectLastRefresh (void)
 Get the Window::_mfGlObjectLastRefresh field.
MFUInt32getMFGlObjectLastReinitialize (void)
 Get the Window::_mfGlObjectLastReinitialize field.
UInt32getGlObjectEventCounter (void)
 Get the value of the Window::_sfGlObjectEventCounter field.
const UInt32getGlObjectEventCounter (void) const
 Get the value of the Window::_sfGlObjectEventCounter field.
UInt32getGlObjectLastRefresh (UInt32 index)
 Get the value of the index element the Window::_mfGlObjectLastRefresh field.
MFUInt32getGlObjectLastRefresh (void)
 Get the Window::_mfGlObjectLastRefresh field.
const MFUInt32getGlObjectLastRefresh (void) const
 Get the Window::_mfGlObjectLastRefresh field.
UInt32getGlObjectLastReinitialize (UInt32 index)
 Get the value of the index element the Window::_mfGlObjectLastReinitialize field.
MFUInt32getGlObjectLastReinitialize (void)
 Get the Window::_mfGlObjectLastReinitialize field.
const MFUInt32getGlObjectLastReinitialize (void) const
 Get the Window::_mfGlObjectLastReinitialize field.
Field Set
*void setGlObjectEventCounter (const UInt32 &value)
 Set the value of the Window::_sfGlObjectEventCounter field.
Pointer
*AttachmentContainerPtr getPtr (void)
MT Edit
template<class FieldTypeT>
*void beginEditX (const BitVector &whichField, FieldTypeT &field)
template<class FieldTypeT>
void endEditX (const BitVector &whichField, FieldTypeT &field)

Static Protected Member Functions

Create Fieldcontainer
template<class ObjectPtrT>
*static void newPtr (ObjectPtrT &result, const typename ObjectPtrT::StoredObjectType *prototypeP)
template<class ObjectPtrT>
static void newPtr (ObjectPtrT &result)
Create Fieldcontainer
template<class ObjectPtrT>
*static void newPtr (ObjectPtrT &result, const typename ObjectPtrT::StoredObjectType *prototypeP)
template<class ObjectPtrT>
static void newPtr (ObjectPtrT &result)
Create Fieldcontainer
template<class ObjectPtrT>
*static void newPtr (ObjectPtrT &result, const typename ObjectPtrT::StoredObjectType *prototypeP)
template<class ObjectPtrT>
static void newPtr (ObjectPtrT &result)

Protected Attributes

Fields
*SFAttachmentMap _attachmentMap
Member
*UInt32 _shares
Fields
*SFOSGQGLWidgetP _sfGlWidget
Fields
*SFDisplayP _sfDisplay
SFX11Window _sfWindow
SFGLXContext _sfContext
Map for GL cvonstant handling
*typedef std::map< GLenum,
Vec2f
ConstHash
Fields
*SFUInt16 _sfWidth
SFUInt16 _sfHeight
MFViewportPtr _mfPort
SFBool _sfResizePending
SFUInt32 _sfGlObjectEventCounter
MFUInt32 _mfGlObjectLastRefresh
MFUInt32 _mfGlObjectLastReinitialize
Fields
*SFAttachmentMap _attachmentMap
Member
*UInt32 _shares
Fields
*SFDisplayP _sfDisplay
SFX11Window _sfWindow
SFGLXContext _sfContext
Map for GL cvonstant handling
*typedef std::map< GLenum,
Vec2f
ConstHash
Fields
*SFUInt16 _sfWidth
SFUInt16 _sfHeight
MFViewportPtr _mfPort
SFBool _sfResizePending
SFUInt32 _sfGlObjectEventCounter
MFUInt32 _mfGlObjectLastRefresh
MFUInt32 _mfGlObjectLastReinitialize
Fields
*SFAttachmentMap _attachmentMap
Member
*UInt32 _shares

Private Types

typedef QTWindowBase Inherited

Private Member Functions

void operator= (const QTWindow &source)

Static Private Member Functions

static void initMethod (void)
 initialize the static features of the class, e.g. action callbacks

Friends

class FieldContainer
class QTWindowBase
GL object handling helper class
class GLObject
GL object handling helper class
class GLObject

Detailed Description

The class for QT-based windows. See QT Window System Library for a description.

Definition at line 53 of file OSGQTWindow.h.


Member Typedef Documentation

typedef QTWindowBase osg::QTW