Experiments - 1.4.5
Utilities
Configuration
GA
NNFW
WorldSim
Total 99%
Experiments
Main Page
Modules
Namespaces
Classes
Files
File List
experiments
include
renderworldwrapperwidget.h
1
/********************************************************************************
2
* FARSA Experiments Library *
3
* Copyright (C) 2007-2014 *
4
* Stefano Nolfi <stefano.nolfi@istc.cnr.it> *
5
* Onofrio Gigliotta <onofrio.gigliotta@istc.cnr.it> *
6
* Gianluca Massera <emmegian@yahoo.it> *
7
* Tomassino Ferrauto <tomassino.ferrauto@istc.cnr.it> *
8
* *
9
* This program is free software; you can redistribute it and/or modify *
10
* it under the terms of the GNU General Public License as published by *
11
* the Free Software Foundation; either version 2 of the License, or *
12
* (at your option) any later version. *
13
* *
14
* This program is distributed in the hope that it will be useful, *
15
* but WITHOUT ANY WARRANTY; without even the implied warranty of *
16
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
17
* GNU General Public License for more details. *
18
* *
19
* You should have received a copy of the GNU General Public License *
20
* along with this program; if not, write to the Free Software *
21
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA *
22
********************************************************************************/
23
24
#ifndef RENDERWORLDWRAPPERWIDGET_H
25
#define RENDERWORLDWRAPPERWIDGET_H
26
27
#include "
experimentsconfig.h
"
28
#include "resourcesuser.h"
29
#include "wmatrix.h"
30
#include <QWidget>
31
#include <QTimer>
32
33
class
QVBoxLayout;
34
35
namespace
farsa {
36
37
class
RenderWorld;
38
47
class
FARSA_EXPERIMENTS_API
RenderWorldWrapperWidget
:
public
QWidget,
public
ConcurrentResourcesUser
48
{
49
Q_OBJECT
50
public
:
57
RenderWorldWrapperWidget
(QWidget* parent = NULL, Qt::WindowFlags flags = 0);
58
62
virtual
~
RenderWorldWrapperWidget
();
63
74
virtual
void
shareResourcesWith(
ResourcesUser
* buddy);
75
76
public
slots:
80
void
updateRenderWorld();
82
void
setSelfUpdate(
bool
enable );
84
bool
isSelfUpdate();
85
protected
:
93
virtual
void
resourceChanged(QString resourceName,
ResourceChangeType
changeType);
94
103
virtual
void
customEvent(QEvent* event);
104
108
void
lookAtRobot();
109
113
RenderWorld
*
const
m_renderWorld
;
114
118
QVBoxLayout*
const
m_layout
;
119
126
bool
m_renderWorldStateRestored
;
127
131
bool
m_setCameraToLookAtRobot
;
132
138
wMatrix
m_robotTm
;
139
141
QTimer*
m_selfUpdateTimer
;
142
};
143
144
}
//end namespace farsa
145
146
#endif
147