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 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215
|
/************************************************************************
* This file has been generated automatically from *
* *
* src/gui/attributetable/qgsfeaturelistview.h *
* *
* Do not edit manually ! Edit header and run scripts/sipify.py again *
************************************************************************/
class QgsFeatureListView : QListView
{
%Docstring(signature="appended")
Shows a list of features and renders a edit button next to each feature.
Accepts a display expression to define the way, features are rendered.
Uses a :py:class:`QgsFeatureListModel` as source model.
%End
%TypeHeaderCode
#include "qgsfeaturelistview.h"
%End
public:
explicit QgsFeatureListView( QWidget *parent /TransferThis/ = 0 );
%Docstring
Creates a feature list view
:param parent: owner
%End
QgsVectorLayerCache *layerCache();
%Docstring
Returns the layer cache
:return: the layer cache used as backend
%End
virtual void setModel( QgsFeatureListModel *featureListModel );
%Docstring
Set the :py:class:`QgsFeatureListModel` which is used to retrieve
information
:param featureListModel: The model to use
%End
QgsFeatureListModel *featureListModel();
%Docstring
Gets the featureListModel used by this view
:return: The model in use
%End
bool setDisplayExpression( const QString &displayExpression );
%Docstring
The display expression is an expression used to render the fields into a
single string which is displaied.
:param displayExpression: The expression used to render the feature
.. seealso:: :py:class:`QgsExpression`
%End
const QString displayExpression() const;
%Docstring
Returns the expression which is currently used to render the features.
:return: A string containing the currend display expression
.. seealso:: :py:class:`QgsExpression`
%End
QString parserErrorString();
%Docstring
Returns a detailed message about errors while parsing a
:py:class:`QgsExpression`.
:return: A message containing information about the parser error.
%End
QgsFeatureIds currentEditSelection();
%Docstring
Gets the currentEditSelection
:return: A list of edited feature ids
%End
void setCurrentFeatureEdited( bool state );
%Docstring
Sets if the currently shown form has received any edit events so far.
:param state: The state
%End
void setFeatureSelectionManager( QgsIFeatureSelectionManager *featureSelectionManager );
%Docstring
setFeatureSelectionManager
:param featureSelectionManager:
%End
protected:
virtual void mouseMoveEvent( QMouseEvent *event );
virtual void mousePressEvent( QMouseEvent *event );
virtual void mouseReleaseEvent( QMouseEvent *event );
virtual void keyPressEvent( QKeyEvent *event );
virtual void contextMenuEvent( QContextMenuEvent *event );
signals:
void currentEditSelectionChanged( QgsFeature &feat );
%Docstring
Emitted whenever the current edit selection has been changed.
:param feat: the feature, which will be edited.
%End
void currentEditSelectionProgressChanged( int progress, int count );
%Docstring
Emitted whenever the current edit selection has been changed.
:param progress: the position of the feature in the list
:param count: the number of features in the list
.. versionadded:: 3.8
%End
void displayExpressionChanged( const QString &expression );
%Docstring
Emitted whenever the display expression is successfully changed
:param expression: The expression that was applied
%End
void willShowContextMenu( QgsActionMenu *menu, const QModelIndex &atIndex );
%Docstring
Emitted when the context menu is created to add the specific actions to
it
:param menu: is the already created context menu
:param atIndex: is the position of the current feature in the model
%End
public slots:
void setEditSelection( const QgsFeatureIds &fids );
%Docstring
Set the feature(s) to be edited
:param fids: A list of features to be edited
%End
void setEditSelection( const QModelIndex &index, QItemSelectionModel::SelectionFlags command );
%Docstring
Set the feature(s) to be edited
:param index: The selection to set
:param command: selection update mode
%End
virtual void selectAll();
%Docstring
Select all currently visible features
%End
void repaintRequested( const QModelIndexList &indexes );
void repaintRequested();
void editFirstFeature();
%Docstring
editFirstFeature will try to edit the first feature of the list
.. versionadded:: 3.8
%End
void editNextFeature();
%Docstring
editNextFeature will try to edit next feature of the list
.. versionadded:: 3.8
%End
void editPreviousFeature();
%Docstring
editPreviousFeature will try to edit previous feature of the list
.. versionadded:: 3.8
%End
void editLastFeature();
%Docstring
editLastFeature will try to edit the last feature of the list
.. versionadded:: 3.8
%End
};
/************************************************************************
* This file has been generated automatically from *
* *
* src/gui/attributetable/qgsfeaturelistview.h *
* *
* Do not edit manually ! Edit header and run scripts/sipify.py again *
************************************************************************/
|