fix dox and layout

This commit is contained in:
Denis Rouzaud 2020-05-06 16:13:53 +02:00
parent 971d107af1
commit 28c20cf1d6
4 changed files with 11 additions and 8 deletions

View File

@ -491,7 +491,7 @@ Returns a reference to the list of QgsLayoutTableSortColumns shown in the table
%Docstring
Replaces the sorting columns in the table with a specified list of QgsLayoutTableSortColumns.
:param columns: list of QgsLayoutTableColumns used to sort the table.
:param sortColumns: list of QgsLayoutTableColumns used to sort the table.
.. seealso:: :py:func:`sortColumns`

View File

@ -456,7 +456,7 @@ class CORE_EXPORT QgsLayoutTable: public QgsLayoutMultiFrame
/**
* Replaces the sorting columns in the table with a specified list of QgsLayoutTableSortColumns.
* \param columns list of QgsLayoutTableColumns used to sort the table.
* \param sortColumns list of QgsLayoutTableColumns used to sort the table.
* \see sortColumns()
* \since QGIS 3.14
*/

View File

@ -65,13 +65,16 @@ class GUI_EXPORT QgsLayoutAttributeTableColumnModelBase: public QAbstractTableMo
ShiftDown //!< Shift the row/column down
};
/**
* Available columns for the configuration table to be used by the model
*/
enum Column
{
Attribute,
Heading,
Alignment,
Width,
SortOrder
Attribute, //!< Attribute for a field or an expression
Heading, //!< Defines the title of the column
Alignment, //!< Defines the alignment of the column
Width, //!< Defines the width of the column
SortOrder //!< Defines the sort order
};
/**

View File

@ -1594,7 +1594,7 @@ void TestQgsLayoutTable::testBaseSort()
table->setDisplayOnlyVisibleFeatures( false );
table->setMaximumNumberOfFeatures( 1 );
QgsLayoutTableColumn col;
col.setAttribute(table->columns()[2].attribute());
col.setAttribute( table->columns()[2].attribute() );
col.setSortOrder( Qt::DescendingOrder );
table->sortColumns() = {col};
table->refresh();