/usr/include/qgis/qgscomposertexttable.h is in libqgis-dev 2.18.17+dfsg-1.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 | /***************************************************************************
qgscomposertexttable.h
----------------------
begin : April 2010
copyright : (C) 2010 by Marco Hugentobler
email : marco at hugis dot net
***************************************************************************/
/***************************************************************************
* *
* This program is free software; you can redistribute it and/or modify *
* it under the terms of the GNU General Public License as published by *
* the Free Software Foundation; either version 2 of the License, or *
* (at your option) any later version. *
* *
***************************************************************************/
#ifndef QGSCOMPOSERTEXTTABLE_H
#define QGSCOMPOSERTEXTTABLE_H
#include "qgscomposertable.h"
#include "qgscomposertablev2.h"
/** \ingroup core
* A text table item that reads text from string lists
* @deprecated use QgsComposerTextTableV2 intead
*/
//TODO QGIS 3.0 - remove
class CORE_EXPORT QgsComposerTextTable: public QgsComposerTable
{
Q_OBJECT
public:
QgsComposerTextTable( QgsComposition* c );
~QgsComposerTextTable();
/** Return correct graphics item type. */
virtual int type() const override { return ComposerTextTable; }
/** Sets the text to use for the header row for the table
* @param labels list of strings to use for each column's header row
* @see headerLabels
*/
void setHeaderLabels( const QStringList& labels );
/** Adds a row to the table
* @param row list of strings to use for each cell's value in the newly added row
* @note If row is shorter than the number of columns in the table than blank cells
* will be inserted at the end of the row. If row contains more strings then the number
* of columns in the table then these extra strings will be ignored.
*/
void addRow( const QStringList& row ) { mRowText.append( row ); }
/** Writes properties specific to text tables
* @param elem an existing QDomElement in which to store the text table's properties.
* @param doc QDomDocument for the destination xml.
* @see readXML
*/
bool writeXML( QDomElement& elem, QDomDocument & doc ) const override;
/** Reads the properties specific to a text table from xml.
* @param itemElem a QDomElement holding the text table's desired properties.
* @param doc QDomDocument for the source xml.
* @see writeXML
*/
bool readXML( const QDomElement& itemElem, const QDomDocument& doc ) override;
/** Queries the text table for text to show in the cells.
* @param attributeMaps list of QgsAttributeMaps where the cell text will be stored
* @returns true if attribute values were successfully set from table's text
* @note not available in python bindings
*/
bool getFeatureAttributes( QList<QgsAttributeMap>& attributeMaps ) override;
private:
/** One stringlist per row*/
QList< QStringList > mRowText;
};
/** \ingroup core
* A text table item that reads text from string lists
* @note added in QGIS 2.10
*/
class CORE_EXPORT QgsComposerTextTableV2 : public QgsComposerTableV2
{
Q_OBJECT
public:
QgsComposerTextTableV2( QgsComposition* c, bool createUndoCommands );
~QgsComposerTextTableV2();
/** Adds a row to the table
* @param row list of strings to use for each cell's value in the newly added row
* @note If row is shorter than the number of columns in the table than blank cells
* will be inserted at the end of the row. If row contains more strings then the number
* of columns in the table then these extra strings will be ignored.
* @note if adding many rows, @link setContents @endlink is much faster
*/
void addRow( const QStringList& row );
/** Sets the contents of the text table.
* @param contents list of table rows
* @see addRow
*/
void setContents( const QList< QStringList >& contents );
bool getTableContents( QgsComposerTableContents &contents ) override;
virtual void addFrame( QgsComposerFrame* frame, bool recalcFrameSizes = true ) override;
private:
/** One stringlist per row*/
QList< QStringList > mRowText;
};
#endif // QGSCOMPOSERTEXTTABLE_H
|