git-svn-id: svn://db.shs.com.ru/libs@701 a8b55f48-bf90-11e4-a774-851b48703e85
This commit is contained in:
@@ -24,11 +24,18 @@
|
||||
MaterialEditor::MaterialEditor(QWidget * parent): QWidget(parent) {
|
||||
ui = new Ui::MaterialEditor();
|
||||
ui->setupUi(this);
|
||||
ui->mapDiffuse ->configure(tr("Diffuse"), true);
|
||||
ui->mapNormal ->configure(tr("Normal"));
|
||||
ui->mapMetalness->configure(tr("Metalness"));
|
||||
ui->mapRoughness->configure(tr("Roughness"));
|
||||
ui->mapEmission ->configure(tr("Emission"), true);
|
||||
ui->mapRelief ->configure(tr("Relief"));
|
||||
ui->checkGlass->hide();
|
||||
ui->frameReflection->hide();
|
||||
ui->label_13->hide();
|
||||
mat = 0;
|
||||
active = true;
|
||||
ignore_next = 0;
|
||||
}
|
||||
|
||||
|
||||
@@ -46,27 +53,30 @@ void MaterialEditor::changeEvent(QEvent * e) {
|
||||
|
||||
void MaterialEditor::materialChanged() {
|
||||
if (!active || !mat) return;
|
||||
ignore_next = 2;
|
||||
mat->_changed = true;
|
||||
mat->color_diffuse = ui->colorDiffuse ->color();
|
||||
mat->color_specular = ui->colorSpecular->color();
|
||||
mat->color_emission = ui->colorEmission->color();
|
||||
mat->color_diffuse = ui->mapDiffuse ->color();
|
||||
mat->color_emission = ui->mapEmission->color();
|
||||
mat->transparency = ui->spinTransparent->value();
|
||||
mat->reflectivity = ui->spinReflect->value();
|
||||
mat->iof = ui->spinIOF->value();
|
||||
mat->dispersion = ui->spinDispersion->value();
|
||||
mat->glass = ui->checkGlass->isChecked();
|
||||
emit changed();
|
||||
//emit changed();
|
||||
}
|
||||
|
||||
|
||||
void MaterialEditor::setMaterial(Material * m) {
|
||||
if (ignore_next > 0) {
|
||||
//ignore_next = false;
|
||||
return;
|
||||
}
|
||||
active = false;
|
||||
mat = m;
|
||||
setEnabled(m);
|
||||
if (!mat) return;
|
||||
ui->colorDiffuse ->setColor(mat->color_diffuse );
|
||||
ui->colorSpecular->setColor(mat->color_specular);
|
||||
ui->colorEmission->setColor(mat->color_emission);
|
||||
ui->mapDiffuse ->setColor(mat->color_diffuse );
|
||||
ui->mapEmission->setColor(mat->color_emission);
|
||||
ui->spinTransparent->setValue(mat->transparency);
|
||||
ui->spinReflect->setValue(mat->reflectivity);
|
||||
ui->spinIOF->setValue(mat->iof);
|
||||
@@ -74,7 +84,7 @@ void MaterialEditor::setMaterial(Material * m) {
|
||||
ui->checkGlass->setChecked(mat->glass);
|
||||
ui->mapDiffuse ->setMap(&(mat->map_diffuse ));
|
||||
ui->mapNormal ->setMap(&(mat->map_normal ));
|
||||
ui->mapSpecular ->setMap(&(mat->map_specular ));
|
||||
ui->mapMetalness->setMap(&(mat->map_metalness));
|
||||
ui->mapRoughness->setMap(&(mat->map_roughness));
|
||||
ui->mapEmission ->setMap(&(mat->map_emission ));
|
||||
ui->mapRelief ->setMap(&(mat->map_relief ));
|
||||
|
||||
@@ -28,6 +28,7 @@ namespace Ui {
|
||||
|
||||
class MaterialEditor: public QWidget
|
||||
{
|
||||
friend class MaterialsEditor;
|
||||
Q_OBJECT
|
||||
public:
|
||||
explicit MaterialEditor(QWidget * parent = 0);
|
||||
@@ -38,6 +39,7 @@ protected:
|
||||
void changeEvent(QEvent * e);
|
||||
|
||||
bool active;
|
||||
int ignore_next;
|
||||
Ui::MaterialEditor * ui;
|
||||
Material * mat;
|
||||
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>435</width>
|
||||
<height>817</height>
|
||||
<height>535</height>
|
||||
</rect>
|
||||
</property>
|
||||
<layout class="QVBoxLayout" name="verticalLayout_4">
|
||||
@@ -24,276 +24,87 @@
|
||||
<number>0</number>
|
||||
</property>
|
||||
<item>
|
||||
<widget class="QGroupBox" name="groupDiffuse">
|
||||
<widget class="MaterialMapEditor" name="mapDiffuse" native="true">
|
||||
<property name="styleSheet">
|
||||
<string notr="true">font:bold;</string>
|
||||
<string notr="true">font:normal;</string>
|
||||
</property>
|
||||
<property name="title">
|
||||
<string>Diffuse</string>
|
||||
</property>
|
||||
<property name="checkable">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
<layout class="QVBoxLayout" name="verticalLayout_5">
|
||||
<item>
|
||||
<widget class="QWidget" name="widgetDiffuse" native="true">
|
||||
<layout class="QGridLayout" name="gridLayout">
|
||||
<property name="leftMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="topMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="rightMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="bottomMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<item row="0" column="0">
|
||||
<widget class="QLabel" name="label">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Fixed" vsizetype="Preferred">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="styleSheet">
|
||||
<string notr="true">font:normal;</string>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Color:</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="1">
|
||||
<widget class="ColorButton" name="colorDiffuse">
|
||||
<property name="focusPolicy">
|
||||
<enum>Qt::NoFocus</enum>
|
||||
</property>
|
||||
<property name="styleSheet">
|
||||
<string notr="true">font:normal;</string>
|
||||
</property>
|
||||
<property name="useAlphaChannel">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="0" colspan="2">
|
||||
<widget class="MaterialMapEditor" name="mapDiffuse" native="true">
|
||||
<property name="styleSheet">
|
||||
<string notr="true">font:normal;</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QGroupBox" name="groupNormal">
|
||||
<property name="styleSheet">
|
||||
<string notr="true">font:bold;</string>
|
||||
<widget class="Line" name="line">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Horizontal</enum>
|
||||
</property>
|
||||
<property name="title">
|
||||
<string>Normal</string>
|
||||
</property>
|
||||
<property name="checkable">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
<layout class="QVBoxLayout" name="verticalLayout">
|
||||
<item>
|
||||
<widget class="MaterialMapEditor" name="mapNormal" native="true">
|
||||
<property name="styleSheet">
|
||||
<string notr="true">font:normal;</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QGroupBox" name="groupSpecular">
|
||||
<widget class="MaterialMapEditor" name="mapNormal" native="true">
|
||||
<property name="styleSheet">
|
||||
<string notr="true">font:bold;</string>
|
||||
<string notr="true">font:normal;</string>
|
||||
</property>
|
||||
<property name="title">
|
||||
<string>Specular</string>
|
||||
</property>
|
||||
<property name="checkable">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
<layout class="QVBoxLayout" name="verticalLayout_6">
|
||||
<item>
|
||||
<widget class="QWidget" name="widgetSpecular" native="true">
|
||||
<layout class="QGridLayout" name="gridLayout_2">
|
||||
<property name="leftMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="topMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="rightMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="bottomMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<item row="0" column="0">
|
||||
<widget class="QLabel" name="label_2">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Fixed" vsizetype="Preferred">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="styleSheet">
|
||||
<string notr="true">font:normal;</string>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Color:</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="1">
|
||||
<widget class="ColorButton" name="colorSpecular">
|
||||
<property name="focusPolicy">
|
||||
<enum>Qt::NoFocus</enum>
|
||||
</property>
|
||||
<property name="styleSheet">
|
||||
<string notr="true">font:normal;</string>
|
||||
</property>
|
||||
<property name="useAlphaChannel">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="0" colspan="2">
|
||||
<widget class="MaterialMapEditor" name="mapSpecular" native="true">
|
||||
<property name="styleSheet">
|
||||
<string notr="true">font:normal;</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QGroupBox" name="groupRoughness">
|
||||
<property name="styleSheet">
|
||||
<string notr="true">font:bold;</string>
|
||||
<widget class="Line" name="line_3">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Horizontal</enum>
|
||||
</property>
|
||||
<property name="title">
|
||||
<string>Roughness</string>
|
||||
</property>
|
||||
<property name="checkable">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
<layout class="QVBoxLayout" name="verticalLayout_3">
|
||||
<item>
|
||||
<widget class="MaterialMapEditor" name="mapRoughness" native="true">
|
||||
<property name="styleSheet">
|
||||
<string notr="true">font:normal;</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QGroupBox" name="groupEmission">
|
||||
<widget class="MaterialMapEditor" name="mapMetalness" native="true">
|
||||
<property name="styleSheet">
|
||||
<string notr="true">font:bold;</string>
|
||||
<string notr="true">font:normal;</string>
|
||||
</property>
|
||||
<property name="title">
|
||||
<string>Emisson</string>
|
||||
</property>
|
||||
<property name="checkable">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
<layout class="QVBoxLayout" name="verticalLayout_7">
|
||||
<item>
|
||||
<widget class="QWidget" name="widgetEmission" native="true">
|
||||
<layout class="QGridLayout" name="gridLayout_3">
|
||||
<property name="leftMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="topMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="rightMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="bottomMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<item row="0" column="0">
|
||||
<widget class="QLabel" name="label_12">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Fixed" vsizetype="Preferred">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="styleSheet">
|
||||
<string notr="true">font:normal;</string>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Color:</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="1">
|
||||
<widget class="ColorButton" name="colorEmission">
|
||||
<property name="focusPolicy">
|
||||
<enum>Qt::NoFocus</enum>
|
||||
</property>
|
||||
<property name="styleSheet">
|
||||
<string notr="true">font:normal;</string>
|
||||
</property>
|
||||
<property name="useAlphaChannel">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="0" colspan="2">
|
||||
<widget class="MaterialMapEditor" name="mapEmission" native="true">
|
||||
<property name="styleSheet">
|
||||
<string notr="true">font:normal;</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QGroupBox" name="groupRelief">
|
||||
<widget class="Line" name="line_2">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Horizontal</enum>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="MaterialMapEditor" name="mapRoughness" native="true">
|
||||
<property name="styleSheet">
|
||||
<string notr="true">font:bold;</string>
|
||||
<string notr="true">font:normal;</string>
|
||||
</property>
|
||||
<property name="title">
|
||||
<string>Relief</string>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="Line" name="line_4">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Horizontal</enum>
|
||||
</property>
|
||||
<property name="checkable">
|
||||
<bool>true</bool>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="MaterialMapEditor" name="mapEmission" native="true">
|
||||
<property name="styleSheet">
|
||||
<string notr="true">font:normal;</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="Line" name="line_5">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Horizontal</enum>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="MaterialMapEditor" name="mapRelief" native="true">
|
||||
<property name="styleSheet">
|
||||
<string notr="true">font:normal;</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="Line" name="line_6">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Horizontal</enum>
|
||||
</property>
|
||||
<layout class="QVBoxLayout" name="verticalLayout_2">
|
||||
<item>
|
||||
<widget class="MaterialMapEditor" name="mapRelief" native="true">
|
||||
<property name="styleSheet">
|
||||
<string notr="true">font:normal;</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
@@ -631,11 +442,6 @@
|
||||
<extends>QWidget</extends>
|
||||
<header>spinslider.h</header>
|
||||
</customwidget>
|
||||
<customwidget>
|
||||
<class>ColorButton</class>
|
||||
<extends>QPushButton</extends>
|
||||
<header>colorbutton.h</header>
|
||||
</customwidget>
|
||||
<customwidget>
|
||||
<class>MaterialMapEditor</class>
|
||||
<extends>QWidget</extends>
|
||||
@@ -648,38 +454,6 @@
|
||||
</customwidgets>
|
||||
<resources/>
|
||||
<connections>
|
||||
<connection>
|
||||
<sender>colorDiffuse</sender>
|
||||
<signal>colorChanged(QColor)</signal>
|
||||
<receiver>MaterialEditor</receiver>
|
||||
<slot>materialChanged()</slot>
|
||||
<hints>
|
||||
<hint type="sourcelabel">
|
||||
<x>326</x>
|
||||
<y>49</y>
|
||||
</hint>
|
||||
<hint type="destinationlabel">
|
||||
<x>282</x>
|
||||
<y>17</y>
|
||||
</hint>
|
||||
</hints>
|
||||
</connection>
|
||||
<connection>
|
||||
<sender>colorSpecular</sender>
|
||||
<signal>colorChanged(QColor)</signal>
|
||||
<receiver>MaterialEditor</receiver>
|
||||
<slot>materialChanged()</slot>
|
||||
<hints>
|
||||
<hint type="sourcelabel">
|
||||
<x>376</x>
|
||||
<y>202</y>
|
||||
</hint>
|
||||
<hint type="destinationlabel">
|
||||
<x>284</x>
|
||||
<y>45</y>
|
||||
</hint>
|
||||
</hints>
|
||||
</connection>
|
||||
<connection>
|
||||
<sender>spinTransparent</sender>
|
||||
<signal>valueChanged(double)</signal>
|
||||
@@ -688,7 +462,7 @@
|
||||
<hints>
|
||||
<hint type="sourcelabel">
|
||||
<x>433</x>
|
||||
<y>497</y>
|
||||
<y>468</y>
|
||||
</hint>
|
||||
<hint type="destinationlabel">
|
||||
<x>283</x>
|
||||
@@ -704,7 +478,7 @@
|
||||
<hints>
|
||||
<hint type="sourcelabel">
|
||||
<x>433</x>
|
||||
<y>526</y>
|
||||
<y>497</y>
|
||||
</hint>
|
||||
<hint type="destinationlabel">
|
||||
<x>284</x>
|
||||
@@ -720,7 +494,7 @@
|
||||
<hints>
|
||||
<hint type="sourcelabel">
|
||||
<x>433</x>
|
||||
<y>555</y>
|
||||
<y>526</y>
|
||||
</hint>
|
||||
<hint type="destinationlabel">
|
||||
<x>284</x>
|
||||
@@ -736,7 +510,7 @@
|
||||
<hints>
|
||||
<hint type="sourcelabel">
|
||||
<x>433</x>
|
||||
<y>468</y>
|
||||
<y>439</y>
|
||||
</hint>
|
||||
<hint type="destinationlabel">
|
||||
<x>284</x>
|
||||
@@ -744,22 +518,6 @@
|
||||
</hint>
|
||||
</hints>
|
||||
</connection>
|
||||
<connection>
|
||||
<sender>colorEmission</sender>
|
||||
<signal>colorChanged(QColor)</signal>
|
||||
<receiver>MaterialEditor</receiver>
|
||||
<slot>materialChanged()</slot>
|
||||
<hints>
|
||||
<hint type="sourcelabel">
|
||||
<x>421</x>
|
||||
<y>351</y>
|
||||
</hint>
|
||||
<hint type="destinationlabel">
|
||||
<x>326</x>
|
||||
<y>63</y>
|
||||
</hint>
|
||||
</hints>
|
||||
</connection>
|
||||
<connection>
|
||||
<sender>spinDispersion</sender>
|
||||
<signal>valueChanged(double)</signal>
|
||||
@@ -768,7 +526,7 @@
|
||||
<hints>
|
||||
<hint type="sourcelabel">
|
||||
<x>433</x>
|
||||
<y>584</y>
|
||||
<y>555</y>
|
||||
</hint>
|
||||
<hint type="destinationlabel">
|
||||
<x>326</x>
|
||||
@@ -793,14 +551,14 @@
|
||||
</hints>
|
||||
</connection>
|
||||
<connection>
|
||||
<sender>mapSpecular</sender>
|
||||
<sender>mapMetalness</sender>
|
||||
<signal>changed()</signal>
|
||||
<receiver>MaterialEditor</receiver>
|
||||
<slot>materialChanged()</slot>
|
||||
<hints>
|
||||
<hint type="sourcelabel">
|
||||
<x>421</x>
|
||||
<y>218</y>
|
||||
<y>189</y>
|
||||
</hint>
|
||||
<hint type="destinationlabel">
|
||||
<x>434</x>
|
||||
@@ -816,7 +574,7 @@
|
||||
<hints>
|
||||
<hint type="sourcelabel">
|
||||
<x>421</x>
|
||||
<y>367</y>
|
||||
<y>338</y>
|
||||
</hint>
|
||||
<hint type="destinationlabel">
|
||||
<x>434</x>
|
||||
@@ -848,7 +606,7 @@
|
||||
<hints>
|
||||
<hint type="sourcelabel">
|
||||
<x>421</x>
|
||||
<y>427</y>
|
||||
<y>398</y>
|
||||
</hint>
|
||||
<hint type="destinationlabel">
|
||||
<x>434</x>
|
||||
@@ -864,7 +622,7 @@
|
||||
<hints>
|
||||
<hint type="sourcelabel">
|
||||
<x>421</x>
|
||||
<y>278</y>
|
||||
<y>249</y>
|
||||
</hint>
|
||||
<hint type="destinationlabel">
|
||||
<x>434</x>
|
||||
@@ -872,102 +630,6 @@
|
||||
</hint>
|
||||
</hints>
|
||||
</connection>
|
||||
<connection>
|
||||
<sender>groupDiffuse</sender>
|
||||
<signal>toggled(bool)</signal>
|
||||
<receiver>widgetDiffuse</receiver>
|
||||
<slot>setVisible(bool)</slot>
|
||||
<hints>
|
||||
<hint type="sourcelabel">
|
||||
<x>40</x>
|
||||
<y>10</y>
|
||||
</hint>
|
||||
<hint type="destinationlabel">
|
||||
<x>47</x>
|
||||
<y>56</y>
|
||||
</hint>
|
||||
</hints>
|
||||
</connection>
|
||||
<connection>
|
||||
<sender>groupNormal</sender>
|
||||
<signal>toggled(bool)</signal>
|
||||
<receiver>mapNormal</receiver>
|
||||
<slot>setVisible(bool)</slot>
|
||||
<hints>
|
||||
<hint type="sourcelabel">
|
||||
<x>54</x>
|
||||
<y>103</y>
|
||||
</hint>
|
||||
<hint type="destinationlabel">
|
||||
<x>55</x>
|
||||
<y>123</y>
|
||||
</hint>
|
||||
</hints>
|
||||
</connection>
|
||||
<connection>
|
||||
<sender>groupSpecular</sender>
|
||||
<signal>toggled(bool)</signal>
|
||||
<receiver>widgetSpecular</receiver>
|
||||
<slot>setVisible(bool)</slot>
|
||||
<hints>
|
||||
<hint type="sourcelabel">
|
||||
<x>72</x>
|
||||
<y>162</y>
|
||||
</hint>
|
||||
<hint type="destinationlabel">
|
||||
<x>71</x>
|
||||
<y>205</y>
|
||||
</hint>
|
||||
</hints>
|
||||
</connection>
|
||||
<connection>
|
||||
<sender>groupRoughness</sender>
|
||||
<signal>toggled(bool)</signal>
|
||||
<receiver>mapRoughness</receiver>
|
||||
<slot>setVisible(bool)</slot>
|
||||
<hints>
|
||||
<hint type="sourcelabel">
|
||||
<x>56</x>
|
||||
<y>246</y>
|
||||
</hint>
|
||||
<hint type="destinationlabel">
|
||||
<x>55</x>
|
||||
<y>273</y>
|
||||
</hint>
|
||||
</hints>
|
||||
</connection>
|
||||
<connection>
|
||||
<sender>groupEmission</sender>
|
||||
<signal>toggled(bool)</signal>
|
||||
<receiver>widgetEmission</receiver>
|
||||
<slot>setVisible(bool)</slot>
|
||||
<hints>
|
||||
<hint type="sourcelabel">
|
||||
<x>67</x>
|
||||
<y>314</y>
|
||||
</hint>
|
||||
<hint type="destinationlabel">
|
||||
<x>71</x>
|
||||
<y>353</y>
|
||||
</hint>
|
||||
</hints>
|
||||
</connection>
|
||||
<connection>
|
||||
<sender>groupRelief</sender>
|
||||
<signal>toggled(bool)</signal>
|
||||
<receiver>mapRelief</receiver>
|
||||
<slot>setVisible(bool)</slot>
|
||||
<hints>
|
||||
<hint type="sourcelabel">
|
||||
<x>42</x>
|
||||
<y>397</y>
|
||||
</hint>
|
||||
<hint type="destinationlabel">
|
||||
<x>44</x>
|
||||
<y>422</y>
|
||||
</hint>
|
||||
</hints>
|
||||
</connection>
|
||||
</connections>
|
||||
<slots>
|
||||
<slot>materialChanged()</slot>
|
||||
|
||||
@@ -25,6 +25,7 @@
|
||||
MaterialMapEditor::MaterialMapEditor(QWidget * parent): QWidget(parent) {
|
||||
ui = new Ui::MaterialMapEditor();
|
||||
ui->setupUi(this);
|
||||
ui->widgetMap->hide();
|
||||
active = true;
|
||||
}
|
||||
|
||||
@@ -42,8 +43,9 @@ void MaterialMapEditor::changeEvent(QEvent * e) {
|
||||
|
||||
|
||||
void MaterialMapEditor::resizeEvent(QResizeEvent * e) {
|
||||
ui->iconedLabel->setFixedWidth(ui->iconedLabel->height());
|
||||
ui->iconedLabel->setIconSize(ui->iconedLabel->size());
|
||||
QSize sz = preferredIconSize(6, this);
|
||||
ui->iconedLabel->setFixedSize(sz);
|
||||
ui->iconedLabel->setIconSize(sz);
|
||||
}
|
||||
|
||||
|
||||
@@ -54,10 +56,18 @@ void MaterialMapEditor::updateIcon() {
|
||||
|
||||
void MaterialMapEditor::mapChanged() {
|
||||
if (!active || !map) return;
|
||||
map->color_amount = ui->sliderAmount->value();
|
||||
map->color_offset = ui->sliderOffset->value();
|
||||
active = false;
|
||||
map->use_bitmap = ui->checkMap->isChecked();
|
||||
if (ui->checkMap->isChecked()) {
|
||||
map->color_amount = ui->sliderAmount->value();
|
||||
map->color_offset = ui->sliderOffset->value();
|
||||
} else {
|
||||
map->color_amount = ui->sliderValue->value();
|
||||
map->color_offset = 0.f;
|
||||
}
|
||||
map->bitmap_scale.setX(ui->spinScaleX->value());
|
||||
map->bitmap_scale.setY(ui->spinScaleY->value());
|
||||
active = true;
|
||||
emit changed();
|
||||
}
|
||||
|
||||
@@ -67,6 +77,9 @@ void MaterialMapEditor::setMap(Map * m) {
|
||||
map = m;
|
||||
setEnabled(m);
|
||||
if (!map) return;
|
||||
ui->stackedWidget->setCurrentIndex(map->use_bitmap ? 1 : 0);
|
||||
ui->checkMap->setChecked(map->use_bitmap);
|
||||
ui->sliderValue->setValue(map->color_amount);
|
||||
ui->sliderAmount->setValue(map->color_amount);
|
||||
ui->sliderOffset->setValue(map->color_offset);
|
||||
ui->spinScaleX->setValue(map->bitmap_scale.x());
|
||||
@@ -76,6 +89,24 @@ void MaterialMapEditor::setMap(Map * m) {
|
||||
active = true;
|
||||
}
|
||||
|
||||
|
||||
void MaterialMapEditor::configure(QString title, bool has_color) {
|
||||
ui->labelTitle->setText(title);
|
||||
ui->colorButton->setVisible(has_color);
|
||||
}
|
||||
|
||||
|
||||
void MaterialMapEditor::setColor(QColor c) {
|
||||
active = false;
|
||||
ui->colorButton->setColor(c);
|
||||
active = true;
|
||||
}
|
||||
|
||||
|
||||
QColor MaterialMapEditor::color() const {
|
||||
return ui->colorButton->color();
|
||||
}
|
||||
|
||||
/*
|
||||
Map MaterialMapEditor::map() {
|
||||
Map m;
|
||||
@@ -106,3 +137,14 @@ void MaterialMapEditor::on_buttonClear_clicked() {
|
||||
updateIcon();
|
||||
mapChanged();
|
||||
}
|
||||
|
||||
|
||||
void MaterialMapEditor::on_checkMap_toggled(bool checked) {
|
||||
if (checked) {
|
||||
ui->sliderAmount->setValue(ui->sliderValue->value());
|
||||
resizeEvent(0);
|
||||
} else
|
||||
ui->sliderValue->setValue(ui->sliderAmount->value());
|
||||
ui->stackedWidget->setCurrentIndex(checked ? 1 : 0);
|
||||
mapChanged();
|
||||
}
|
||||
|
||||
@@ -33,6 +33,9 @@ public:
|
||||
explicit MaterialMapEditor(QWidget * parent = 0);
|
||||
|
||||
void setMap(Map * m);
|
||||
void configure(QString title, bool has_color = false);
|
||||
void setColor(QColor c);
|
||||
QColor color() const;
|
||||
|
||||
protected:
|
||||
void changeEvent(QEvent * e);
|
||||
@@ -47,6 +50,7 @@ private slots:
|
||||
void mapChanged();
|
||||
void on_buttonSelect_clicked();
|
||||
void on_buttonClear_clicked();
|
||||
void on_checkMap_toggled(bool checked);
|
||||
|
||||
signals:
|
||||
void changed();
|
||||
|
||||
@@ -6,11 +6,11 @@
|
||||
<rect>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>587</width>
|
||||
<height>138</height>
|
||||
<width>725</width>
|
||||
<height>218</height>
|
||||
</rect>
|
||||
</property>
|
||||
<layout class="QHBoxLayout" name="horizontalLayout">
|
||||
<layout class="QVBoxLayout" name="verticalLayout">
|
||||
<property name="leftMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
@@ -24,197 +24,313 @@
|
||||
<number>0</number>
|
||||
</property>
|
||||
<item>
|
||||
<widget class="IconedLabel" name="iconedLabel">
|
||||
<property name="direction">
|
||||
<enum>IconedLabel::RightToLeft</enum>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<layout class="QFormLayout" name="formLayout">
|
||||
<item row="0" column="0" colspan="2">
|
||||
<layout class="QHBoxLayout" name="horizontalLayout_2">
|
||||
<property name="spacing">
|
||||
<number>2</number>
|
||||
<layout class="QHBoxLayout" name="horizontalLayout">
|
||||
<item>
|
||||
<widget class="QLabel" name="labelTitle">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Fixed" vsizetype="Preferred">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="styleSheet">
|
||||
<string notr="true">font: bold;</string>
|
||||
</property>
|
||||
<item>
|
||||
<widget class="QLineEdit" name="linePath"/>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QToolButton" name="buttonClear">
|
||||
<property name="icon">
|
||||
<iconset resource="../qad/utils/qad_utils.qrc">
|
||||
<normaloff>:/icons/edit-delete.png</normaloff>:/icons/edit-delete.png</iconset>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QToolButton" name="buttonSelect">
|
||||
<property name="icon">
|
||||
<iconset resource="../qad/application/qad_application.qrc">
|
||||
<normaloff>:/icons/document-open.png</normaloff>:/icons/document-open.png</iconset>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
<item row="1" column="0">
|
||||
<widget class="QLabel" name="label">
|
||||
<property name="text">
|
||||
<string>Amount:</string>
|
||||
<string>title:</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="1">
|
||||
<widget class="SpinSlider" name="sliderAmount">
|
||||
<property name="minimum">
|
||||
<double>-1.000000000000000</double>
|
||||
</property>
|
||||
<property name="maximum">
|
||||
<double>1.000000000000000</double>
|
||||
</property>
|
||||
<property name="value">
|
||||
<double>1.000000000000000</double>
|
||||
</property>
|
||||
<property name="decimals">
|
||||
<number>2</number>
|
||||
</property>
|
||||
<property name="singleStep">
|
||||
<double>0.050000000000000</double>
|
||||
</property>
|
||||
<property name="pageStep">
|
||||
<double>0.200000000000000</double>
|
||||
</property>
|
||||
<property name="spinMinimum">
|
||||
<double>-99.000000000000000</double>
|
||||
</property>
|
||||
<property name="spinMaximum">
|
||||
<double>99.000000000000000</double>
|
||||
<item>
|
||||
<widget class="ColorButton" name="colorButton">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Preferred" vsizetype="Fixed">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="2" column="0">
|
||||
<widget class="QLabel" name="label_2">
|
||||
<item>
|
||||
<widget class="QStackedWidget" name="stackedWidget">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Preferred" vsizetype="Fixed">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<widget class="QWidget" name="page">
|
||||
<layout class="QHBoxLayout" name="horizontalLayout_5">
|
||||
<property name="leftMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="topMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="rightMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="bottomMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<item>
|
||||
<widget class="SpinSlider" name="sliderValue">
|
||||
<property name="minimum">
|
||||
<double>0.000000000000000</double>
|
||||
</property>
|
||||
<property name="maximum">
|
||||
<double>1.000000000000000</double>
|
||||
</property>
|
||||
<property name="value">
|
||||
<double>1.000000000000000</double>
|
||||
</property>
|
||||
<property name="decimals">
|
||||
<number>2</number>
|
||||
</property>
|
||||
<property name="singleStep">
|
||||
<double>0.050000000000000</double>
|
||||
</property>
|
||||
<property name="pageStep">
|
||||
<double>0.200000000000000</double>
|
||||
</property>
|
||||
<property name="spinMinimum">
|
||||
<double>0.000000000000000</double>
|
||||
</property>
|
||||
<property name="spinMaximum">
|
||||
<double>1.000000000000000</double>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
<widget class="QWidget" name="page_2"/>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QCheckBox" name="checkMap">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Fixed" vsizetype="Fixed">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Offset:</string>
|
||||
<string>Map</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="2" column="1">
|
||||
<widget class="SpinSlider" name="sliderOffset">
|
||||
<property name="minimum">
|
||||
<double>-1.000000000000000</double>
|
||||
</property>
|
||||
<property name="maximum">
|
||||
<double>1.000000000000000</double>
|
||||
</property>
|
||||
<property name="decimals">
|
||||
<number>2</number>
|
||||
</property>
|
||||
<property name="singleStep">
|
||||
<double>0.050000000000000</double>
|
||||
</property>
|
||||
<property name="pageStep">
|
||||
<double>0.200000000000000</double>
|
||||
</property>
|
||||
<property name="spinMinimum">
|
||||
<double>-99.000000000000000</double>
|
||||
</property>
|
||||
<property name="spinMaximum">
|
||||
<double>99.000000000000000</double>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="3" column="0" colspan="2">
|
||||
<layout class="QHBoxLayout" name="horizontalLayout_3">
|
||||
<item>
|
||||
<widget class="QLabel" name="label_3">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Fixed" vsizetype="Preferred">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Scale X:</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QDoubleSpinBox" name="spinScaleX">
|
||||
<property name="maximum">
|
||||
<double>9999.000000000000000</double>
|
||||
</property>
|
||||
<property name="singleStep">
|
||||
<double>0.100000000000000</double>
|
||||
</property>
|
||||
<property name="value">
|
||||
<double>1.000000000000000</double>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<spacer name="horizontalSpacer">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Horizontal</enum>
|
||||
</property>
|
||||
<property name="sizeType">
|
||||
<enum>QSizePolicy::Preferred</enum>
|
||||
</property>
|
||||
<property name="sizeHint" stdset="0">
|
||||
<size>
|
||||
<width>20</width>
|
||||
<height>20</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QLabel" name="label_4">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Fixed" vsizetype="Preferred">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Scale Y:</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QDoubleSpinBox" name="spinScaleY">
|
||||
<property name="maximum">
|
||||
<double>9999.000000000000000</double>
|
||||
</property>
|
||||
<property name="singleStep">
|
||||
<double>0.100000000000000</double>
|
||||
</property>
|
||||
<property name="value">
|
||||
<double>1.000000000000000</double>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<spacer name="horizontalSpacer_2">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Horizontal</enum>
|
||||
</property>
|
||||
<property name="sizeType">
|
||||
<enum>QSizePolicy::Expanding</enum>
|
||||
</property>
|
||||
<property name="sizeHint" stdset="0">
|
||||
<size>
|
||||
<width>1</width>
|
||||
<height>20</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QWidget" name="widgetMap" native="true">
|
||||
<layout class="QHBoxLayout" name="horizontalLayout_4">
|
||||
<property name="leftMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="topMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="rightMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="bottomMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<item>
|
||||
<widget class="IconedLabel" name="iconedLabel">
|
||||
<property name="direction">
|
||||
<enum>IconedLabel::RightToLeft</enum>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<layout class="QFormLayout" name="formLayout">
|
||||
<item row="0" column="0" colspan="2">
|
||||
<layout class="QHBoxLayout" name="horizontalLayout_2">
|
||||
<property name="spacing">
|
||||
<number>2</number>
|
||||
</property>
|
||||
<item>
|
||||
<widget class="QLineEdit" name="linePath"/>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QToolButton" name="buttonClear">
|
||||
<property name="icon">
|
||||
<iconset resource="../../qad/utils/qad_utils.qrc">
|
||||
<normaloff>:/icons/edit-delete.png</normaloff>:/icons/edit-delete.png</iconset>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QToolButton" name="buttonSelect">
|
||||
<property name="icon">
|
||||
<iconset resource="../../qad/application/qad_application.qrc">
|
||||
<normaloff>:/icons/document-open.png</normaloff>:/icons/document-open.png</iconset>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
<item row="1" column="0">
|
||||
<widget class="QLabel" name="label">
|
||||
<property name="text">
|
||||
<string>Amount:</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="1">
|
||||
<widget class="SpinSlider" name="sliderAmount">
|
||||
<property name="minimum">
|
||||
<double>-1.000000000000000</double>
|
||||
</property>
|
||||
<property name="maximum">
|
||||
<double>1.000000000000000</double>
|
||||
</property>
|
||||
<property name="value">
|
||||
<double>1.000000000000000</double>
|
||||
</property>
|
||||
<property name="decimals">
|
||||
<number>2</number>
|
||||
</property>
|
||||
<property name="singleStep">
|
||||
<double>0.050000000000000</double>
|
||||
</property>
|
||||
<property name="pageStep">
|
||||
<double>0.200000000000000</double>
|
||||
</property>
|
||||
<property name="spinMinimum">
|
||||
<double>-99.000000000000000</double>
|
||||
</property>
|
||||
<property name="spinMaximum">
|
||||
<double>99.000000000000000</double>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="2" column="0">
|
||||
<widget class="QLabel" name="label_2">
|
||||
<property name="text">
|
||||
<string>Offset:</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="2" column="1">
|
||||
<widget class="SpinSlider" name="sliderOffset">
|
||||
<property name="minimum">
|
||||
<double>-1.000000000000000</double>
|
||||
</property>
|
||||
<property name="maximum">
|
||||
<double>1.000000000000000</double>
|
||||
</property>
|
||||
<property name="decimals">
|
||||
<number>2</number>
|
||||
</property>
|
||||
<property name="singleStep">
|
||||
<double>0.050000000000000</double>
|
||||
</property>
|
||||
<property name="pageStep">
|
||||
<double>0.200000000000000</double>
|
||||
</property>
|
||||
<property name="spinMinimum">
|
||||
<double>-99.000000000000000</double>
|
||||
</property>
|
||||
<property name="spinMaximum">
|
||||
<double>99.000000000000000</double>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="3" column="0" colspan="2">
|
||||
<layout class="QHBoxLayout" name="horizontalLayout_3">
|
||||
<item>
|
||||
<widget class="QLabel" name="label_3">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Fixed" vsizetype="Preferred">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Scale X:</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QDoubleSpinBox" name="spinScaleX">
|
||||
<property name="maximum">
|
||||
<double>9999.000000000000000</double>
|
||||
</property>
|
||||
<property name="singleStep">
|
||||
<double>0.100000000000000</double>
|
||||
</property>
|
||||
<property name="value">
|
||||
<double>1.000000000000000</double>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<spacer name="horizontalSpacer">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Horizontal</enum>
|
||||
</property>
|
||||
<property name="sizeType">
|
||||
<enum>QSizePolicy::Preferred</enum>
|
||||
</property>
|
||||
<property name="sizeHint" stdset="0">
|
||||
<size>
|
||||
<width>20</width>
|
||||
<height>20</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QLabel" name="label_4">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Fixed" vsizetype="Preferred">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Scale Y:</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QDoubleSpinBox" name="spinScaleY">
|
||||
<property name="maximum">
|
||||
<double>9999.000000000000000</double>
|
||||
</property>
|
||||
<property name="singleStep">
|
||||
<double>0.100000000000000</double>
|
||||
</property>
|
||||
<property name="value">
|
||||
<double>1.000000000000000</double>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<spacer name="horizontalSpacer_2">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Horizontal</enum>
|
||||
</property>
|
||||
<property name="sizeType">
|
||||
<enum>QSizePolicy::Expanding</enum>
|
||||
</property>
|
||||
<property name="sizeHint" stdset="0">
|
||||
<size>
|
||||
<width>1</width>
|
||||
<height>20</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
<customwidgets>
|
||||
@@ -223,6 +339,11 @@
|
||||
<extends>QWidget</extends>
|
||||
<header>spinslider.h</header>
|
||||
</customwidget>
|
||||
<customwidget>
|
||||
<class>ColorButton</class>
|
||||
<extends>QPushButton</extends>
|
||||
<header>colorbutton.h</header>
|
||||
</customwidget>
|
||||
<customwidget>
|
||||
<class>IconedLabel</class>
|
||||
<extends>QFrame</extends>
|
||||
@@ -230,8 +351,8 @@
|
||||
</customwidget>
|
||||
</customwidgets>
|
||||
<resources>
|
||||
<include location="../qad/utils/qad_utils.qrc"/>
|
||||
<include location="../qad/application/qad_application.qrc"/>
|
||||
<include location="../../qad/utils/qad_utils.qrc"/>
|
||||
<include location="../../qad/application/qad_application.qrc"/>
|
||||
</resources>
|
||||
<connections>
|
||||
<connection>
|
||||
@@ -241,8 +362,8 @@
|
||||
<slot>mapChanged()</slot>
|
||||
<hints>
|
||||
<hint type="sourcelabel">
|
||||
<x>471</x>
|
||||
<y>22</y>
|
||||
<x>598</x>
|
||||
<y>55</y>
|
||||
</hint>
|
||||
<hint type="destinationlabel">
|
||||
<x>99</x>
|
||||
@@ -257,8 +378,8 @@
|
||||
<slot>mapChanged()</slot>
|
||||
<hints>
|
||||
<hint type="sourcelabel">
|
||||
<x>440</x>
|
||||
<y>38</y>
|
||||
<x>655</x>
|
||||
<y>87</y>
|
||||
</hint>
|
||||
<hint type="destinationlabel">
|
||||
<x>512</x>
|
||||
@@ -273,8 +394,8 @@
|
||||
<slot>mapChanged()</slot>
|
||||
<hints>
|
||||
<hint type="sourcelabel">
|
||||
<x>497</x>
|
||||
<y>66</y>
|
||||
<x>655</x>
|
||||
<y>116</y>
|
||||
</hint>
|
||||
<hint type="destinationlabel">
|
||||
<x>511</x>
|
||||
@@ -289,8 +410,8 @@
|
||||
<slot>mapChanged()</slot>
|
||||
<hints>
|
||||
<hint type="sourcelabel">
|
||||
<x>377</x>
|
||||
<y>104</y>
|
||||
<x>491</x>
|
||||
<y>146</y>
|
||||
</hint>
|
||||
<hint type="destinationlabel">
|
||||
<x>332</x>
|
||||
@@ -305,8 +426,8 @@
|
||||
<slot>mapChanged()</slot>
|
||||
<hints>
|
||||
<hint type="sourcelabel">
|
||||
<x>519</x>
|
||||
<y>110</y>
|
||||
<x>647</x>
|
||||
<y>146</y>
|
||||
</hint>
|
||||
<hint type="destinationlabel">
|
||||
<x>493</x>
|
||||
@@ -314,6 +435,70 @@
|
||||
</hint>
|
||||
</hints>
|
||||
</connection>
|
||||
<connection>
|
||||
<sender>checkMap</sender>
|
||||
<signal>toggled(bool)</signal>
|
||||
<receiver>sliderValue</receiver>
|
||||
<slot>setHidden(bool)</slot>
|
||||
<hints>
|
||||
<hint type="sourcelabel">
|
||||
<x>693</x>
|
||||
<y>15</y>
|
||||
</hint>
|
||||
<hint type="destinationlabel">
|
||||
<x>626</x>
|
||||
<y>14</y>
|
||||
</hint>
|
||||
</hints>
|
||||
</connection>
|
||||
<connection>
|
||||
<sender>checkMap</sender>
|
||||
<signal>toggled(bool)</signal>
|
||||
<receiver>widgetMap</receiver>
|
||||
<slot>setVisible(bool)</slot>
|
||||
<hints>
|
||||
<hint type="sourcelabel">
|
||||
<x>686</x>
|
||||
<y>9</y>
|
||||
</hint>
|
||||
<hint type="destinationlabel">
|
||||
<x>695</x>
|
||||
<y>62</y>
|
||||
</hint>
|
||||
</hints>
|
||||
</connection>
|
||||
<connection>
|
||||
<sender>sliderValue</sender>
|
||||
<signal>valueChanged(double)</signal>
|
||||
<receiver>MaterialMapEditor</receiver>
|
||||
<slot>mapChanged()</slot>
|
||||
<hints>
|
||||
<hint type="sourcelabel">
|
||||
<x>99</x>
|
||||
<y>15</y>
|
||||
</hint>
|
||||
<hint type="destinationlabel">
|
||||
<x>130</x>
|
||||
<y>28</y>
|
||||
</hint>
|
||||
</hints>
|
||||
</connection>
|
||||
<connection>
|
||||
<sender>colorButton</sender>
|
||||
<signal>colorChanged(QColor)</signal>
|
||||
<receiver>MaterialMapEditor</receiver>
|
||||
<slot>mapChanged()</slot>
|
||||
<hints>
|
||||
<hint type="sourcelabel">
|
||||
<x>60</x>
|
||||
<y>11</y>
|
||||
</hint>
|
||||
<hint type="destinationlabel">
|
||||
<x>75</x>
|
||||
<y>27</y>
|
||||
</hint>
|
||||
</hints>
|
||||
</connection>
|
||||
</connections>
|
||||
<slots>
|
||||
<slot>mapChanged()</slot>
|
||||
|
||||
@@ -114,6 +114,10 @@ void MaterialsEditor::selectionChanged() {
|
||||
|
||||
|
||||
void MaterialsEditor::materialsChanged() {
|
||||
if (ui->widgetMaterial->ignore_next > 0) {
|
||||
ui->widgetMaterial->ignore_next--;
|
||||
return;
|
||||
}
|
||||
Material * cm = currentMaterial();
|
||||
ui->comboMaterial->clear();
|
||||
if (!view) return;
|
||||
|
||||
Reference in New Issue
Block a user