WIP on new texture form
- Added FreeLayerHelper - Added texture layers table
This commit is contained in:
parent
0a11c7d48a
commit
c8f36643d0
10 changed files with 451 additions and 28 deletions
|
@ -690,15 +690,22 @@ void BasePreview::resizeEvent(QResizeEvent* event)
|
||||||
void BasePreview::paintEvent(QPaintEvent*)
|
void BasePreview::paintEvent(QPaintEvent*)
|
||||||
{
|
{
|
||||||
QPainter painter(this);
|
QPainter painter(this);
|
||||||
painter.drawImage(0, 0, *this->_pixbuf);
|
if (isEnabled())
|
||||||
|
|
||||||
QImage osd(_pixbuf->size(), _pixbuf->format());
|
|
||||||
osd.fill(0x00000000);
|
|
||||||
for (int i = 0; i < _osd.size(); i++)
|
|
||||||
{
|
{
|
||||||
_osd[i]->apply(&osd, xoffset, yoffset, scaling);
|
painter.drawImage(0, 0, *this->_pixbuf);
|
||||||
|
|
||||||
|
QImage osd(_pixbuf->size(), _pixbuf->format());
|
||||||
|
osd.fill(0x00000000);
|
||||||
|
for (int i = 0; i < _osd.size(); i++)
|
||||||
|
{
|
||||||
|
_osd[i]->apply(&osd, xoffset, yoffset, scaling);
|
||||||
|
}
|
||||||
|
painter.drawImage(0, 0, osd);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
painter.fillRect(rect(), QColor(100, 100, 100));
|
||||||
}
|
}
|
||||||
painter.drawImage(0, 0, osd);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void BasePreview::updateScaling()
|
void BasePreview::updateScaling()
|
||||||
|
|
|
@ -149,6 +149,8 @@ void FreeFormHelper::setExploreButton(QPushButton* button)
|
||||||
{
|
{
|
||||||
_button_explore = button;
|
_button_explore = button;
|
||||||
|
|
||||||
|
button->setToolTip(tr("Explore the scenery in 3D, with current changes applied"));
|
||||||
|
|
||||||
connect(button, SIGNAL(clicked()), this, SLOT(processExploreClicked()));
|
connect(button, SIGNAL(clicked()), this, SLOT(processExploreClicked()));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -164,6 +166,8 @@ void FreeFormHelper::setRenderButton(QPushButton* button)
|
||||||
{
|
{
|
||||||
_button_render = button;
|
_button_render = button;
|
||||||
|
|
||||||
|
button->setToolTip(tr("Quick render preview, with current changes applied"));
|
||||||
|
|
||||||
connect(button, SIGNAL(clicked()), this, SLOT(processRenderClicked()));
|
connect(button, SIGNAL(clicked()), this, SLOT(processRenderClicked()));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
117
src/editing/common/freelayerhelper.cpp
Normal file
117
src/editing/common/freelayerhelper.cpp
Normal file
|
@ -0,0 +1,117 @@
|
||||||
|
#include "freelayerhelper.h"
|
||||||
|
|
||||||
|
#include <QTableWidget>
|
||||||
|
#include <QPushButton>
|
||||||
|
|
||||||
|
FreeLayerHelper::FreeLayerHelper(Layers* layers, bool reverse)
|
||||||
|
{
|
||||||
|
_table = NULL;
|
||||||
|
_selected = -1;
|
||||||
|
_layers = layers;
|
||||||
|
_reverse = reverse;
|
||||||
|
}
|
||||||
|
|
||||||
|
FreeLayerHelper::~FreeLayerHelper()
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
void FreeLayerHelper::refreshLayers()
|
||||||
|
{
|
||||||
|
if (_table)
|
||||||
|
{
|
||||||
|
int selected = _selected;
|
||||||
|
|
||||||
|
emit tableUpdateNeeded();
|
||||||
|
|
||||||
|
int n = layersCount(_layers);
|
||||||
|
if (n == 0)
|
||||||
|
{
|
||||||
|
_selected = -1;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (selected < 0)
|
||||||
|
{
|
||||||
|
_table->clearSelection();
|
||||||
|
emit selectionChanged(-1);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
if (selected >= n)
|
||||||
|
{
|
||||||
|
selected = n - 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
_table->setCurrentCell(selected, 0);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
void FreeLayerHelper::setLayerTable(QTableWidget* table)
|
||||||
|
{
|
||||||
|
_table = table;
|
||||||
|
|
||||||
|
connect(table, SIGNAL(currentCellChanged(int, int, int, int)), this, SLOT(tableSelectionChanged(int, int)));
|
||||||
|
|
||||||
|
refreshLayers();
|
||||||
|
}
|
||||||
|
|
||||||
|
void FreeLayerHelper::setAddButton(QPushButton* button)
|
||||||
|
{
|
||||||
|
connect(button, SIGNAL(clicked()), this, SLOT(addLayer()));
|
||||||
|
}
|
||||||
|
|
||||||
|
void FreeLayerHelper::setDelButton(QPushButton* button)
|
||||||
|
{
|
||||||
|
connect(button, SIGNAL(clicked()), this, SLOT(deleteLayer()));
|
||||||
|
}
|
||||||
|
|
||||||
|
void FreeLayerHelper::setDownButton(QPushButton* button)
|
||||||
|
{
|
||||||
|
connect(button, SIGNAL(clicked()), this, SLOT(moveLayerDown()));
|
||||||
|
}
|
||||||
|
|
||||||
|
void FreeLayerHelper::setUpButton(QPushButton* button)
|
||||||
|
{
|
||||||
|
connect(button, SIGNAL(clicked()), this, SLOT(moveLayerUp()));
|
||||||
|
}
|
||||||
|
|
||||||
|
void FreeLayerHelper::addLayer()
|
||||||
|
{
|
||||||
|
_selected = layersAddLayer(_layers, NULL);
|
||||||
|
emit(layersChanged());
|
||||||
|
refreshLayers();
|
||||||
|
}
|
||||||
|
|
||||||
|
void FreeLayerHelper::deleteLayer()
|
||||||
|
{
|
||||||
|
if (_selected >= 0)
|
||||||
|
{
|
||||||
|
layersDeleteLayer(_layers, _selected);
|
||||||
|
emit(layersChanged());
|
||||||
|
}
|
||||||
|
refreshLayers();
|
||||||
|
}
|
||||||
|
|
||||||
|
void FreeLayerHelper::moveLayerDown()
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
void FreeLayerHelper::moveLayerUp()
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
void FreeLayerHelper::tableSelectionChanged(int row, int)
|
||||||
|
{
|
||||||
|
int n = layersCount(_layers);
|
||||||
|
|
||||||
|
if (n == 0 or row >= n)
|
||||||
|
{
|
||||||
|
_selected = -1;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
_selected = _reverse ? n - 1 - row : row;
|
||||||
|
}
|
||||||
|
|
||||||
|
emit(selectionChanged(_selected));
|
||||||
|
}
|
44
src/editing/common/freelayerhelper.h
Normal file
44
src/editing/common/freelayerhelper.h
Normal file
|
@ -0,0 +1,44 @@
|
||||||
|
#ifndef _EDITING_COMMON_FREELAYERHELPER_H_
|
||||||
|
#define _EDITING_COMMON_FREELAYERHELPER_H_
|
||||||
|
|
||||||
|
#include <QObject>
|
||||||
|
#include "rendering/layers.h"
|
||||||
|
|
||||||
|
class QTableWidget;
|
||||||
|
class QPushButton;
|
||||||
|
|
||||||
|
class FreeLayerHelper : public QObject {
|
||||||
|
Q_OBJECT
|
||||||
|
|
||||||
|
public:
|
||||||
|
FreeLayerHelper(Layers* layers, bool reverse=false);
|
||||||
|
~FreeLayerHelper();
|
||||||
|
|
||||||
|
void refreshLayers();
|
||||||
|
void setLayerTable(QTableWidget* table);
|
||||||
|
void setAddButton(QPushButton* button);
|
||||||
|
void setDelButton(QPushButton* button);
|
||||||
|
void setDownButton(QPushButton* button);
|
||||||
|
void setUpButton(QPushButton* button);
|
||||||
|
|
||||||
|
signals:
|
||||||
|
void selectionChanged(int layer);
|
||||||
|
void layersChanged();
|
||||||
|
void tableUpdateNeeded();
|
||||||
|
|
||||||
|
public slots:
|
||||||
|
void addLayer();
|
||||||
|
void deleteLayer();
|
||||||
|
void moveLayerDown();
|
||||||
|
void moveLayerUp();
|
||||||
|
void tableSelectionChanged(int row, int col);
|
||||||
|
|
||||||
|
private:
|
||||||
|
QTableWidget* _table;
|
||||||
|
Layers* _layers;
|
||||||
|
int _selected;
|
||||||
|
bool _reverse;
|
||||||
|
};
|
||||||
|
|
||||||
|
#endif
|
||||||
|
|
|
@ -124,9 +124,9 @@ MainWindow::MainWindow() :
|
||||||
ui->tabs->setCurrentIndex(0);
|
ui->tabs->setCurrentIndex(0);
|
||||||
|
|
||||||
// TODO Decide this according to platform / screen size
|
// TODO Decide this according to platform / screen size
|
||||||
//ui->toolBar->hide();
|
ui->toolBar->hide();
|
||||||
ui->tool_panel->hide();
|
ui->tool_panel->hide();
|
||||||
ui->menuBar->hide();
|
//ui->menuBar->hide();
|
||||||
|
|
||||||
scenerySetCustomDataCallback(MainWindow::guiSaveCallback, MainWindow::guiLoadCallback, this);
|
scenerySetCustomDataCallback(MainWindow::guiSaveCallback, MainWindow::guiLoadCallback, this);
|
||||||
|
|
||||||
|
|
|
@ -72,7 +72,8 @@ HEADERS += \
|
||||||
terrain/widgetterrainbasenoisepreview.h \
|
terrain/widgetterrainbasenoisepreview.h \
|
||||||
common/mainwindow.h \
|
common/mainwindow.h \
|
||||||
terrain/dialogbaseterrainnoise.h \
|
terrain/dialogbaseterrainnoise.h \
|
||||||
textures/maintexturesform.h
|
textures/maintexturesform.h \
|
||||||
|
common/freelayerhelper.h
|
||||||
|
|
||||||
SOURCES += \
|
SOURCES += \
|
||||||
terrain/widgetheightmap.cpp \
|
terrain/widgetheightmap.cpp \
|
||||||
|
@ -124,7 +125,8 @@ SOURCES += \
|
||||||
terrain/widgetterrainbasenoisepreview.cpp \
|
terrain/widgetterrainbasenoisepreview.cpp \
|
||||||
common/mainwindow.cpp \
|
common/mainwindow.cpp \
|
||||||
terrain/dialogbaseterrainnoise.cpp \
|
terrain/dialogbaseterrainnoise.cpp \
|
||||||
textures/maintexturesform.cpp
|
textures/maintexturesform.cpp \
|
||||||
|
common/freelayerhelper.cpp
|
||||||
|
|
||||||
FORMS += \
|
FORMS += \
|
||||||
terrain/dialogterrainpainting.ui \
|
terrain/dialogterrainpainting.ui \
|
||||||
|
|
|
@ -74,6 +74,19 @@
|
||||||
</layout>
|
</layout>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
|
<item>
|
||||||
|
<spacer name="verticalSpacer_2">
|
||||||
|
<property name="orientation">
|
||||||
|
<enum>Qt::Vertical</enum>
|
||||||
|
</property>
|
||||||
|
<property name="sizeHint" stdset="0">
|
||||||
|
<size>
|
||||||
|
<width>20</width>
|
||||||
|
<height>40</height>
|
||||||
|
</size>
|
||||||
|
</property>
|
||||||
|
</spacer>
|
||||||
|
</item>
|
||||||
<item>
|
<item>
|
||||||
<widget class="QGroupBox" name="groupBox_3">
|
<widget class="QGroupBox" name="groupBox_3">
|
||||||
<property name="title">
|
<property name="title">
|
||||||
|
@ -116,6 +129,19 @@
|
||||||
</layout>
|
</layout>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
|
<item>
|
||||||
|
<spacer name="verticalSpacer_3">
|
||||||
|
<property name="orientation">
|
||||||
|
<enum>Qt::Vertical</enum>
|
||||||
|
</property>
|
||||||
|
<property name="sizeHint" stdset="0">
|
||||||
|
<size>
|
||||||
|
<width>20</width>
|
||||||
|
<height>40</height>
|
||||||
|
</size>
|
||||||
|
</property>
|
||||||
|
</spacer>
|
||||||
|
</item>
|
||||||
<item>
|
<item>
|
||||||
<widget class="QGroupBox" name="groupBox_1">
|
<widget class="QGroupBox" name="groupBox_1">
|
||||||
<property name="title">
|
<property name="title">
|
||||||
|
@ -185,6 +211,19 @@
|
||||||
</layout>
|
</layout>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
|
<item>
|
||||||
|
<spacer name="verticalSpacer_4">
|
||||||
|
<property name="orientation">
|
||||||
|
<enum>Qt::Vertical</enum>
|
||||||
|
</property>
|
||||||
|
<property name="sizeHint" stdset="0">
|
||||||
|
<size>
|
||||||
|
<width>20</width>
|
||||||
|
<height>40</height>
|
||||||
|
</size>
|
||||||
|
</property>
|
||||||
|
</spacer>
|
||||||
|
</item>
|
||||||
<item>
|
<item>
|
||||||
<widget class="QGroupBox" name="groupBox_6">
|
<widget class="QGroupBox" name="groupBox_6">
|
||||||
<property name="title">
|
<property name="title">
|
||||||
|
@ -224,6 +263,19 @@
|
||||||
</layout>
|
</layout>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
|
<item>
|
||||||
|
<spacer name="verticalSpacer_5">
|
||||||
|
<property name="orientation">
|
||||||
|
<enum>Qt::Vertical</enum>
|
||||||
|
</property>
|
||||||
|
<property name="sizeHint" stdset="0">
|
||||||
|
<size>
|
||||||
|
<width>20</width>
|
||||||
|
<height>40</height>
|
||||||
|
</size>
|
||||||
|
</property>
|
||||||
|
</spacer>
|
||||||
|
</item>
|
||||||
<item>
|
<item>
|
||||||
<widget class="QGroupBox" name="groupBox_7">
|
<widget class="QGroupBox" name="groupBox_7">
|
||||||
<property name="title">
|
<property name="title">
|
||||||
|
@ -329,6 +381,19 @@
|
||||||
</layout>
|
</layout>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
|
<item>
|
||||||
|
<spacer name="verticalSpacer_6">
|
||||||
|
<property name="orientation">
|
||||||
|
<enum>Qt::Vertical</enum>
|
||||||
|
</property>
|
||||||
|
<property name="sizeHint" stdset="0">
|
||||||
|
<size>
|
||||||
|
<width>20</width>
|
||||||
|
<height>40</height>
|
||||||
|
</size>
|
||||||
|
</property>
|
||||||
|
</spacer>
|
||||||
|
</item>
|
||||||
</layout>
|
</layout>
|
||||||
</item>
|
</item>
|
||||||
<item>
|
<item>
|
||||||
|
|
|
@ -1,14 +1,106 @@
|
||||||
#include "maintexturesform.h"
|
#include "maintexturesform.h"
|
||||||
#include "ui_maintexturesform.h"
|
#include "ui_maintexturesform.h"
|
||||||
|
|
||||||
MainTexturesForm::MainTexturesForm(QWidget *parent) :
|
#include "../common/freeformhelper.h"
|
||||||
QWidget(parent),
|
#include "../common/freelayerhelper.h"
|
||||||
ui(new Ui::MainTexturesForm)
|
#include "rendering/scenery.h"
|
||||||
|
#include "previewmaterial.h"
|
||||||
|
|
||||||
|
MainTexturesForm::MainTexturesForm(QWidget *parent) : QWidget(parent), ui(new Ui::MainTexturesForm)
|
||||||
{
|
{
|
||||||
|
textures = (TexturesDefinition*) TexturesDefinitionClass.create();
|
||||||
|
|
||||||
ui->setupUi(this);
|
ui->setupUi(this);
|
||||||
|
|
||||||
|
form_helper = new FreeFormHelper(this);
|
||||||
|
form_helper->setApplyButton(ui->button_apply);
|
||||||
|
form_helper->setRevertButton(ui->button_revert);
|
||||||
|
form_helper->setExploreButton(ui->button_explore);
|
||||||
|
form_helper->setRenderButton(ui->button_render);
|
||||||
|
form_helper->startManaging();
|
||||||
|
|
||||||
|
layer_helper = new FreeLayerHelper(textures->layers, true);
|
||||||
|
layer_helper->setLayerTable(ui->layersGrid);
|
||||||
|
layer_helper->setAddButton(ui->layer_add);
|
||||||
|
layer_helper->setDelButton(ui->layer_del);
|
||||||
|
layer_helper->setDownButton(ui->layer_down);
|
||||||
|
layer_helper->setUpButton(ui->layer_up);
|
||||||
|
connect(layer_helper, SIGNAL(tableUpdateNeeded()), this, SLOT(updateLayers()));
|
||||||
|
connect(layer_helper, SIGNAL(layersChanged()), form_helper, SLOT(processDataChange()));
|
||||||
|
connect(layer_helper, SIGNAL(selectionChanged(int)), this, SLOT(selectLayer(int)));
|
||||||
}
|
}
|
||||||
|
|
||||||
MainTexturesForm::~MainTexturesForm()
|
MainTexturesForm::~MainTexturesForm()
|
||||||
{
|
{
|
||||||
delete ui;
|
delete ui;
|
||||||
|
delete form_helper;
|
||||||
|
delete layer_helper;
|
||||||
|
}
|
||||||
|
|
||||||
|
void MainTexturesForm::updateLayers()
|
||||||
|
{
|
||||||
|
int i, n;
|
||||||
|
|
||||||
|
ui->layersGrid->clearContents();
|
||||||
|
|
||||||
|
n = layersCount(textures->layers);
|
||||||
|
ui->layersGrid->setRowCount(n);
|
||||||
|
|
||||||
|
for (i = 0; i < n; i++)
|
||||||
|
{
|
||||||
|
QTableWidgetItem* item;
|
||||||
|
TexturesLayerDefinition* layer = (TexturesLayerDefinition*) layersGetLayer(textures->layers, i);
|
||||||
|
|
||||||
|
item = new QTableWidgetItem(QString("%1").arg(i + 1));
|
||||||
|
item->setFlags(Qt::ItemIsSelectable | Qt::ItemIsEnabled);
|
||||||
|
ui->layersGrid->setItem(n - 1 - i, 0, item);
|
||||||
|
|
||||||
|
item = new QTableWidgetItem(QString(layersGetName(textures->layers, i)));
|
||||||
|
item->setFlags(Qt::ItemIsSelectable | Qt::ItemIsEnabled);
|
||||||
|
ui->layersGrid->setItem(n - 1 - i, 1, item);
|
||||||
|
|
||||||
|
ui->layersGrid->setCellWidget(n - 1 - i, 2, new SmallMaterialPreview(ui->layersGrid, &layer->material));
|
||||||
|
}
|
||||||
|
|
||||||
|
ui->preview_cumul->setEnabled(n > 0);
|
||||||
|
|
||||||
|
ui->layersGrid->resizeColumnsToContents();
|
||||||
|
}
|
||||||
|
|
||||||
|
void MainTexturesForm::selectLayer(int layer)
|
||||||
|
{
|
||||||
|
if (layer < 0)
|
||||||
|
{
|
||||||
|
ui->preview_coverage->setEnabled(false);
|
||||||
|
ui->preview_texture->setEnabled(false);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
ui->preview_coverage->setEnabled(true);
|
||||||
|
ui->preview_texture->setEnabled(true);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
void MainTexturesForm::updateLocalDataFromScenery()
|
||||||
|
{
|
||||||
|
sceneryGetTextures(textures);
|
||||||
|
}
|
||||||
|
|
||||||
|
void MainTexturesForm::commitLocalDataToScenery()
|
||||||
|
{
|
||||||
|
scenerySetTextures(textures);
|
||||||
|
}
|
||||||
|
|
||||||
|
void MainTexturesForm::refreshFromLocalData()
|
||||||
|
{
|
||||||
|
layer_helper->refreshLayers();
|
||||||
|
}
|
||||||
|
|
||||||
|
void MainTexturesForm::refreshFromFellowData()
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
void MainTexturesForm::alterRenderer(Renderer* renderer)
|
||||||
|
{
|
||||||
|
TexturesRendererClass.bind(renderer, textures);
|
||||||
}
|
}
|
||||||
|
|
|
@ -2,21 +2,38 @@
|
||||||
#define MAINTEXTURESFORM_H
|
#define MAINTEXTURESFORM_H
|
||||||
|
|
||||||
#include <QWidget>
|
#include <QWidget>
|
||||||
|
#include "rendering/textures/public.h"
|
||||||
|
|
||||||
namespace Ui {
|
namespace Ui {
|
||||||
class MainTexturesForm;
|
class MainTexturesForm;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
class FreeFormHelper;
|
||||||
|
class FreeLayerHelper;
|
||||||
|
|
||||||
class MainTexturesForm : public QWidget
|
class MainTexturesForm : public QWidget
|
||||||
{
|
{
|
||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
|
|
||||||
public:
|
public:
|
||||||
explicit MainTexturesForm(QWidget *parent = 0);
|
explicit MainTexturesForm(QWidget *parent = 0);
|
||||||
~MainTexturesForm();
|
~MainTexturesForm();
|
||||||
|
|
||||||
|
public slots:
|
||||||
|
void updateLocalDataFromScenery();
|
||||||
|
void commitLocalDataToScenery();
|
||||||
|
void refreshFromLocalData();
|
||||||
|
void refreshFromFellowData();
|
||||||
|
void alterRenderer(Renderer* renderer);
|
||||||
|
|
||||||
|
void updateLayers();
|
||||||
|
void selectLayer(int layer);
|
||||||
|
|
||||||
private:
|
private:
|
||||||
Ui::MainTexturesForm *ui;
|
Ui::MainTexturesForm *ui;
|
||||||
|
TexturesDefinition* textures;
|
||||||
|
FreeFormHelper* form_helper;
|
||||||
|
FreeLayerHelper* layer_helper;
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif // MAINTEXTURESFORM_H
|
#endif // MAINTEXTURESFORM_H
|
||||||
|
|
|
@ -6,8 +6,8 @@
|
||||||
<rect>
|
<rect>
|
||||||
<x>0</x>
|
<x>0</x>
|
||||||
<y>0</y>
|
<y>0</y>
|
||||||
<width>1008</width>
|
<width>997</width>
|
||||||
<height>664</height>
|
<height>742</height>
|
||||||
</rect>
|
</rect>
|
||||||
</property>
|
</property>
|
||||||
<property name="windowTitle">
|
<property name="windowTitle">
|
||||||
|
@ -46,7 +46,43 @@
|
||||||
<item>
|
<item>
|
||||||
<layout class="QHBoxLayout" name="horizontalLayout_2">
|
<layout class="QHBoxLayout" name="horizontalLayout_2">
|
||||||
<item>
|
<item>
|
||||||
<widget class="QTableView" name="tableView"/>
|
<widget class="QTableWidget" name="layersGrid">
|
||||||
|
<property name="editTriggers">
|
||||||
|
<set>QAbstractItemView::NoEditTriggers</set>
|
||||||
|
</property>
|
||||||
|
<property name="selectionMode">
|
||||||
|
<enum>QAbstractItemView::SingleSelection</enum>
|
||||||
|
</property>
|
||||||
|
<property name="selectionBehavior">
|
||||||
|
<enum>QAbstractItemView::SelectRows</enum>
|
||||||
|
</property>
|
||||||
|
<attribute name="horizontalHeaderHighlightSections">
|
||||||
|
<bool>false</bool>
|
||||||
|
</attribute>
|
||||||
|
<attribute name="verticalHeaderVisible">
|
||||||
|
<bool>false</bool>
|
||||||
|
</attribute>
|
||||||
|
<column>
|
||||||
|
<property name="text">
|
||||||
|
<string>Level</string>
|
||||||
|
</property>
|
||||||
|
</column>
|
||||||
|
<column>
|
||||||
|
<property name="text">
|
||||||
|
<string>Name</string>
|
||||||
|
</property>
|
||||||
|
</column>
|
||||||
|
<column>
|
||||||
|
<property name="text">
|
||||||
|
<string>Material</string>
|
||||||
|
</property>
|
||||||
|
</column>
|
||||||
|
<column>
|
||||||
|
<property name="text">
|
||||||
|
<string>Modify terrain</string>
|
||||||
|
</property>
|
||||||
|
</column>
|
||||||
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item>
|
<item>
|
||||||
<layout class="QVBoxLayout" name="verticalLayout_3">
|
<layout class="QVBoxLayout" name="verticalLayout_3">
|
||||||
|
@ -64,7 +100,7 @@
|
||||||
</spacer>
|
</spacer>
|
||||||
</item>
|
</item>
|
||||||
<item>
|
<item>
|
||||||
<widget class="QPushButton" name="pushButton">
|
<widget class="QPushButton" name="layer_add">
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string>Add layer</string>
|
<string>Add layer</string>
|
||||||
</property>
|
</property>
|
||||||
|
@ -72,10 +108,19 @@
|
||||||
<iconset resource="../../../data/ui_pictures.qrc">
|
<iconset resource="../../../data/ui_pictures.qrc">
|
||||||
<normaloff>:/buttons/logo/images/layer_add.png</normaloff>:/buttons/logo/images/layer_add.png</iconset>
|
<normaloff>:/buttons/logo/images/layer_add.png</normaloff>:/buttons/logo/images/layer_add.png</iconset>
|
||||||
</property>
|
</property>
|
||||||
|
<property name="iconSize">
|
||||||
|
<size>
|
||||||
|
<width>32</width>
|
||||||
|
<height>32</height>
|
||||||
|
</size>
|
||||||
|
</property>
|
||||||
|
<property name="flat">
|
||||||
|
<bool>false</bool>
|
||||||
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item>
|
<item>
|
||||||
<widget class="QPushButton" name="pushButton_2">
|
<widget class="QPushButton" name="layer_del">
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string>Remove layer</string>
|
<string>Remove layer</string>
|
||||||
</property>
|
</property>
|
||||||
|
@ -83,6 +128,12 @@
|
||||||
<iconset resource="../../../data/ui_pictures.qrc">
|
<iconset resource="../../../data/ui_pictures.qrc">
|
||||||
<normaloff>:/buttons/logo/images/layer_del.png</normaloff>:/buttons/logo/images/layer_del.png</iconset>
|
<normaloff>:/buttons/logo/images/layer_del.png</normaloff>:/buttons/logo/images/layer_del.png</iconset>
|
||||||
</property>
|
</property>
|
||||||
|
<property name="iconSize">
|
||||||
|
<size>
|
||||||
|
<width>32</width>
|
||||||
|
<height>32</height>
|
||||||
|
</size>
|
||||||
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item>
|
<item>
|
||||||
|
@ -90,6 +141,9 @@
|
||||||
<property name="orientation">
|
<property name="orientation">
|
||||||
<enum>Qt::Vertical</enum>
|
<enum>Qt::Vertical</enum>
|
||||||
</property>
|
</property>
|
||||||
|
<property name="sizeType">
|
||||||
|
<enum>QSizePolicy::MinimumExpanding</enum>
|
||||||
|
</property>
|
||||||
<property name="sizeHint" stdset="0">
|
<property name="sizeHint" stdset="0">
|
||||||
<size>
|
<size>
|
||||||
<width>20</width>
|
<width>20</width>
|
||||||
|
@ -99,14 +153,20 @@
|
||||||
</spacer>
|
</spacer>
|
||||||
</item>
|
</item>
|
||||||
<item>
|
<item>
|
||||||
<widget class="QPushButton" name="pushButton_3">
|
<widget class="QPushButton" name="layer_edit">
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string>Rename layer</string>
|
<string>Edit layer</string>
|
||||||
</property>
|
</property>
|
||||||
<property name="icon">
|
<property name="icon">
|
||||||
<iconset resource="../../../data/ui_pictures.qrc">
|
<iconset resource="../../../data/ui_pictures.qrc">
|
||||||
<normaloff>:/buttons/logo/images/layer_rename.png</normaloff>:/buttons/logo/images/layer_rename.png</iconset>
|
<normaloff>:/buttons/logo/images/layer_rename.png</normaloff>:/buttons/logo/images/layer_rename.png</iconset>
|
||||||
</property>
|
</property>
|
||||||
|
<property name="iconSize">
|
||||||
|
<size>
|
||||||
|
<width>32</width>
|
||||||
|
<height>32</height>
|
||||||
|
</size>
|
||||||
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item>
|
<item>
|
||||||
|
@ -114,6 +174,9 @@
|
||||||
<property name="orientation">
|
<property name="orientation">
|
||||||
<enum>Qt::Vertical</enum>
|
<enum>Qt::Vertical</enum>
|
||||||
</property>
|
</property>
|
||||||
|
<property name="sizeType">
|
||||||
|
<enum>QSizePolicy::MinimumExpanding</enum>
|
||||||
|
</property>
|
||||||
<property name="sizeHint" stdset="0">
|
<property name="sizeHint" stdset="0">
|
||||||
<size>
|
<size>
|
||||||
<width>20</width>
|
<width>20</width>
|
||||||
|
@ -123,7 +186,7 @@
|
||||||
</spacer>
|
</spacer>
|
||||||
</item>
|
</item>
|
||||||
<item>
|
<item>
|
||||||
<widget class="QPushButton" name="pushButton_5">
|
<widget class="QPushButton" name="layer_down">
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string>Move layer down</string>
|
<string>Move layer down</string>
|
||||||
</property>
|
</property>
|
||||||
|
@ -131,10 +194,16 @@
|
||||||
<iconset resource="../../../data/ui_pictures.qrc">
|
<iconset resource="../../../data/ui_pictures.qrc">
|
||||||
<normaloff>:/buttons/logo/images/layer_down.png</normaloff>:/buttons/logo/images/layer_down.png</iconset>
|
<normaloff>:/buttons/logo/images/layer_down.png</normaloff>:/buttons/logo/images/layer_down.png</iconset>
|
||||||
</property>
|
</property>
|
||||||
|
<property name="iconSize">
|
||||||
|
<size>
|
||||||
|
<width>32</width>
|
||||||
|
<height>32</height>
|
||||||
|
</size>
|
||||||
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item>
|
<item>
|
||||||
<widget class="QPushButton" name="pushButton_4">
|
<widget class="QPushButton" name="layer_up">
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string>Move layer up</string>
|
<string>Move layer up</string>
|
||||||
</property>
|
</property>
|
||||||
|
@ -142,6 +211,12 @@
|
||||||
<iconset resource="../../../data/ui_pictures.qrc">
|
<iconset resource="../../../data/ui_pictures.qrc">
|
||||||
<normaloff>:/buttons/logo/images/layer_up.png</normaloff>:/buttons/logo/images/layer_up.png</iconset>
|
<normaloff>:/buttons/logo/images/layer_up.png</normaloff>:/buttons/logo/images/layer_up.png</iconset>
|
||||||
</property>
|
</property>
|
||||||
|
<property name="iconSize">
|
||||||
|
<size>
|
||||||
|
<width>32</width>
|
||||||
|
<height>32</height>
|
||||||
|
</size>
|
||||||
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item>
|
<item>
|
||||||
|
@ -171,7 +246,7 @@
|
||||||
</property>
|
</property>
|
||||||
<layout class="QGridLayout" name="gridLayout">
|
<layout class="QGridLayout" name="gridLayout">
|
||||||
<item row="2" column="1">
|
<item row="2" column="1">
|
||||||
<widget class="BasePreview" name="preview_shape_6" native="true">
|
<widget class="BasePreview" name="preview_texture" native="true">
|
||||||
<property name="sizePolicy">
|
<property name="sizePolicy">
|
||||||
<sizepolicy hsizetype="Fixed" vsizetype="Fixed">
|
<sizepolicy hsizetype="Fixed" vsizetype="Fixed">
|
||||||
<horstretch>0</horstretch>
|
<horstretch>0</horstretch>
|
||||||
|
@ -203,7 +278,7 @@
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item row="2" column="0">
|
<item row="2" column="0">
|
||||||
<widget class="BasePreview" name="preview_shape_2" native="true">
|
<widget class="BasePreview" name="preview_coverage" native="true">
|
||||||
<property name="sizePolicy">
|
<property name="sizePolicy">
|
||||||
<sizepolicy hsizetype="Fixed" vsizetype="Fixed">
|
<sizepolicy hsizetype="Fixed" vsizetype="Fixed">
|
||||||
<horstretch>0</horstretch>
|
<horstretch>0</horstretch>
|
||||||
|
@ -258,7 +333,7 @@
|
||||||
</property>
|
</property>
|
||||||
<layout class="QVBoxLayout" name="verticalLayout_4">
|
<layout class="QVBoxLayout" name="verticalLayout_4">
|
||||||
<item>
|
<item>
|
||||||
<widget class="BasePreview" name="preview_shape" native="true">
|
<widget class="BasePreview" name="preview_cumul" native="true">
|
||||||
<property name="sizePolicy">
|
<property name="sizePolicy">
|
||||||
<sizepolicy hsizetype="Fixed" vsizetype="Fixed">
|
<sizepolicy hsizetype="Fixed" vsizetype="Fixed">
|
||||||
<horstretch>0</horstretch>
|
<horstretch>0</horstretch>
|
||||||
|
|
Loading…
Reference in a new issue