Main Page
Namespaces
Classes
Files
File List
File Members
src
extern
QGLViewer
mouseGrabber.cpp
Go to the documentation of this file.
1
/****************************************************************************
2
3
Copyright (C) 2002-2014 Gilles Debunne. All rights reserved.
4
5
This file is part of the QGLViewer library version 2.6.3.
6
7
http://www.libqglviewer.com - contact@libqglviewer.com
8
9
This file may be used under the terms of the GNU General Public License
10
versions 2.0 or 3.0 as published by the Free Software Foundation and
11
appearing in the LICENSE file included in the packaging of this file.
12
In addition, as a special exception, Gilles Debunne gives you certain
13
additional rights, described in the file GPL_EXCEPTION in this package.
14
15
libQGLViewer uses dual licensing. Commercial/proprietary software must
16
purchase a libQGLViewer Commercial License.
17
18
This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
19
WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
20
21
*****************************************************************************/
22
23
#include "
mouseGrabber.h
"
24
25
using namespace
qglviewer
;
26
27
// Static private variable
28
QList<MouseGrabber*>
MouseGrabber::MouseGrabberPool_
;
29
33
MouseGrabber::MouseGrabber
()
34
: grabsMouse_(false)
35
{
36
addInMouseGrabberPool
();
37
}
38
47
void
MouseGrabber::addInMouseGrabberPool
()
48
{
49
if
(!
isInMouseGrabberPool
())
50
MouseGrabber::MouseGrabberPool_
.append(
this
);
51
}
52
57
void
MouseGrabber::removeFromMouseGrabberPool
()
58
{
59
if
(
isInMouseGrabberPool
())
60
MouseGrabber::MouseGrabberPool_
.removeAll(const_cast<MouseGrabber*>(
this
));
61
}
62
71
void
MouseGrabber::clearMouseGrabberPool
(
bool
autoDelete)
72
{
73
if
(autoDelete)
74
qDeleteAll(
MouseGrabber::MouseGrabberPool_
);
75
MouseGrabber::MouseGrabberPool_
.clear();
76
}
qglviewer
Definition:
camera.h:29
qglviewer::MouseGrabber::MouseGrabberPool_
static QList< MouseGrabber * > MouseGrabberPool_
Definition:
mouseGrabber.h:259
qglviewer::MouseGrabber::isInMouseGrabberPool
bool isInMouseGrabberPool() const
Definition:
mouseGrabber.h:206
qglviewer::MouseGrabber::MouseGrabber
MouseGrabber()
Definition:
mouseGrabber.cpp:33
qglviewer::MouseGrabber::addInMouseGrabberPool
void addInMouseGrabberPool()
Definition:
mouseGrabber.cpp:47
mouseGrabber.h
qglviewer::MouseGrabber::clearMouseGrabberPool
void clearMouseGrabberPool(bool autoDelete=false)
Definition:
mouseGrabber.cpp:71
qglviewer::MouseGrabber::removeFromMouseGrabberPool
void removeFromMouseGrabberPool()
Definition:
mouseGrabber.cpp:57
octovis
Author(s): Kai M. Wurm
, Armin Hornung
autogenerated on Wed Jun 5 2019 19:26:39