mirror of
				https://github.com/qgis/QGIS.git
				synced 2025-11-04 00:04:25 -05:00 
			
		
		
		
	
		
			
				
	
	
		
			169 lines
		
	
	
		
			4.6 KiB
		
	
	
	
		
			Plaintext
		
	
	
	
	
	
			
		
		
	
	
			169 lines
		
	
	
		
			4.6 KiB
		
	
	
	
		
			Plaintext
		
	
	
	
	
	
/************************************************************************
 | 
						|
 * This file has been generated automatically from                      *
 | 
						|
 *                                                                      *
 | 
						|
 * src/gui/tableeditor/qgstableeditordialog.h                           *
 | 
						|
 *                                                                      *
 | 
						|
 * Do not edit manually ! Edit header and run scripts/sipify.py again   *
 | 
						|
 ************************************************************************/
 | 
						|
 | 
						|
 | 
						|
 | 
						|
class QgsTableEditorDialog : QMainWindow
 | 
						|
{
 | 
						|
%Docstring(signature="appended")
 | 
						|
 | 
						|
A reusable window for editing simple spreadsheet-style tables.
 | 
						|
 | 
						|
Table content is retrieved and set using the :py:class:`QgsTableContents` class. The editor
 | 
						|
has support for table foreground and background colors, and numeric formats.
 | 
						|
 | 
						|
.. versionadded:: 3.12
 | 
						|
%End
 | 
						|
 | 
						|
%TypeHeaderCode
 | 
						|
#include "qgstableeditordialog.h"
 | 
						|
%End
 | 
						|
  public:
 | 
						|
 | 
						|
    QgsTableEditorDialog( QWidget *parent = 0 );
 | 
						|
%Docstring
 | 
						|
Constructor for QgsTableEditorDialog with the specified ``parent`` widget.
 | 
						|
%End
 | 
						|
 | 
						|
    void setTableContents( const QgsTableContents &contents );
 | 
						|
%Docstring
 | 
						|
Sets the ``contents`` to show in the editor widget.
 | 
						|
 | 
						|
.. seealso:: :py:func:`tableContents`
 | 
						|
%End
 | 
						|
 | 
						|
 | 
						|
    bool setTableContentsFromClipboard();
 | 
						|
%Docstring
 | 
						|
Parses the clipboard text into contents to show in the editor widget.
 | 
						|
 | 
						|
:return: ``True`` if the clipboard was successfully parsed
 | 
						|
 | 
						|
.. seealso:: :py:func:`tableContents`
 | 
						|
%End
 | 
						|
 | 
						|
    QgsTableContents tableContents() const;
 | 
						|
%Docstring
 | 
						|
Returns the current contents of the editor widget table.
 | 
						|
 | 
						|
.. seealso:: :py:func:`setTableContents`
 | 
						|
%End
 | 
						|
 | 
						|
    double tableRowHeight( int row );
 | 
						|
%Docstring
 | 
						|
Returns the configured row height for the specified ``row``, or 0 if an automatic height
 | 
						|
should be used for the row.
 | 
						|
 | 
						|
.. seealso:: :py:func:`setTableRowHeight`
 | 
						|
%End
 | 
						|
 | 
						|
    double tableColumnWidth( int column );
 | 
						|
%Docstring
 | 
						|
Returns the configured column width for the specified ``column``, or 0 if an automatic width
 | 
						|
should be used for the column.
 | 
						|
 | 
						|
.. seealso:: :py:func:`setTableColumnWidth`
 | 
						|
%End
 | 
						|
 | 
						|
    void setTableRowHeight( int row, double height );
 | 
						|
%Docstring
 | 
						|
Sets the configured row ``height`` for the specified ``row``. Set ``height`` to 0
 | 
						|
if an automatic height should be used for the row.
 | 
						|
 | 
						|
This should be called after a call to :py:func:`~QgsTableEditorDialog.setTableContents`.
 | 
						|
 | 
						|
.. seealso:: :py:func:`tableRowHeight`
 | 
						|
%End
 | 
						|
 | 
						|
    void setTableColumnWidth( int column, double width );
 | 
						|
%Docstring
 | 
						|
Sets the configured column ``width`` for the specified ``column``. Set ``width`` to 0
 | 
						|
if an automatic width should be used for the column.
 | 
						|
 | 
						|
This should be called after a call to :py:func:`~QgsTableEditorDialog.setTableContents`.
 | 
						|
 | 
						|
.. seealso:: :py:func:`tableColumnWidth`
 | 
						|
%End
 | 
						|
 | 
						|
    bool includeTableHeader() const;
 | 
						|
%Docstring
 | 
						|
Returns ``True`` if the table includes a header row.
 | 
						|
 | 
						|
.. seealso:: :py:func:`setIncludeTableHeader`
 | 
						|
%End
 | 
						|
 | 
						|
    void setIncludeTableHeader( bool included );
 | 
						|
%Docstring
 | 
						|
Sets whether the table includes a header row.
 | 
						|
 | 
						|
.. seealso:: :py:func:`includeTableHeader`
 | 
						|
%End
 | 
						|
 | 
						|
    QVariantList tableHeaders() const;
 | 
						|
%Docstring
 | 
						|
Returns the table header values.
 | 
						|
 | 
						|
.. seealso:: :py:func:`setTableHeaders`
 | 
						|
%End
 | 
						|
 | 
						|
    void setTableHeaders( const QVariantList &headers );
 | 
						|
%Docstring
 | 
						|
Sets the table ``headers``.
 | 
						|
 | 
						|
.. seealso:: :py:func:`tableHeaders`
 | 
						|
%End
 | 
						|
 | 
						|
    void registerExpressionContextGenerator( QgsExpressionContextGenerator *generator );
 | 
						|
%Docstring
 | 
						|
Register an expression context generator class that will be used to retrieve
 | 
						|
an expression context for the editor when required.
 | 
						|
 | 
						|
.. versionadded:: 3.16
 | 
						|
%End
 | 
						|
 | 
						|
    QgsMapLayer *layer() const;
 | 
						|
%Docstring
 | 
						|
Returns the (possibly ``None``) layer associated with the expression editor context.
 | 
						|
 | 
						|
.. versionadded:: 3.40
 | 
						|
%End
 | 
						|
 | 
						|
    void setLayer( QgsMapLayer *layer );
 | 
						|
%Docstring
 | 
						|
Sets the ``layer`` to be used associated with the expression editor context.
 | 
						|
 | 
						|
.. versionadded:: 3.40
 | 
						|
%End
 | 
						|
 | 
						|
  signals:
 | 
						|
 | 
						|
    void tableChanged();
 | 
						|
%Docstring
 | 
						|
Emitted whenever the table contents are changed.
 | 
						|
%End
 | 
						|
 | 
						|
    void includeHeaderChanged( bool included );
 | 
						|
%Docstring
 | 
						|
Emitted whenever the "include table header" setting is changed.
 | 
						|
%End
 | 
						|
 | 
						|
  protected:
 | 
						|
 | 
						|
    virtual void closeEvent( QCloseEvent * );
 | 
						|
 | 
						|
 | 
						|
};
 | 
						|
 | 
						|
/************************************************************************
 | 
						|
 * This file has been generated automatically from                      *
 | 
						|
 *                                                                      *
 | 
						|
 * src/gui/tableeditor/qgstableeditordialog.h                           *
 | 
						|
 *                                                                      *
 | 
						|
 * Do not edit manually ! Edit header and run scripts/sipify.py again   *
 | 
						|
 ************************************************************************/
 |