summaryrefslogtreecommitdiff
path: root/tests/auto/controls/data/tableview
Commit message (Collapse)AuthorAgeFilesLines
* Unify license header usageAntti Kokko2016-02-0419-57/+247
| | | | | | | Updated BSD license headers Change-Id: I73d67dbc6dbbe7c58d2b9c301b46fb6163243095 Reviewed-by: Lars Knoll <lars.knoll@theqtcompany.com>
* BasicTableView: Use ListView's overlay header for the table headerGabriel de Dietrich2015-11-031-2/+3
| | | | | | | | | | | | | | | | | | | | Previoulsy we manually positioned the table header over the table contents, which required some manual tweakings. Since 5.4, ListView support overlay headers that we can use them to clean our code in BasicTableView. There is, however, a small issue on Mac where the vertical scrollbar (specially in non-transient mode) is displayed below the table header. Since the header can't span beyond the ListView boundaries, we need to account for the vertical scrollbar width in the ListView's content width. This patch also updates the Desktop style to set the transientScrollBars property and some small tweaks to the Base style. Change-Id: I4433d0703328f23eadb0ae4563fbef5bba0168db Task-number: QTBUG-34344 Reviewed-by: Mitch Curtis <mitch.curtis@theqtcompany.com>
* BSD license for QML code in testsJ-P Nurmi2015-03-0619-444/+520
| | | | | | Change-Id: Ie45c9b8d5a5d7f92e4b835473b0c76e3a83998b5 Reviewed-by: Caroline Chao <caroline.chao@theqtcompany.com> Reviewed-by: Liang Qi <liang.qi@theqtcompany.com>
* BasicTableView refactoring: Separate view from user interactionGabriel de Dietrich2015-02-121-2/+4
| | | | | | | | | | | | | | | | | | One of the main tasks of the user interaction code is to manage the current items selection. However, in the upcoming TreeView, the selection will be completely different, but we still want to keep 99% of the view code. Also, in our TreeView implementation, the user's model is proxyfied by a TreeModelAdaptor. But that's not the case in the TableView. So, in order to keep using the same API, we introduce the __model intermediate property. Where it makes sense, TableView and TreeView share common API through BasicTableView. Change-Id: I0a922c1c1093919df7d880d72fe12ed0f372cc08 Reviewed-by: J-P Nurmi <jpnurmi@theqtcompany.com>
* Tests: update license headersJ-P Nurmi2015-02-1119-603/+527
| | | | | | | Change-Id: I364c2ee1983f59f4c1b3e4e411b46f71c85599ee Reviewed-by: Caroline Chao <caroline.chao@theqtcompany.com> Reviewed-by: Mitch Curtis <mitch.curtis@digia.com> Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@theqtcompany.com>
* TableView: correct event.accepted in key handlersLiang Qi2014-10-091-0/+75
| | | | | | | | Autotest is included. Task-number: QTBUG-41444 Change-Id: Ia3120b62a58361fbb13cd06e9c17b0e511cecace Reviewed-by: J-P Nurmi <jpnurmi@theqtcompany.com>
* Controls: Fixed support for Keys attached property on TableViewLiang Qi2014-10-081-0/+60
| | | | | | | | | | | | | | | By forwarding key events from the internal control. The key events from internal are Keys.forwardTo TableView, then user could customize their own behavior. Autotest are included. [ChangeLog][TableView] Fixed support for Keys attached property, by forwarding key events from the internal control. Change-Id: Ic59273ae2589bf6d1a0ccf5babf8fd1741376e6c Reviewed-by: J-P Nurmi <jpnurmi@theqtcompany.com>
* Introduce TableView::pressAndHold(int row) [signal]J-P Nurmi2014-07-142-0/+6
| | | | | | | | [ChangeLog][TableView] Introduced a pressAndHold(int row) signal that is emitted when the user presses and holds a row. Change-Id: I823a7fd534fd6fca78831f00e7ecbb9f2118e006 Reviewed-by: Frederik Gladhorn <frederik.gladhorn@digia.com>
* Bump QtQuick.Controls import version to 1.2J-P Nurmi2014-04-0717-17/+17
| | | | | Change-Id: Idc0b93cbfc2fe23e8be3bcaece672d06555a81f6 Reviewed-by: Jens Bache-Wiig <jens.bache-wiig@digia.com>
* Import QtQuick 2.2J-P Nurmi2014-04-0717-17/+17
| | | | | Change-Id: Ifc9719ec6fbbd80b866c01eebc471d0ed121bd16 Reviewed-by: Jens Bache-Wiig <jens.bache-wiig@digia.com>
* TableView: fix activeFocusOnTab behaviorLiang Qi2014-02-251-0/+81
| | | | | | | | | | Autotest is included. Task-number: QTBUG-36950 Change-Id: I94c5b5225437ce87365740ea7423b09737dd275a Reviewed-by: J-P Nurmi <jpnurmi@digia.com> Reviewed-by: Jens Bache-Wiig <jens.bache-wiig@digia.com> Reviewed-by: Caroline Chao <caroline.chao@digia.com>
* TableView: added resizeToContents and resizeColumnsToContentsShawn Rutledge2014-01-221-0/+58
| | | | | | | | | | | | These are analogous to QTableView::resizeColumnToContents(i) and resizeColumnsToContents(). Double-clicking the header near a width adjustment boundary still provides a means for the user to do this if the application doesn't do it programmatically. Change-Id: Ibded0c9f255301b461dac7080901fc6065fdbe5e Reviewed-by: Caroline Chao <caroline.chao@digia.com> Reviewed-by: Shawn Rutledge <shawn.rutledge@digia.com> Reviewed-by: Jens Bache-Wiig <jens.bache-wiig@digia.com>
* Update imports to 1.1 and remove version from qmlmodule definitionJens Bache-Wiig2013-09-1015-15/+15
| | | | | Change-Id: Icb4c6d78225c072da787e4646a55d8cf71a5db7a Reviewed-by: Caroline Chao <caroline.chao@digia.com>
* TableView: let delegates handle mouse eventsCaroline Chao2013-06-194-16/+236
| | | | | | | | | Includes auto tests. Task-number: QTBUG-31206 Change-Id: I683363f70f7e360cc70f84fd460cbde5e70a61af Reviewed-by: Caroline Chao <caroline.chao@digia.com> Reviewed-by: Jens Bache-Wiig <jens.bache-wiig@digia.com>
* Updated activation signals in TableViewJens Bache-Wiig2013-06-101-3/+14
| | | | | | | | | | | | | | | - Added row property to activated() - Added clicked(row) signal - Added doubleClicked(row) signal - We also fixed the behavior so that we do not emit activated if the user clicks outside of the available rows. - We fixed a problem where key events would not be seen outside of the control Change-Id: I13feba26e900daf85be7be88216f1a0a4a446c57 Reviewed-by: J-P Nurmi <jpnurmi@digia.com>
* Revise TableView API for managing the columnsJ-P Nurmi2013-05-291-0/+65
| | | | | | | | | | | | | | | | | | | | Replace "property list<TableViewColumn> columns" with: - addColumn(column) - insertColumn(index, column) - moveColumn(from, to) - removeColumn(index) - getColumn(index) Exposing list<TableViewColumn> type of property in the public API was problematic for several reasons. First of all, it limited the internal implementation too much. Secondly, modifying the list programmatically did not work as expected, and it also threw nasty warnings while reordering the columns interactively. Task-number: QTBUG-30319 Task-number: QTBUG-31028 Change-Id: I0039f7e4be2d6ee9303a4118bdf84146b6a96a05 Reviewed-by: Jens Bache-Wiig <jens.bache-wiig@digia.com>
* Refactor TableView styling APIJens Bache-Wiig2013-05-271-3/+3
| | | | | | | | | We don't want to directly expose the item properties in the namespace of the loader. Instead we standardize on styleData as a property container. Change-Id: Ib451e06ab393ba4945c96076d71dd3f96489e0c7 Reviewed-by: J-P Nurmi <jpnurmi@digia.com>
* TableView: Fix activated() not emittedCaroline Chao2013-05-072-0/+57
| | | | | | | | | | | | | | | | | | The mousearea in TableView has to accept mouse event in onPressed to receive upcoming double click event. Regression introduced by Iff3e5c1. Instead of not accepting the event in onPressed, set the MouseArea property propagateComposedEvents to true and does not accept the onClicked event. Also uses QStyle::SH_ItemView_ActivateItemOnSingleClick to check if the table is activated on single or double-clicking. By default, it is activated on double-clicking. Change-Id: I744174d7b31efebfae5e8db4db7b99a544ecf50f Reviewed-by: J-P Nurmi <jpnurmi@digia.com>
* Tests: Add autotests for TableView (rowCount & columnCount)Caroline Chao2013-05-031-0/+68
| | | | | Change-Id: I953d0b1803a69acec04ab4ff542ab4629a4df1c4 Reviewed-by: J-P Nurmi <jpnurmi@digia.com>
* Don't select a TableView index by defaultJens Bache-Wiig2013-04-268-0/+8
| | | | | Change-Id: I436849ce43b11dd3b61ef59280e3b8fa39b7da0f Reviewed-by: Jens Bache-Wiig <jens.bache-wiig@digia.com>
* TableView: Fix mouse click not forwarded to childCaroline Chao2013-04-251-0/+70
| | | | | | | Add autotest. Change-Id: Iff3e5c1caab506b90bb1a9cd14a418c48280ffe3 Reviewed-by: Jens Bache-Wiig <jens.bache-wiig@digia.com>
* Change imports from QtQuick 2.0 to QtQuick 2.1Caroline Chao2013-03-148-8/+8
| | | | | | Change-Id: If9df032c76e36f385aacd30cc31d6f02574c6f11 Reviewed-by: J-P Nurmi <jpnurmi@digia.com> Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@digia.com>
* Replaced BSD with LGPL license to conform with Qt Project modulesShawn Rutledge2013-02-218-8/+8
| | | | | | | | We want to use the same license as the other Qt modules. QML files stay as BSD for now. Change-Id: I10b1484f5ab0dfe2138ff7e045d0ecfd85556aa1 Reviewed-by: Jens Bache-Wiig <jens.bache-wiig@digia.com>
* Rename QtDesktop to QtQuick.ControlsJens Bache-Wiig2013-02-218-0/+414
Change-Id: Icc61dbfc74cc2a303b9847e7d2c7ace4a9002046 Reviewed-by: Jens Bache-Wiig <jens.bache-wiig@digia.com>