root/OpenSceneGraph/trunk/include/osgQt/QWidgetImage @ 13041

Revision 13041, 1.6 kB (checked in by robert, 2 years ago)

Ran script to remove trailing spaces and tabs

  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
Line 
1/* -*-c++-*- OpenSceneGraph - Copyright (C) 1998-2009 Robert Osfield
2 *
3 * This library is open source and may be redistributed and/or modified under
4 * the terms of the OpenSceneGraph Public License (OSGPL) version 0.0 or
5 * (at your option) any later version.  The full license is in LICENSE file
6 * included with this distribution, and on the openscenegraph.org website.
7 *
8 * This library is distributed in the hope that it will be useful,
9 * but WITHOUT ANY WARRANTY; without even the implied warranty of
10 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
11 * OpenSceneGraph Public License for more details.
12*/
13
14#ifndef QWIDGETIMAGE
15#define QWIDGETIMAGE
16
17#include <osg/Image>
18#include <osgQt/QGraphicsViewAdapter>
19
20namespace osgQt
21{
22
23class OSGQT_EXPORT QWidgetImage : public osg::Image
24{
25    public:
26
27        QWidgetImage( QWidget* widget=0 );
28
29        QWidget* getQWidget() { return _widget; }
30        QGraphicsViewAdapter* getQGraphicsViewAdapter() { return _adapter; }
31
32
33        void clearWriteBuffer();
34
35        void render();
36
37        /// Overridden scaleImage used to catch cases where the image is
38        /// fullscreen and the window is resized.
39        virtual void scaleImage(int s,int t,int r, GLenum newDataType);
40
41        virtual bool sendFocusHint(bool focus);
42
43        virtual bool sendPointerEvent(int x, int y, int buttonMask);
44
45        virtual bool sendKeyEvent(int key, bool keyDown);
46
47        virtual void setFrameLastRendered(const osg::FrameStamp* frameStamp);
48
49    protected:
50
51        QPointer<QGraphicsViewAdapter>  _adapter;
52        QPointer<QWidget>               _widget;
53};
54
55}
56
57#endif
Note: See TracBrowser for help on using the browser.