Started work on new textures interface
This commit is contained in:
parent
300f53121e
commit
039e4bb3cb
7 changed files with 438 additions and 11 deletions
|
@ -9,6 +9,11 @@
|
|||
<file>images/load.png</file>
|
||||
<file>images/new.png</file>
|
||||
<file>images/save.png</file>
|
||||
<file>images/layer_add.png</file>
|
||||
<file>images/layer_del.png</file>
|
||||
<file>images/layer_down.png</file>
|
||||
<file>images/layer_rename.png</file>
|
||||
<file>images/layer_up.png</file>
|
||||
</qresource>
|
||||
<qresource prefix="/tabs">
|
||||
<file>images/tab_atmosphere.png</file>
|
||||
|
|
|
@ -135,8 +135,6 @@
|
|||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
<zorder>widget</zorder>
|
||||
<zorder>widget</zorder>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
|
@ -260,7 +258,7 @@
|
|||
<item>
|
||||
<widget class="QTabWidget" name="tabs">
|
||||
<property name="currentIndex">
|
||||
<number>0</number>
|
||||
<number>1</number>
|
||||
</property>
|
||||
<property name="iconSize">
|
||||
<size>
|
||||
|
@ -277,6 +275,15 @@
|
|||
<string>Lanscape shape</string>
|
||||
</attribute>
|
||||
</widget>
|
||||
<widget class="MainTexturesForm" name="tab">
|
||||
<attribute name="icon">
|
||||
<iconset resource="../../../data/ui_pictures.qrc">
|
||||
<normaloff>:/tabs/images/tab_textures.png</normaloff>:/tabs/images/tab_textures.png</iconset>
|
||||
</attribute>
|
||||
<attribute name="title">
|
||||
<string>Textures</string>
|
||||
</attribute>
|
||||
</widget>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
|
@ -483,6 +490,12 @@
|
|||
<header>terrain/mainterrainform.h</header>
|
||||
<container>1</container>
|
||||
</customwidget>
|
||||
<customwidget>
|
||||
<class>MainTexturesForm</class>
|
||||
<extends>QWidget</extends>
|
||||
<header>textures/maintexturesform.h</header>
|
||||
<container>1</container>
|
||||
</customwidget>
|
||||
</customwidgets>
|
||||
<resources>
|
||||
<include location="../../../data/ui_pictures.qrc"/>
|
||||
|
@ -515,8 +528,8 @@
|
|||
<y>425</y>
|
||||
</hint>
|
||||
<hint type="destinationlabel">
|
||||
<x>213</x>
|
||||
<y>425</y>
|
||||
<x>-1</x>
|
||||
<y>-1</y>
|
||||
</hint>
|
||||
</hints>
|
||||
</connection>
|
||||
|
|
|
@ -71,7 +71,8 @@ HEADERS += \
|
|||
common/previewrenderer.h \
|
||||
terrain/widgetterrainbasenoisepreview.h \
|
||||
common/mainwindow.h \
|
||||
terrain/dialogbaseterrainnoise.h
|
||||
terrain/dialogbaseterrainnoise.h \
|
||||
textures/maintexturesform.h
|
||||
|
||||
SOURCES += \
|
||||
terrain/widgetheightmap.cpp \
|
||||
|
@ -122,14 +123,16 @@ SOURCES += \
|
|||
common/previewrenderer.cpp \
|
||||
terrain/widgetterrainbasenoisepreview.cpp \
|
||||
common/mainwindow.cpp \
|
||||
terrain/dialogbaseterrainnoise.cpp
|
||||
terrain/dialogbaseterrainnoise.cpp \
|
||||
textures/maintexturesform.cpp
|
||||
|
||||
FORMS += \
|
||||
terrain/dialogterrainpainting.ui \
|
||||
common/widgetglobalformbuttons.ui \
|
||||
terrain/mainterrainform.ui \
|
||||
common/mainwindow.ui \
|
||||
terrain/dialogbaseterrainnoise.ui
|
||||
terrain/dialogbaseterrainnoise.ui \
|
||||
textures/maintexturesform.ui
|
||||
|
||||
RESOURCES += \
|
||||
../../data/ui_pictures.qrc
|
||||
|
|
|
@ -6,8 +6,8 @@
|
|||
<rect>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>1079</width>
|
||||
<height>720</height>
|
||||
<width>1181</width>
|
||||
<height>693</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="windowTitle">
|
||||
|
@ -293,7 +293,7 @@
|
|||
</size>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Go to textures to add small height displacements (rocks...)</string>
|
||||
<string>Go to textures to add relief effect (rocks...)</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
|
|
14
src/editing/textures/maintexturesform.cpp
Normal file
14
src/editing/textures/maintexturesform.cpp
Normal file
|
@ -0,0 +1,14 @@
|
|||
#include "maintexturesform.h"
|
||||
#include "ui_maintexturesform.h"
|
||||
|
||||
MainTexturesForm::MainTexturesForm(QWidget *parent) :
|
||||
QWidget(parent),
|
||||
ui(new Ui::MainTexturesForm)
|
||||
{
|
||||
ui->setupUi(this);
|
||||
}
|
||||
|
||||
MainTexturesForm::~MainTexturesForm()
|
||||
{
|
||||
delete ui;
|
||||
}
|
22
src/editing/textures/maintexturesform.h
Normal file
22
src/editing/textures/maintexturesform.h
Normal file
|
@ -0,0 +1,22 @@
|
|||
#ifndef MAINTEXTURESFORM_H
|
||||
#define MAINTEXTURESFORM_H
|
||||
|
||||
#include <QWidget>
|
||||
|
||||
namespace Ui {
|
||||
class MainTexturesForm;
|
||||
}
|
||||
|
||||
class MainTexturesForm : public QWidget
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
explicit MainTexturesForm(QWidget *parent = 0);
|
||||
~MainTexturesForm();
|
||||
|
||||
private:
|
||||
Ui::MainTexturesForm *ui;
|
||||
};
|
||||
|
||||
#endif // MAINTEXTURESFORM_H
|
370
src/editing/textures/maintexturesform.ui
Normal file
370
src/editing/textures/maintexturesform.ui
Normal file
|
@ -0,0 +1,370 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<ui version="4.0">
|
||||
<class>MainTexturesForm</class>
|
||||
<widget class="QWidget" name="MainTexturesForm">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>1008</width>
|
||||
<height>664</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="windowTitle">
|
||||
<string>Form</string>
|
||||
</property>
|
||||
<layout class="QHBoxLayout" name="horizontalLayout">
|
||||
<item>
|
||||
<layout class="QVBoxLayout" name="verticalLayout">
|
||||
<item>
|
||||
<widget class="QGroupBox" name="groupBox_2">
|
||||
<property name="title">
|
||||
<string>Texture layers</string>
|
||||
</property>
|
||||
<property name="flat">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
<layout class="QVBoxLayout" name="verticalLayout_6">
|
||||
<item>
|
||||
<widget class="QLabel" name="label_6">
|
||||
<property name="font">
|
||||
<font>
|
||||
<italic>true</italic>
|
||||
</font>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>These are the layers of textures that control the ground details. Each texture has two effects : a relief effect to add better definition to the base terrain shape, and a detail effect for close views.</string>
|
||||
</property>
|
||||
<property name="textFormat">
|
||||
<enum>Qt::AutoText</enum>
|
||||
</property>
|
||||
<property name="wordWrap">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<layout class="QHBoxLayout" name="horizontalLayout_2">
|
||||
<item>
|
||||
<widget class="QTableView" name="tableView"/>
|
||||
</item>
|
||||
<item>
|
||||
<layout class="QVBoxLayout" name="verticalLayout_3">
|
||||
<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>
|
||||
<widget class="QPushButton" name="pushButton">
|
||||
<property name="text">
|
||||
<string>Add layer</string>
|
||||
</property>
|
||||
<property name="icon">
|
||||
<iconset resource="../../../data/ui_pictures.qrc">
|
||||
<normaloff>:/buttons/logo/images/layer_add.png</normaloff>:/buttons/logo/images/layer_add.png</iconset>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QPushButton" name="pushButton_2">
|
||||
<property name="text">
|
||||
<string>Remove layer</string>
|
||||
</property>
|
||||
<property name="icon">
|
||||
<iconset resource="../../../data/ui_pictures.qrc">
|
||||
<normaloff>:/buttons/logo/images/layer_del.png</normaloff>:/buttons/logo/images/layer_del.png</iconset>
|
||||
</property>
|
||||
</widget>
|
||||
</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>
|
||||
<widget class="QPushButton" name="pushButton_3">
|
||||
<property name="text">
|
||||
<string>Rename layer</string>
|
||||
</property>
|
||||
<property name="icon">
|
||||
<iconset resource="../../../data/ui_pictures.qrc">
|
||||
<normaloff>:/buttons/logo/images/layer_rename.png</normaloff>:/buttons/logo/images/layer_rename.png</iconset>
|
||||
</property>
|
||||
</widget>
|
||||
</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>
|
||||
<widget class="QPushButton" name="pushButton_5">
|
||||
<property name="text">
|
||||
<string>Move layer down</string>
|
||||
</property>
|
||||
<property name="icon">
|
||||
<iconset resource="../../../data/ui_pictures.qrc">
|
||||
<normaloff>:/buttons/logo/images/layer_down.png</normaloff>:/buttons/logo/images/layer_down.png</iconset>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QPushButton" name="pushButton_4">
|
||||
<property name="text">
|
||||
<string>Move layer up</string>
|
||||
</property>
|
||||
<property name="icon">
|
||||
<iconset resource="../../../data/ui_pictures.qrc">
|
||||
<normaloff>:/buttons/logo/images/layer_up.png</normaloff>:/buttons/logo/images/layer_up.png</iconset>
|
||||
</property>
|
||||
</widget>
|
||||
</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>
|
||||
</layout>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QGroupBox" name="groupBox_3">
|
||||
<property name="title">
|
||||
<string>Selected layer previews</string>
|
||||
</property>
|
||||
<layout class="QGridLayout" name="gridLayout">
|
||||
<item row="2" column="1">
|
||||
<widget class="BasePreview" name="preview_shape_6" native="true">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Fixed" vsizetype="Fixed">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>200</width>
|
||||
<height>200</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="maximumSize">
|
||||
<size>
|
||||
<width>200</width>
|
||||
<height>200</height>
|
||||
</size>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="0">
|
||||
<widget class="QLabel" name="label">
|
||||
<property name="text">
|
||||
<string>Coverage</string>
|
||||
</property>
|
||||
<property name="alignment">
|
||||
<set>Qt::AlignCenter</set>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="2" column="0">
|
||||
<widget class="BasePreview" name="preview_shape_2" native="true">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Fixed" vsizetype="Fixed">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>200</width>
|
||||
<height>200</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="maximumSize">
|
||||
<size>
|
||||
<width>200</width>
|
||||
<height>200</height>
|
||||
</size>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="1">
|
||||
<widget class="QLabel" name="label_5">
|
||||
<property name="text">
|
||||
<string>Appearance</string>
|
||||
</property>
|
||||
<property name="alignment">
|
||||
<set>Qt::AlignCenter</set>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="Line" name="line">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Vertical</enum>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<layout class="QVBoxLayout" name="verticalLayout_2">
|
||||
<item>
|
||||
<widget class="QGroupBox" name="groupBox">
|
||||
<property name="title">
|
||||
<string>All layers preview</string>
|
||||
</property>
|
||||
<property name="flat">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
<layout class="QVBoxLayout" name="verticalLayout_4">
|
||||
<item>
|
||||
<widget class="BasePreview" name="preview_shape" native="true">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Fixed" vsizetype="Fixed">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>200</width>
|
||||
<height>200</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="maximumSize">
|
||||
<size>
|
||||
<width>200</width>
|
||||
<height>200</height>
|
||||
</size>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QPushButton" name="button_render">
|
||||
<property name="text">
|
||||
<string>Render preview</string>
|
||||
</property>
|
||||
<property name="icon">
|
||||
<iconset resource="../../../data/ui_pictures.qrc">
|
||||
<normaloff>:/buttons/logo/images/render.png</normaloff>:/buttons/logo/images/render.png</iconset>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QPushButton" name="button_explore">
|
||||
<property name="text">
|
||||
<string>Explore in 3D</string>
|
||||
</property>
|
||||
<property name="icon">
|
||||
<iconset resource="../../../data/ui_pictures.qrc">
|
||||
<normaloff>:/buttons/logo/images/explore.png</normaloff>:/buttons/logo/images/explore.png</iconset>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<spacer name="verticalSpacer">
|
||||
<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>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QGroupBox" name="groupBox_4">
|
||||
<property name="title">
|
||||
<string>Actions</string>
|
||||
</property>
|
||||
<property name="flat">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
<layout class="QVBoxLayout" name="verticalLayout_5">
|
||||
<item>
|
||||
<widget class="QPushButton" name="button_revert">
|
||||
<property name="text">
|
||||
<string>Revert modifications</string>
|
||||
</property>
|
||||
<property name="icon">
|
||||
<iconset resource="../../../data/ui_pictures.qrc">
|
||||
<normaloff>:/buttons/logo/images/revert.png</normaloff>:/buttons/logo/images/revert.png</iconset>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QPushButton" name="button_apply">
|
||||
<property name="text">
|
||||
<string>Apply modifications</string>
|
||||
</property>
|
||||
<property name="icon">
|
||||
<iconset resource="../../../data/ui_pictures.qrc">
|
||||
<normaloff>:/buttons/logo/images/apply.png</normaloff>:/buttons/logo/images/apply.png</iconset>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
<customwidgets>
|
||||
<customwidget>
|
||||
<class>BasePreview</class>
|
||||
<extends>QWidget</extends>
|
||||
<header>basepreview.h</header>
|
||||
<container>1</container>
|
||||
</customwidget>
|
||||
</customwidgets>
|
||||
<resources>
|
||||
<include location="../../../data/ui_pictures.qrc"/>
|
||||
</resources>
|
||||
<connections/>
|
||||
</ui>
|
Loading…
Reference in a new issue