Date 2018/03/12
Author Alessandro Pasotti (@elpaso), Nyall Dawson (@nyalldawson )
Contact elpaso at itopen dot it, nyall dot dawson at gmail dotcom
maintainer @elpaso, @nyalldawson
Version QGIS 3.2
Create a layout widget to populate a text table.
In layouts there's a class QgsLayoutItemTextTable
- it's a subclass of the same base class used by the
layout attribute table, which just fills a table with a given list-of-list of values.
It's used only by the georeferencer for making reports, and not exposed in the layout designer. This is solely because there's no interface for populating the table.
The proposed solution adds a new layout widget to populate the text table.
The widget will look pretty much the same of the current attribute table widget, but instead of reading values from a vector layer, values will be manually entered by the user in a simple table with add/remove columns/rows buttons.
A refresh button and ok/cancel will be also added.
MOCKUP GOES HERE
Affected files are mainly in layouts: a new abstract base class will be created to hold common functionality shared between the two (attribute and text) tables, companion widgets hierarchy will be also created.
In addition to the simple table editor, we could eventually implement the following features:
- import/export of table data from/to CSV (and maybe JSON too)
- individual cell formatting (color, font, bg color etc.)
- copy paste from a spreadsheet application
- QGIS expressions in cells
- table column sorting
- undo-redo stack for table actions (useful in conjunction with sorting, formatting etc.)
- more spreadsheet-like capabilities
None
No issues.
(required)