Skip to content
Snippets Groups Projects
Commit 97775d9c authored by Christiaan Janssen's avatar Christiaan Janssen
Browse files

QmlDesigner.EasingPane: fixed easing curve names and editing values inside the spinboxes

parent 88a61596
No related branches found
No related tags found
No related merge requests found
...@@ -94,7 +94,6 @@ EasingContextPane::EasingContextPane(QWidget *parent) : ...@@ -94,7 +94,6 @@ EasingContextPane::EasingContextPane(QWidget *parent) :
ui->setupUi(this); ui->setupUi(this);
m_simulation = new EasingSimulation(this,ui->graphicsView); m_simulation = new EasingSimulation(this,ui->graphicsView);
// ui->graphicsView->setScene(m_simulation->scene());
m_easingGraph = new EasingGraph(this); m_easingGraph = new EasingGraph(this);
m_easingGraph->raise(); m_easingGraph->raise();
...@@ -196,13 +195,11 @@ void EasingContextPane::setGraphDisplayMode(GraphDisplayMode newMode) ...@@ -196,13 +195,11 @@ void EasingContextPane::setGraphDisplayMode(GraphDisplayMode newMode)
m_displayMode = newMode; m_displayMode = newMode;
switch (newMode) { switch (newMode) {
case GraphMode: { case GraphMode: {
// ui->graphSelectButton->setIcon(QIcon(":/simulicon.png"));
m_simulation->hide(); m_simulation->hide();
m_easingGraph->show(); m_easingGraph->show();
break; break;
} }
case SimulationMode: { case SimulationMode: {
// ui->graphSelectButton->setIcon(QIcon(":/graphicon.png"));
m_simulation->show(); m_simulation->show();
m_easingGraph->hide(); m_easingGraph->hide();
break; break;
...@@ -236,15 +233,6 @@ void EasingContextPane::setOthers() ...@@ -236,15 +233,6 @@ void EasingContextPane::setOthers()
ui->overshootSpinBox->setEnabled(false); ui->overshootSpinBox->setEnabled(false);
ui->overshootSpinBox->setEnabled(false); ui->overshootSpinBox->setEnabled(false);
ui->periodSpinBox->setEnabled(false); ui->periodSpinBox->setEnabled(false);
// ui->durationSpinBox->setSuffix(" ms");
// ui->durationSpinBox->setGeometry(0,65,90,23);
// ui->easingExtremesComboBox->setGeometry(90,64,75,25);
// ui->easingShapeComboBox->setGeometry(165,64,115,25);
// ui->easingExtremesComboBox->show();
// ui->amplitudeSpinBox->hide();
// ui->periodSpinBox->hide();
// ui->overshootSpinBox->hide();
} }
void EasingContextPane::setLinear() void EasingContextPane::setLinear()
...@@ -307,7 +295,7 @@ void QmlDesigner::EasingContextPane::on_easingShapeComboBox_currentIndexChanged( ...@@ -307,7 +295,7 @@ void QmlDesigner::EasingContextPane::on_easingShapeComboBox_currentIndexChanged(
m_easingGraph->setPeriod(ui->periodSpinBox->value()); m_easingGraph->setPeriod(ui->periodSpinBox->value());
m_easingGraph->setOvershoot(ui->overshootSpinBox->value()); m_easingGraph->setOvershoot(ui->overshootSpinBox->value());
m_simulation->updateCurve(m_easingGraph->easingCurve(),ui->durationSpinBox->value()); m_simulation->updateCurve(m_easingGraph->easingCurve(),ui->durationSpinBox->value());
emit propertyChanged(QLatin1String("easing.type"), QVariant(QLatin1String("Easing.")+m_easingGraph->easingName())); emit propertyChanged(QLatin1String("easing.type"), QVariant("\""+m_easingGraph->easingName()+"\""));
} }
} }
...@@ -319,7 +307,7 @@ void QmlDesigner::EasingContextPane::on_easingExtremesComboBox_currentIndexChang ...@@ -319,7 +307,7 @@ void QmlDesigner::EasingContextPane::on_easingExtremesComboBox_currentIndexChang
m_easingGraph->setPeriod(ui->periodSpinBox->value()); m_easingGraph->setPeriod(ui->periodSpinBox->value());
m_easingGraph->setOvershoot(ui->overshootSpinBox->value()); m_easingGraph->setOvershoot(ui->overshootSpinBox->value());
m_simulation->updateCurve(m_easingGraph->easingCurve(),ui->durationSpinBox->value()); m_simulation->updateCurve(m_easingGraph->easingCurve(),ui->durationSpinBox->value());
emit propertyChanged(QLatin1String("easing.type"), QVariant(QLatin1String("Easing.")+m_easingGraph->easingName())); emit propertyChanged(QLatin1String("easing.type"), QVariant("\""+m_easingGraph->easingName()+"\""));
} }
} }
......
...@@ -212,6 +212,9 @@ ...@@ -212,6 +212,9 @@
<property name="specialValueText"> <property name="specialValueText">
<string>INVALID</string> <string>INVALID</string>
</property> </property>
<property name="keyboardTracking">
<bool>false</bool>
</property>
<property name="suffix"> <property name="suffix">
<string> ms</string> <string> ms</string>
</property> </property>
...@@ -253,6 +256,9 @@ ...@@ -253,6 +256,9 @@
<property name="specialValueText"> <property name="specialValueText">
<string>INVALID</string> <string>INVALID</string>
</property> </property>
<property name="keyboardTracking">
<bool>false</bool>
</property>
<property name="decimals"> <property name="decimals">
<number>3</number> <number>3</number>
</property> </property>
...@@ -291,6 +297,9 @@ ...@@ -291,6 +297,9 @@
<property name="specialValueText"> <property name="specialValueText">
<string>INVALID</string> <string>INVALID</string>
</property> </property>
<property name="keyboardTracking">
<bool>false</bool>
</property>
<property name="decimals"> <property name="decimals">
<number>3</number> <number>3</number>
</property> </property>
...@@ -329,6 +338,9 @@ ...@@ -329,6 +338,9 @@
<property name="specialValueText"> <property name="specialValueText">
<string>INVALID</string> <string>INVALID</string>
</property> </property>
<property name="keyboardTracking">
<bool>false</bool>
</property>
<property name="decimals"> <property name="decimals">
<number>3</number> <number>3</number>
</property> </property>
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment