aboutsummaryrefslogtreecommitdiffstats
path: root/src/imports/controls/qtquickcontrols2plugin.cpp
Commit message (Collapse)AuthorAgeFilesLines
* Remove wrong Container revision registrationJ-P Nurmi2016-10-051-2/+0
| | | | | | | | | | | | | We register Container.qml for QtQuick.Controls 2.0, so it is important to not override the registration with plain QQuickContainer template revision 1 for QtQuick.Controls 2.1, or else the behavior of Container will be different depending on whether the user imports QtQuick Controls 2.0 or 2.1. The auto test started failing when the import version was bumped from 2.0 to 2.1. This revealed that "Container" was pointing to Container.qml in 2.0, and to QQuickContainer in 2.1. Change-Id: I80b8de3bf556c57e4ae853b116d387431dfa02c7 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* Improve the type registration version commentsJ-P Nurmi2016-10-041-3/+3
| | | | | Change-Id: I6a5f42e341f213676146bc2a9540c63d3435ffa3 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* Merge remote-tracking branch 'origin/5.7' into 5.8J-P Nurmi2016-10-031-11/+3
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: examples/quickcontrols2/gallery/gallery.qrc src/imports/calendar/doc/snippets/qtlabscalendar-calendarmodel.qml src/imports/calendar/doc/snippets/qtlabscalendar-dayofweekrow-layout.qml src/imports/calendar/doc/snippets/qtlabscalendar-dayofweekrow.qml src/imports/calendar/doc/snippets/qtlabscalendar-monthgrid-layout.qml src/imports/calendar/doc/snippets/qtlabscalendar-monthgrid.qml src/imports/calendar/doc/snippets/qtlabscalendar-weeknumbercolumn-layout.qml src/imports/calendar/doc/snippets/qtlabscalendar-weeknumbercolumn.qml src/imports/controls/doc/qtquickcontrols2.qdocconf src/imports/controls/doc/snippets/qtlabscalendar-calendarmodel.qml src/imports/controls/doc/snippets/qtlabscalendar-dayofweekrow-layout.qml src/imports/controls/doc/snippets/qtlabscalendar-dayofweekrow.qml src/imports/controls/doc/snippets/qtlabscalendar-monthgrid-layout.qml src/imports/controls/doc/snippets/qtlabscalendar-monthgrid.qml src/imports/controls/doc/snippets/qtlabscalendar-weeknumbercolumn-layout.qml src/imports/controls/doc/snippets/qtlabscalendar-weeknumbercolumn.qml src/imports/controls/doc/snippets/screenshots/qtlabscalendar-calendarmodel.qml src/imports/controls/doc/snippets/screenshots/qtlabscalendar-dayofweekrow-layout.qml src/imports/controls/doc/snippets/screenshots/qtlabscalendar-dayofweekrow.qml src/imports/controls/doc/snippets/screenshots/qtlabscalendar-monthgrid-layout.qml src/imports/controls/doc/snippets/screenshots/qtlabscalendar-monthgrid.qml src/imports/controls/doc/snippets/screenshots/qtlabscalendar-weeknumbercolumn-layout.qml src/imports/controls/doc/snippets/screenshots/qtlabscalendar-weeknumbercolumn.qml src/imports/controls/qtquickcontrols2plugin.cpp src/quicktemplates2/qquicktooltip.cpp src/quicktemplates2/qquicktooltip_p.h src/quicktemplates2/qquicktumbler.cpp tests/auto/controls/data/tst_spinbox.qml tests/auto/controls/data/tst_tumbler.qml tests/auto/qquickmaterialstyle/data/tst_material.qml Change-Id: I25b7473b47739043b6f768603bece30b18021318
| * qtquickcontrols2plugin.cpp: cleanup includesJ-P Nurmi2016-10-021-9/+1
| | | | | | | | | | Change-Id: I5c1b3a911972b61562d8d7e9b1e07cbde0bef78f Reviewed-by: J-P Nurmi <jpnurmi@qt.io>
| * Make a plain AbstractButton calculate suitable implicit sizeJ-P Nurmi2016-10-021-2/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Just like commit 87b21a57 made Control do it, this applies the same logic to AbstractButton. The simple reasoning is that when customizing both the contentItem and the background, it is much better to use the AbstractButton type that does not have any default building blocks. Previously you would have to supply implicit size calculation as well, but this makes it much more convenient to use. [ChangeLog][Controls][AbstractButton] A plain AbstractButton now calculates its implicit size based on the implicit size of the content item plus paddings, and the implicit size of the background item. Change-Id: Ic380366b25940fbb9f28882c4622d58f4c042a07 Reviewed-by: J-P Nurmi <jpnurmi@qt.io>
* | Default: consolidate style colors into a singletonMitch Curtis2016-09-121-0/+9
| | | | | | | | | | | | | | | | This reduces all of the duplicate literals that we currently have. Task-number: QTBUG-55867 Change-Id: I28f1f646d25f2f6578d52b4ba96f8f0f3ad6706b Reviewed-by: J-P Nurmi <jpnurmi@qt.io>
* | Merge remote-tracking branch 'origin/5.7' into 5.8J-P Nurmi2016-09-021-2/+2
|\| | | | | | | Change-Id: I82da1e547c4ead1181ade19f77c62651c00998a3
| * Make a plain Container calculate suitable implicit sizeJ-P Nurmi2016-08-311-1/+1
| | | | | | | | | | | | | | | | | | [ChangeLog][Controls][Container] A plain Container now calculates its implicit size based on the implicit size of the content item plus paddings, and the implicit size of the background item. Change-Id: I0481aef0ce713d92bee8b119bf5158dea612d598 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
| * Make a plain Control calculate suitable implicit sizeJ-P Nurmi2016-08-311-1/+1
| | | | | | | | | | | | | | | | | | [ChangeLog][Controls][Control] A plain Control now calculates its implicit size based on the implicit size of the content item plus paddings, and the implicit size of the background item. Change-Id: I086ecf8e3f564ee49df2f9d30015e127dc88db6e Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* | Add RoundButtonMitch Curtis2016-09-021-0/+1
| | | | | | | | | | | | | | | | [ChangeLog][Controls] Added RoundButton. Change-Id: I30a8b9e942a61089e87fb1aa248432e42caf0d20 Task-number: QTBUG-54967 Reviewed-by: J-P Nurmi <jpnurmi@qt.io>
* | Init QQuickStyle's base URL to avoid creating temp QQmlEngineJ-P Nurmi2016-08-251-3/+5
| | | | | | | | | | | | | | | | | | | | | | | | Initialize the base URL from QtQuickControls2Plugin::registerTypes() to avoid creating an unnecessary temporary instance of QQmlEngine. It was used to list all known import paths, which were scanned for the requested style folder. Now that we pass the base URL, the built-in styles (a name without path to the style) can be looked up straight from the base path. Change-Id: I0d68d4c5bb90a4ab89660b5ce97f6433aeefc1ff Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* | Restore version 2.0 for the .impl importsJ-P Nurmi2016-08-101-8/+8
| | | | | | | | | | | | | | | | | | | | | | It's a bit of extra hassle, but the type registration can be done so that we keep the old version available to avoid deliberately breaking apps that have had to import .impl to gain access to the internal goodies. For example, someone may have made a copy of one of the controls as our documentation suggests. :) Change-Id: I5308d7e74ecebf69da7fe9c6912380f72c3c9a2b Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* | Add MenuSeparatorMitch Curtis2016-07-251-0/+1
| | | | | | | | | | | | | | | | | | [ChangeLog][Controls] Added MenuSeparator to visually distinguish between groups of items in a menu. Change-Id: I7a52910b19633ed1188c90ca56c92346a28d4d5c Task-number: QTBUG-54862 Reviewed-by: J-P Nurmi <jpnurmi@qt.io>
* | Add ToolSeparatorMitch Curtis2016-07-211-0/+1
| | | | | | | | | | | | | | | | | | | | ToolSeparator is used to visually distinguish between groups of items in a toolbar by separating them with a line. It can be used in horizontal or vertical toolbars. Task-number: QTBUG-54862 Change-Id: Ie68e680510428ad19e7f80268063af07b61100eb Reviewed-by: J-P Nurmi <jpnurmi@qt.io>
* | Add DialogJ-P Nurmi2016-07-181-0/+1
| | | | | | | | | | | | | | | | | | | | [ChangeLog][Controls] Added Dialog to provide convenience for handling dialog popups. Dialog integrates with DialogButtonBox, and provides convenient accepted() and rejected() signals. Task-number: QTBUG-51090 Change-Id: I776516738b82c0e5726769c054d6f2a956fb616d Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* | qtquickcontrols2plugin.cpp: remove useless double registrationJ-P Nurmi2016-07-081-8/+0
| | | | | | | | | | | | | | | | | | This does not even seem to affect the availability of new properties. It is enough that the types internally import QtQuick.Templates 2.1, which was done in the previous commit. Change-Id: I4b1bce7dc503cc257e3d6483bac4c05b8421995f Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* | Bump up all controls and templates imports to version 2.1J-P Nurmi2016-07-081-8/+8
| | | | | | | | | | | | | | | | | | | | | | | | Controls must import templates version 2.1 in order to "inherit" 1-revisioned properties, methods, and signals. So far, this has been done case by case, but it's less error prone and more clear to change them all. For example, if you ever see a source file pasted/linked somewhere, it's easy to identify the version it belongs to. Change-Id: I41609ec1a22bc05ac3e79f953a147ca42d9e0786 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* | Add hover support to TextArea & TextFieldJ-P Nurmi2016-06-291-0/+2
| | | | | | | | | | | | Task-number: QTBUG-50003 Change-Id: Ie101ba8840fba2a7503da8de77d9cf2a3c91d562 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* | RangeSlider: add first.hovered and second.hovered propertiesJ-P Nurmi2016-06-281-0/+1
| | | | | | | | | | | | | | | | | | | | | | The actual hover effects are coming in separate patches. [ChangeLog][RangeSlider] Added first.hovered and second.hovered properties that hold whether the respective handles are hovered. Change-Id: I3ffeed5de6c9a168534c8e9d4f1642161fc52caf Task-number: QTBUG-50003 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* | SpinBox: add up.hovered and down.hovered propertiesJ-P Nurmi2016-06-281-0/+1
| | | | | | | | | | | | | | | | | | | | | | The actual hover effects are coming in separate patches. [ChangeLog][SpinBox] Added up.hovered and down.hovered properties that hold whether the respective buttons are hovered. Task-number: QTBUG-50003 Change-Id: Ie47329e23326f40e4c807703ff7a97437f68deb4 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* | Tumbler: add wrap propertyMitch Curtis2016-06-281-0/+3
| | | | | | | | | | | | | | | | | | [ChangeLog][Tumbler] Added wrap property to control whether or not tumbler wraps when it reaches the top and bottom. Change-Id: I27c543d98f7bc574bc5dc882a130abe0dcc13cea Task-number: QTBUG-53587 Reviewed-by: J-P Nurmi <jpnurmi@qt.io>
* | Add QQuickContainer::increment|decrementCurrentIndex()J-P Nurmi2016-06-201-0/+1
| | | | | | | | | | | | | | | | | | [ChangeLog][Container] Added incrementCurrentIndex() and decrementCurrentIndex() methods for changing the current index without losing its property binding. Change-Id: Id44e0db5e3d0951eb77b0124a83c5eb3df898012 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* | Add DialogButtonBoxJ-P Nurmi2016-06-151-0/+1
| | | | | | | | | | | | | | | | | | | | | | [ChangeLog][Controls] Added DialogButtonBox to provide convenience for handling dialog buttons. DialogButtonBox is able to create a set of standard buttons with a single line of QML code, and provides convenient accepted() and rejected() signals. Task-number: QTBUG-51090 Change-Id: I9b3c6ba1b2836dadf9a2ac9086be1eba214e7c4d Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* | Slider: expose valueAt(pos) for getting continuous value updatesJ-P Nurmi2016-06-131-0/+1
| | | | | | | | | | | | | | | | | | [ChangeLog][Slider] Added valueAt() method for getting continuous value updates. Task-number: QTBUG-53847 Change-Id: I0aa813c7105faa64b714ab0a0630f79d97a58854 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* | Add ButtonGroup::clicked(AbstractButton) signalJ-P Nurmi2016-06-061-0/+1
| | | | | | | | | | | | | | | | [ChangeLog][ButtonGroup] Added clicked(AbstractButton) signal for centralized click handling for grouped buttons. Change-Id: Ib64d360db211d2763f6237e411152a2a395fd2b5 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* | StackView: add attached activated() etc. signalsJ-P Nurmi2016-06-061-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | For initializing and cleaning up item-specific resources, these are much more convenient than a StackView.onStatusChanged handler. [ChangeLog][StackView] Added attached activated(), deactivated(), activating(), and deactivating() signals that are convenient for initializing and cleaning up item-specific resources. Change-Id: If8df45b31a14cd2491db2c87eeb1c071af4e695f Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* | SwipeView: add isNextItem and isPreviousItem attached propertiesJ-P Nurmi2016-06-061-0/+3
|/ | | | | | | | | [ChangeLog][SwipeView] Added isNextItem and isPreviousItem attached properties to make it straight-forward to use Loader for unloading pages that are outside the reach. Change-Id: Idb97d64282afaef58cc3302d3f558900a0d7d4b5 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* Merge remote-tracking branch 'origin/5.6' into 5.7Liang Qi2016-05-191-1/+1
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: .qmake.conf src/imports/controls/doc/qtlabscontrols.qdocconf src/imports/controls/doc/qtquickcontrols2.qdocconf src/imports/controls/material/qtlabsmaterialstyleplugin.cpp src/imports/controls/material/qtquickcontrols2materialstyleplugin.cpp src/imports/controls/qtlabscontrolsplugin.cpp src/imports/controls/qtquickcontrols2plugin.cpp src/imports/templates/qtlabstemplatesplugin.cpp src/imports/templates/qtquicktemplates2plugin.cpp Change-Id: I6159e681b77e4a0a293b6bd7fb11a46d58873da0
* | Use a lowercase style name as a built-in file selectorJ-P Nurmi2016-05-101-1/+1
| | | | | | | | | | | | | | | | | | | | | | Be consistent with lowercase platform name, and match with the examples in the docs. Change-Id: I33dcc65e720b80f61277efe0aa13caecda6714c4 Task-number: QTBUG-53203 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io> Reviewed-by: Liang Qi <liang.qi@qt.io> Reviewed-by: Frank Meerkoetter <frank.meerkoetter@basyskom.com>
* | Move resources to :/qt-project.org/imports/QtQuick/Controls.2J-P Nurmi2016-04-211-1/+1
| | | | | | | | | | | | Change-Id: I0e36bd0ce16465e648fffd3e172711f4ad2b870c Task-number: QTBUG-52549 Reviewed-by: J-P Nurmi <jpnurmi@qt.io>
* | import Qt.labs.controls 1.0 => QtQuick.Controls 2.0J-P Nurmi2016-04-211-53/+53
| | | | | | | | | | | | | | | | | | Docs, resources, .metainfo and plugins.qmltypes will be updated in follow up commits. Change-Id: I4438c5bfb8802bff0fa15c56431cfd288f179861 Task-number: QTBUG-52549 Reviewed-by: J-P Nurmi <jpnurmi@qt.io>
* | Default: use QQuickColorImageProviderJ-P Nurmi2016-04-211-1/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | This way we don't need to duplicate all images that are built into the main controls plugin's resources. In order to make them work with QQuickColorImageProvider, some of the images had to be converted from Format_Indexed8 to Format_ARGB32: QPainter::begin: Cannot paint on an image with the QImage::Format_Indexed8 format QPainter::setCompositionMode: Painter not active Change-Id: I67f8820e803ef7ff29ce60460ed4ca5bb2fad4cb Reviewed-by: Mitch Curtis <mitch.curtis@theqtcompany.com>
* | Update Default style Dial to match new design specsMitch Curtis2016-04-201-0/+2
| | | | | | | | | | | | Change-Id: Id3a1ce6257ab999c08130549b43414b17df6168d Task-number: QTBUG-50993 Reviewed-by: J-P Nurmi <jpnurmi@qt.io>
* | Merge QQuickPluginUtils to QQuickStylePluginJ-P Nurmi2016-04-191-8/+7
| | | | | | | | | | | | | | | | | | | | | | Now that we have a common base class for the plugins, we don't need a separate utils namespace. QQuickStylePlugin::typeUrl() is based on the former QQuickPluginUtils::pluginBasePath(). It returns a URL to the internal composite types that must be explicitly registered for static builds. Change-Id: Icf28c27c84f6b58b1e7b34203dad39c852f0d362 Reviewed-by: Mitch Curtis <mitch.curtis@theqtcompany.com>
* | Controls: update license headersJ-P Nurmi2016-04-141-2/+2
| | | | | | | | | | | | | | This file is part of the Qt Quick Controls 2 module of the Qt Toolkit. Change-Id: Ib653135662bfd353a73290539995e8e5be211587 Reviewed-by: J-P Nurmi <jpnurmi@theqtcompany.com>
* | Controls: rename the plugin to QtQuickControls2PluginJ-P Nurmi2016-04-131-0/+156
|/ | | | | Change-Id: I7c7c11675f340ab8110f38041434a91f72c9552e Reviewed-by: J-P Nurmi <jpnurmi@theqtcompany.com>
* Rename QtQuick.Controls 2.0 to Qt.labs.controls 1.0J-P Nurmi2015-10-011-108/+0
| | | | | Change-Id: I142622dd85e95ef70b11132e77ccf48701f2cabc Reviewed-by: Mitch Curtis <mitch.curtis@theqtcompany.com>
* Rename QtQuick.Templates 2.0 to Qt.labs.templates 1.0J-P Nurmi2015-10-011-1/+1
| | | | | | Change-Id: I3263a600065dfa2bfe7334ec44a74e2dca83aa36 Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@theqtcompany.com> Reviewed-by: Mitch Curtis <mitch.curtis@theqtcompany.com>
* Remove ToggleButtonJ-P Nurmi2015-09-251-1/+0
| | | | | | | | We don't have a sensible design. It's better not to have it at all than to have a confusing tiny bit tweaked clone of Switch. Change-Id: Ib0eabd075590100e9e49846c7172909525b54a57 Reviewed-by: Liang Qi <liang.qi@theqtcompany.com>
* Add support for file selector based stylesJ-P Nurmi2015-09-251-28/+31
| | | | | | | | | | | unset QT_FILE_SELECTORS ./app # => selects qtbase/qml/QtQuick/Controls.2/Button.qml export QT_FILE_SELECTORS=Flat ./app # => selects qtbase/qml/QtQuick/Controls.2/+Flat/Button.qml Change-Id: Ib5d6fdcee89c14b2511dce90ea2ac5c077aafa0d Reviewed-by: Mitch Curtis <mitch.curtis@theqtcompany.com>
* Templatize the former extrasJ-P Nurmi2015-09-231-32/+1
| | | | | Change-Id: Ief9ee07d1f5f6c80500bfa611bace860481e2a3f Reviewed-by: Liang Qi <liang.qi@theqtcompany.com>
* Merge Qt Quick Extras into Qt Quick ControlsMitch Curtis2015-09-181-0/+14
| | | | | | | | | | | | The original split existed because the public and enterprise controls were developed separately. Now that all controls are public and developed together, the split no longer makes sense and is difficult for users to understand. Change-Id: I00420f4d09f8c837232231d03fe818b7b3403fab Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@theqtcompany.com> Reviewed-by: Frederik Gladhorn <frederik.gladhorn@theqtcompany.com> Reviewed-by: J-P Nurmi <jpnurmi@theqtcompany.com>
* Rename libQtQuickControls to libQtQuickTemplatesJ-P Nurmi2015-09-161-23/+23
| | | | | Change-Id: I1e663bb7be2be8b3d4edf0c038862cc2150aec40 Reviewed-by: J-P Nurmi <jpnurmi@theqtcompany.com>
* Register types in C++ (instead of qmldir)J-P Nurmi2015-09-141-0/+48
| | | | | | | | | | | | | | Later on, we can choose to register types from different style-subdirs based on a yet unknown style selector (app manifest file, env var, ...) This is also a step to the right direction to get QML types inherit enums and attached properties from the respective C++ base types. The qmlRegisterType(QUrl) overload for composite types probably needs a template argument to help figure out the missing meta-object link between the composite type and the C++ base type. Change-Id: I9b3c2afdd93fff56d1e7513879b3e9229f483cbf Reviewed-by: J-P Nurmi <jpnurmi@theqtcompany.com>
* Use QtQuick.TemplatesJ-P Nurmi2015-09-091-55/+1
| | | | | Change-Id: I3d1822457efd740e7c9d91747e978d787c0dd4b8 Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@theqtcompany.com>
* Refactor ExclusiveGroupJ-P Nurmi2015-06-301-1/+1
| | | | | | | | | | | | | Add support for toggled() and toggled(bool) signals to bring ExclusiveGroup 2.0 on par with ExclusiveGroup 1.0. Furthermore, the attached property is now "ExclusiveGroup.group" to be consistent with all other attached properties like StackView.view, TabView.view, and others. It looks clumsy to repeat, but it's better to keep the type names to the minimum, and the documentation also stays in one place. Change-Id: Ic46f8d2ec4b58c5056e8b2bbca5c9f88968bfb80 Reviewed-by: J-P Nurmi <jpnurmi@theqtcompany.com>
* Add qquicktoolbutton.cppJ-P Nurmi2015-06-251-0/+2
| | | | | Change-Id: Ida886850072a654dad97abd0ab930c9badbbe716 Reviewed-by: J-P Nurmi <jpnurmi@theqtcompany.com>
* Rename QQuickTheme -> QQuickThemeAttachedJ-P Nurmi2015-06-141-1/+1
| | | | | | | Follow the QtQuick conventions & make tst_sanity easier. Change-Id: Ic722383ca09de2bd53ee81177297ecafdf6a9cf7 Reviewed-by: J-P Nurmi <jpnurmi@theqtcompany.com>
* Remove the old TabView implementationJ-P Nurmi2015-06-111-3/+0
| | | | | Change-Id: I8d8aa96f2f37f458577a5a3ec681e3c9174d0918 Reviewed-by: J-P Nurmi <jpnurmi@theqtcompany.com>
* Remove "abstract" prefix from the C++ classesJ-P Nurmi2015-04-101-44/+44
| | | | | | | | | | The QML type registration is still using Abstract-prefix to avoid conflicts, until QTBUG-43581 & QTBUG-43582 have been resolved so that the public types can be used for accessing attached properties and enums. Change-Id: I469712461f706a83c226e4017282ca1d6914c670 Reviewed-by: J-P Nurmi <jpnurmi@theqtcompany.com>