diff --git a/TODO b/TODO index 286adc6..671e7c4 100644 --- a/TODO +++ b/TODO @@ -30,6 +30,7 @@ Technology Preview 2 : Technology Preview 3 : - Restore render progress. +- Store the terrain canvases in a tree to allow "multi-res" edition. - Implement High Dynamic Range. - Implement Sub Surface Scattering for water. - Use bicubic interpolation for antialiasing. diff --git a/gui_qt/baseform.cpp b/gui_qt/baseform.cpp index 0bf06c9..718b5ed 100644 --- a/gui_qt/baseform.cpp +++ b/gui_qt/baseform.cpp @@ -112,12 +112,14 @@ BaseForm::BaseForm(QWidget* parent, bool auto_apply, bool with_layers) : QWidget control->layout()->addWidget(_buttons); control->layout()->setAlignment(_buttons, Qt::AlignBottom); - _button_apply = addButton(tr("Apply")); - _button_apply->setEnabled(false); - connect(_button_apply, SIGNAL(clicked()), this, SLOT(applyConfig())); _button_revert = addButton(tr("Revert")); + _button_revert->setIcon(QIcon("images/cancel.png")); _button_revert->setEnabled(false); connect(_button_revert, SIGNAL(clicked()), this, SLOT(revertConfig())); + _button_apply = addButton(tr("Apply")); + _button_apply->setIcon(QIcon("images/apply.png")); + _button_apply->setEnabled(false); + connect(_button_apply, SIGNAL(clicked()), this, SLOT(applyConfig())); _auto_update_previews = true; diff --git a/gui_qt/dialogcurve.cpp b/gui_qt/dialogcurve.cpp index ba71309..ae44fcf 100644 --- a/gui_qt/dialogcurve.cpp +++ b/gui_qt/dialogcurve.cpp @@ -48,17 +48,20 @@ DialogCurve::DialogCurve(QWidget *parent, Curve* curve, double xmin, double xmax layout()->addWidget(buttons); buttons->setLayout(new QHBoxLayout()); - _button_accept = new QPushButton(tr("Validate"), buttons); - buttons->layout()->addWidget(_button_accept); - QObject::connect(_button_accept, SIGNAL(clicked()), this, SLOT(accept())); + _button_cancel = new QPushButton(tr("Cancel"), buttons); + _button_cancel->setIcon(QIcon("images/cancel.png")); + buttons->layout()->addWidget(_button_cancel); + QObject::connect(_button_cancel, SIGNAL(clicked()), this, SLOT(reject())); _button_revert = new QPushButton(tr("Revert"), buttons); + _button_revert->setIcon(QIcon("images/revert.png")); buttons->layout()->addWidget(_button_revert); QObject::connect(_button_revert, SIGNAL(clicked()), this, SLOT(revert())); - _button_cancel = new QPushButton(tr("Cancel"), buttons); - buttons->layout()->addWidget(_button_cancel); - QObject::connect(_button_cancel, SIGNAL(clicked()), this, SLOT(reject())); + _button_accept = new QPushButton(tr("Validate"), buttons); + _button_accept->setIcon(QIcon("images/apply.png")); + buttons->layout()->addWidget(_button_accept); + QObject::connect(_button_accept, SIGNAL(clicked()), this, SLOT(accept())); setWindowTitle(tr("Paysages 3D - Curve editor")); resize(900, 600); diff --git a/gui_qt/dialogheightmap.cpp b/gui_qt/dialogheightmap.cpp index a04e237..313e303 100644 --- a/gui_qt/dialogheightmap.cpp +++ b/gui_qt/dialogheightmap.cpp @@ -120,17 +120,20 @@ DialogHeightMap::DialogHeightMap(QWidget* parent, HeightMap* heightmap, TerrainC slider->setValue(200); // Buttons layout - button = new QPushButton(tr("Validate"), buttons); + button = new QPushButton(tr("Cancel"), buttons); + button->setIcon(QIcon("images/cancel.png")); buttons->layout()->addWidget(button); - QObject::connect(button, SIGNAL(clicked()), this, SLOT(accept())); + QObject::connect(button, SIGNAL(clicked()), this, SLOT(reject())); button = new QPushButton(tr("Revert"), buttons); + button->setIcon(QIcon("images/revert.png")); buttons->layout()->addWidget(button); QObject::connect(button, SIGNAL(clicked()), this, SLOT(revert())); - button = new QPushButton(tr("Cancel"), buttons); + button = new QPushButton(tr("Validate"), buttons); + button->setIcon(QIcon("images/apply.png")); buttons->layout()->addWidget(button); - QObject::connect(button, SIGNAL(clicked()), this, SLOT(reject())); + QObject::connect(button, SIGNAL(clicked()), this, SLOT(accept())); setWindowTitle(tr("Paysages 3D - Height map painting")); } diff --git a/gui_qt/dialoglayers.cpp b/gui_qt/dialoglayers.cpp index fc5cf3f..97d644c 100644 --- a/gui_qt/dialoglayers.cpp +++ b/gui_qt/dialoglayers.cpp @@ -25,17 +25,20 @@ DialogLayers::DialogLayers(QWidget *parent, Layers* layers, QString title, FormL layout()->addWidget(buttons); layout()->setAlignment(buttons, Qt::AlignBottom); - button = new QPushButton(tr("Validate"), buttons); + button = new QPushButton(tr("Cancel"), buttons); + button->setIcon(QIcon("images/cancel.png")); buttons->layout()->addWidget(button); - QObject::connect(button, SIGNAL(clicked()), this, SLOT(accept())); + QObject::connect(button, SIGNAL(clicked()), this, SLOT(reject())); button = new QPushButton(tr("Reset"), buttons); + button->setIcon(QIcon("images/revert.png")); buttons->layout()->addWidget(button); QObject::connect(button, SIGNAL(clicked()), this, SLOT(revert())); - button = new QPushButton(tr("Cancel"), buttons); + button = new QPushButton(tr("Validate"), buttons); + button->setIcon(QIcon("images/apply.png")); buttons->layout()->addWidget(button); - QObject::connect(button, SIGNAL(clicked()), this, SLOT(reject())); + QObject::connect(button, SIGNAL(clicked()), this, SLOT(accept())); setWindowTitle(tr("Paysages 3D - ") + title); } diff --git a/gui_qt/dialogmaterial.cpp b/gui_qt/dialogmaterial.cpp index 38563d2..a336ce8 100644 --- a/gui_qt/dialogmaterial.cpp +++ b/gui_qt/dialogmaterial.cpp @@ -22,17 +22,20 @@ DialogMaterial::DialogMaterial(QWidget *parent, SurfaceMaterial* material) : Dia layout()->addWidget(buttons); layout()->setAlignment(buttons, Qt::AlignBottom); - button = new QPushButton(tr("Validate"), buttons); + button = new QPushButton(tr("Cancel"), buttons); + button->setIcon(QIcon("images/cancel.png")); buttons->layout()->addWidget(button); - QObject::connect(button, SIGNAL(clicked()), this, SLOT(accept())); + QObject::connect(button, SIGNAL(clicked()), this, SLOT(reject())); - button = new QPushButton(tr("Reset"), buttons); + button = new QPushButton(tr("Revert"), buttons); + button->setIcon(QIcon("images/revert.png")); buttons->layout()->addWidget(button); QObject::connect(button, SIGNAL(clicked()), this, SLOT(revert())); - button = new QPushButton(tr("Cancel"), buttons); + button = new QPushButton(tr("Validate"), buttons); + button->setIcon(QIcon("images/apply.png")); buttons->layout()->addWidget(button); - QObject::connect(button, SIGNAL(clicked()), this, SLOT(reject())); + QObject::connect(button, SIGNAL(clicked()), this, SLOT(accept())); setWindowTitle(tr("Paysages 3D - Material editor")); } diff --git a/gui_qt/dialognoise.cpp b/gui_qt/dialognoise.cpp index 6906c57..6ebc2ab 100644 --- a/gui_qt/dialognoise.cpp +++ b/gui_qt/dialognoise.cpp @@ -161,17 +161,20 @@ DialogNoise::DialogNoise(QWidget *parent, NoiseGenerator* value): buttons->setLayout(new QHBoxLayout()); form->layout()->addWidget(buttons); - button = new QPushButton(tr("Validate"), buttons); + button = new QPushButton(tr("Cancel"), buttons); + button->setIcon(QIcon("images/cancel.png")); buttons->layout()->addWidget(button); - QObject::connect(button, SIGNAL(clicked()), this, SLOT(accept())); + QObject::connect(button, SIGNAL(clicked()), this, SLOT(reject())); - button = new QPushButton(tr("Reset"), buttons); + button = new QPushButton(tr("Revert"), buttons); + button->setIcon(QIcon("images/revert.png")); buttons->layout()->addWidget(button); QObject::connect(button, SIGNAL(clicked()), this, SLOT(revert())); - button = new QPushButton(tr("Cancel"), buttons); + button = new QPushButton(tr("Validate"), buttons); + button->setIcon(QIcon("images/apply.png")); buttons->layout()->addWidget(button); - QObject::connect(button, SIGNAL(clicked()), this, SLOT(reject())); + QObject::connect(button, SIGNAL(clicked()), this, SLOT(accept())); setWindowTitle(tr("Paysages 3D - Noise editor")); diff --git a/images/apply.png b/images/apply.png new file mode 100644 index 0000000..58b25f9 Binary files /dev/null and b/images/apply.png differ diff --git a/images/cancel.png b/images/cancel.png new file mode 100644 index 0000000..772b9d2 Binary files /dev/null and b/images/cancel.png differ diff --git a/images/revert.png b/images/revert.png new file mode 100644 index 0000000..18daed4 Binary files /dev/null and b/images/revert.png differ