Functions that are meant to be overridden should be virtual.
Also add a convience level() function, seems to be a common need.
Change-Id: I09d452ab12f0ac29fb31de853057511418a47e7e
Reviewed-by: Christian Stenger <christian.stenger@theqtcompany.com>
The circle closes, that's where the code came from.
Change-Id: Ic36ab61ec8886c9a2747aeb29a7245df3ef0b6c4
Reviewed-by: Christian Stenger <christian.stenger@theqtcompany.com>
Only the top level entry was handled so far, but we might add
items with subitems.
Change-Id: I55084a1f595f4982bd37168e71b144b17eee63b1
Reviewed-by: hjk <hjk@theqtcompany.com>
Default to 'editable' (not selectable), intentionally changes behavior
in the Kits, Compilers and Debugger option pages, but brings it more
in line with Qt version.
Change-Id: I71739a5d61c9980fc6da729dcb59b0900047f066
Reviewed-by: Christian Stenger <christian.stenger@theqtcompany.com>
Reviewed-by: hjk <hjk@theqtcompany.com>
canFetchMore/fetchMore, and insertChild (at given position). Make
prepend/appendChild use the latter.
Change-Id: I4162fe6e64f37d26de209aa81894c9730957694b
Reviewed-by: Christian Stenger <christian.stenger@theqtcompany.com>
Reviewed-by: Eike Ziller <eike.ziller@theqtcompany.com>
Full separation does not seem possible as QTreeView assumes
all items to have equal column count.
Change-Id: Ia260924fe13ea62789923af8484f9838295355b6
Reviewed-by: Christian Stenger <christian.stenger@theqtcompany.com>
... and use the items themselves as main entry point for
item related operations.
With non-uniform tree items it's easier to have item specific
functionality directly in the item implementation instead of
the model.
Change-Id: I4e9b7db98d16b91ddef81917417691129bb83621
Reviewed-by: Christian Stenger <christian.stenger@theqtcompany.com>
Currently #if'd out, but takes only a one line change to enable
quick testing. Tests pass with the included change to flags().
Change-Id: I6dca376f162ad26e8ce6de65241e56497ff7267e
Reviewed-by: Christian Stenger <christian.stenger@theqtcompany.com>
Add functions to remove a single item, to access the last child
of an item and a simple way to construct items that only display
static data.
Change-Id: I89347fbb6bbbac6b77fcfb23fa0b780a13643d6f
Reviewed-by: Tobias Hunger <tobias.hunger@theqtcompany.com>
This is mainly used to communicate the number of columns and
header contents.
Change-Id: Ic3163265338d71f1fa8250e4765bb764e5784197
Reviewed-by: Christian Stenger <christian.stenger@theqtcompany.com>
That kind of boiler plate comes up often enough to justify a wrapper.
Change-Id: I94aa5b1ccbe5a98f091a47087654e59e9e122c1d
Reviewed-by: Tobias Hunger <tobias.hunger@theqtcompany.com>