paysages: Project tree reorganization

git-svn-id: https://subversion.assembla.com/svn/thunderk/paysages@552 b1fd45b6-86a6-48da-8261-f70d1f35bdcc
This commit is contained in:
Michaël Lemaire 2013-04-17 12:29:51 +00:00 committed by ThunderK
parent 82d291d903
commit ae19273d18
220 changed files with 177 additions and 163 deletions

View file

@ -2,20 +2,20 @@ BUILDMODE=debug
BUILDPATH=./build/${BUILDMODE} BUILDPATH=./build/${BUILDMODE}
all: all:
@+cd lib_paysages && make BUILDMODE=${BUILDMODE} @+cd src/rendering && make BUILDMODE=${BUILDMODE} PROJECT_PATH=${CURDIR}
@+cd exploring && make BUILDMODE=${BUILDMODE} @+cd src/exploring && make BUILDMODE=${BUILDMODE} PROJECT_PATH=${CURDIR}
@+cd cli && make BUILDMODE=${BUILDMODE} @+cd src/controlling && make BUILDMODE=${BUILDMODE} PROJECT_PATH=${CURDIR}
@+cd gui_qt && qmake "BUILDMODE=${BUILDMODE}" && make @+cd src/editing && qmake "BUILDMODE=${BUILDMODE}" "PROJECT_PATH=${CURDIR}" && make
clean: clean:
cd lib_paysages && make clean BUILDMODE=${BUILDMODE} cd src/rendering && make clean BUILDMODE=${BUILDMODE} PROJECT_PATH=${CURDIR}
cd exploring && make clean BUILDMODE=${BUILDMODE} cd src/exploring && make clean BUILDMODE=${BUILDMODE} PROJECT_PATH=${CURDIR}
cd cli && make clean BUILDMODE=${BUILDMODE} cd src/controlling && make clean BUILDMODE=${BUILDMODE} PROJECT_PATH=${CURDIR}
cd gui_qt && qmake "BUILDMODE=${BUILDMODE}" && make clean cd src/editing && qmake "BUILDMODE=${BUILDMODE}" "PROJECT_PATH=${CURDIR}" && make clean
rm -f ${BUILDPATH}/paysages-qt
rm -f ${BUILDPATH}/paysages-cli rm -f ${BUILDPATH}/paysages-cli
rm -f ${BUILDPATH}/paysages-qt
rm -f ${BUILDPATH}/libpaysages_exploring.so rm -f ${BUILDPATH}/libpaysages_exploring.so
rm -f ${BUILDPATH}/libpaysages.so rm -f ${BUILDPATH}/libpaysages_rendering.so
release: release:
make BUILDMODE=release all make BUILDMODE=release all

0
data/.paysages_data Normal file
View file

View file

Before

Width:  |  Height:  |  Size: 4.2 KiB

After

Width:  |  Height:  |  Size: 4.2 KiB

View file

Before

Width:  |  Height:  |  Size: 35 KiB

After

Width:  |  Height:  |  Size: 35 KiB

View file

Before

Width:  |  Height:  |  Size: 4.3 KiB

After

Width:  |  Height:  |  Size: 4.3 KiB

View file

Before

Width:  |  Height:  |  Size: 5 KiB

After

Width:  |  Height:  |  Size: 5 KiB

View file

Before

Width:  |  Height:  |  Size: 291 B

After

Width:  |  Height:  |  Size: 291 B

View file

Before

Width:  |  Height:  |  Size: 4.6 KiB

After

Width:  |  Height:  |  Size: 4.6 KiB

View file

Before

Width:  |  Height:  |  Size: 3.7 KiB

After

Width:  |  Height:  |  Size: 3.7 KiB

View file

Before

Width:  |  Height:  |  Size: 3.6 KiB

After

Width:  |  Height:  |  Size: 3.6 KiB

View file

Before

Width:  |  Height:  |  Size: 3.8 KiB

After

Width:  |  Height:  |  Size: 3.8 KiB

View file

Before

Width:  |  Height:  |  Size: 1.2 KiB

After

Width:  |  Height:  |  Size: 1.2 KiB

View file

Before

Width:  |  Height:  |  Size: 3.7 KiB

After

Width:  |  Height:  |  Size: 3.7 KiB

View file

Before

Width:  |  Height:  |  Size: 4 KiB

After

Width:  |  Height:  |  Size: 4 KiB

View file

Before

Width:  |  Height:  |  Size: 4.2 KiB

After

Width:  |  Height:  |  Size: 4.2 KiB

View file

Before

Width:  |  Height:  |  Size: 20 KiB

After

Width:  |  Height:  |  Size: 20 KiB

View file

Before

Width:  |  Height:  |  Size: 527 B

After

Width:  |  Height:  |  Size: 527 B

View file

Before

Width:  |  Height:  |  Size: 53 KiB

After

Width:  |  Height:  |  Size: 53 KiB

View file

Before

Width:  |  Height:  |  Size: 1.1 KiB

After

Width:  |  Height:  |  Size: 1.1 KiB

View file

Before

Width:  |  Height:  |  Size: 8.8 KiB

After

Width:  |  Height:  |  Size: 8.8 KiB

View file

Before

Width:  |  Height:  |  Size: 3.4 KiB

After

Width:  |  Height:  |  Size: 3.4 KiB

View file

Before

Width:  |  Height:  |  Size: 4.7 KiB

After

Width:  |  Height:  |  Size: 4.7 KiB

View file

Before

Width:  |  Height:  |  Size: 2.5 KiB

After

Width:  |  Height:  |  Size: 2.5 KiB

View file

Before

Width:  |  Height:  |  Size: 4 KiB

After

Width:  |  Height:  |  Size: 4 KiB

View file

Before

Width:  |  Height:  |  Size: 1.7 KiB

After

Width:  |  Height:  |  Size: 1.7 KiB

View file

Before

Width:  |  Height:  |  Size: 2.3 KiB

After

Width:  |  Height:  |  Size: 2.3 KiB

View file

Before

Width:  |  Height:  |  Size: 2.2 KiB

After

Width:  |  Height:  |  Size: 2.2 KiB

View file

Before

Width:  |  Height:  |  Size: 1.1 KiB

After

Width:  |  Height:  |  Size: 1.1 KiB

View file

Before

Width:  |  Height:  |  Size: 2.3 KiB

After

Width:  |  Height:  |  Size: 2.3 KiB

View file

Before

Width:  |  Height:  |  Size: 2.3 KiB

After

Width:  |  Height:  |  Size: 2.3 KiB

View file

Before

Width:  |  Height:  |  Size: 537 B

After

Width:  |  Height:  |  Size: 537 B

View file

@ -13,7 +13,7 @@ ifneq (,${LIBS})
CC_LDFLAGS += $(shell pkg-config --libs ${LIBS}) CC_LDFLAGS += $(shell pkg-config --libs ${LIBS})
endif endif
CC_FLAGS += -fPIC -Wall CC_FLAGS += -fPIC -Wall -I${PROJECT_PATH}/src
CC_LDFLAGS += -fPIC CC_LDFLAGS += -fPIC
all:prepare ${RESULT} all:prepare ${RESULT}

View file

@ -1,4 +1,11 @@
PATH_LIB_PAYSAGES = ../lib_paysages ifeq ($(strip $(BUILDMODE)),)
exit 1
endif
ifeq ($(strip $(PROJECT_PATH)),)
exit 1
endif
PATH_LIB_PAYSAGES = ${PROJECT_PATH}/rendering
BUILDMODE = debug BUILDMODE = debug
BUILDPATH = ../build/${BUILDMODE} BUILDPATH = ${PROJECT_PATH}/build/${BUILDMODE}
HEADERS = $(${PATH_LIB_PAYSAGES}/atmosphere/*.h ${PATH_LIB_PAYSAGES}/clouds/*.h ${PATH_LIB_PAYSAGES}/terrain/*.h ${PATH_LIB_PAYSAGES}/textures/*.h ${PATH_LIB_PAYSAGES}/water/*.h ${PATH_LIB_PAYSAGES}/tools/*.h ${PATH_LIB_PAYSAGES}/shared/*.h) HEADERS = $(${PATH_LIB_PAYSAGES}/atmosphere/*.h ${PATH_LIB_PAYSAGES}/clouds/*.h ${PATH_LIB_PAYSAGES}/terrain/*.h ${PATH_LIB_PAYSAGES}/textures/*.h ${PATH_LIB_PAYSAGES}/water/*.h ${PATH_LIB_PAYSAGES}/tools/*.h ${PATH_LIB_PAYSAGES}/shared/*.h)

View file

@ -1,10 +1,10 @@
include ../common_pre.mk include ../common_pre.mk
OBJPATH = ${BUILDPATH}/cli OBJPATH = ${BUILDPATH}/controlling
RESULT = ${BUILDPATH}/paysages-cli RESULT = ${BUILDPATH}/paysages-cli
SOURCES += $(wildcard *.c) SOURCES += $(wildcard *.c)
HEADERS += $(wildcard *.h) HEADERS += $(wildcard *.h)
CC_LDFLAGS += -L${BUILDPATH} -lpaysages CC_LDFLAGS += -L${BUILDPATH} -lpaysages_rendering
include ../common_post.mk include ../common_post.mk

View file

@ -3,10 +3,10 @@
#include <string.h> #include <string.h>
#include <math.h> #include <math.h>
#include "../lib_paysages/auto.h" #include "rendering/auto.h"
#include "../lib_paysages/main.h" #include "rendering/main.h"
#include "../lib_paysages/render.h" #include "rendering/render.h"
#include "../lib_paysages/scenery.h" #include "rendering/scenery.h"
void startRender(Renderer* renderer, char* outputpath, RenderParams params) void startRender(Renderer* renderer, char* outputpath, RenderParams params)
{ {

View file

@ -4,7 +4,7 @@
#include <QMutex> #include <QMutex>
#include <QImage> #include <QImage>
#include <QGLWidget> #include <QGLWidget>
#include "../lib_paysages/renderer.h" #include "rendering/renderer.h"
class BaseExplorerChunk class BaseExplorerChunk
{ {

View file

@ -49,31 +49,31 @@ BaseForm::BaseForm(QWidget* parent, bool auto_apply, bool with_layers) : QWidget
layers->layout()->addWidget(_layer_list); layers->layout()->addWidget(_layer_list);
QObject::connect(_layer_list, SIGNAL(currentIndexChanged(int)), this, SLOT(layerListChanged())); QObject::connect(_layer_list, SIGNAL(currentIndexChanged(int)), this, SLOT(layerListChanged()));
_layer_new = new QPushButton(QIcon("images/layer_add.png"), "", layers); _layer_new = new QPushButton(QIcon(getDataPath("images/layer_add.png")), "", layers);
_layer_new->setToolTip(tr("Add layer")); _layer_new->setToolTip(tr("Add layer"));
_layer_new->setMaximumSize(30, 30); _layer_new->setMaximumSize(30, 30);
layers->layout()->addWidget(_layer_new); layers->layout()->addWidget(_layer_new);
QObject::connect(_layer_new, SIGNAL(clicked()), this, SLOT(layerAddClicked())); QObject::connect(_layer_new, SIGNAL(clicked()), this, SLOT(layerAddClicked()));
_layer_del = new QPushButton(QIcon("images/layer_del.png"), "", layers); _layer_del = new QPushButton(QIcon(getDataPath("images/layer_del.png")), "", layers);
_layer_del->setToolTip(tr("Delete layer")); _layer_del->setToolTip(tr("Delete layer"));
_layer_del->setMaximumSize(30, 30); _layer_del->setMaximumSize(30, 30);
layers->layout()->addWidget(_layer_del); layers->layout()->addWidget(_layer_del);
QObject::connect(_layer_del, SIGNAL(clicked()), this, SLOT(layerDelClicked())); QObject::connect(_layer_del, SIGNAL(clicked()), this, SLOT(layerDelClicked()));
_layer_rename = new QPushButton(QIcon("images/layer_rename.png"), "", layers); _layer_rename = new QPushButton(QIcon(getDataPath("images/layer_rename.png")), "", layers);
_layer_rename->setToolTip(tr("Rename layer")); _layer_rename->setToolTip(tr("Rename layer"));
_layer_rename->setMaximumSize(30, 30); _layer_rename->setMaximumSize(30, 30);
layers->layout()->addWidget(_layer_rename); layers->layout()->addWidget(_layer_rename);
QObject::connect(_layer_rename, SIGNAL(clicked()), this, SLOT(layerRenameClicked())); QObject::connect(_layer_rename, SIGNAL(clicked()), this, SLOT(layerRenameClicked()));
_layer_up = new QPushButton(QIcon("images/layer_up.png"), "", layers); _layer_up = new QPushButton(QIcon(getDataPath("images/layer_up.png")), "", layers);
_layer_up->setToolTip(tr("Move layer upward")); _layer_up->setToolTip(tr("Move layer upward"));
_layer_up->setMaximumSize(30, 30); _layer_up->setMaximumSize(30, 30);
layers->layout()->addWidget(_layer_up); layers->layout()->addWidget(_layer_up);
QObject::connect(_layer_up, SIGNAL(clicked()), this, SLOT(layerUpClicked())); QObject::connect(_layer_up, SIGNAL(clicked()), this, SLOT(layerUpClicked()));
_layer_down = new QPushButton(QIcon("images/layer_down.png"), "", layers); _layer_down = new QPushButton(QIcon(getDataPath("images/layer_down.png")), "", layers);
_layer_down->setToolTip(tr("Move layer downward")); _layer_down->setToolTip(tr("Move layer downward"));
_layer_down->setMaximumSize(30, 30); _layer_down->setMaximumSize(30, 30);
layers->layout()->addWidget(_layer_down); layers->layout()->addWidget(_layer_down);
@ -112,15 +112,15 @@ BaseForm::BaseForm(QWidget* parent, bool auto_apply, bool with_layers) : QWidget
control->layout()->setAlignment(_buttons, Qt::AlignBottom); control->layout()->setAlignment(_buttons, Qt::AlignBottom);
_button_revert = addButton(tr("Revert")); _button_revert = addButton(tr("Revert"));
_button_revert->setIcon(QIcon("images/cancel.png")); _button_revert->setIcon(QIcon(getDataPath("images/cancel.png")));
_button_revert->setEnabled(false); _button_revert->setEnabled(false);
connect(_button_revert, SIGNAL(clicked()), this, SLOT(revertConfig())); connect(_button_revert, SIGNAL(clicked()), this, SLOT(revertConfig()));
_button_apply = addButton(tr("Apply")); _button_apply = addButton(tr("Apply"));
_button_apply->setIcon(QIcon("images/apply.png")); _button_apply->setIcon(QIcon(getDataPath("images/apply.png")));
_button_apply->setEnabled(false); _button_apply->setEnabled(false);
connect(_button_apply, SIGNAL(clicked()), this, SLOT(applyConfig())); connect(_button_apply, SIGNAL(clicked()), this, SLOT(applyConfig()));
_button_preset = addButton(tr("Load preset")); _button_preset = addButton(tr("Load preset"));
_button_preset->setIcon(QIcon("images/auto.png")); _button_preset->setIcon(QIcon(getDataPath("images/auto.png")));
_button_preset->hide(); _button_preset->hide();
connect(_button_preset, SIGNAL(clicked()), this, SLOT(presetChoiceClicked())); connect(_button_preset, SIGNAL(clicked()), this, SLOT(presetChoiceClicked()));

View file

@ -8,12 +8,12 @@
#include "basepreview.h" #include "basepreview.h"
#include "baseinput.h" #include "baseinput.h"
#include "dialoglayers.h" #include "dialoglayers.h"
#include "../lib_paysages/shared/types.h" #include "rendering/shared/types.h"
#include "../lib_paysages/tools/curve.h" #include "rendering/tools/curve.h"
#include "../lib_paysages/tools/color.h" #include "rendering/tools/color.h"
#include "../lib_paysages/tools/pack.h" #include "rendering/tools/pack.h"
#include "../lib_paysages/noise.h" #include "rendering/noise.h"
#include "../lib_paysages/layers.h" #include "rendering/layers.h"
class BaseForm:public QWidget class BaseForm:public QWidget
{ {

View file

@ -4,7 +4,7 @@
/* Base form, with automatic layer control */ /* Base form, with automatic layer control */
#include "baseform.h" #include "baseform.h"
#include "../lib_paysages/layers.h" #include "rendering/layers.h"
class BaseFormLayer:public BaseForm class BaseFormLayer:public BaseForm
{ {

View file

@ -9,7 +9,7 @@
#include <assert.h> #include <assert.h>
#include <math.h> #include <math.h>
#include "tools.h" #include "tools.h"
#include "../lib_paysages/system.h" #include "rendering/system.h"
/*************** PreviewChunk ***************/ /*************** PreviewChunk ***************/
class PreviewChunk class PreviewChunk
@ -744,7 +744,7 @@ void BasePreview::contextMenuEvent(QContextMenuEvent* event)
action->setProperty("value", i); action->setProperty("value", i);
if (i == iter1.value().current) if (i == iter1.value().current)
{ {
action->setIcon(QIcon("images/choice_on.png")); action->setIcon(QIcon(getDataPath("images/choice_on.png")));
action->setIconVisibleInMenu(true); action->setIconVisibleInMenu(true);
} }
} }
@ -767,7 +767,7 @@ void BasePreview::contextMenuEvent(QContextMenuEvent* event)
action->setProperty("value", not iter2.value().value); action->setProperty("value", not iter2.value().value);
if (iter2.value().value) if (iter2.value().value)
{ {
action->setIcon(QIcon("images/toggle_on.png")); action->setIcon(QIcon(getDataPath("images/toggle_on.png")));
action->setIconVisibleInMenu(true); action->setIconVisibleInMenu(true);
} }
} }

View file

@ -10,7 +10,7 @@
#include <QLabel> #include <QLabel>
#include <QHash> #include <QHash>
#include "previewosd.h" #include "previewosd.h"
#include "../lib_paysages/tools/pack.h" #include "rendering/tools/pack.h"
class _ContextChoice class _ContextChoice
{ {

View file

@ -6,8 +6,8 @@
#include "widgetcurveeditor.h" #include "widgetcurveeditor.h"
#include "previewcolorgradation.h" #include "previewcolorgradation.h"
#include "../lib_paysages/tools/color.h" #include "rendering/tools/color.h"
#include "../lib_paysages/tools/curve.h" #include "rendering/tools/curve.h"
class DialogColorGradation : public QDialog class DialogColorGradation : public QDialog
{ {

View file

@ -21,18 +21,18 @@ DialogCurve::DialogCurve(QWidget *parent, Curve* curve, double xmin, double xmax
QWidget* form; QWidget* form;
QGridLayout* form_layout; QGridLayout* form_layout;
QLabel* label; QLabel* label;
_base = curve; _base = curve;
_current = curveCreate(); _current = curveCreate();
curveCopy(_base, _current); curveCopy(_base, _current);
setLayout(new QVBoxLayout()); setLayout(new QVBoxLayout());
form = new QWidget(this); form = new QWidget(this);
form_layout = new QGridLayout(); form_layout = new QGridLayout();
form->setLayout(form_layout); form->setLayout(form_layout);
layout()->addWidget(form); layout()->addWidget(form);
label = new QLabel(tr("This is the curve editor.\nClick on points and drag them to move them.\nDouble click to add a new point.\nRight click on a point to delete it."), form); label = new QLabel(tr("This is the curve editor.\nClick on points and drag them to move them.\nDouble click to add a new point.\nRight click on a point to delete it."), form);
label->setSizePolicy(QSizePolicy::MinimumExpanding, QSizePolicy::Minimum); label->setSizePolicy(QSizePolicy::MinimumExpanding, QSizePolicy::Minimum);
label->setMinimumWidth(150); label->setMinimumWidth(150);
@ -47,19 +47,19 @@ DialogCurve::DialogCurve(QWidget *parent, Curve* curve, double xmin, double xmax
buttons = new QWidget(this); buttons = new QWidget(this);
layout()->addWidget(buttons); layout()->addWidget(buttons);
buttons->setLayout(new QHBoxLayout()); buttons->setLayout(new QHBoxLayout());
_button_cancel = new QPushButton(tr("Cancel"), buttons); _button_cancel = new QPushButton(tr("Cancel"), buttons);
_button_cancel->setIcon(QIcon("images/cancel.png")); _button_cancel->setIcon(QIcon(getDataPath("images/cancel.png")));
buttons->layout()->addWidget(_button_cancel); buttons->layout()->addWidget(_button_cancel);
QObject::connect(_button_cancel, SIGNAL(clicked()), this, SLOT(reject())); QObject::connect(_button_cancel, SIGNAL(clicked()), this, SLOT(reject()));
_button_revert = new QPushButton(tr("Revert"), buttons); _button_revert = new QPushButton(tr("Revert"), buttons);
_button_revert->setIcon(QIcon("images/revert.png")); _button_revert->setIcon(QIcon(getDataPath("images/revert.png")));
buttons->layout()->addWidget(_button_revert); buttons->layout()->addWidget(_button_revert);
QObject::connect(_button_revert, SIGNAL(clicked()), this, SLOT(revert())); QObject::connect(_button_revert, SIGNAL(clicked()), this, SLOT(revert()));
_button_accept = new QPushButton(tr("Validate"), buttons); _button_accept = new QPushButton(tr("Validate"), buttons);
_button_accept->setIcon(QIcon("images/apply.png")); _button_accept->setIcon(QIcon(getDataPath("images/apply.png")));
buttons->layout()->addWidget(_button_accept); buttons->layout()->addWidget(_button_accept);
QObject::connect(_button_accept, SIGNAL(clicked()), this, SLOT(accept())); QObject::connect(_button_accept, SIGNAL(clicked()), this, SLOT(accept()));

View file

@ -5,7 +5,7 @@
#include <QPushButton> #include <QPushButton>
#include "widgetcurveeditor.h" #include "widgetcurveeditor.h"
#include "../lib_paysages/tools/curve.h" #include "rendering/tools/curve.h"
class DialogCurve : public QDialog class DialogCurve : public QDialog
{ {

View file

@ -3,7 +3,7 @@
#include <QDialog> #include <QDialog>
#include "widgetexplorer.h" #include "widgetexplorer.h"
#include "../lib_paysages/camera.h" #include "rendering/camera.h"
class DialogExplorer : public QDialog class DialogExplorer : public QDialog
{ {

View file

@ -9,7 +9,7 @@
#include <QFileDialog> #include <QFileDialog>
#include <QInputDialog> #include <QInputDialog>
#include <math.h> #include <math.h>
#include "../lib_paysages/scenery.h" #include "rendering/scenery.h"
#include "widgetheightmap.h" #include "widgetheightmap.h"
/**************** Dialog form ****************/ /**************** Dialog form ****************/
@ -110,17 +110,17 @@ DialogHeightMap::DialogHeightMap(QWidget* parent, TerrainDefinition* terrain) :
// Buttons layout // Buttons layout
button = new QPushButton(tr("Cancel"), buttons); button = new QPushButton(tr("Cancel"), buttons);
button->setIcon(QIcon("images/cancel.png")); button->setIcon(QIcon(getDataPath("images/cancel.png")));
buttons->layout()->addWidget(button); buttons->layout()->addWidget(button);
QObject::connect(button, SIGNAL(clicked()), this, SLOT(reject())); QObject::connect(button, SIGNAL(clicked()), this, SLOT(reject()));
button = new QPushButton(tr("Revert"), buttons); button = new QPushButton(tr("Revert"), buttons);
button->setIcon(QIcon("images/revert.png")); button->setIcon(QIcon(getDataPath("images/revert.png")));
buttons->layout()->addWidget(button); buttons->layout()->addWidget(button);
QObject::connect(button, SIGNAL(clicked()), this, SLOT(revert())); QObject::connect(button, SIGNAL(clicked()), this, SLOT(revert()));
button = new QPushButton(tr("Validate"), buttons); button = new QPushButton(tr("Validate"), buttons);
button->setIcon(QIcon("images/apply.png")); button->setIcon(QIcon(getDataPath("images/apply.png")));
buttons->layout()->addWidget(button); buttons->layout()->addWidget(button);
QObject::connect(button, SIGNAL(clicked()), this, SLOT(accept())); QObject::connect(button, SIGNAL(clicked()), this, SLOT(accept()));

View file

@ -2,7 +2,7 @@
#define _PAYSAGES_QT_DIALOGHEIGHTMAP_H_ #define _PAYSAGES_QT_DIALOGHEIGHTMAP_H_
#include <QLabel> #include <QLabel>
#include "../lib_paysages/terrain/public.h" #include "rendering/terrain/public.h"
#include "tools.h" #include "tools.h"
#include "widgetheightmap.h" #include "widgetheightmap.h"

View file

@ -11,32 +11,32 @@ DialogLayers::DialogLayers(QWidget *parent, Layers* layers, QString title, FormL
{ {
QPushButton* button; QPushButton* button;
QWidget* buttons; QWidget* buttons;
_layers = layers; _layers = layers;
setLayout(new QVBoxLayout()); setLayout(new QVBoxLayout());
_form = form_builder(this, _layers); _form = form_builder(this, _layers);
_form->hideButtons(); _form->hideButtons();
layout()->addWidget(_form); layout()->addWidget(_form);
buttons = new QWidget(this); buttons = new QWidget(this);
buttons->setLayout(new QHBoxLayout()); buttons->setLayout(new QHBoxLayout());
layout()->addWidget(buttons); layout()->addWidget(buttons);
layout()->setAlignment(buttons, Qt::AlignBottom); layout()->setAlignment(buttons, Qt::AlignBottom);
button = new QPushButton(tr("Cancel"), buttons); button = new QPushButton(tr("Cancel"), buttons);
button->setIcon(QIcon("images/cancel.png")); button->setIcon(QIcon(getDataPath("images/cancel.png")));
buttons->layout()->addWidget(button); buttons->layout()->addWidget(button);
QObject::connect(button, SIGNAL(clicked()), this, SLOT(reject())); QObject::connect(button, SIGNAL(clicked()), this, SLOT(reject()));
button = new QPushButton(tr("Reset"), buttons); button = new QPushButton(tr("Reset"), buttons);
button->setIcon(QIcon("images/revert.png")); button->setIcon(QIcon(getDataPath("images/revert.png")));
buttons->layout()->addWidget(button); buttons->layout()->addWidget(button);
QObject::connect(button, SIGNAL(clicked()), this, SLOT(revert())); QObject::connect(button, SIGNAL(clicked()), this, SLOT(revert()));
button = new QPushButton(tr("Validate"), buttons); button = new QPushButton(tr("Validate"), buttons);
button->setIcon(QIcon("images/apply.png")); button->setIcon(QIcon(getDataPath("images/apply.png")));
buttons->layout()->addWidget(button); buttons->layout()->addWidget(button);
QObject::connect(button, SIGNAL(clicked()), this, SLOT(accept())); QObject::connect(button, SIGNAL(clicked()), this, SLOT(accept()));
@ -53,7 +53,7 @@ bool DialogLayers::editLayers(QWidget* parent, Layers* layers, QString title, Fo
DialogLayers* dialog = new DialogLayers(parent, layers, title, form_builder); DialogLayers* dialog = new DialogLayers(parent, layers, title, form_builder);
result = dialog->exec(); result = dialog->exec();
delete dialog; delete dialog;
return result != 0; return result != 0;

View file

@ -6,7 +6,7 @@
#include <QListWidget> #include <QListWidget>
#include "tools.h" #include "tools.h"
#include "../lib_paysages/layers.h" #include "rendering/layers.h"
class DialogLayers; class DialogLayers;
class BaseFormLayer; class BaseFormLayer;

View file

@ -10,30 +10,30 @@ DialogMaterial::DialogMaterial(QWidget *parent, SurfaceMaterial* material) : Dia
{ {
QPushButton* button; QPushButton* button;
QWidget* buttons; QWidget* buttons;
setLayout(new QVBoxLayout()); setLayout(new QVBoxLayout());
_form = new FormMaterial(this, material); _form = new FormMaterial(this, material);
_form->hideButtons(); _form->hideButtons();
layout()->addWidget(_form); layout()->addWidget(_form);
buttons = new QWidget(this); buttons = new QWidget(this);
buttons->setLayout(new QHBoxLayout()); buttons->setLayout(new QHBoxLayout());
layout()->addWidget(buttons); layout()->addWidget(buttons);
layout()->setAlignment(buttons, Qt::AlignBottom); layout()->setAlignment(buttons, Qt::AlignBottom);
button = new QPushButton(tr("Cancel"), buttons); button = new QPushButton(tr("Cancel"), buttons);
button->setIcon(QIcon("images/cancel.png")); button->setIcon(QIcon(getDataPath("images/cancel.png")));
buttons->layout()->addWidget(button); buttons->layout()->addWidget(button);
QObject::connect(button, SIGNAL(clicked()), this, SLOT(reject())); QObject::connect(button, SIGNAL(clicked()), this, SLOT(reject()));
button = new QPushButton(tr("Revert"), buttons); button = new QPushButton(tr("Revert"), buttons);
button->setIcon(QIcon("images/revert.png")); button->setIcon(QIcon(getDataPath("images/revert.png")));
buttons->layout()->addWidget(button); buttons->layout()->addWidget(button);
QObject::connect(button, SIGNAL(clicked()), this, SLOT(revert())); QObject::connect(button, SIGNAL(clicked()), this, SLOT(revert()));
button = new QPushButton(tr("Validate"), buttons); button = new QPushButton(tr("Validate"), buttons);
button->setIcon(QIcon("images/apply.png")); button->setIcon(QIcon(getDataPath("images/apply.png")));
buttons->layout()->addWidget(button); buttons->layout()->addWidget(button);
QObject::connect(button, SIGNAL(clicked()), this, SLOT(accept())); QObject::connect(button, SIGNAL(clicked()), this, SLOT(accept()));
@ -46,7 +46,7 @@ bool DialogMaterial::getMaterial(QWidget* parent, SurfaceMaterial* material)
DialogMaterial* dialog = new DialogMaterial(parent, material); DialogMaterial* dialog = new DialogMaterial(parent, material);
result = dialog->exec(); result = dialog->exec();
if (result) if (result)
{ {
dialog->_form->getMaterial(material); dialog->_form->getMaterial(material);

View file

@ -7,7 +7,7 @@
#include "formmaterial.h" #include "formmaterial.h"
#include "tools.h" #include "tools.h"
#include "../lib_paysages/shared/types.h" #include "rendering/shared/types.h"
class DialogMaterial : public DialogWithPreview class DialogMaterial : public DialogWithPreview
{ {

View file

@ -10,7 +10,7 @@
#include <QScrollArea> #include <QScrollArea>
#include <QPushButton> #include <QPushButton>
#include <math.h> #include <math.h>
#include "../lib_paysages/tools/color.h" #include "rendering/tools/color.h"
/**************** Previews ****************/ /**************** Previews ****************/
class PreviewLevel:public BasePreview class PreviewLevel:public BasePreview
@ -184,17 +184,17 @@ DialogNoise::DialogNoise(QWidget *parent, NoiseGenerator* value):
form->layout()->addWidget(buttons); form->layout()->addWidget(buttons);
button = new QPushButton(tr("Cancel"), buttons); button = new QPushButton(tr("Cancel"), buttons);
button->setIcon(QIcon("images/cancel.png")); button->setIcon(QIcon(getDataPath("images/cancel.png")));
buttons->layout()->addWidget(button); buttons->layout()->addWidget(button);
QObject::connect(button, SIGNAL(clicked()), this, SLOT(reject())); QObject::connect(button, SIGNAL(clicked()), this, SLOT(reject()));
button = new QPushButton(tr("Revert"), buttons); button = new QPushButton(tr("Revert"), buttons);
button->setIcon(QIcon("images/revert.png")); button->setIcon(QIcon(getDataPath("images/revert.png")));
buttons->layout()->addWidget(button); buttons->layout()->addWidget(button);
QObject::connect(button, SIGNAL(clicked()), this, SLOT(revert())); QObject::connect(button, SIGNAL(clicked()), this, SLOT(revert()));
button = new QPushButton(tr("Validate"), buttons); button = new QPushButton(tr("Validate"), buttons);
button->setIcon(QIcon("images/apply.png")); button->setIcon(QIcon(getDataPath("images/apply.png")));
buttons->layout()->addWidget(button); buttons->layout()->addWidget(button);
QObject::connect(button, SIGNAL(clicked()), this, SLOT(accept())); QObject::connect(button, SIGNAL(clicked()), this, SLOT(accept()));

View file

@ -6,7 +6,7 @@
#include "basepreview.h" #include "basepreview.h"
#include "tools.h" #include "tools.h"
#include "../lib_paysages/noise.h" #include "rendering/noise.h"
class DialogNoise : public DialogWithPreview class DialogNoise : public DialogWithPreview
{ {

View file

@ -12,8 +12,8 @@
#include <QPushButton> #include <QPushButton>
#include "tools.h" #include "tools.h"
#include "../lib_paysages/scenery.h" #include "rendering/scenery.h"
#include "../lib_paysages/auto.h" #include "rendering/auto.h"
static DialogRender* _current_dialog; static DialogRender* _current_dialog;
@ -129,7 +129,7 @@ DialogRender::DialogRender(QWidget *parent, Renderer* renderer):
_exposure_control->setValue(200); _exposure_control->setValue(200);
_actions->layout()->addWidget(_exposure_control); _actions->layout()->addWidget(_exposure_control);
_save_button = new QPushButton(QIcon("images/save.png"), tr("Save picture"), _actions); _save_button = new QPushButton(QIcon(getDataPath("images/save.png")), tr("Save picture"), _actions);
_actions->layout()->addWidget(_save_button); _actions->layout()->addWidget(_save_button);
// Connections // Connections

View file

@ -10,8 +10,8 @@
#include <QComboBox> #include <QComboBox>
#include <QLabel> #include <QLabel>
#include <QMutex> #include <QMutex>
#include "../lib_paysages/renderer.h" #include "rendering/renderer.h"
#include "../lib_paysages/tools/color.h" #include "rendering/tools/color.h"
class DialogRender : public QDialog class DialogRender : public QDialog
{ {

View file

@ -2,7 +2,7 @@
#include <math.h> #include <math.h>
#include "baseexplorerchunk.h" #include "baseexplorerchunk.h"
#include "../lib_paysages/camera.h" #include "rendering/camera.h"
ExplorerChunkSky::ExplorerChunkSky(Renderer* renderer, double size, SkyboxOrientation orientation) : BaseExplorerChunk(renderer) ExplorerChunkSky::ExplorerChunkSky(Renderer* renderer, double size, SkyboxOrientation orientation) : BaseExplorerChunk(renderer)
{ {

View file

@ -2,8 +2,8 @@
#define _PAYSAGES_QT_EXPLORERCHUNKSKY_H_ #define _PAYSAGES_QT_EXPLORERCHUNKSKY_H_
#include "baseexplorerchunk.h" #include "baseexplorerchunk.h"
#include "../lib_paysages/renderer.h" #include "rendering/renderer.h"
#include "../lib_paysages/tools/euclid.h" #include "rendering/tools/euclid.h"
enum SkyboxOrientation enum SkyboxOrientation
{ {

View file

@ -2,7 +2,7 @@
#include <math.h> #include <math.h>
#include "baseexplorerchunk.h" #include "baseexplorerchunk.h"
#include "../lib_paysages/camera.h" #include "rendering/camera.h"
ExplorerChunkTerrain::ExplorerChunkTerrain(Renderer* renderer, double x, double z, double size, int nbchunks, double water_height) : BaseExplorerChunk(renderer) ExplorerChunkTerrain::ExplorerChunkTerrain(Renderer* renderer, double x, double z, double size, int nbchunks, double water_height) : BaseExplorerChunk(renderer)
{ {

View file

@ -2,8 +2,8 @@
#define _PAYSAGES_QT_EXPLORERCHUNKTERRAIN_H_ #define _PAYSAGES_QT_EXPLORERCHUNKTERRAIN_H_
#include "baseexplorerchunk.h" #include "baseexplorerchunk.h"
#include "../lib_paysages/renderer.h" #include "rendering/renderer.h"
#include "../lib_paysages/tools/euclid.h" #include "rendering/tools/euclid.h"
class ExplorerChunkTerrain:public BaseExplorerChunk class ExplorerChunkTerrain:public BaseExplorerChunk
{ {

View file

@ -6,9 +6,9 @@
#include <QSlider> #include <QSlider>
#include <math.h> #include <math.h>
#include "../lib_paysages/atmosphere/public.h" #include "rendering/atmosphere/public.h"
#include "../lib_paysages/scenery.h" #include "rendering/scenery.h"
#include "../lib_paysages/renderer.h" #include "rendering/renderer.h"
static AtmosphereDefinition* _definition; static AtmosphereDefinition* _definition;

View file

@ -1,8 +1,8 @@
#include "formclouds.h" #include "formclouds.h"
#include "../lib_paysages/tools/color.h" #include "rendering/tools/color.h"
#include "../lib_paysages/tools/euclid.h" #include "rendering/tools/euclid.h"
#include "../lib_paysages/scenery.h" #include "rendering/scenery.h"
#include "tools.h" #include "tools.h"

View file

@ -4,7 +4,7 @@
#include <QWidget> #include <QWidget>
#include "basepreview.h" #include "basepreview.h"
#include "baseformlayer.h" #include "baseformlayer.h"
#include "../lib_paysages/clouds/public.h" #include "rendering/clouds/public.h"
class FormClouds : public BaseFormLayer class FormClouds : public BaseFormLayer
{ {

View file

@ -4,7 +4,7 @@
#include "basepreview.h" #include "basepreview.h"
#include "baseform.h" #include "baseform.h"
#include "../lib_paysages/shared/types.h" #include "rendering/shared/types.h"
class FormMaterial : public BaseForm class FormMaterial : public BaseForm
{ {

View file

@ -3,8 +3,8 @@
#include "dialogrender.h" #include "dialogrender.h"
#include "inputcamera.h" #include "inputcamera.h"
#include "tools.h" #include "tools.h"
#include "../lib_paysages/render.h" #include "rendering/render.h"
#include "../lib_paysages/scenery.h" #include "rendering/scenery.h"
/**************** Previews ****************/ /**************** Previews ****************/
class PreviewRenderLandscape:public BasePreview class PreviewRenderLandscape:public BasePreview

View file

@ -2,9 +2,9 @@
#define _PAYSAGES_QT_FORMRENDER_H_ #define _PAYSAGES_QT_FORMRENDER_H_
#include "baseform.h" #include "baseform.h"
#include "../lib_paysages/camera.h" #include "rendering/camera.h"
#include "../lib_paysages/renderer.h" #include "rendering/renderer.h"
#include "../lib_paysages/render.h" #include "rendering/render.h"
class FormRender : public BaseForm class FormRender : public BaseForm
{ {

View file

@ -4,7 +4,7 @@
#include <QSlider> #include <QSlider>
#include "tools.h" #include "tools.h"
#include "dialogheightmap.h" #include "dialogheightmap.h"
#include "../lib_paysages/scenery.h" #include "rendering/scenery.h"
static TerrainDefinition* _definition; static TerrainDefinition* _definition;

View file

@ -1,6 +1,6 @@
#include "formtextures.h" #include "formtextures.h"
#include "../lib_paysages/scenery.h" #include "rendering/scenery.h"
#include "tools.h" #include "tools.h"
/**************** Previews ****************/ /**************** Previews ****************/

View file

@ -4,7 +4,7 @@
#include <QWidget> #include <QWidget>
#include "basepreview.h" #include "basepreview.h"
#include "baseformlayer.h" #include "baseformlayer.h"
#include "../lib_paysages/textures/public.h" #include "rendering/textures/public.h"
class FormTextures : public BaseFormLayer class FormTextures : public BaseFormLayer
{ {

View file

@ -5,11 +5,11 @@
#include <QSlider> #include <QSlider>
#include <math.h> #include <math.h>
#include "../lib_paysages/tools/euclid.h" #include "rendering/tools/euclid.h"
#include "../lib_paysages/tools/lighting.h" #include "rendering/tools/lighting.h"
#include "../lib_paysages/renderer.h" #include "rendering/renderer.h"
#include "../lib_paysages/scenery.h" #include "rendering/scenery.h"
#include "../lib_paysages/water/public.h" #include "rendering/water/public.h"
#include "tools.h" #include "tools.h"
static WaterDefinition* _definition; static WaterDefinition* _definition;

View file

@ -4,7 +4,7 @@
#include <QWidget> #include <QWidget>
#include "baseinput.h" #include "baseinput.h"
#include "../lib_paysages/camera.h" #include "rendering/camera.h"
class InputCamera:public BaseInput class InputCamera:public BaseInput
{ {

View file

@ -4,7 +4,7 @@
#include <QWidget> #include <QWidget>
#include "baseinput.h" #include "baseinput.h"
#include "../lib_paysages/shared/types.h" #include "rendering/shared/types.h"
class InputColor:public BaseInput class InputColor:public BaseInput
{ {

View file

@ -4,7 +4,7 @@
#include <QWidget> #include <QWidget>
#include "baseinput.h" #include "baseinput.h"
#include "../lib_paysages/tools/color.h" #include "rendering/tools/color.h"
class InputColorGradation:public BaseInput class InputColorGradation:public BaseInput
{ {

View file

@ -4,7 +4,7 @@
#include <QWidget> #include <QWidget>
#include "baseinput.h" #include "baseinput.h"
#include "../lib_paysages/tools/curve.h" #include "rendering/tools/curve.h"
class InputCurve:public BaseInput class InputCurve:public BaseInput
{ {

View file

@ -4,7 +4,7 @@
#include <QWidget> #include <QWidget>
#include "baseinput.h" #include "baseinput.h"
#include "dialoglayers.h" #include "dialoglayers.h"
#include "../lib_paysages/layers.h" #include "rendering/layers.h"
class InputLayers:public BaseInput class InputLayers:public BaseInput
{ {

View file

@ -4,8 +4,8 @@
#include <QWidget> #include <QWidget>
#include "baseinput.h" #include "baseinput.h"
#include "../lib_paysages/shared/types.h" #include "rendering/shared/types.h"
#include "../lib_paysages/tools/lighting.h" #include "rendering/tools/lighting.h"
class InputMaterial:public BaseInput class InputMaterial:public BaseInput
{ {

Some files were not shown because too many files have changed in this diff Show more