QGIS/python/gui/qgstreewidgetitem.sip

195 lines
5.9 KiB
Plaintext
Raw Normal View History

2017-06-08 11:26:03 +02:00
/************************************************************************
* This file has been generated automatically from *
* *
* src/gui/qgstreewidgetitem.h *
* *
* Do not edit manually ! Edit header and run scripts/sipify.pl again *
************************************************************************/
class QgsTreeWidgetItem : QTreeWidgetItem
{
2017-06-08 11:26:03 +02:00
%Docstring
2017-12-15 10:36:55 -04:00
QTreeWidgetItem subclass with custom handling for item sorting.
QgsTreeWidgetItem allows for items to be sorted using a specified user role, and
also correctly handles sorting numeric or mixed text and numeric values.
2017-06-08 11:26:03 +02:00
.. versionadded:: 3.0
%End
%TypeHeaderCode
2017-06-08 11:26:03 +02:00
#include "qgstreewidgetitem.h"
%End
public:
explicit QgsTreeWidgetItem( QTreeWidget *view /TransferThis/, int type = Type );
2017-06-08 11:26:03 +02:00
%Docstring
2017-12-15 10:36:55 -04:00
Constructor for QgsTreeWidgetItem
:param view: parent QTreeWidget view
:param type: item type
2017-06-08 11:26:03 +02:00
%End
explicit QgsTreeWidgetItem( int type = Type );
2017-06-08 11:26:03 +02:00
%Docstring
2017-12-15 10:36:55 -04:00
Constructor for QgsTreeWidgetItem
:param type: item type
2017-06-08 11:26:03 +02:00
%End
QgsTreeWidgetItem( const QStringList &strings, int type = Type );
2017-06-08 11:26:03 +02:00
%Docstring
2017-12-15 10:36:55 -04:00
Constructor for QgsTreeWidgetItem
:param strings: list of strings containing text for each column in the item
:param type: item type
2017-06-08 11:26:03 +02:00
%End
QgsTreeWidgetItem( QTreeWidget *view /TransferThis/, const QStringList &strings, int type = Type );
2017-06-08 11:26:03 +02:00
%Docstring
2017-12-15 10:36:55 -04:00
Constructor for QgsTreeWidgetItem
:param view: parent QTreeWidget view
:param strings: list of strings containing text for each column in the item
:param type: item type
2017-06-08 11:26:03 +02:00
%End
QgsTreeWidgetItem( QTreeWidget *view /TransferThis/, QTreeWidgetItem *after, int type = Type );
2017-06-08 11:26:03 +02:00
%Docstring
2017-12-15 10:36:55 -04:00
Constructor for QgsTreeWidgetItem
:param view: parent QTreeWidget view
:param after: QTreeWidgetItem to place insert item after in the view
:param type: item type
2017-06-08 11:26:03 +02:00
%End
explicit QgsTreeWidgetItem( QTreeWidgetItem *parent /TransferThis/, int type = Type );
2017-06-08 11:26:03 +02:00
%Docstring
2017-12-15 10:36:55 -04:00
Constructor for QgsTreeWidgetItem
:param parent: QTreeWidgetItem item
:param type: item type
2017-06-08 11:26:03 +02:00
%End
QgsTreeWidgetItem( QTreeWidgetItem *parent /TransferThis/, const QStringList &strings, int type = Type );
2017-06-08 11:26:03 +02:00
%Docstring
2017-12-15 10:36:55 -04:00
Constructor for QgsTreeWidgetItem
:param parent: QTreeWidgetItem item
:param strings: list of strings containing text for each column in the item
:param type: item type
2017-06-08 11:26:03 +02:00
%End
QgsTreeWidgetItem( QTreeWidgetItem *parent /TransferThis/, QTreeWidgetItem *after, int type = Type );
2017-06-08 11:26:03 +02:00
%Docstring
2017-12-15 10:36:55 -04:00
Constructor for QgsTreeWidgetItem
:param parent: QTreeWidgetItem item
:param after: QTreeWidgetItem to place insert item after in the view
:param type: item type
2017-06-08 11:26:03 +02:00
%End
void setSortData( int column, const QVariant &value );
2017-06-08 11:26:03 +02:00
%Docstring
2017-12-15 10:36:55 -04:00
Sets the custom sort data for a specified column. If set, this value will be used when
sorting the item instead of the item's display text. If not set, the item's display
text will be used when sorting.
:param column: column index
:param value: sort value
2017-12-05 20:04:14 -04:00
.. seealso:: :py:func:`sortData()`
2017-06-08 11:26:03 +02:00
%End
QVariant sortData( int column ) const;
2017-06-08 11:26:03 +02:00
%Docstring
2017-12-15 10:36:55 -04:00
Returns the custom sort data for a specified column. If set, this value will be used when
sorting the item instead of the item's display text. If not set, the item's display
text will be used when sorting.
:rtype: QVariant
2017-12-05 20:04:14 -04:00
.. seealso:: :py:func:`setSortData()`
2017-06-08 11:26:03 +02:00
%End
void setAlwaysOnTopPriority( int priority );
2017-06-08 11:26:03 +02:00
%Docstring
2017-12-15 10:36:55 -04:00
Sets a the item to display always on top of other items in the widget, regardless of the
sort column and sort or display value for the item.
:param priority: priority for sorting always on top items. Items with a lower priority will
be placed above items with a higher priority.
2017-12-05 20:04:14 -04:00
.. seealso:: :py:func:`alwaysOnTopPriority()`
2017-06-08 11:26:03 +02:00
%End
int alwaysOnTopPriority() const;
2017-06-08 11:26:03 +02:00
%Docstring
2017-12-15 10:36:55 -04:00
Returns the item's priority when it is set to show always on top. Items with a lower priority will
be placed above items with a higher priority.
:return: priority, or -1 if item is not set to show always on top
:rtype: int
2017-12-05 20:04:14 -04:00
.. seealso:: :py:func:`setAlwaysOnTopPriority()`
2017-06-08 11:26:03 +02:00
%End
virtual bool operator<( const QTreeWidgetItem &other ) const;
2017-06-08 11:26:03 +02:00
%Docstring
2017-12-15 10:36:55 -04:00
Returns true if this item should appear before another item when sorting
a list of items.
:rtype: bool
2017-06-08 11:26:03 +02:00
%End
bool operator>=( const QTreeWidgetItem &other ) const;
2017-06-08 11:26:03 +02:00
%Docstring
2017-12-15 10:36:55 -04:00
Returns true if this item should appear after another item when sorting
a list of items.
:rtype: bool
2017-06-08 11:26:03 +02:00
%End
};
class QgsTreeWidgetItemObject: QObject, QgsTreeWidgetItem
{
2017-06-08 11:26:03 +02:00
%Docstring
2017-12-15 10:36:55 -04:00
Custom QgsTreeWidgetItem with extra signals when item is edited.
2017-06-08 11:26:03 +02:00
.. versionadded:: 3.0
%End
%TypeHeaderCode
2017-06-08 11:26:03 +02:00
#include "qgstreewidgetitem.h"
%End
public:
explicit QgsTreeWidgetItemObject( int type = Type );
2017-06-08 11:26:03 +02:00
%Docstring
2017-12-15 10:36:55 -04:00
Constructor for QgsTreeWidgetItemObject
:param type: item type
2017-06-08 11:26:03 +02:00
%End
explicit QgsTreeWidgetItemObject( QTreeWidget *parent /TransferThis/, int type = Type );
2017-06-08 11:26:03 +02:00
%Docstring
Constructs a tree widget item of the specified type and appends it to the items in the given parent.
%End
virtual void setData( int column, int role, const QVariant &value );
2017-06-08 11:26:03 +02:00
%Docstring
Sets the value for the item's column and role to the given value.
%End
signals:
void itemEdited( QTreeWidgetItem *item, int column );
2017-06-08 11:26:03 +02:00
%Docstring
This signal is emitted when the contents of the column in the specified item has been edited by the user.
%End
};
2017-06-08 11:26:03 +02:00
/************************************************************************
* This file has been generated automatically from *
* *
* src/gui/qgstreewidgetitem.h *
* *
* Do not edit manually ! Edit header and run scripts/sipify.pl again *
************************************************************************/