aboutsummaryrefslogtreecommitdiffstats
path: root/src/quicktemplates2/qquickicon_p.h
Commit message (Collapse)AuthorAgeFilesLines
* Register C++ types declarativelyMitch Curtis2020-08-261-0/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Adapt to the new way of registering C++ types. The types need to be seen at compile time so that code can be generated that invokes them. This patch: - Adds QML_* macros where applicable. - Adapts the build system files to the new way of registering modules. - Splits up the QtQuick.Controls[.*].impl files into their own plugins, as we can only register one QML module per .pro file. - Removes C++ type registration calls in every plugin. - Moves private types from src/quickcontrols2/quickcontrols2.pro to src/quickcontrols2/impl/quickcontrols2-impl.pro. Some of these types need to be exposed to QML, but quickcontrols2.pro is already in use to declare the QtQuick.Controls import (and also provides the public C++ QQuickStyle API), and the new QML_IMPORT_NAME/VERSION syntax only allows one module per project. As some of the types that need to be exposed to QML are also referenced by some C++ code (e.g. tests, etc.), we just move all of the private types to the new library. Follow-up patches will register the QML types declaratively. Task-number: QTBUG-82922 Change-Id: Iaf9ee106237d61701d57a8896f3822304c8151a6 Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
* QQuickIcon: prevent detach-ing when there is nothing to changeKonstantin Ritt2019-09-101-1/+1
| | | | | | | saves a bunch of pointless detach attempts on each deep-copy Change-Id: Ibb1ae99bd54b2d35f9c9aa9e541fb03891ad94ec Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* QQuickIcon: Add support to cache a pixmapMikhail Svetkin2019-01-221-0/+5
| | | | | | | [ChangeLog][Controls] Added cache property to icon. Change-Id: I9b3410e74ab8962d039939a8e005a2aff8e026cb Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* QQuickIcon: fix reset methodsJ-P Nurmi2018-02-061-4/+4
| | | | | | Task-number: QTBUG-65193 Change-Id: I6393d39add5c3643812084ef4702e843bac14702 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* Make AbstractButton's icon properties win over Action's when both are setMitch Curtis2018-02-051-4/+10
| | | | | | Task-number: QTBUG-65193 Change-Id: Idff23dcc35f3c3fe41406678613b022098149318 Reviewed-by: J-P Nurmi <jpnurmi@qt.io>
* Make QQuickIcon a value typeJ-P Nurmi2017-05-101-18/+20
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | QQuickIcon no longer inherits QObject, but becomes a light-weight implicitly shared Q_GADGET-type, that is passed by value the same way fonts and colors are. Before: SUB: OS: Fedora 25 (Workstation Edition) SUB: QPA: xcb SUB: GL_VENDOR: Intel Open Source Technology Center SUB: GL_RENDERER: Mesa DRI Intel(R) Haswell Desktop SUB: GL_VERSION: 3.0 Mesa 13.0.4 SUB: running: benchmarks/auto/creation/controls/delegates_buttoncontrol2.qml SUB: 110 frames SUB: 109 frames SUB: 109 frames SUB: 109 frames SUB: 109 frames SUB: Average: SUB: 109.2 frames; using samples; MedianAll=109; StdDev=0.447214, CoV=0.00409536 After: [...] SUB: running: benchmarks/auto/creation/controls/delegates_buttoncontrol2.qml SUB: 123 frames SUB: 124 frames SUB: 124 frames SUB: 122 frames SUB: 125 frames SUB: Average: SUB: 123.6 frames; using samples; MedianAll=124; StdDev=1.14018, CoV=0.00922472 Change-Id: I604532204fb94fc0726d0c9b8b6097f9ebc265e8 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* QQuickIcon: fix the type of the source propertyJ-P Nurmi2017-04-241-4/+5
| | | | | | | | | | | | | | | | | | | For example, something like: Button { icon.source: "../images/drawer.png" } did not work in the Gallery example, even though it works fine for Image elements etc. The URL needs to be resolved relative to the caller. By making the property an URL instead of a plain string, the QML engine does the correct thing automatically. Note: icon.source.length no longer works in auto tests, so it got replaced by a compare(). Change-Id: I5fdb3aa55003d2f04e5458b7636e4dae3fa9857c Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* QQuickIcon: pass signal argumentsJ-P Nurmi2017-04-031-5/+5
| | | | | | | | This makes it possible for QQuickAbstractButton to sync its icon with the icon from QQuickAction by simply connecting signals to the setters. Change-Id: I6b944dd598d66389bdb06f4f2874aa813c1246c7 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* Add QQuickIcon::colorJ-P Nurmi2017-02-201-0/+7
| | | | | | | | | This will be used by the built-in styles to visualize various states (gray when disabled, accent color when active...) and can be also set or overridden by the users. Change-Id: I293348415d7e66dea163190cdf35d60ce5407b5b Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* Add QQuickIconMitch Curtis2017-02-091-0/+94
This adds the initial API needed to add support for setting icons on buttons, etc., and is also necessary for action support. Follow up commits will add the actual support for icons. Change-Id: I9ab892aa4fe43210e7b18bed3e0ebcec2edb9c91 Reviewed-by: J-P Nurmi <jpnurmi@qt.io>