Unify qmleasing and easingcurveeditor
authorAlan Alpert <416365416c@gmail.com>
Tue, 20 Nov 2012 03:01:50 +0000 (19:01 -0800)
committerThe Qt Project <gerrit-noreply@qt-project.org>
Wed, 21 Nov 2012 15:49:23 +0000 (16:49 +0100)
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>
20 files changed:
tools/easingcurveeditor/easingcurveeditor.pro [deleted file]
tools/easingcurveeditor/main.cpp [deleted file]
tools/easingcurveeditor/resources.qrc [deleted file]
tools/qmleasing/Button.qml [moved from tools/easingcurveeditor/Button.qml with 100% similarity]
tools/qmleasing/TextField.qml [deleted file]
tools/qmleasing/easing.qml [deleted file]
tools/qmleasing/import.ui [new file with mode: 0644]
tools/qmleasing/main.cpp
tools/qmleasing/mainwindow.cpp [moved from tools/easingcurveeditor/mainwindow.cpp with 80% similarity]
tools/qmleasing/mainwindow.h [moved from tools/easingcurveeditor/mainwindow.h with 96% similarity]
tools/qmleasing/pane.ui [moved from tools/easingcurveeditor/pane.ui with 100% similarity]
tools/qmleasing/preview.qml [moved from tools/easingcurveeditor/preview.qml with 100% similarity]
tools/qmleasing/properties.ui [moved from tools/easingcurveeditor/properties.ui with 92% similarity]
tools/qmleasing/qmleasing.pro
tools/qmleasing/resources.qrc
tools/qmleasing/segmentproperties.cpp [moved from tools/easingcurveeditor/segmentproperties.cpp with 100% similarity]
tools/qmleasing/segmentproperties.h [moved from tools/easingcurveeditor/segmentproperties.h with 100% similarity]
tools/qmleasing/splineeditor.cpp [moved from tools/easingcurveeditor/splineeditor.cpp with 100% similarity]
tools/qmleasing/splineeditor.h [moved from tools/easingcurveeditor/splineeditor.h with 100% similarity]
tools/tools.pro

diff --git a/tools/easingcurveeditor/easingcurveeditor.pro b/tools/easingcurveeditor/easingcurveeditor.pro
deleted file mode 100644 (file)
index 91f6516..0000000
+++ /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 (file)
index 212b9b1..0000000
+++ /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 (file)
index c184af4..0000000
+++ /dev/null
@@ -1,6 +0,0 @@
-<RCC>
-    <qresource prefix="/">
-        <file>preview.qml</file>
-        <file>Button.qml</file>
-    </qresource>
-</RCC>
diff --git a/tools/qmleasing/TextField.qml b/tools/qmleasing/TextField.qml
deleted file mode 100644 (file)
index 7fedab8..0000000
+++ /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 (file)
index 8bed5ba..0000000
+++ /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 (file)
index 0000000..86b80e2
--- /dev/null
@@ -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>
index 60a6f37..212b9b1 100644 (file)
 **
 ****************************************************************************/
 
-#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"
similarity index 80%
rename from tools/easingcurveeditor/mainwindow.cpp
rename to tools/qmleasing/mainwindow.cpp
index 7f7b2d9..3cf6d22 100644 (file)
@@ -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);
+}
similarity index 96%
rename from tools/easingcurveeditor/mainwindow.h
rename to tools/qmleasing/mainwindow.h
index 9ab58e6..f2fcc61 100644 (file)
@@ -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;
 
 };
similarity index 92%
rename from tools/easingcurveeditor/properties.ui
rename to tools/qmleasing/properties.ui
index af96e9c..ea28df3 100644 (file)
@@ -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>
      </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">
      </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/>
index b43071c..eadcb30 100644 (file)
@@ -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
index c7a67b8..c184af4 100644 (file)
@@ -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>
index 3966411..abb246f 100644 (file)
@@ -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