diff options
author | Alan Alpert <416365416c@gmail.com> | 2012-11-19 19:01:50 -0800 |
---|---|---|
committer | The Qt Project <gerrit-noreply@qt-project.org> | 2012-11-21 16:49:23 +0100 |
commit | 69cc8cd7acf36f1d1f73e6e30d7162bfe59c364e (patch) | |
tree | b9e6fb3c4080006933572ec0f7c84979e2b61faa /tools | |
parent | e03e870b7b4aac85e85b56655ccbc5d99c91053f (diff) |
Unify qmleasing and easingcurveeditor
Keeping the name qmleasing, but most of the code from easingcurveeditor.
easingcurveeditor had more UI and functionality, as qmleasing could only
import AfterEffects curves. That functionality has now been added to
easingcurveeditor.
Change-Id: Iac1a004f13fe33a18449af1b08bd22138d525322
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
Reviewed-by: Christopher Adams <chris.adams@jollamobile.com>
Reviewed-by: Thomas Hartmann <Thomas.Hartmann@digia.com>
Diffstat (limited to 'tools')
-rw-r--r-- | tools/easingcurveeditor/easingcurveeditor.pro | 19 | ||||
-rw-r--r-- | tools/easingcurveeditor/main.cpp | 55 | ||||
-rw-r--r-- | tools/easingcurveeditor/resources.qrc | 6 | ||||
-rw-r--r-- | tools/qmleasing/Button.qml (renamed from tools/easingcurveeditor/Button.qml) | 0 | ||||
-rw-r--r-- | tools/qmleasing/TextField.qml | 76 | ||||
-rw-r--r-- | tools/qmleasing/easing.qml | 219 | ||||
-rw-r--r-- | tools/qmleasing/import.ui | 139 | ||||
-rw-r--r-- | tools/qmleasing/main.cpp | 73 | ||||
-rw-r--r-- | tools/qmleasing/mainwindow.cpp (renamed from tools/easingcurveeditor/mainwindow.cpp) | 27 | ||||
-rw-r--r-- | tools/qmleasing/mainwindow.h (renamed from tools/easingcurveeditor/mainwindow.h) | 3 | ||||
-rw-r--r-- | tools/qmleasing/pane.ui (renamed from tools/easingcurveeditor/pane.ui) | 0 | ||||
-rw-r--r-- | tools/qmleasing/preview.qml (renamed from tools/easingcurveeditor/preview.qml) | 0 | ||||
-rw-r--r-- | tools/qmleasing/properties.ui (renamed from tools/easingcurveeditor/properties.ui) | 11 | ||||
-rw-r--r-- | tools/qmleasing/qmleasing.pro | 17 | ||||
-rw-r--r-- | tools/qmleasing/resources.qrc | 4 | ||||
-rw-r--r-- | tools/qmleasing/segmentproperties.cpp (renamed from tools/easingcurveeditor/segmentproperties.cpp) | 0 | ||||
-rw-r--r-- | tools/qmleasing/segmentproperties.h (renamed from tools/easingcurveeditor/segmentproperties.h) | 0 | ||||
-rw-r--r-- | tools/qmleasing/splineeditor.cpp (renamed from tools/easingcurveeditor/splineeditor.cpp) | 0 | ||||
-rw-r--r-- | tools/qmleasing/splineeditor.h (renamed from tools/easingcurveeditor/splineeditor.h) | 0 | ||||
-rw-r--r-- | tools/tools.pro | 3 |
20 files changed, 202 insertions, 450 deletions
diff --git a/tools/easingcurveeditor/easingcurveeditor.pro b/tools/easingcurveeditor/easingcurveeditor.pro deleted file mode 100644 index 91f6516ade..0000000000 --- a/tools/easingcurveeditor/easingcurveeditor.pro +++ /dev/null @@ -1,19 +0,0 @@ -QT += qml quick widgets -CONFIG -= app_bundle - -# Input -SOURCES += main.cpp \ - splineeditor.cpp \ - mainwindow.cpp \ - segmentproperties.cpp - -RESOURCES = $$PWD/resources.qrc - -HEADERS += \ - splineeditor.h \ - mainwindow.h \ - segmentproperties.h - -FORMS += \ - properties.ui \ - pane.ui diff --git a/tools/easingcurveeditor/main.cpp b/tools/easingcurveeditor/main.cpp deleted file mode 100644 index 212b9b1fd2..0000000000 --- a/tools/easingcurveeditor/main.cpp +++ /dev/null @@ -1,55 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies). -** Contact: http://www.qt-project.org/legal -** -** This file is part of the tools applications of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:LGPL$ -** Commercial License Usage -** Licensees holding valid commercial Qt licenses may use this file in -** accordance with the commercial license agreement provided with the -** Software or, alternatively, in accordance with the terms contained in -** a written agreement between you and Digia. For licensing terms and -** conditions see http://qt.digia.com/licensing. For further information -** use the contact form at http://qt.digia.com/contact-us. -** -** GNU Lesser General Public License Usage -** Alternatively, this file may be used under the terms of the GNU Lesser -** General Public License version 2.1 as published by the Free Software -** Foundation and appearing in the file LICENSE.LGPL included in the -** packaging of this file. Please review the following information to -** ensure the GNU Lesser General Public License version 2.1 requirements -** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. -** -** In addition, as a special exception, Digia gives you certain additional -** rights. These rights are described in the Digia Qt LGPL Exception -** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. -** -** GNU General Public License Usage -** Alternatively, this file may be used under the terms of the GNU -** General Public License version 3.0 as published by the Free Software -** Foundation and appearing in the file LICENSE.GPL included in the -** packaging of this file. Please review the following information to -** ensure the GNU General Public License version 3.0 requirements will be -** met: http://www.gnu.org/copyleft/gpl.html. -** -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - -#include "mainwindow.h" - -#include <QApplication> - -int main(int argc, char ** argv) -{ - QApplication app(argc, argv); - - MainWindow mainWindow; - mainWindow.show(); - mainWindow.showQuickView(); - - return app.exec(); -} diff --git a/tools/easingcurveeditor/resources.qrc b/tools/easingcurveeditor/resources.qrc deleted file mode 100644 index c184af4662..0000000000 --- a/tools/easingcurveeditor/resources.qrc +++ /dev/null @@ -1,6 +0,0 @@ -<RCC> - <qresource prefix="/"> - <file>preview.qml</file> - <file>Button.qml</file> - </qresource> -</RCC> diff --git a/tools/easingcurveeditor/Button.qml b/tools/qmleasing/Button.qml index f90e8a39b7..f90e8a39b7 100644 --- a/tools/easingcurveeditor/Button.qml +++ b/tools/qmleasing/Button.qml diff --git a/tools/qmleasing/TextField.qml b/tools/qmleasing/TextField.qml deleted file mode 100644 index 7fedab8a03..0000000000 --- a/tools/qmleasing/TextField.qml +++ /dev/null @@ -1,76 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies). -** Contact: http://www.qt-project.org/legal -** -** This file is part of the QtQml module of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:LGPL$ -** Commercial License Usage -** Licensees holding valid commercial Qt licenses may use this file in -** accordance with the commercial license agreement provided with the -** Software or, alternatively, in accordance with the terms contained in -** a written agreement between you and Digia. For licensing terms and -** conditions see http://qt.digia.com/licensing. For further information -** use the contact form at http://qt.digia.com/contact-us. -** -** GNU Lesser General Public License Usage -** Alternatively, this file may be used under the terms of the GNU Lesser -** General Public License version 2.1 as published by the Free Software -** Foundation and appearing in the file LICENSE.LGPL included in the -** packaging of this file. Please review the following information to -** ensure the GNU Lesser General Public License version 2.1 requirements -** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. -** -** In addition, as a special exception, Digia gives you certain additional -** rights. These rights are described in the Digia Qt LGPL Exception -** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. -** -** GNU General Public License Usage -** Alternatively, this file may be used under the terms of the GNU -** General Public License version 3.0 as published by the Free Software -** Foundation and appearing in the file LICENSE.GPL included in the -** packaging of this file. Please review the following information to -** ensure the GNU General Public License version 3.0 requirements will be -** met: http://www.gnu.org/copyleft/gpl.html. -** -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - -import QtQuick 2.0 - -FocusScope { - width: input.x + input.width - height: border.height - - property alias name: name.text - property alias text: input.text - - Text { - id: name - height: parent.height - } - - TextInput { - id: input - anchors.left: name.right - anchors.leftMargin: 4 - focus: true - width: 50 - horizontalAlignment: "AlignRight" - Rectangle { - id: border - x: -2; y: -2 - width: parent.width + 4 - height: parent.height + 4 - color: "transparent" - border.color: input.activeFocus?"green":"lightgreen" - - border.width: 3 - radius: 5 - } - } -} - diff --git a/tools/qmleasing/easing.qml b/tools/qmleasing/easing.qml deleted file mode 100644 index 8bed5ba9ef..0000000000 --- a/tools/qmleasing/easing.qml +++ /dev/null @@ -1,219 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies). -** Contact: http://www.qt-project.org/legal -** -** This file is part of the QtQml module of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:LGPL$ -** Commercial License Usage -** Licensees holding valid commercial Qt licenses may use this file in -** accordance with the commercial license agreement provided with the -** Software or, alternatively, in accordance with the terms contained in -** a written agreement between you and Digia. For licensing terms and -** conditions see http://qt.digia.com/licensing. For further information -** use the contact form at http://qt.digia.com/contact-us. -** -** GNU Lesser General Public License Usage -** Alternatively, this file may be used under the terms of the GNU Lesser -** General Public License version 2.1 as published by the Free Software -** Foundation and appearing in the file LICENSE.LGPL included in the -** packaging of this file. Please review the following information to -** ensure the GNU Lesser General Public License version 2.1 requirements -** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. -** -** In addition, as a special exception, Digia gives you certain additional -** rights. These rights are described in the Digia Qt LGPL Exception -** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. -** -** GNU General Public License Usage -** Alternatively, this file may be used under the terms of the GNU -** General Public License version 3.0 as published by the Free Software -** Foundation and appearing in the file LICENSE.GPL included in the -** packaging of this file. Please review the following information to -** ensure the GNU General Public License version 3.0 requirements will be -** met: http://www.gnu.org/copyleft/gpl.html. -** -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - -import QtQuick 2.0 -import EasingPlot 1.0 - -Rectangle { - width: 775; height: 550 - - function precision(n) - { - var str = n.toPrecision(3); - while (str.length > 1 && (str[str.length - 1] == "0" || str[str.length - 1] == ".")) - str = str.substr(0, str.length - 1); - return str; - } - - function updateEasing() { - var ini = Math.min(100, Math.max(0, Number(in_inf.text))); - var outi = Math.min(100, Math.max(0, Number(out_inf.text))); - - var ins = Number(in_slope.text); - var outs = Number(out_slope.text); - - var p1 = [ (ini / 100), (ini / 100) * ins ]; - var p2 = [ 1 - (outi / 100), 1 - (outi / 100) * outs ]; - - text.text = "[ " + precision(p1[0]) + ", " + precision(p1[1]) + ", " + precision(p2[0]) + ", " + precision(p2[1]) + ", 1, 1 ]"; - } - - Rectangle { - id: border - width: 500; height: 500 - x: 25; y: 25 - border.color: "lightsteelblue" - border.width: 3 - radius: 5 - color: "transparent" - - EasingPlot { - id: plot - - anchors.centerIn: parent - width: parent.width - 10 - height: parent.height - 10 - - easing.type: "Bezier" - easing.bezierCurve: eval(text.text) - } - - } - - Text { - text: "<u>After Effects curve</u>" - anchors.horizontalCenter: text.horizontalCenter - anchors.bottom: column.top - anchors.bottomMargin: 14 - } - - Column { - id: column - - y: 70 - anchors.right: parent.right - anchors.rightMargin: 25 - spacing: 5 - TextField { - id: in_inf - focus: true - name: "Input influence:" - text: "33" - anchors.right: parent.right - KeyNavigation.tab: in_slope - KeyNavigation.backtab: text - onTextChanged: updateEasing(); - } - TextField { - id: in_slope - name: "Input slope:" - text: "0" - anchors.right: parent.right - KeyNavigation.tab: out_inf - KeyNavigation.backtab: in_inf - onTextChanged: updateEasing(); - } - TextField { - id: out_inf - name: "Output influence:" - text: "33" - anchors.right: parent.right - KeyNavigation.tab: out_slope - KeyNavigation.backtab: in_slope - onTextChanged: updateEasing(); - } - TextField { - id: out_slope - name: "Output slope:" - text: "0" - anchors.right: parent.right - KeyNavigation.tab: text - KeyNavigation.backtab: out_info - onTextChanged: updateEasing(); - } - } - - Text { - text: "<u>QML Bezier curve</u>" - anchors.horizontalCenter: text.horizontalCenter - anchors.bottom: text.top - anchors.bottomMargin: 10 - } - - TextEdit { - id: text - x: 200 - width: 200 - height: 200 - - Rectangle { - x: -2; y: -2 - width: parent.width + 4 - height: parent.height + 4 - color: "transparent" - border.color: text.activeFocus?"green":"lightgreen" - - border.width: 3 - radius: 5 - } - - wrapMode: "WordWrap" - - anchors.top: column.bottom - anchors.topMargin: 50 - anchors.right: column.right - KeyNavigation.tab: in_inf - KeyNavigation.backtab: out_slope - } - - - Item { - anchors.left: text.left - anchors.top: text.bottom - anchors.topMargin: 35 - width: text.width - height: rect.height - - Rectangle { - color: "gray" - width: 50; height: 50 - id: rect - - NumberAnimation on x { - id: animation - running: false - easing: plot.easing - duration: 1000 - } - - radius: 5 - } - - MouseArea { - anchors.fill: parent - onClicked: { - if (rect.x < 5) { - animation.to = text.width - rect.width; - } else { - animation.to = 0; - } - animation.start(); - } - } - - Text { - anchors.centerIn: parent - text: "Click to Try" - } - } - - Component.onCompleted: updateEasing(); -} diff --git a/tools/qmleasing/import.ui b/tools/qmleasing/import.ui new file mode 100644 index 0000000000..86b80e241d --- /dev/null +++ b/tools/qmleasing/import.ui @@ -0,0 +1,139 @@ +<?xml version="1.0" encoding="UTF-8"?> +<ui version="4.0"> + <class>ImportDialog</class> + <widget class="QDialog" name="ImportDialog"> + <property name="geometry"> + <rect> + <x>0</x> + <y>0</y> + <width>400</width> + <height>164</height> + </rect> + </property> + <property name="windowTitle"> + <string>Import After Effects Curve</string> + </property> + <widget class="QDialogButtonBox" name="buttonBox"> + <property name="geometry"> + <rect> + <x>40</x> + <y>130</y> + <width>341</width> + <height>32</height> + </rect> + </property> + <property name="orientation"> + <enum>Qt::Horizontal</enum> + </property> + <property name="standardButtons"> + <set>QDialogButtonBox::Cancel|QDialogButtonBox::Ok</set> + </property> + </widget> + <widget class="QWidget" name="formLayoutWidget"> + <property name="geometry"> + <rect> + <x>20</x> + <y>10</y> + <width>361</width> + <height>101</height> + </rect> + </property> + <layout class="QFormLayout" name="formLayout"> + <property name="labelAlignment"> + <set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set> + </property> + <item row="0" column="0"> + <widget class="QLabel" name="label"> + <property name="text"> + <string>Input Influence:</string> + </property> + </widget> + </item> + <item row="2" column="0"> + <widget class="QLabel" name="label_3"> + <property name="text"> + <string>Output Influence:</string> + </property> + </widget> + </item> + <item row="3" column="0"> + <widget class="QLabel" name="label_4"> + <property name="text"> + <string>Output Slope:</string> + </property> + </widget> + </item> + <item row="0" column="1"> + <widget class="QLineEdit" name="inInfluenceEdit"> + <property name="text"> + <string>33</string> + </property> + </widget> + </item> + <item row="1" column="1"> + <widget class="QLineEdit" name="inSlopeEdit"> + <property name="text"> + <string>0</string> + </property> + </widget> + </item> + <item row="2" column="1"> + <widget class="QLineEdit" name="outInfluenceEdit"> + <property name="text"> + <string>33</string> + </property> + </widget> + </item> + <item row="3" column="1"> + <widget class="QLineEdit" name="outSlopeEdit"> + <property name="text"> + <string>0</string> + </property> + </widget> + </item> + <item row="1" column="0"> + <widget class="QLabel" name="label_2"> + <property name="text"> + <string>Input Slope:</string> + </property> + </widget> + </item> + </layout> + </widget> + </widget> + <resources/> + <connections> + <connection> + <sender>buttonBox</sender> + <signal>accepted()</signal> + <receiver>ImportDialog</receiver> + <slot>accept()</slot> + <hints> + <hint type="sourcelabel"> + <x>248</x> + <y>254</y> + </hint> + <hint type="destinationlabel"> + <x>157</x> + <y>274</y> + </hint> + </hints> + </connection> + <connection> + <sender>buttonBox</sender> + <signal>rejected()</signal> + <receiver>ImportDialog</receiver> + <slot>reject()</slot> + <hints> + <hint type="sourcelabel"> + <x>316</x> + <y>260</y> + </hint> + <hint type="destinationlabel"> + <x>286</x> + <y>274</y> + </hint> + </hints> + </connection> + </connections> +</ui> diff --git a/tools/qmleasing/main.cpp b/tools/qmleasing/main.cpp index 60a6f37f55..212b9b1fd2 100644 --- a/tools/qmleasing/main.cpp +++ b/tools/qmleasing/main.cpp @@ -39,78 +39,17 @@ ** ****************************************************************************/ -#include <QPainter> -#include <QtQuick/QQuickView> -#include <QGuiApplication> -#include <QEasingCurve> -#include <QtQuick/QQuickPaintedItem> +#include "mainwindow.h" -class EasingPlot : public QQuickPaintedItem -{ - Q_OBJECT - Q_PROPERTY(QEasingCurve easing READ easing WRITE setEasing NOTIFY easingChanged); - -public: - EasingPlot(); - - QEasingCurve easing() const; - void setEasing(const QEasingCurve &); - -signals: - void easingChanged(); - -protected: - virtual void paint(QPainter *painter); - -private: - QEasingCurve m_easing; -}; - -EasingPlot::EasingPlot() -{ -} - -QEasingCurve EasingPlot::easing() const -{ - return m_easing; -} - -void EasingPlot::setEasing(const QEasingCurve &e) -{ - if (m_easing == e) - return; - - m_easing = e; - emit easingChanged(); - - update(); -} - -void EasingPlot::paint(QPainter *painter) -{ - QPointF lastPoint(0, 0); - - for (int ii = 1; ii <= 100; ++ii) { - qreal value = m_easing.valueForProgress(qreal(ii) / 100.); - - QPointF currentPoint(width() * qreal(ii) / 100., value * (height() - 1)); - painter->drawLine(lastPoint, currentPoint); - - lastPoint = currentPoint; - } -} +#include <QApplication> int main(int argc, char ** argv) { - QGuiApplication app(argc, argv); - - qmlRegisterType<EasingPlot>("EasingPlot", 1, 0, "EasingPlot"); + QApplication app(argc, argv); - QQuickView view; - view.setSource(QUrl("qrc:/easing.qml")); - view.show(); + MainWindow mainWindow; + mainWindow.show(); + mainWindow.showQuickView(); return app.exec(); } - -#include "main.moc" diff --git a/tools/easingcurveeditor/mainwindow.cpp b/tools/qmleasing/mainwindow.cpp index 7f7b2d96af..3cf6d224b9 100644 --- a/tools/easingcurveeditor/mainwindow.cpp +++ b/tools/qmleasing/mainwindow.cpp @@ -47,6 +47,8 @@ #include <QEasingCurve> #include <QHBoxLayout> #include <QVBoxLayout> +#include <QDoubleValidator> +#include <QDialog> MainWindow::MainWindow(QWidget *parent) : QMainWindow(parent) @@ -98,6 +100,16 @@ MainWindow::MainWindow(QWidget *parent) : groupBoxLayout->addWidget(splineEditor->pointListWidget()); m_splineEditor = splineEditor; connect(ui_properties.plainTextEdit, SIGNAL(textChanged()), this, SLOT(textEditTextChanged())); + + QDialog* importDialog = new QDialog(this); + ui_import.setupUi(importDialog); + ui_import.inInfluenceEdit->setValidator(new QDoubleValidator(this)); + ui_import.inSlopeEdit->setValidator(new QDoubleValidator(this)); + ui_import.outInfluenceEdit->setValidator(new QDoubleValidator(this)); + ui_import.outSlopeEdit->setValidator(new QDoubleValidator(this)); + connect(ui_properties.importButton, SIGNAL(clicked()), importDialog, SLOT(show())); + connect(importDialog, SIGNAL(finished(int)), this, SLOT(importData(int))); + connect(this, SIGNAL(close()), this, SLOT(doClose())); initQml(); } @@ -140,3 +152,18 @@ void MainWindow::closeEvent(QCloseEvent *) { quickView.close(); } + +void MainWindow::importData(int result) +{ + if (!result) + return; + double ii = ui_import.inInfluenceEdit->text().toDouble(); + double is = ui_import.inSlopeEdit->text().toDouble(); + double oi = ui_import.outInfluenceEdit->text().toDouble(); + double os = ui_import.outSlopeEdit->text().toDouble(); + ii = qBound<double>(0., ii, 100.) / 100.; + oi = qBound<double>(0., oi, 100.) / 100.; + QString generatedString = QString("[%1,%2,%3,%4,1,1]").arg(ii, 0, 'f', 3) + .arg(ii*is,0,'f',3).arg(1-oi, 0, 'f', 3).arg(1-(oi*os), 0, 'f', 3); + ui_properties.plainTextEdit->setPlainText(generatedString); +} diff --git a/tools/easingcurveeditor/mainwindow.h b/tools/qmleasing/mainwindow.h index 9ab58e65a5..f2fcc61167 100644 --- a/tools/easingcurveeditor/mainwindow.h +++ b/tools/qmleasing/mainwindow.h @@ -45,6 +45,7 @@ #include <QMainWindow> #include <QtQuick/QQuickView> #include "ui_properties.h" +#include "ui_import.h" class SplineEditor; @@ -60,6 +61,7 @@ signals: public slots: void textEditTextChanged(); + void importData(int result); protected: virtual void moveEvent(QMoveEvent *event); @@ -71,6 +73,7 @@ private: QQuickView quickView; QWidget *m_placeholder; Ui_Properties ui_properties; + Ui_ImportDialog ui_import; SplineEditor *m_splineEditor; }; diff --git a/tools/easingcurveeditor/pane.ui b/tools/qmleasing/pane.ui index 1500589192..1500589192 100644 --- a/tools/easingcurveeditor/pane.ui +++ b/tools/qmleasing/pane.ui diff --git a/tools/easingcurveeditor/preview.qml b/tools/qmleasing/preview.qml index 7194b1e0e0..7194b1e0e0 100644 --- a/tools/easingcurveeditor/preview.qml +++ b/tools/qmleasing/preview.qml diff --git a/tools/easingcurveeditor/properties.ui b/tools/qmleasing/properties.ui index af96e9c7a1..ea28df33ac 100644 --- a/tools/easingcurveeditor/properties.ui +++ b/tools/qmleasing/properties.ui @@ -86,7 +86,7 @@ </property> </widget> </item> - <item row="4" column="1"> + <item row="6" column="1"> <spacer name="spacer_2"> <property name="orientation"> <enum>Qt::Vertical</enum> @@ -102,7 +102,7 @@ </property> </spacer> </item> - <item row="5" column="0" colspan="3"> + <item row="9" column="0" colspan="3"> <widget class="QGroupBox" name="groupBox"> <property name="sizePolicy"> <sizepolicy hsizetype="Preferred" vsizetype="Expanding"> @@ -124,6 +124,13 @@ </property> </widget> </item> + <item row="4" column="0" colspan="3"> + <widget class="QPushButton" name="importButton"> + <property name="text"> + <string>Import AfterEffects Curve</string> + </property> + </widget> + </item> </layout> </widget> <resources/> diff --git a/tools/qmleasing/qmleasing.pro b/tools/qmleasing/qmleasing.pro index b43071c4ed..eadcb304c4 100644 --- a/tools/qmleasing/qmleasing.pro +++ b/tools/qmleasing/qmleasing.pro @@ -1,6 +1,19 @@ -QT += qml quick +QT += qml quick widgets CONFIG -= app_bundle -SOURCES += main.cpp +SOURCES += main.cpp \ + splineeditor.cpp \ + mainwindow.cpp \ + segmentproperties.cpp RESOURCES = $$PWD/resources.qrc + +HEADERS += \ + splineeditor.h \ + mainwindow.h \ + segmentproperties.h + +FORMS += \ + properties.ui \ + pane.ui \ + import.ui diff --git a/tools/qmleasing/resources.qrc b/tools/qmleasing/resources.qrc index c7a67b838c..c184af4662 100644 --- a/tools/qmleasing/resources.qrc +++ b/tools/qmleasing/resources.qrc @@ -1,6 +1,6 @@ <RCC> <qresource prefix="/"> - <file>easing.qml</file> - <file>TextField.qml</file> + <file>preview.qml</file> + <file>Button.qml</file> </qresource> </RCC> diff --git a/tools/easingcurveeditor/segmentproperties.cpp b/tools/qmleasing/segmentproperties.cpp index 8dff50e8a5..8dff50e8a5 100644 --- a/tools/easingcurveeditor/segmentproperties.cpp +++ b/tools/qmleasing/segmentproperties.cpp diff --git a/tools/easingcurveeditor/segmentproperties.h b/tools/qmleasing/segmentproperties.h index 8e6701245e..8e6701245e 100644 --- a/tools/easingcurveeditor/segmentproperties.h +++ b/tools/qmleasing/segmentproperties.h diff --git a/tools/easingcurveeditor/splineeditor.cpp b/tools/qmleasing/splineeditor.cpp index 5d1ee8bd31..5d1ee8bd31 100644 --- a/tools/easingcurveeditor/splineeditor.cpp +++ b/tools/qmleasing/splineeditor.cpp diff --git a/tools/easingcurveeditor/splineeditor.h b/tools/qmleasing/splineeditor.h index 301fa1c0d2..301fa1c0d2 100644 --- a/tools/easingcurveeditor/splineeditor.h +++ b/tools/qmleasing/splineeditor.h diff --git a/tools/tools.pro b/tools/tools.pro index 396641193f..abb246f0fe 100644 --- a/tools/tools.pro +++ b/tools/tools.pro @@ -3,10 +3,9 @@ SUBDIRS += \ qmlscene \ qmlplugindump \ qmlmin \ - qmleasing \ qmlprofiler \ qmlbundle \ qmltestrunner -!contains(QT_CONFIG, no-widgets):SUBDIRS += easingcurveeditor +!contains(QT_CONFIG, no-widgets):SUBDIRS += qmleasing |