Equalizer  1.8.0
Parallel Rendering Framework
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Pages
qt/windowSystem.h
1 
2 /* Copyright (c) 2014, Daniel Nachbaur <danielnachbaur@gmail.com>
3  *
4  * This library is free software; you can redistribute it and/or modify it under
5  * the terms of the GNU Lesser General Public License version 2.1 as published
6  * by the Free Software Foundation.
7  *
8  * This library is distributed in the hope that it will be useful, but WITHOUT
9  * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
10  * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
11  * details.
12  *
13  * You should have received a copy of the GNU Lesser General Public License
14  * along with this library; if not, write to the Free Software Foundation, Inc.,
15  * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
16  */
17 
18 #include <QObject>
19 #include <eq/client/windowSystem.h>
20 #include "types.h"
21 
22 namespace eq
23 {
24 namespace qt
25 {
26 
27 class WindowSystem : public QObject, public WindowSystemIF
28 {
29  Q_OBJECT
30 
31 public:
32  EQ_API WindowSystem();
33  EQ_API ~WindowSystem();
34 
35 signals:
36  eq::qt::GLWidget* createWidget( eq::Window*, const WindowSettings&,
37  QThread* );
38  void destroyWidget( QGLWidget* );
39 
40 private:
41  std::string getName() const final;
42  eq::SystemWindow* createWindow( eq::Window* window,
43  const WindowSettings& settings ) final;
44  eq::SystemPipe* createPipe( eq::Pipe* pipe ) final;
45  eq::MessagePump* createMessagePump() final;
46  bool hasMainThreadEvents() const final { return true; }
47  bool setupFont( util::ObjectManager& gl, const void* key,
48  const std::string& name, const uint32_t size ) const final;
49 
50 
51  bool _useSystemWindowSystem( const WindowSettings& settings,
52  const eq::Window* sharedWindow );
53  void _setupFactory();
54  void _deleteGLWidget( QGLWidget* widget );
55 
56  WidgetFactory* _factory;
57 };
58 
59 }
60 }
A Pipe represents a graphics card (GPU) on a Node.
A set of settings to setup an eq::SystemWindow.
An interface to process system messages or events.
Definition: messagePump.h:27
A Window represents an on-screen or off-screen drawable.
The interface definition for system-specific GPU handling.
Definition: systemPipe.h:37
The interface definition for system-specific windowing code.
Definition: systemWindow.h:35
A facility class to manage OpenGL objects across shared contexts.
Definition: objectManager.h:51
The interface for windowing toolkits.
Definition: windowSystem.h:40
Creates and destroys the eq::qt::GLWidget in the QApplication thread.
Definition: widgetFactory.h:32