From a3aa859f0cabdf91e82e9b8f08829f821e537868 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=C3=ABl=20Lemaire?= Date: Fri, 8 Jun 2012 12:54:57 +0000 Subject: [PATCH] paysages : Renaming wanderer->explorer git-svn-id: https://subversion.assembla.com/svn/thunderk/paysages@340 b1fd45b6-86a6-48da-8261-f70d1f35bdcc --- ...{dialogwanderer.cpp => dialogexplorer.cpp} | 11 +++--- gui_qt/dialogexplorer.h | 22 ++++++++++++ gui_qt/dialogwanderer.h | 22 ------------ gui_qt/inputcamera.cpp | 4 +-- gui_qt/mainwindow.cpp | 4 +-- ...{widgetwanderer.cpp => widgetexplorer.cpp} | 36 +++++++++---------- gui_qt/{widgetwanderer.h => widgetexplorer.h} | 10 +++--- i18n/paysages_fr.ts | 10 +++--- 8 files changed, 59 insertions(+), 60 deletions(-) rename gui_qt/{dialogwanderer.cpp => dialogexplorer.cpp} (84%) create mode 100644 gui_qt/dialogexplorer.h delete mode 100644 gui_qt/dialogwanderer.h rename gui_qt/{widgetwanderer.cpp => widgetexplorer.cpp} (93%) rename gui_qt/{widgetwanderer.h => widgetexplorer.h} (86%) diff --git a/gui_qt/dialogwanderer.cpp b/gui_qt/dialogexplorer.cpp similarity index 84% rename from gui_qt/dialogwanderer.cpp rename to gui_qt/dialogexplorer.cpp index b707b31..4a211d0 100644 --- a/gui_qt/dialogwanderer.cpp +++ b/gui_qt/dialogexplorer.cpp @@ -1,12 +1,11 @@ -#include "dialogwanderer.h" +#include "dialogexplorer.h" #include #include #include #include -#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(); diff --git a/gui_qt/dialogexplorer.h b/gui_qt/dialogexplorer.h new file mode 100644 index 0000000..e190aed --- /dev/null +++ b/gui_qt/dialogexplorer.h @@ -0,0 +1,22 @@ +#ifndef _PAYSAGES_QT_DIALOGEXPLORER_H_ +#define _PAYSAGES_QT_DIALOGEXPLORER_H_ + +#include +#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 diff --git a/gui_qt/dialogwanderer.h b/gui_qt/dialogwanderer.h deleted file mode 100644 index 34176ec..0000000 --- a/gui_qt/dialogwanderer.h +++ /dev/null @@ -1,22 +0,0 @@ -#ifndef _PAYSAGES_QT_DIALOGWANDERER_H_ -#define _PAYSAGES_QT_DIALOGWANDERER_H_ - -#include -#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 diff --git a/gui_qt/inputcamera.cpp b/gui_qt/inputcamera.cpp index 7a947f8..74d0c46 100644 --- a/gui_qt/inputcamera.cpp +++ b/gui_qt/inputcamera.cpp @@ -5,7 +5,7 @@ #include #include -#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; diff --git a/gui_qt/mainwindow.cpp b/gui_qt/mainwindow.cpp index 648c42b..ed21702 100644 --- a/gui_qt/mainwindow.cpp +++ b/gui_qt/mainwindow.cpp @@ -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; diff --git a/gui_qt/widgetwanderer.cpp b/gui_qt/widgetexplorer.cpp similarity index 93% rename from gui_qt/widgetwanderer.cpp rename to gui_qt/widgetexplorer.cpp index 2a8629f..cda9f58 100644 --- a/gui_qt/widgetwanderer.cpp +++ b/gui_qt/widgetexplorer.cpp @@ -1,4 +1,4 @@ -#include "widgetwanderer.h" +#include "widgetexplorer.h" #include #include @@ -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 _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; diff --git a/gui_qt/widgetwanderer.h b/gui_qt/widgetexplorer.h similarity index 86% rename from gui_qt/widgetwanderer.h rename to gui_qt/widgetexplorer.h index 827ab9c..18149fa 100644 --- a/gui_qt/widgetwanderer.h +++ b/gui_qt/widgetexplorer.h @@ -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 #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(); diff --git a/i18n/paysages_fr.ts b/i18n/paysages_fr.ts index 5ab5dff..6de9da6 100644 --- a/i18n/paysages_fr.ts +++ b/i18n/paysages_fr.ts @@ -218,12 +218,12 @@ Right click on a point to delete it. DialogWanderer - + Paysages 3D - Explore Paysages 3D - Exploration - + COMMANDS Left click : Look around @@ -256,17 +256,17 @@ Maintenir MAJ : Plus lent Maintenir Ctrl : Plus rapide - + Reset camera Revenir au point de vue initial - + Validate as render camera Choisir comme caméra de rendu - + Close Fermer