git-svn-id: svn://db.shs.com.ru/libs@447 a8b55f48-bf90-11e4-a774-851b48703e85
This commit is contained in:
@@ -143,6 +143,7 @@ public:
|
||||
|
||||
QMatrix4x4 transform() {return mat_;}
|
||||
void setTransform(const QMatrix4x4 & t);
|
||||
bool isRawMatrix() {return raw_matrix;}
|
||||
|
||||
bool isAcceptLight() const {return accept_light;}
|
||||
void setAcceptLight(bool yes) {accept_light = yes;}
|
||||
|
||||
@@ -49,6 +49,7 @@ void GLObjectEditor::setObject(GLObjectBase * o) {
|
||||
ui->groupLight->setEnabled(false);
|
||||
return;
|
||||
}
|
||||
ui->buttonDiscardRawMatrix->setEnabled(o->isRawMatrix());
|
||||
active = false;
|
||||
ui->spinPosX->setValue(object->posX());
|
||||
ui->spinPosY->setValue(object->posY());
|
||||
@@ -88,15 +89,17 @@ void GLObjectEditor::setObject(GLObjectBase * o) {
|
||||
|
||||
void GLObjectEditor::objectChanged() {
|
||||
if (!active || object == 0) return;
|
||||
object->setPosX(ui->spinPosX->value());
|
||||
object->setPosY(ui->spinPosY->value());
|
||||
object->setPosZ(ui->spinPosZ->value());
|
||||
object->setRotationX(ui->spinRotationX->value());
|
||||
object->setRotationY(ui->spinRotationY->value());
|
||||
object->setRotationZ(ui->spinRotationZ->value());
|
||||
object->setScaleX(ui->spinScaleX->value());
|
||||
object->setScaleY(ui->spinScaleY->value());
|
||||
object->setScaleZ(ui->spinScaleZ->value());
|
||||
if (!object->isRawMatrix()) {
|
||||
object->setPosX(ui->spinPosX->value());
|
||||
object->setPosY(ui->spinPosY->value());
|
||||
object->setPosZ(ui->spinPosZ->value());
|
||||
object->setRotationX(ui->spinRotationX->value());
|
||||
object->setRotationY(ui->spinRotationY->value());
|
||||
object->setRotationZ(ui->spinRotationZ->value());
|
||||
object->setScaleX(ui->spinScaleX->value());
|
||||
object->setScaleY(ui->spinScaleY->value());
|
||||
object->setScaleZ(ui->spinScaleZ->value());
|
||||
}
|
||||
object->setLineWidth(ui->spinLineWidth->value());
|
||||
object->setVisible(ui->checkVisible->isChecked());
|
||||
object->setAcceptLight(ui->checkAcceptLight->isChecked());
|
||||
@@ -131,3 +134,18 @@ void GLObjectEditor::on_spinLightAngleEnd_valueChanged(double v) {
|
||||
if (ui->spinLightAngleStart->value() > v)
|
||||
ui->spinLightAngleStart->setValue(v);
|
||||
}
|
||||
|
||||
|
||||
void GLObjectEditor::on_buttonDiscardRawMatrix_clicked() {
|
||||
if (!active || !object) return;
|
||||
object->setPosX(ui->spinPosX->value());
|
||||
object->setPosY(ui->spinPosY->value());
|
||||
object->setPosZ(ui->spinPosZ->value());
|
||||
object->setRotationX(ui->spinRotationX->value());
|
||||
object->setRotationY(ui->spinRotationY->value());
|
||||
object->setRotationZ(ui->spinRotationZ->value());
|
||||
object->setScaleX(ui->spinScaleX->value());
|
||||
object->setScaleY(ui->spinScaleY->value());
|
||||
object->setScaleZ(ui->spinScaleZ->value());
|
||||
ui->buttonDiscardRawMatrix->setEnabled(false);
|
||||
}
|
||||
|
||||
@@ -45,6 +45,7 @@ private slots:
|
||||
void objectChanged();
|
||||
void on_spinLightAngleStart_valueChanged(double v);
|
||||
void on_spinLightAngleEnd_valueChanged(double v);
|
||||
void on_buttonDiscardRawMatrix_clicked();
|
||||
|
||||
signals:
|
||||
void changed();
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>329</width>
|
||||
<height>681</height>
|
||||
<height>707</height>
|
||||
</rect>
|
||||
</property>
|
||||
<layout class="QFormLayout" name="formLayout">
|
||||
@@ -26,14 +26,14 @@
|
||||
<property name="verticalSpacing">
|
||||
<number>2</number>
|
||||
</property>
|
||||
<item row="0" column="0">
|
||||
<item row="1" column="0">
|
||||
<widget class="QLabel" name="label">
|
||||
<property name="text">
|
||||
<string>Position X</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="1">
|
||||
<item row="1" column="1">
|
||||
<widget class="QDoubleSpinBox" name="spinPosX">
|
||||
<property name="minimum">
|
||||
<double>-99999.000000000000000</double>
|
||||
@@ -43,14 +43,14 @@
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="0">
|
||||
<item row="2" column="0">
|
||||
<widget class="QLabel" name="label_2">
|
||||
<property name="text">
|
||||
<string>Position Y</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="1">
|
||||
<item row="2" column="1">
|
||||
<widget class="QDoubleSpinBox" name="spinPosY">
|
||||
<property name="minimum">
|
||||
<double>-99999.000000000000000</double>
|
||||
@@ -60,14 +60,14 @@
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="2" column="0">
|
||||
<item row="3" column="0">
|
||||
<widget class="QLabel" name="label_3">
|
||||
<property name="text">
|
||||
<string>Position Z</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="2" column="1">
|
||||
<item row="3" column="1">
|
||||
<widget class="QDoubleSpinBox" name="spinPosZ">
|
||||
<property name="minimum">
|
||||
<double>-99999.000000000000000</double>
|
||||
@@ -77,28 +77,28 @@
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="3" column="0">
|
||||
<item row="4" column="0">
|
||||
<widget class="QLabel" name="label_4">
|
||||
<property name="text">
|
||||
<string>Rotation X</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="4" column="0">
|
||||
<item row="5" column="0">
|
||||
<widget class="QLabel" name="label_5">
|
||||
<property name="text">
|
||||
<string>Rotation Y</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="5" column="0">
|
||||
<item row="6" column="0">
|
||||
<widget class="QLabel" name="label_6">
|
||||
<property name="text">
|
||||
<string>Rotation Z</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="3" column="1">
|
||||
<item row="4" column="1">
|
||||
<widget class="SpinSlider" name="spinRotationX">
|
||||
<property name="minimum">
|
||||
<double>-180.000000000000000</double>
|
||||
@@ -108,7 +108,7 @@
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="4" column="1">
|
||||
<item row="5" column="1">
|
||||
<widget class="SpinSlider" name="spinRotationY">
|
||||
<property name="minimum">
|
||||
<double>-180.000000000000000</double>
|
||||
@@ -118,7 +118,7 @@
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="5" column="1">
|
||||
<item row="6" column="1">
|
||||
<widget class="SpinSlider" name="spinRotationZ">
|
||||
<property name="minimum">
|
||||
<double>-180.000000000000000</double>
|
||||
@@ -128,28 +128,28 @@
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="6" column="0">
|
||||
<item row="7" column="0">
|
||||
<widget class="QLabel" name="label_7">
|
||||
<property name="text">
|
||||
<string>Scale X</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="7" column="0">
|
||||
<item row="8" column="0">
|
||||
<widget class="QLabel" name="label_8">
|
||||
<property name="text">
|
||||
<string>Scale Y</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="8" column="0">
|
||||
<item row="9" column="0">
|
||||
<widget class="QLabel" name="label_9">
|
||||
<property name="text">
|
||||
<string>Scale Z</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="6" column="1">
|
||||
<item row="7" column="1">
|
||||
<widget class="QDoubleSpinBox" name="spinScaleX">
|
||||
<property name="decimals">
|
||||
<number>4</number>
|
||||
@@ -168,7 +168,7 @@
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="7" column="1">
|
||||
<item row="8" column="1">
|
||||
<widget class="QDoubleSpinBox" name="spinScaleY">
|
||||
<property name="decimals">
|
||||
<number>4</number>
|
||||
@@ -187,7 +187,7 @@
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="8" column="1">
|
||||
<item row="9" column="1">
|
||||
<widget class="QDoubleSpinBox" name="spinScaleZ">
|
||||
<property name="decimals">
|
||||
<number>4</number>
|
||||
@@ -206,14 +206,14 @@
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="9" column="0">
|
||||
<item row="10" column="0">
|
||||
<widget class="QLabel" name="label_10">
|
||||
<property name="text">
|
||||
<string>Render mode</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="9" column="1">
|
||||
<item row="10" column="1">
|
||||
<widget class="QComboBox" name="comboRenderMode">
|
||||
<item>
|
||||
<property name="text">
|
||||
@@ -237,35 +237,35 @@
|
||||
</item>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="10" column="1">
|
||||
<item row="11" column="1">
|
||||
<widget class="QCheckBox" name="checkVisible">
|
||||
<property name="text">
|
||||
<string>Visible</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="11" column="1">
|
||||
<item row="12" column="1">
|
||||
<widget class="QCheckBox" name="checkAcceptLight">
|
||||
<property name="text">
|
||||
<string>Accept light</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="12" column="1">
|
||||
<item row="13" column="1">
|
||||
<widget class="QCheckBox" name="checkAcceptFog">
|
||||
<property name="text">
|
||||
<string>Accept fog</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="15" column="0">
|
||||
<item row="16" column="0">
|
||||
<widget class="QLabel" name="label_11">
|
||||
<property name="text">
|
||||
<string>Line width</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="15" column="1">
|
||||
<item row="16" column="1">
|
||||
<widget class="QDoubleSpinBox" name="spinLineWidth">
|
||||
<property name="minimum">
|
||||
<double>0.000000000000000</double>
|
||||
@@ -281,21 +281,21 @@
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="13" column="1">
|
||||
<item row="14" column="1">
|
||||
<widget class="QCheckBox" name="checkCastShadows">
|
||||
<property name="text">
|
||||
<string>Cast shadows</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="14" column="1">
|
||||
<item row="15" column="1">
|
||||
<widget class="QCheckBox" name="checkReceiveShadows">
|
||||
<property name="text">
|
||||
<string>Receive shadows</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="16" column="0" colspan="2">
|
||||
<item row="17" column="0" colspan="2">
|
||||
<widget class="QGroupBox" name="groupLight">
|
||||
<property name="title">
|
||||
<string>Light</string>
|
||||
@@ -622,6 +622,16 @@
|
||||
</layout>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="0" colspan="2">
|
||||
<widget class="QPushButton" name="buttonDiscardRawMatrix">
|
||||
<property name="enabled">
|
||||
<bool>false</bool>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Discard raw transform</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
<customwidgets>
|
||||
|
||||
Reference in New Issue
Block a user