summaryrefslogtreecommitdiffstats
path: root/src/corelib/tools/qeasingcurve.h
Commit message (Collapse)AuthorAgeFilesLines
* Replace Q_NULLPTR with nullptr where possibleKevin Funk2017-09-191-1/+1
| | | | | | | | | | | | | Remaining uses of Q_NULLPTR are in: src/corelib/global/qcompilerdetection.h (definition and documentation of Q_NULLPTR) tests/manual/qcursor/qcursorhighdpi/main.cpp (a test executable compilable both under Qt4 and Qt5) Change-Id: If6b074d91486e9b784138f4514f5c6d072acda9a Reviewed-by: Ville Voutilainen <ville.voutilainen@qt.io> Reviewed-by: Lars Knoll <lars.knoll@qt.io> Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
* QEasingCurve: mark as sharedGiuseppe D'Angelo2017-02-271-1/+1
| | | | | | | Requires no further changes. Change-Id: Ib280fa69a752aefa1c29fc5f0eb292e99b96270a Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
* Updated license headersJani Heikkinen2016-01-151-14/+20
| | | | | | | | | | | From Qt 5.7 -> LGPL v2.1 isn't an option anymore, see http://blog.qt.io/blog/2016/01/13/new-agreement-with-the-kde-free-qt-foundation/ Updated license headers to use new LGPL header instead of LGPL21 one (in those files which will be under LGPL v3) Change-Id: I046ec3e47b1876cd7b4b0353a576b352e3a946d9 Reviewed-by: Lars Knoll <lars.knoll@theqtcompany.com>
* QEasingCurve: mark nothrow move constructible/assignable and nothrow swappableMarc Mutz2015-12-041-3/+3
| | | | | Change-Id: Ib81e6f2278608e102ed7bfc799525777737a4e87 Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
* QtCore: Use Q_NULLPTR instead of 0 in all public headersMarc Mutz2015-07-011-1/+1
| | | | | | | | | This is in preparation of adding -Wzero-as-null-pointer-constant (or similar) to the headers check. Task-number: QTBUG-45291 Change-Id: I0cc388ef9faf45cbcf425ad0dc77db3060c104a8 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Update copyright headersJani Heikkinen2015-02-111-7/+7
| | | | | | | | | | | | | | | | | | Qt copyrights are now in The Qt Company, so we could update the source code headers accordingly. In the same go we should also fix the links to point to qt.io. Outdated header.LGPL removed (use header.LGPL21 instead) Old header.LGPL3 renamed to header.LGPL3-COMM to match actual licensing combination. New header.LGPL-COMM taken in the use file which were using old header.LGPL3 (src/plugins/platforms/android/extract.cpp) Added new header.LGPL3 containing Commercial + LGPLv3 + GPLv2 license combination Change-Id: I6f49b819a8a20cc4f88b794a8f6726d975e8ffbe Reviewed-by: Matti Paaso <matti.paaso@theqtcompany.com>
* Use Q_ENUM and Q_FLAG for types in QtCoreOlivier Goffart2015-02-041-1/+1
| | | | | | Change-Id: I33590a9c4c6d87c5bbba1d201e32c6bf1bd3e00b Reviewed-by: Lars Knoll <lars.knoll@digia.com> Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
* Update license headers and add new license filesMatti Paaso2014-09-241-19/+11
| | | | | | | | | - Renamed LICENSE.LGPL to LICENSE.LGPLv21 - Added LICENSE.LGPLv3 - Removed LICENSE.GPL Change-Id: Iec3406e3eb3f133be549092015cefe33d259a3f2 Reviewed-by: Iikka Eklund <iikka.eklund@digia.com>
* Remove QT_{BEGIN,END}_HEADER macro usageSergio Ahumada2013-01-291-4/+0
| | | | | | | | | | | The macro was made empty in ba3dc5f3b56d1fab6fe37fe7ae08096d7dc68bcb and is no longer necessary or used. Discussed-on: http://lists.qt-project.org/pipermail/development/2013-January/009284.html Change-Id: Id2bb2e2cabde059305d4af5f12593344ba30f001 Reviewed-by: Laszlo Papp <lpapp@kde.org> Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@digia.com> Reviewed-by: hjk <hjk121@nokiamail.com>
* Update copyright year in Digia's license headersSergio Ahumada2013-01-181-1/+1
| | | | | Change-Id: Ic804938fc352291d011800d21e549c10acac66fb Reviewed-by: Lars Knoll <lars.knoll@digia.com>
* Change copyrights from Nokia to DigiaIikka Eklund2012-09-221-24/+24
| | | | | | | | Change copyrights and license headers from Nokia to Digia Change-Id: If1cc974286d29fd01ec6c19dd4719a67f4c3f00e Reviewed-by: Lars Knoll <lars.knoll@digia.com> Reviewed-by: Sergio Ahumada <sergio.ahumada@digia.com>
* QEasingCurve: implement copy assignment operator inlineMarc Mutz2012-02-211-1/+2
| | | | | | | | | | 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: implement move constructorMarc Mutz2012-02-211-0/+1
| | | | | | | | | | | | | | | | | | | | | The move constructor sets other.d_ptr to zero. This is safe, because after being moved from, the object is left in a state in which it can be safely destroyed (delete nullptr is a no-op). It cannot meaningfully be used anymore (most members will crash with a nullptr dereference), but in most cases, the moved-from object cannot be accessed anyway (not a named object), and if a named object is moved from, it must have been through explicit std::move(), as in the test case. The STL makes better guarantees (moved-from containers are .empty()), but I don't think it's worth introducing a null state into QEasingCurve just for supporting a use-case that should be considered a bug anyway. Change-Id: I4115b7386cdea6960507da6843a0d0196d8e4139 Reviewed-by: Lars Knoll <lars.knoll@nokia.com> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* QEasingCurve: implement move-assignment operatorMarc Mutz2012-02-211-0/+4
| | | | | | | | Implemented as in QPen etc. Change-Id: I65b43c6ec7308ca4b44f614594c15c41ab2f89f9 Reviewed-by: Lars Knoll <lars.knoll@nokia.com> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* QEasingCurve: add member-swapMarc Mutz2012-02-211-0/+3
| | | | | | | | 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: mark as Q_MOVABLE_TYPEMarc Mutz2012-02-211-0/+1
| | | | | | | | | The private data doesn't contain any back-links to the public class, afaics. So QEasingCurve qualifies for movable. Change-Id: Id8ab186fc0a25740458341256b53425dc40bce37 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
* QEasingCurve: return QVector for cubic spline representationMarc Mutz2012-02-181-2/+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>
* Remove use of QT_MODULE from libraryGunnar Sletta2012-01-251-1/+0
| | | | | | | | | | These defines were there to aid in the commercial licensing scheme we used long ago, and are no longer needed. Keep a QT_MODULE(x) define so other modules continue compiling. Change-Id: I8fd76cd5270df8f14aee746b6cf32ebf7c23fec7 Reviewed-by: Lars Knoll <lars.knoll@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/+2
| | | | | Change-Id: Ida722f013613d8633867a902660da30d28aeb918 Reviewed-by: Aaron Kennedy <aaron.kennedy@nokia.com>
* Adding custom bezier easing curves to QEasingCurveThomas Hartmann2011-11-021-1/+5
| | | | | | | | | | | | | | | | | | | | | | | | | 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/+125
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