paysages : Renaming wanderer->explorer
git-svn-id: https://subversion.assembla.com/svn/thunderk/paysages@340 b1fd45b6-86a6-48da-8261-f70d1f35bdcc
This commit is contained in:
parent
f270c6aad0
commit
a3aa859f0c
8 changed files with 59 additions and 60 deletions
|
@ -1,12 +1,11 @@
|
|||
#include "dialogwanderer.h"
|
||||
#include "dialogexplorer.h"
|
||||
|
||||
#include <QWidget>
|
||||
#include <QPushButton>
|
||||
#include <QVBoxLayout>
|
||||
#include <QLabel>
|
||||
#include "widgetwanderer.h"
|
||||
|
||||
DialogWanderer::DialogWanderer(QWidget* parent, CameraDefinition* camera, bool camera_validable) : QDialog(parent)
|
||||
DialogExplorer::DialogExplorer(QWidget* parent, CameraDefinition* camera, bool camera_validable) : QDialog(parent)
|
||||
{
|
||||
QWidget* panel;
|
||||
QPushButton* button;
|
||||
|
@ -15,7 +14,7 @@ DialogWanderer::DialogWanderer(QWidget* parent, CameraDefinition* camera, bool c
|
|||
setWindowTitle(tr("Paysages 3D - Explore"));
|
||||
setLayout(new QHBoxLayout());
|
||||
|
||||
_wanderer = new WidgetWanderer(this, camera);
|
||||
_wanderer = new WidgetExplorer(this, camera);
|
||||
layout()->addWidget(_wanderer);
|
||||
|
||||
panel = new QWidget(this);
|
||||
|
@ -44,11 +43,11 @@ DialogWanderer::DialogWanderer(QWidget* parent, CameraDefinition* camera, bool c
|
|||
resize(900, 600);
|
||||
}
|
||||
|
||||
DialogWanderer::~DialogWanderer()
|
||||
DialogExplorer::~DialogExplorer()
|
||||
{
|
||||
}
|
||||
|
||||
void DialogWanderer::validateCamera()
|
||||
void DialogExplorer::validateCamera()
|
||||
{
|
||||
_wanderer->validateCamera();
|
||||
accept();
|
22
gui_qt/dialogexplorer.h
Normal file
22
gui_qt/dialogexplorer.h
Normal file
|
@ -0,0 +1,22 @@
|
|||
#ifndef _PAYSAGES_QT_DIALOGEXPLORER_H_
|
||||
#define _PAYSAGES_QT_DIALOGEXPLORER_H_
|
||||
|
||||
#include <QDialog>
|
||||
#include "widgetexplorer.h"
|
||||
#include "../lib_paysages/camera.h"
|
||||
|
||||
class DialogExplorer : public QDialog
|
||||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
explicit DialogExplorer(QWidget *parent, CameraDefinition* camera, bool camera_validable);
|
||||
~DialogExplorer();
|
||||
|
||||
protected slots:
|
||||
void validateCamera();
|
||||
|
||||
private:
|
||||
WidgetExplorer* _wanderer;
|
||||
};
|
||||
|
||||
#endif
|
|
@ -1,22 +0,0 @@
|
|||
#ifndef _PAYSAGES_QT_DIALOGWANDERER_H_
|
||||
#define _PAYSAGES_QT_DIALOGWANDERER_H_
|
||||
|
||||
#include <QDialog>
|
||||
#include "widgetwanderer.h"
|
||||
#include "../lib_paysages/camera.h"
|
||||
|
||||
class DialogWanderer : public QDialog
|
||||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
explicit DialogWanderer(QWidget *parent, CameraDefinition* camera, bool camera_validable);
|
||||
~DialogWanderer();
|
||||
|
||||
protected slots:
|
||||
void validateCamera();
|
||||
|
||||
private:
|
||||
WidgetWanderer* _wanderer;
|
||||
};
|
||||
|
||||
#endif
|
|
@ -5,7 +5,7 @@
|
|||
#include <QPainter>
|
||||
#include <QColorDialog>
|
||||
|
||||
#include "dialogwanderer.h"
|
||||
#include "dialogexplorer.h"
|
||||
|
||||
InputCamera::InputCamera(QWidget* form, QString label, CameraDefinition* value):BaseInput(form, label)
|
||||
{
|
||||
|
@ -40,7 +40,7 @@ void InputCamera::editCamera()
|
|||
{
|
||||
int result;
|
||||
|
||||
DialogWanderer* dialog = new DialogWanderer(_control, _value, true);
|
||||
DialogExplorer* dialog = new DialogExplorer(_control, _value, true);
|
||||
result = dialog->exec();
|
||||
|
||||
delete dialog;
|
||||
|
|
|
@ -22,7 +22,7 @@
|
|||
#include "formrender.h"
|
||||
|
||||
#include "dialogrender.h"
|
||||
#include "dialogwanderer.h"
|
||||
#include "dialogexplorer.h"
|
||||
|
||||
#include "../lib_paysages/main.h"
|
||||
#include "../lib_paysages/auto.h"
|
||||
|
@ -230,7 +230,7 @@ void MainWindow::explore3D()
|
|||
|
||||
sceneryGetCamera(&camera);
|
||||
|
||||
DialogWanderer* dialog = new DialogWanderer(this, &camera, true);
|
||||
DialogExplorer* dialog = new DialogExplorer(this, &camera, true);
|
||||
result = dialog->exec();
|
||||
|
||||
delete dialog;
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
#include "widgetwanderer.h"
|
||||
#include "widgetexplorer.h"
|
||||
|
||||
#include <QGLWidget>
|
||||
#include <QKeyEvent>
|
||||
|
@ -13,7 +13,7 @@
|
|||
class ChunkMaintenanceThread:public QThread
|
||||
{
|
||||
public:
|
||||
ChunkMaintenanceThread(WidgetWanderer* wanderer)
|
||||
ChunkMaintenanceThread(WidgetExplorer* wanderer)
|
||||
{
|
||||
_wanderer = wanderer;
|
||||
_running = true;
|
||||
|
@ -41,7 +41,7 @@ protected:
|
|||
|
||||
private:
|
||||
bool _running;
|
||||
WidgetWanderer* _wanderer;
|
||||
WidgetExplorer* _wanderer;
|
||||
};
|
||||
|
||||
static QVector<ChunkMaintenanceThread*> _threads;
|
||||
|
@ -66,7 +66,7 @@ static void _getLightStatus(Renderer* renderer, LightStatus* status, Vector3 loc
|
|||
lightingGetStatus((LightingDefinition*)renderer->customData[2], renderer, location, status);
|
||||
}
|
||||
|
||||
WidgetWanderer::WidgetWanderer(QWidget *parent, CameraDefinition* camera):
|
||||
WidgetExplorer::WidgetExplorer(QWidget *parent, CameraDefinition* camera):
|
||||
QGLWidget(parent)
|
||||
{
|
||||
setMinimumSize(400, 300);
|
||||
|
@ -122,7 +122,7 @@ WidgetWanderer::WidgetWanderer(QWidget *parent, CameraDefinition* camera):
|
|||
_last_mouse_y = 0;
|
||||
}
|
||||
|
||||
WidgetWanderer::~WidgetWanderer()
|
||||
WidgetExplorer::~WidgetExplorer()
|
||||
{
|
||||
stopThreads();
|
||||
|
||||
|
@ -133,7 +133,7 @@ WidgetWanderer::~WidgetWanderer()
|
|||
waterDeleteDefinition(&_water);
|
||||
}
|
||||
|
||||
void WidgetWanderer::startThreads()
|
||||
void WidgetExplorer::startThreads()
|
||||
{
|
||||
int nbcore;
|
||||
|
||||
|
@ -155,7 +155,7 @@ void WidgetWanderer::startThreads()
|
|||
}
|
||||
}
|
||||
|
||||
void WidgetWanderer::stopThreads()
|
||||
void WidgetExplorer::stopThreads()
|
||||
{
|
||||
for (int i = 0; i < _threads.count(); i++)
|
||||
{
|
||||
|
@ -173,7 +173,7 @@ bool _cmpChunks(const BaseExplorerChunk* c1, const BaseExplorerChunk* c2)
|
|||
return c1->priority > c2->priority;
|
||||
}
|
||||
|
||||
void WidgetWanderer::performChunksMaintenance()
|
||||
void WidgetExplorer::performChunksMaintenance()
|
||||
{
|
||||
BaseExplorerChunk* chunk;
|
||||
|
||||
|
@ -204,18 +204,18 @@ void WidgetWanderer::performChunksMaintenance()
|
|||
_lock_chunks.unlock();
|
||||
}
|
||||
|
||||
void WidgetWanderer::resetCamera()
|
||||
void WidgetExplorer::resetCamera()
|
||||
{
|
||||
cameraCopyDefinition(_base_camera, &_current_camera);
|
||||
updateGL();
|
||||
}
|
||||
|
||||
void WidgetWanderer::validateCamera()
|
||||
void WidgetExplorer::validateCamera()
|
||||
{
|
||||
cameraCopyDefinition(&_current_camera, _base_camera);
|
||||
}
|
||||
|
||||
void WidgetWanderer::keyPressEvent(QKeyEvent* event)
|
||||
void WidgetExplorer::keyPressEvent(QKeyEvent* event)
|
||||
{
|
||||
double factor;
|
||||
|
||||
|
@ -269,7 +269,7 @@ void WidgetWanderer::keyPressEvent(QKeyEvent* event)
|
|||
}
|
||||
}
|
||||
|
||||
void WidgetWanderer::mousePressEvent(QMouseEvent* event)
|
||||
void WidgetExplorer::mousePressEvent(QMouseEvent* event)
|
||||
{
|
||||
_last_mouse_x = event->x();
|
||||
_last_mouse_y = event->y();
|
||||
|
@ -277,7 +277,7 @@ void WidgetWanderer::mousePressEvent(QMouseEvent* event)
|
|||
event->ignore();
|
||||
}
|
||||
|
||||
void WidgetWanderer::mouseMoveEvent(QMouseEvent* event)
|
||||
void WidgetExplorer::mouseMoveEvent(QMouseEvent* event)
|
||||
{
|
||||
double factor;
|
||||
|
||||
|
@ -318,7 +318,7 @@ void WidgetWanderer::mouseMoveEvent(QMouseEvent* event)
|
|||
_last_mouse_y = event->y();
|
||||
}
|
||||
|
||||
void WidgetWanderer::wheelEvent(QWheelEvent* event)
|
||||
void WidgetExplorer::wheelEvent(QWheelEvent* event)
|
||||
{
|
||||
double factor;
|
||||
|
||||
|
@ -345,7 +345,7 @@ void WidgetWanderer::wheelEvent(QWheelEvent* event)
|
|||
event->accept();
|
||||
}
|
||||
|
||||
void WidgetWanderer::timerEvent(QTimerEvent *event)
|
||||
void WidgetExplorer::timerEvent(QTimerEvent *event)
|
||||
{
|
||||
if (_updated)
|
||||
{
|
||||
|
@ -362,7 +362,7 @@ void WidgetWanderer::timerEvent(QTimerEvent *event)
|
|||
_lock_chunks.unlock();
|
||||
}
|
||||
|
||||
void WidgetWanderer::initializeGL()
|
||||
void WidgetExplorer::initializeGL()
|
||||
{
|
||||
glClearColor(0.0, 0.0, 0.0, 0.0);
|
||||
|
||||
|
@ -385,7 +385,7 @@ void WidgetWanderer::initializeGL()
|
|||
glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);
|
||||
}
|
||||
|
||||
void WidgetWanderer::resizeGL(int w, int h)
|
||||
void WidgetExplorer::resizeGL(int w, int h)
|
||||
{
|
||||
cameraSetRenderSize(&_current_camera, w, h);
|
||||
|
||||
|
@ -398,7 +398,7 @@ void WidgetWanderer::resizeGL(int w, int h)
|
|||
glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);
|
||||
}
|
||||
|
||||
void WidgetWanderer::paintGL()
|
||||
void WidgetExplorer::paintGL()
|
||||
{
|
||||
QTime start_time;
|
||||
double frame_time;
|
|
@ -1,5 +1,5 @@
|
|||
#ifndef _PAYSAGES_QT_WIDGETWANDERER_H_
|
||||
#define _PAYSAGES_QT_WIDGETWANDERER_H_
|
||||
#ifndef _PAYSAGES_QT_WIDGETEXPLORER_H_
|
||||
#define _PAYSAGES_QT_WIDGETEXPLORER_H_
|
||||
|
||||
#include <QGLWidget>
|
||||
#include "baseexplorerchunk.h"
|
||||
|
@ -11,12 +11,12 @@
|
|||
#include "../lib_paysages/textures.h"
|
||||
#include "../lib_paysages/lighting.h"
|
||||
|
||||
class WidgetWanderer : public QGLWidget
|
||||
class WidgetExplorer : public QGLWidget
|
||||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
WidgetWanderer(QWidget* parent, CameraDefinition* camera);
|
||||
~WidgetWanderer();
|
||||
WidgetExplorer(QWidget* parent, CameraDefinition* camera);
|
||||
~WidgetExplorer();
|
||||
|
||||
void performChunksMaintenance();
|
||||
|
|
@ -218,12 +218,12 @@ Right click on a point to delete it.</source>
|
|||
<context>
|
||||
<name>DialogWanderer</name>
|
||||
<message>
|
||||
<location filename="../gui_qt/dialogwanderer.cpp" line="15"/>
|
||||
<location filename="../gui_qt/dialogexplorer.cpp" line="14"/>
|
||||
<source>Paysages 3D - Explore</source>
|
||||
<translation>Paysages 3D - Exploration</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../gui_qt/dialogwanderer.cpp" line="25"/>
|
||||
<location filename="../gui_qt/dialogexplorer.cpp" line="24"/>
|
||||
<source>COMMANDS
|
||||
|
||||
Left click : Look around
|
||||
|
@ -256,17 +256,17 @@ Maintenir MAJ : Plus lent
|
|||
Maintenir Ctrl : Plus rapide</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../gui_qt/dialogwanderer.cpp" line="27"/>
|
||||
<location filename="../gui_qt/dialogexplorer.cpp" line="26"/>
|
||||
<source>Reset camera</source>
|
||||
<translation>Revenir au point de vue initial</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../gui_qt/dialogwanderer.cpp" line="33"/>
|
||||
<location filename="../gui_qt/dialogexplorer.cpp" line="32"/>
|
||||
<source>Validate as render camera</source>
|
||||
<translation>Choisir comme caméra de rendu</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../gui_qt/dialogwanderer.cpp" line="38"/>
|
||||
<location filename="../gui_qt/dialogexplorer.cpp" line="37"/>
|
||||
<source>Close</source>
|
||||
<translation>Fermer</translation>
|
||||
</message>
|
||||
|
|
Loading…
Reference in a new issue