summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlessandro Portale <alessandro.portale@qt.io>2023-01-27 12:50:01 +0100
committerAlessandro Portale <alessandro.portale@qt.io>2023-02-01 13:47:53 +0000
commitfc8b81f2cb0b8acb7cdeb6109539869d42dd7802 (patch)
tree3dadd0cb387d82cb716f4377fdd357e1c7ab886d
parent5445ff511ad788f93f2bc3261aed58e2f7761258 (diff)
downloadqt-creator-fc8b81f2cb0b8acb7cdeb6109539869d42dd7802.tar.gz
QmlEditorWidgets: Inline easingcontextpane.ui
Change-Id: Ib9960c56c3efdd4c4924999f80d97aa5cc3b6c69 Reviewed-by: hjk <hjk@qt.io>
-rw-r--r--src/libs/qmleditorwidgets/CMakeLists.txt2
-rw-r--r--src/libs/qmleditorwidgets/easingpane/easingcontextpane.cpp212
-rw-r--r--src/libs/qmleditorwidgets/easingpane/easingcontextpane.h22
-rw-r--r--src/libs/qmleditorwidgets/easingpane/easingcontextpane.ui362
-rw-r--r--src/libs/qmleditorwidgets/qmleditorwidgets.qbs2
5 files changed, 152 insertions, 448 deletions
diff --git a/src/libs/qmleditorwidgets/CMakeLists.txt b/src/libs/qmleditorwidgets/CMakeLists.txt
index c0b0baec57..c57b4d6e00 100644
--- a/src/libs/qmleditorwidgets/CMakeLists.txt
+++ b/src/libs/qmleditorwidgets/CMakeLists.txt
@@ -8,7 +8,7 @@ add_qtc_library(QmlEditorWidgets
contextpanewidgetimage.cpp contextpanewidgetimage.h
contextpanewidgetrectangle.cpp contextpanewidgetrectangle.h contextpanewidgetrectangle.ui
customcolordialog.cpp customcolordialog.h
- easingpane/easingcontextpane.cpp easingpane/easingcontextpane.h easingpane/easingcontextpane.ui
+ easingpane/easingcontextpane.cpp easingpane/easingcontextpane.h
easingpane/easinggraph.cpp easingpane/easinggraph.h
easingpane/easingpane.qrc
filewidget.cpp filewidget.h
diff --git a/src/libs/qmleditorwidgets/easingpane/easingcontextpane.cpp b/src/libs/qmleditorwidgets/easingpane/easingcontextpane.cpp
index cc19227a82..810cd02ce3 100644
--- a/src/libs/qmleditorwidgets/easingpane/easingcontextpane.cpp
+++ b/src/libs/qmleditorwidgets/easingpane/easingcontextpane.cpp
@@ -2,14 +2,21 @@
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0
#include "easingcontextpane.h"
-#include "ui_easingcontextpane.h"
+
+#include "easinggraph.h"
+
#include <qmljs/qmljspropertyreader.h>
+#include <utils/layoutbuilder.h>
#include <utils/qtcassert.h>
#include <utils/utilsicons.h>
+#include <QComboBox>
+#include <QDoubleSpinBox>
#include <QGraphicsPixmapItem>
#include <QGraphicsScene>
+#include <QGraphicsView>
#include <QPropertyAnimation>
+#include <QPushButton>
#include <QSequentialAnimationGroup>
namespace QmlEditorWidgets {
@@ -92,44 +99,91 @@ private:
};
-EasingContextPane::EasingContextPane(QWidget *parent) :
- QWidget(parent),
- ui(new Ui::EasingContextPane)
+EasingContextPane::EasingContextPane(QWidget *parent)
+ : QWidget(parent)
{
- ui->setupUi(this);
-
- m_simulation = new EasingSimulation(this,ui->graphicsView);
+ m_graphicsView = new QGraphicsView;
+ m_graphicsView->setFixedSize({290, 90});
+ m_graphicsView->setHorizontalScrollBarPolicy(Qt::ScrollBarAlwaysOff);
+ m_graphicsView->setInteractive(false);
+
+ m_playButton = new QPushButton;
+ m_playButton->setIcon(Utils::Icons::RUN_SMALL.icon());
+ m_playButton->setSizePolicy(QSizePolicy::Preferred, QSizePolicy::Expanding);
+ m_playButton->setToolTip(tr("Play simulation."));
+
+ m_easingShapeComboBox = new QComboBox;
+ m_easingShapeComboBox->addItems(
+ {"Linear", "Quad", "Cubic", "Quart", "Quint", "Sine", "Expo", "Circ", "Elastic", "Back", "Bounce"});
+ m_easingShapeComboBox->setToolTip(tr("Type of easing curve."));
+ m_easingExtremesComboBox = new QComboBox;
+ m_easingExtremesComboBox->addItems(
+ {"In", "Out", "InOut", "OutIn"});
+ m_easingExtremesComboBox->setToolTip(tr("Acceleration or deceleration of easing curve."));
+
+ m_durationSpinBox = new QSpinBox;
+ m_durationSpinBox->setKeyboardTracking(false);
+ m_durationSpinBox->setMaximum(9999999);
+ m_durationSpinBox->setMinimum(-1);
+ m_durationSpinBox->setSingleStep(10);
+ m_durationSpinBox->setSuffix(tr(" ms"));
+ m_durationSpinBox->setToolTip(tr("Duration of animation."));
+
+ m_amplitudeSpinBox = new QDoubleSpinBox;
+ m_amplitudeSpinBox->setSingleStep(0.05);
+ m_amplitudeSpinBox->setToolTip(tr("Amplitude of elastic and bounce easing curves."));
+ m_periodSpinBox = new QDoubleSpinBox;
+ m_periodSpinBox->setSingleStep(0.01);
+ m_periodSpinBox->setToolTip(tr("Easing period of an elastic curve."));
+ m_overshootSpinBox = new QDoubleSpinBox;
+ m_overshootSpinBox->setSingleStep(0.05);
+ m_overshootSpinBox->setToolTip(tr("Easing overshoot for a back curve."));
+ for (auto spinBox : {m_amplitudeSpinBox, m_periodSpinBox, m_overshootSpinBox}) {
+ spinBox->setDecimals(3);
+ spinBox->setKeyboardTracking(false);
+ spinBox->setMaximum(999999.9);
+ }
+ using namespace Utils::Layouting;
+ Column {
+ Row { m_graphicsView, m_playButton, },
+ Row {
+ Form {
+ tr("Easing"), m_easingShapeComboBox, br,
+ tr("Duration"), m_durationSpinBox, br,
+ tr("Period"), m_periodSpinBox, br,
+ },
+ Form {
+ tr("Subtype"), m_easingExtremesComboBox, br,
+ tr("Amplitude"), m_amplitudeSpinBox, br,
+ tr("Overshoot"), m_overshootSpinBox, br,
+ },
+ },
+ }.attachTo(this);
+
+ m_simulation = new EasingSimulation(this, m_graphicsView);
m_easingGraph = new EasingGraph(this);
m_easingGraph->raise();
setLinear();
- ui->playButton->setIcon(Utils::Icons::RUN_SMALL.icon());
-
setGraphDisplayMode(GraphMode);
connect(m_simulation, &EasingSimulation::finished, this, &EasingContextPane::switchToGraph);
- connect(ui->playButton, &QPushButton::clicked, this, &EasingContextPane::playClicked);
- connect(ui->overshootSpinBox, &QDoubleSpinBox::valueChanged,
+ connect(m_playButton, &QPushButton::clicked, this, &EasingContextPane::playClicked);
+ connect(m_overshootSpinBox, &QDoubleSpinBox::valueChanged,
this, &EasingContextPane::overshootChanged);
- connect(ui->periodSpinBox, &QDoubleSpinBox::valueChanged,
+ connect(m_periodSpinBox, &QDoubleSpinBox::valueChanged,
this, &EasingContextPane::periodChanged);
- connect(ui->amplitudeSpinBox, &QDoubleSpinBox::valueChanged,
+ connect(m_amplitudeSpinBox, &QDoubleSpinBox::valueChanged,
this, &EasingContextPane::amplitudeChanged);
- connect(ui->easingExtremesComboBox, &QComboBox::currentIndexChanged,
+ connect(m_easingExtremesComboBox, &QComboBox::currentIndexChanged,
this, &EasingContextPane::easingExtremesChanged);
- connect(ui->easingShapeComboBox, &QComboBox::currentIndexChanged,
+ connect(m_easingShapeComboBox, &QComboBox::currentIndexChanged,
this, &EasingContextPane::easingShapeChanged);
- connect(ui->durationSpinBox, &QSpinBox::valueChanged,
+ connect(m_durationSpinBox, &QSpinBox::valueChanged,
this, &EasingContextPane::durationChanged);
}
-EasingContextPane::~EasingContextPane()
-{
- delete ui;
-}
-
-
bool EasingContextPane::acceptsType(const QStringList &types)
{
return types.contains(QLatin1String("NumberAnimation")) ||
@@ -140,7 +194,7 @@ bool EasingContextPane::acceptsType(const QStringList &types)
void EasingContextPane::setProperties(QmlJS::PropertyReader *propertyReader)
{
- m_easingGraph->setGeometry(ui->graphicsView->geometry().adjusted(2,2,-2,-2));
+ m_easingGraph->setGeometry(m_graphicsView->geometry().adjusted(2,2,-2,-2));
QString newEasingType = QLatin1String("Linear");
if (propertyReader->hasProperty(QLatin1String("easing.type"))) {
newEasingType = propertyReader->readProperty(QLatin1String("easing.type")).toString();
@@ -149,49 +203,49 @@ void EasingContextPane::setProperties(QmlJS::PropertyReader *propertyReader)
}
m_easingGraph->setEasingName(newEasingType);
- ui->easingShapeComboBox->setCurrentIndex(ui->easingShapeComboBox->findText(m_easingGraph->easingShape()));
- ui->easingExtremesComboBox->setCurrentIndex(ui->easingExtremesComboBox->findText(m_easingGraph->easingExtremes()));
+ m_easingShapeComboBox->setCurrentIndex(m_easingShapeComboBox->findText(m_easingGraph->easingShape()));
+ m_easingExtremesComboBox->setCurrentIndex(m_easingExtremesComboBox->findText(m_easingGraph->easingExtremes()));
if (propertyReader->hasProperty(QLatin1String("easing.period"))) {
qreal period = propertyReader->readProperty(QLatin1String("easing.period")).toDouble();
- if (period < ui->periodSpinBox->minimum() || period > ui->periodSpinBox->maximum())
- ui->periodSpinBox->setValue(ui->periodSpinBox->minimum());
+ if (period < m_periodSpinBox->minimum() || period > m_periodSpinBox->maximum())
+ m_periodSpinBox->setValue(m_periodSpinBox->minimum());
else
- ui->periodSpinBox->setValue(period);
+ m_periodSpinBox->setValue(period);
}
else
- ui->periodSpinBox->setValue(0.3);
+ m_periodSpinBox->setValue(0.3);
if (propertyReader->hasProperty(QLatin1String("easing.amplitude"))) {
qreal amplitude = propertyReader->readProperty(QLatin1String("easing.amplitude")).toDouble();
- if (amplitude < ui->amplitudeSpinBox->minimum() || amplitude > ui->amplitudeSpinBox->maximum())
- ui->amplitudeSpinBox->setValue(ui->amplitudeSpinBox->minimum());
+ if (amplitude < m_amplitudeSpinBox->minimum() || amplitude > m_amplitudeSpinBox->maximum())
+ m_amplitudeSpinBox->setValue(m_amplitudeSpinBox->minimum());
else
- ui->amplitudeSpinBox->setValue(amplitude);
+ m_amplitudeSpinBox->setValue(amplitude);
}
else
- ui->amplitudeSpinBox->setValue(1.0);
+ m_amplitudeSpinBox->setValue(1.0);
if (propertyReader->hasProperty(QLatin1String("easing.overshoot"))) {
qreal overshoot = propertyReader->readProperty(QLatin1String("easing.overshoot")).toDouble();
- if (overshoot < ui->overshootSpinBox->minimum() || overshoot > ui->overshootSpinBox->maximum())
- ui->overshootSpinBox->setValue(ui->overshootSpinBox->minimum());
+ if (overshoot < m_overshootSpinBox->minimum() || overshoot > m_overshootSpinBox->maximum())
+ m_overshootSpinBox->setValue(m_overshootSpinBox->minimum());
else
- ui->overshootSpinBox->setValue(overshoot);
+ m_overshootSpinBox->setValue(overshoot);
}
else
- ui->overshootSpinBox->setValue(1.70158);
+ m_overshootSpinBox->setValue(1.70158);
if (propertyReader->hasProperty(QLatin1String("duration"))) {
qreal duration = propertyReader->readProperty(QLatin1String("duration")).toInt();
- if (duration < ui->durationSpinBox->minimum() || duration > ui->durationSpinBox->maximum())
- ui->durationSpinBox->setValue(ui->durationSpinBox->minimum());
+ if (duration < m_durationSpinBox->minimum() || duration > m_durationSpinBox->maximum())
+ m_durationSpinBox->setValue(m_durationSpinBox->minimum());
else
- ui->durationSpinBox->setValue(duration);
+ m_durationSpinBox->setValue(duration);
}
else
- ui->durationSpinBox->setValue(250);
+ m_durationSpinBox->setValue(250);
}
void EasingContextPane::setGraphDisplayMode(GraphDisplayMode newMode)
@@ -218,71 +272,71 @@ void EasingContextPane::startAnimation()
if (m_simulation->running()) {
m_simulation->stop();
} else {
- m_simulation->animate(ui->durationSpinBox->value(), m_easingGraph->easingCurve());
- ui->playButton->setIcon(Utils::Icons::STOP_SMALL.icon());
+ m_simulation->animate(m_durationSpinBox->value(), m_easingGraph->easingCurve());
+ m_playButton->setIcon(Utils::Icons::STOP_SMALL.icon());
}
}
void EasingContextPane::switchToGraph()
{
- ui->playButton->setIcon(Utils::Icons::RUN_SMALL.icon());
+ m_playButton->setIcon(Utils::Icons::RUN_SMALL.icon());
setGraphDisplayMode(GraphMode);
}
void EasingContextPane::setOthers()
{
- ui->easingExtremesComboBox->setEnabled(true);
- ui->amplitudeSpinBox->setEnabled(false);
- ui->overshootSpinBox->setEnabled(false);
- ui->overshootSpinBox->setEnabled(false);
- ui->periodSpinBox->setEnabled(false);
+ m_easingExtremesComboBox->setEnabled(true);
+ m_amplitudeSpinBox->setEnabled(false);
+ m_overshootSpinBox->setEnabled(false);
+ m_overshootSpinBox->setEnabled(false);
+ m_periodSpinBox->setEnabled(false);
}
void EasingContextPane::setLinear()
{
- ui->easingExtremesComboBox->setEnabled(false);
- ui->amplitudeSpinBox->setEnabled(false);
- ui->overshootSpinBox->setEnabled(false);
- ui->periodSpinBox->setEnabled(false);
+ m_easingExtremesComboBox->setEnabled(false);
+ m_amplitudeSpinBox->setEnabled(false);
+ m_overshootSpinBox->setEnabled(false);
+ m_periodSpinBox->setEnabled(false);
}
void EasingContextPane::setBack()
{
- ui->easingExtremesComboBox->setEnabled(true);
- ui->amplitudeSpinBox->setEnabled(false);
- ui->overshootSpinBox->setEnabled(true);
- ui->periodSpinBox->setEnabled(false);
+ m_easingExtremesComboBox->setEnabled(true);
+ m_amplitudeSpinBox->setEnabled(false);
+ m_overshootSpinBox->setEnabled(true);
+ m_periodSpinBox->setEnabled(false);
}
void EasingContextPane::setElastic()
{
- ui->easingExtremesComboBox->setEnabled(true);
- ui->amplitudeSpinBox->setEnabled(true);
- ui->overshootSpinBox->setEnabled(false);
- ui->periodSpinBox->setEnabled(true);
+ m_easingExtremesComboBox->setEnabled(true);
+ m_amplitudeSpinBox->setEnabled(true);
+ m_overshootSpinBox->setEnabled(false);
+ m_periodSpinBox->setEnabled(true);
}
void EasingContextPane::setBounce()
{
- ui->easingExtremesComboBox->setEnabled(true);
- ui->amplitudeSpinBox->setEnabled(true);
- ui->overshootSpinBox->setEnabled(false);
- ui->periodSpinBox->setEnabled(false);
+ m_easingExtremesComboBox->setEnabled(true);
+ m_amplitudeSpinBox->setEnabled(true);
+ m_overshootSpinBox->setEnabled(false);
+ m_periodSpinBox->setEnabled(false);
}
} //QmlDesigner
void QmlEditorWidgets::EasingContextPane::durationChanged(int newValue)
{
- m_simulation->updateCurve(m_easingGraph->easingCurve(),ui->durationSpinBox->value());
+ m_simulation->updateCurve(m_easingGraph->easingCurve(),m_durationSpinBox->value());
emit propertyChanged(QLatin1String("duration"), newValue);
}
void QmlEditorWidgets::EasingContextPane::easingShapeChanged(int newIndex)
{
QTC_ASSERT(newIndex >= 0, return);
- const QString newShape = ui->easingShapeComboBox->itemText(newIndex);
+ const QString newShape = m_easingShapeComboBox->itemText(newIndex);
if (newShape==QLatin1String("Linear"))
setLinear();
else if (newShape==QLatin1String("Bounce"))
@@ -297,10 +351,10 @@ void QmlEditorWidgets::EasingContextPane::easingShapeChanged(int newIndex)
if (m_easingGraph->easingShape() != newShape) {
m_easingGraph->setEasingShape(newShape);
// reload easing parameters
- m_easingGraph->setAmplitude(ui->amplitudeSpinBox->value());
- m_easingGraph->setPeriod(ui->periodSpinBox->value());
- m_easingGraph->setOvershoot(ui->overshootSpinBox->value());
- m_simulation->updateCurve(m_easingGraph->easingCurve(),ui->durationSpinBox->value());
+ m_easingGraph->setAmplitude(m_amplitudeSpinBox->value());
+ m_easingGraph->setPeriod(m_periodSpinBox->value());
+ m_easingGraph->setOvershoot(m_overshootSpinBox->value());
+ m_simulation->updateCurve(m_easingGraph->easingCurve(),m_durationSpinBox->value());
emit propertyChanged(QLatin1String("easing.type"), QVariant(QLatin1String("Easing.")+m_easingGraph->easingName()));
}
}
@@ -308,13 +362,13 @@ void QmlEditorWidgets::EasingContextPane::easingShapeChanged(int newIndex)
void QmlEditorWidgets::EasingContextPane::easingExtremesChanged(int newIndex)
{
QTC_ASSERT(newIndex >= 0, return);
- const QString newExtremes = ui->easingExtremesComboBox->itemText(newIndex);
+ const QString newExtremes = m_easingExtremesComboBox->itemText(newIndex);
if (m_easingGraph->easingExtremes() != newExtremes) {
m_easingGraph->setEasingExtremes(newExtremes);
- m_easingGraph->setAmplitude(ui->amplitudeSpinBox->value());
- m_easingGraph->setPeriod(ui->periodSpinBox->value());
- m_easingGraph->setOvershoot(ui->overshootSpinBox->value());
- m_simulation->updateCurve(m_easingGraph->easingCurve(),ui->durationSpinBox->value());
+ m_easingGraph->setAmplitude(m_amplitudeSpinBox->value());
+ m_easingGraph->setPeriod(m_periodSpinBox->value());
+ m_easingGraph->setOvershoot(m_overshootSpinBox->value());
+ m_simulation->updateCurve(m_easingGraph->easingCurve(),m_durationSpinBox->value());
emit propertyChanged(QLatin1String("easing.type"), QVariant(QLatin1String("Easing.")+m_easingGraph->easingName()));
}
}
@@ -325,7 +379,7 @@ void QmlEditorWidgets::EasingContextPane::amplitudeChanged(double newAmplitude)
(m_easingGraph->easingShape()==QLatin1String("Bounce")
|| m_easingGraph->easingShape()==QLatin1String("Elastic"))) {
m_easingGraph->setAmplitude(newAmplitude);
- m_simulation->updateCurve(m_easingGraph->easingCurve(),ui->durationSpinBox->value());
+ m_simulation->updateCurve(m_easingGraph->easingCurve(),m_durationSpinBox->value());
emit propertyChanged(QLatin1String("easing.amplitude"), newAmplitude);
}
}
@@ -334,7 +388,7 @@ void QmlEditorWidgets::EasingContextPane::periodChanged(double newPeriod)
{
if ((newPeriod != m_easingGraph->period()) && (m_easingGraph->easingShape()==QLatin1String("Elastic"))) {
m_easingGraph->setPeriod(newPeriod);
- m_simulation->updateCurve(m_easingGraph->easingCurve(),ui->durationSpinBox->value());
+ m_simulation->updateCurve(m_easingGraph->easingCurve(),m_durationSpinBox->value());
emit propertyChanged(QLatin1String("easing.period"), newPeriod);
}
@@ -344,7 +398,7 @@ void QmlEditorWidgets::EasingContextPane::overshootChanged(double newOvershoot)
{
if ((newOvershoot != m_easingGraph->overshoot()) && (m_easingGraph->easingShape()==QLatin1String("Back"))) {
m_easingGraph->setOvershoot(newOvershoot);
- m_simulation->updateCurve(m_easingGraph->easingCurve(),ui->durationSpinBox->value());
+ m_simulation->updateCurve(m_easingGraph->easingCurve(),m_durationSpinBox->value());
emit propertyChanged(QLatin1String("easing.overshoot"), newOvershoot);
}
}
diff --git a/src/libs/qmleditorwidgets/easingpane/easingcontextpane.h b/src/libs/qmleditorwidgets/easingpane/easingcontextpane.h
index e2d7a89fe6..570de97fd7 100644
--- a/src/libs/qmleditorwidgets/easingpane/easingcontextpane.h
+++ b/src/libs/qmleditorwidgets/easingpane/easingcontextpane.h
@@ -3,18 +3,23 @@
#pragma once
-#include "easinggraph.h"
-
#include <QWidget>
QT_BEGIN_NAMESPACE
+class QPushButton;
+class QComboBox;
+class QSpinBox;
+class QDoubleSpinBox;
+class QGraphicsView;
class QVariant;
-namespace Ui { class EasingContextPane; }
QT_END_NAMESPACE
+class EasingGraph;
+
namespace QmlJS { class PropertyReader; }
namespace QmlEditorWidgets {
+
class EasingSimulation;
class EasingContextPane : public QWidget
@@ -24,7 +29,6 @@ class EasingContextPane : public QWidget
enum GraphDisplayMode { GraphMode, SimulationMode };
public:
explicit EasingContextPane(QWidget *parent = nullptr);
- ~EasingContextPane() override;
void setProperties(QmlJS::PropertyReader *propertyReader);
void setGraphDisplayMode(GraphDisplayMode newMode);
@@ -45,7 +49,15 @@ protected:
void setBounce();
private:
- Ui::EasingContextPane *ui;
+ QGraphicsView *m_graphicsView;
+ QPushButton *m_playButton;
+ QComboBox *m_easingShapeComboBox;
+ QSpinBox *m_durationSpinBox;
+ QDoubleSpinBox *m_periodSpinBox;
+ QComboBox *m_easingExtremesComboBox;
+ QDoubleSpinBox *m_amplitudeSpinBox;
+ QDoubleSpinBox *m_overshootSpinBox;
+
GraphDisplayMode m_displayMode;
EasingGraph *m_easingGraph;
EasingSimulation *m_simulation;
diff --git a/src/libs/qmleditorwidgets/easingpane/easingcontextpane.ui b/src/libs/qmleditorwidgets/easingpane/easingcontextpane.ui
deleted file mode 100644
index aa351e986f..0000000000
--- a/src/libs/qmleditorwidgets/easingpane/easingcontextpane.ui
+++ /dev/null
@@ -1,362 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<ui version="4.0">
- <class>EasingContextPane</class>
- <widget class="QWidget" name="EasingContextPane">
- <property name="geometry">
- <rect>
- <x>0</x>
- <y>0</y>
- <width>257</width>
- <height>163</height>
- </rect>
- </property>
- <property name="windowTitle">
- <string>Dialog</string>
- </property>
- <layout class="QGridLayout" name="gridLayout">
- <property name="leftMargin">
- <number>0</number>
- </property>
- <property name="topMargin">
- <number>3</number>
- </property>
- <property name="rightMargin">
- <number>3</number>
- </property>
- <property name="bottomMargin">
- <number>3</number>
- </property>
- <property name="spacing">
- <number>3</number>
- </property>
- <item row="0" column="0" colspan="4">
- <widget class="QGraphicsView" name="graphicsView">
- <property name="enabled">
- <bool>true</bool>
- </property>
- <property name="interactive">
- <bool>false</bool>
- </property>
- </widget>
- </item>
- <item row="0" column="4">
- <widget class="QPushButton" name="playButton">
- <property name="minimumSize">
- <size>
- <width>0</width>
- <height>83</height>
- </size>
- </property>
- <property name="maximumSize">
- <size>
- <width>30</width>
- <height>16777215</height>
- </size>
- </property>
- <property name="toolTip">
- <string>Play simulation.</string>
- </property>
- </widget>
- </item>
- <item row="1" column="0">
- <widget class="QLabel" name="label_5">
- <property name="text">
- <string>Easing</string>
- </property>
- <property name="alignment">
- <set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
- </property>
- </widget>
- </item>
- <item row="1" column="1">
- <widget class="QComboBox" name="easingShapeComboBox">
- <property name="sizePolicy">
- <sizepolicy hsizetype="MinimumExpanding" vsizetype="Fixed">
- <horstretch>0</horstretch>
- <verstretch>0</verstretch>
- </sizepolicy>
- </property>
- <property name="maximumSize">
- <size>
- <width>70</width>
- <height>16777215</height>
- </size>
- </property>
- <property name="toolTip">
- <string>Type of easing curve.</string>
- </property>
- <item>
- <property name="text">
- <string notr="true">Linear</string>
- </property>
- </item>
- <item>
- <property name="text">
- <string notr="true">Quad</string>
- </property>
- </item>
- <item>
- <property name="text">
- <string notr="true">Cubic</string>
- </property>
- </item>
- <item>
- <property name="text">
- <string notr="true">Quart</string>
- </property>
- </item>
- <item>
- <property name="text">
- <string notr="true">Quint</string>
- </property>
- </item>
- <item>
- <property name="text">
- <string notr="true">Sine</string>
- </property>
- </item>
- <item>
- <property name="text">
- <string notr="true">Expo</string>
- </property>
- </item>
- <item>
- <property name="text">
- <string notr="true">Circ</string>
- </property>
- </item>
- <item>
- <property name="text">
- <string notr="true">Elastic</string>
- </property>
- </item>
- <item>
- <property name="text">
- <string notr="true">Back</string>
- </property>
- </item>
- <item>
- <property name="text">
- <string notr="true">Bounce</string>
- </property>
- </item>
- </widget>
- </item>
- <item row="1" column="2">
- <widget class="QLabel" name="label_6">
- <property name="layoutDirection">
- <enum>Qt::LeftToRight</enum>
- </property>
- <property name="text">
- <string>Subtype</string>
- </property>
- <property name="alignment">
- <set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
- </property>
- </widget>
- </item>
- <item row="1" column="3" colspan="2">
- <widget class="QComboBox" name="easingExtremesComboBox">
- <property name="sizePolicy">
- <sizepolicy hsizetype="MinimumExpanding" vsizetype="Fixed">
- <horstretch>0</horstretch>
- <verstretch>0</verstretch>
- </sizepolicy>
- </property>
- <property name="toolTip">
- <string>Acceleration or deceleration of easing curve.</string>
- </property>
- <item>
- <property name="text">
- <string notr="true">In</string>
- </property>
- </item>
- <item>
- <property name="text">
- <string notr="true">Out</string>
- </property>
- </item>
- <item>
- <property name="text">
- <string notr="true">InOut</string>
- </property>
- </item>
- <item>
- <property name="text">
- <string notr="true">OutIn</string>
- </property>
- </item>
- </widget>
- </item>
- <item row="2" column="0">
- <widget class="QLabel" name="label_2">
- <property name="text">
- <string>Duration</string>
- </property>
- <property name="alignment">
- <set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
- </property>
- </widget>
- </item>
- <item row="2" column="1">
- <widget class="QSpinBox" name="durationSpinBox">
- <property name="maximumSize">
- <size>
- <width>70</width>
- <height>16777215</height>
- </size>
- </property>
- <property name="toolTip">
- <string>Duration of animation.</string>
- </property>
- <property name="specialValueText">
- <string>INVALID</string>
- </property>
- <property name="keyboardTracking">
- <bool>false</bool>
- </property>
- <property name="suffix">
- <string> ms</string>
- </property>
- <property name="minimum">
- <number>-1</number>
- </property>
- <property name="maximum">
- <number>9999999</number>
- </property>
- <property name="singleStep">
- <number>10</number>
- </property>
- <property name="value">
- <number>250</number>
- </property>
- </widget>
- </item>
- <item row="2" column="2">
- <widget class="QLabel" name="label">
- <property name="text">
- <string>Amplitude</string>
- </property>
- <property name="alignment">
- <set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
- </property>
- </widget>
- </item>
- <item row="2" column="3" colspan="2">
- <widget class="QDoubleSpinBox" name="amplitudeSpinBox">
- <property name="maximumSize">
- <size>
- <width>70</width>
- <height>16777215</height>
- </size>
- </property>
- <property name="toolTip">
- <string>Amplitude of elastic and bounce easing curves.</string>
- </property>
- <property name="specialValueText">
- <string>INVALID</string>
- </property>
- <property name="keyboardTracking">
- <bool>false</bool>
- </property>
- <property name="decimals">
- <number>3</number>
- </property>
- <property name="maximum">
- <double>999999.989999999990687</double>
- </property>
- <property name="singleStep">
- <double>0.050000000000000</double>
- </property>
- <property name="value">
- <double>1.000000000000000</double>
- </property>
- </widget>
- </item>
- <item row="3" column="0">
- <widget class="QLabel" name="label_3">
- <property name="text">
- <string>Period</string>
- </property>
- <property name="alignment">
- <set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
- </property>
- </widget>
- </item>
- <item row="3" column="1">
- <widget class="QDoubleSpinBox" name="periodSpinBox">
- <property name="maximumSize">
- <size>
- <width>70</width>
- <height>16777215</height>
- </size>
- </property>
- <property name="toolTip">
- <string>Easing period of an elastic curve.</string>
- </property>
- <property name="specialValueText">
- <string>INVALID</string>
- </property>
- <property name="keyboardTracking">
- <bool>false</bool>
- </property>
- <property name="decimals">
- <number>3</number>
- </property>
- <property name="maximum">
- <double>999999.989999999990687</double>
- </property>
- <property name="singleStep">
- <double>0.010000000000000</double>
- </property>
- <property name="value">
- <double>0.300000000000000</double>
- </property>
- </widget>
- </item>
- <item row="3" column="2">
- <widget class="QLabel" name="label_4">
- <property name="text">
- <string>Overshoot</string>
- </property>
- <property name="alignment">
- <set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
- </property>
- </widget>
- </item>
- <item row="3" column="3" colspan="2">
- <widget class="QDoubleSpinBox" name="overshootSpinBox">
- <property name="maximumSize">
- <size>
- <width>70</width>
- <height>16777215</height>
- </size>
- </property>
- <property name="toolTip">
- <string>Easing overshoot for a back curve.</string>
- </property>
- <property name="specialValueText">
- <string>INVALID</string>
- </property>
- <property name="keyboardTracking">
- <bool>false</bool>
- </property>
- <property name="decimals">
- <number>3</number>
- </property>
- <property name="maximum">
- <double>999999.989999999990687</double>
- </property>
- <property name="singleStep">
- <double>0.050000000000000</double>
- </property>
- <property name="value">
- <double>1.700000000000000</double>
- </property>
- </widget>
- </item>
- </layout>
- </widget>
- <resources/>
- <connections/>
-</ui>
diff --git a/src/libs/qmleditorwidgets/qmleditorwidgets.qbs b/src/libs/qmleditorwidgets/qmleditorwidgets.qbs
index 8dbf160c25..1c7382c198 100644
--- a/src/libs/qmleditorwidgets/qmleditorwidgets.qbs
+++ b/src/libs/qmleditorwidgets/qmleditorwidgets.qbs
@@ -37,7 +37,7 @@ QtcLibrary {
id: easingPane
prefix: "easingpane/"
files: [
- "easingcontextpane.cpp", "easingcontextpane.h", "easingcontextpane.ui",
+ "easingcontextpane.cpp", "easingcontextpane.h",
"easinggraph.cpp", "easinggraph.h",
"easingpane.qrc",
]