From 9af4b8694f82aa455ce844368c4f9c00b6f907b9 Mon Sep 17 00:00:00 2001 From: Thomas Hartmann Date: Thu, 13 Feb 2020 13:38:27 +0100 Subject: QmlDesigner: Remove duration from TimelineForm The timeline has an end and start. There was an invisble spinbox for duration that I removed. Change-Id: I5ab8c888db650f97dbb3dac08b5b202fa681d291 Reviewed-by: Tim Jenssen --- .../components/timelineeditor/timelineform.cpp | 6 - .../components/timelineeditor/timelineform.ui | 190 +++++++++------------ 2 files changed, 79 insertions(+), 117 deletions(-) diff --git a/src/plugins/qmldesigner/components/timelineeditor/timelineform.cpp b/src/plugins/qmldesigner/components/timelineeditor/timelineform.cpp index eb63ad4883..db9e8a8ef6 100644 --- a/src/plugins/qmldesigner/components/timelineeditor/timelineform.cpp +++ b/src/plugins/qmldesigner/components/timelineeditor/timelineform.cpp @@ -47,8 +47,6 @@ TimelineForm::TimelineForm(QWidget *parent) { ui->setupUi(this); - ui->duration->setVisible(false); - connect(ui->expressionBindingLineEdit, &QLineEdit::editingFinished, [this]() { QTC_ASSERT(m_timeline.isValid(), return ); @@ -135,13 +133,10 @@ void TimelineForm::setTimeline(const QmlTimeline &timeline) if (m_timeline.isValid()) { ui->idLineEdit->setText(m_timeline.modelNode().displayName()); - ui->duration->setValue(qRound(m_timeline.duration())); ui->startFrame->setValue( m_timeline.modelNode().variantProperty("startFrame").value().toInt()); ui->endFrame->setValue(m_timeline.modelNode().variantProperty("endFrame").value().toInt()); - ui->duration->setValue(qRound(m_timeline.duration())); - if (m_timeline.modelNode().hasBindingProperty("currentFrame")) { ui->expressionBindingLineEdit->setText( m_timeline.modelNode().bindingProperty("currentFrame").expression()); @@ -173,7 +168,6 @@ void TimelineForm::setProperty(const PropertyName &propertyName, const QVariant } catch (const Exception &e) { e.showException(); } - ui->duration->setValue(qRound(m_timeline.duration())); } void TimelineForm::connectSpinBox(QSpinBox *spinBox, const PropertyName &propertyName) diff --git a/src/plugins/qmldesigner/components/timelineeditor/timelineform.ui b/src/plugins/qmldesigner/components/timelineeditor/timelineform.ui index d962608b11..370a6f8154 100644 --- a/src/plugins/qmldesigner/components/timelineeditor/timelineform.ui +++ b/src/plugins/qmldesigner/components/timelineeditor/timelineform.ui @@ -11,11 +11,14 @@ - - + + Qt::Horizontal + + QSizePolicy::Expanding + 49 @@ -24,25 +27,36 @@ - - - - - 80 - 0 - + + + + Qt::Horizontal - + - 80 - 16777215 + 49 + 20 - - -100000 + + + + + + End frame: - - 100000 + + Qt::AlignLeading|Qt::AlignLeft|Qt::AlignVCenter + + + + + + + Start frame: + + + Qt::AlignLeading|Qt::AlignLeft|Qt::AlignVCenter @@ -68,46 +82,42 @@ - - - - Duration + + + + false - - Qt::AlignLeading|Qt::AlignLeft|Qt::AlignVCenter + + Expression binding - - + + - Expression binding: + Timeline ID: Qt::AlignLeading|Qt::AlignLeft|Qt::AlignVCenter - - - - Qt::Horizontal - - + + + - 49 - 20 + 160 + 0 - - - - - - End frame: + + + 75 + true + - - Qt::AlignLeading|Qt::AlignLeft|Qt::AlignVCenter + + Timeline Settings @@ -124,8 +134,8 @@ - - + + Qt::Horizontal @@ -140,37 +150,18 @@ - - - - true + + + + Expression binding: - - - 240 - 0 - + + Qt::AlignLeading|Qt::AlignLeft|Qt::AlignVCenter - - - - Qt::Horizontal - - - QSizePolicy::Expanding - - - - 49 - 20 - - - - - - + + 80 @@ -183,21 +174,11 @@ 16777215 - - true + + -100000 - 200000 - - - - - - - false - - - Expression binding + 100000 @@ -208,44 +189,31 @@ - - - - Timeline ID: - - - Qt::AlignLeading|Qt::AlignLeft|Qt::AlignVCenter + + + + true - - - - - 160 + 240 0 - - - 75 - true - - - - Timeline Settings - - - - - Start frame: + + + + Qt::Horizontal - - Qt::AlignLeading|Qt::AlignLeft|Qt::AlignVCenter + + + 49 + 20 + - + -- cgit v1.2.1