summaryrefslogtreecommitdiffstats
path: root/src/corelib/tools/qeasingcurve.cpp
Commit message (Collapse)AuthorAgeFilesLines
...
* fix a few qdoc command typosJeremy Katz2012-08-011-1/+1
| | | | | Change-Id: I5eb3a6d2bb7939f001f1fcb836660dd46a47c350 Reviewed-by: Casper van Donderen <casper.vandonderen@nokia.com>
* Change remaining uses of {to,from}Ascii to {to,from}Latin1 [QtCore]Thiago Macieira2012-05-041-3/+3
| | | | | | | | | | | This operation should be a no-op anyway, since at this point in time, the fromAscii and toAscii functions simply call their fromLatin1 and toLatin1 counterparts. Task-number: QTBUG-21872 Change-Id: I38f97ad379deafebef02c75d611343ca15640c8a Reviewed-by: Lars Knoll <lars.knoll@nokia.com> Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@nokia.com>
* Doc: Prepare for building modular QtCore docs.Casper van Donderen2012-04-191-95/+85
| | | | | | | | | | | | This change fixes most qdoc errors in QtCore. There are about 900 left. The main thing this change does is moving documentation from qtcore from /doc/src to /src/corelib/doc. Other issues resolved are mis-use of qdoc commands. Change-Id: I002d01edfb13575e8bf27ce91596a577a92562d1 Reviewed-by: Lars Knoll <lars.knoll@nokia.com> Reviewed-by: Jason McDonald <jason.mcdonald@nokia.com> Reviewed-by: Jerome Pasion <jerome.pasion@nokia.com>
* Make {TCBPoint,QEasingCurveFunction}::operator==() consthjk2012-04-161-3/+3
| | | | | | | | This is needed to use the classes with standard algorithms and is the Right Thing anyway. Change-Id: I13d1e0bfabbd216319cc138f11a9b3240f093052 Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
* QEasingCurve: fix a missing */Marc Mutz2012-02-221-0/+1
| | | | | Change-Id: I344342e950158c9dc832f1cd181d92899ddb1651 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* QEasingCurve: implement copy assignment operator inlineMarc Mutz2012-02-211-14/+1
| | | | | | | | | | Implement the copy-assignment operator inline, using the copy-swap idiom. This makes assignment strongly exception safe, but also simplifies maintainence, because op= is formulated in terms of the copy constructor now. Change-Id: I803c9100a520d659b685992237cb76fd114222c8 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* QEasingCurve: simplify and fix copy constructorMarc Mutz2012-02-211-4/+6
| | | | | | | | | | | | | | | | | | | | | | The copy constructor used the default Private constructor, followed by the application of the compiler-generated copy assignment operator, and finally replaced the config member with a copy of itself. This is needlessly inefficient. Worse: it's incorrect: if config->copy() throws, then *d_ptr is leaked. Solution: implement the copy constructor for Private, and use it in the copy constructor of the public class. Effect: everything that can throw now prevents the new Private class from being created, and the compiler ends up cleaning up after us. Change-Id: I09ed18bb39ee7cd81aaa8ba01676fc202502a8e3 Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
* QEasingCurve: add member-swapMarc Mutz2012-02-211-0/+7
| | | | | | | | Implementated as in QPen etc. Change-Id: Ia08551bf7902b60e115d1b1d2353030597e34841 Reviewed-by: Lars Knoll <lars.knoll@nokia.com> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* QEasingCurve: return QVector for cubic spline representationMarc Mutz2012-02-181-3/+9
| | | | | | | | | | | | | | QEasingCurve internally holds the spline data in a QVector<QPointF>. For the return from cubicBezierSpline(), the vector is transformed into a QList<QPointF>. This involves copying, and into an inefficient (for QPointF payloads) container at that, so deprecate cubicBezierSpline() in favour of a new toCubicSpline() returning the QVector directly. Change-Id: Ie4827fe7c6e289ad97a0b09772e47298779c76ca Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
* Remove "All rights reserved" line from license headers.Jason McDonald2012-01-301-1/+1
| | | | | | | | | | As in the past, to avoid rewriting various autotests that contain line-number information, an extra blank line has been inserted at the end of the license text to ensure that this commit does not change the total number of lines in the license header. Change-Id: I311e001373776812699d6efc045b5f742890c689 Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
* Update contact information in license headers.Jason McDonald2012-01-231-1/+1
| | | | | | | Replace Nokia contact email address with Qt Project website. Change-Id: I431bbbf76d7c27d8b502f87947675c116994c415 Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
* Update copyright year in license headers.Jason McDonald2012-01-051-1/+1
| | | | | Change-Id: I02f2c620296fcd91d4967d58767ea33fc4e1e7dc Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
* adding a getter cubicBezierSpline() to QEasingCurveThomas Hartmann2011-11-181-0/+11
| | | | | Change-Id: Ida722f013613d8633867a902660da30d28aeb918 Reviewed-by: Aaron Kennedy <aaron.kennedy@nokia.com>
* avoid type aliasingThomas Hartmann2011-11-111-9/+30
| | | | | | | | | | | | | | | | | For -O2 gcc activates -fstrict-aliasing. As a result the compiler is allowed to assume that pt[1]=px[1]/3+B1 does not affect t. Therefore the result of _fast_cbrt() was always 0. Using a union for casting avoids this issue. For more details see: http://labs.qt.nokia.com/2011/06/10/type-punning-and-strict-aliasing Also the updated code respect endianness. Change-Id: Id4bed16efac52e494e7357dc2f23f94e8c525df1 Reviewed-by: Olivier Goffart <ogoffart@woboq.com> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Adding custom bezier easing curves to QEasingCurveThomas Hartmann2011-11-021-5/+536
| | | | | | | | | | | | | | | | | | | | | | | | | I added the possibilty to define Bezier/TCB splines and use them as custom easing curves. Note: Splines have a parametric definition. This means we have a function/polynom of t that evalutes to x and y. x/y = f(t). For our purpose we actually need the function y = f(x). So as a first step we have to solve the solution x = f(t) for a given t and then in a second step we evaluate y = f(t). f(t) is a cubic polynom so we use cardanos formula to solve this equation directly. For the casus irreducibilis we need 3 functions that are a combination of arcos and cos. Instead of evaluating arcos and cos we approximate these functions directly. TCB splines are converted into the corresponding cubic bezier spline. Change-Id: Id2afc15efac92e494d6358dc2e11f94e8c524da1 Reviewed-by: Aaron Kennedy <aaron.kennedy@nokia.com>
* Update licenseheader text in source files for qtbase Qt moduleJyri Tahtela2011-05-241-17/+17
| | | | | | | Updated version of LGPL and FDL licenseheaders. Apply release phase licenseheaders for all source files. Reviewed-by: Trust Me
* Initial import from the monolithic Qt.Qt by Nokia2011-04-271-0/+937
This is the beginning of revision history for this module. If you want to look at revision history older than this, please refer to the Qt Git wiki for how to use Git history grafting. At the time of writing, this wiki is located here: http://qt.gitorious.org/qt/pages/GitIntroductionWithQt If you have already performed the grafting and you don't see any history beyond this commit, try running "git log" with the "--follow" argument. Branched from the monolithic repo, Qt master branch, at commit 896db169ea224deb96c59ce8af800d019de63f12