|
QGIS API Documentation
2.6.0-Brighton
|
This widget is used to show the attributes of a set of features of a QgsVectorLayer. More...
#include <qgsdualview.h>
Public Types | |
| enum | ViewMode { AttributeTable = 0, AttributeEditor = 1 } |
| The view modes, in which this widget can present information. More... | |
Public Slots | |
| void | setCurrentEditSelection (const QgsFeatureIds &fids) |
| Set the current edit selection in the AttributeEditor mode. | |
| bool | saveEditChanges () |
| saveEditChanges | |
Signals | |
| void | displayExpressionChanged (const QString expression) |
| Is emitted, whenever the display expression is successfully changed. | |
| void | filterChanged () |
| Is emitted, whenever the filter changes. | |
Public Member Functions | |
| QgsDualView (QWidget *parent=0) | |
| Constructor. | |
| void | init (QgsVectorLayer *layer, QgsMapCanvas *mapCanvas, const QgsFeatureRequest &request=QgsFeatureRequest(), QgsAttributeEditorContext context=QgsAttributeEditorContext()) |
| Has to be called to initialize the dual view. | |
| void | setView (ViewMode view) |
| Change the current view mode. | |
| void | setFilterMode (QgsAttributeTableFilterModel::FilterMode filterMode) |
| Set the filter mode. | |
| QgsAttributeTableFilterModel::FilterMode | filterMode () |
| void | setSelectedOnTop (bool selectedOnTop) |
| Toggle the selectedOnTop flag. | |
| int | featureCount () |
| Returns the number of features on the layer. | |
| int | filteredFeatureCount () |
| Returns the number of features which are currently visible, according to the filter restrictions. | |
| void | setFilteredFeatures (QgsFeatureIds filteredFeatures) |
| Set a list of currently visible features. | |
| QgsFeatureIds | filteredFeatures () |
| QgsAttributeTableModel * | masterModel () const |
| Returns the model which has the information about all features (not only filtered) | |
| void | setRequest (const QgsFeatureRequest &request) |
| void | setFeatureSelectionManager (QgsIFeatureSelectionManager *featureSelectionManager) |
Protected Member Functions | |
| void | columnBoxInit () |
| Initializes widgets which depend on the attributes of this layer. | |
Friends | |
| class | TestQgsDualView |
This widget is used to show the attributes of a set of features of a QgsVectorLayer.
The attributes can be edited. It supports two different layouts: the table layout, in which the attributes for the features are shown in a table and the editor layout, where the features are shown as a selectable list and the attributes for the currently selected feature are shown in a form.
The view modes, in which this widget can present information.
Relates to the QStackedWidget stacks.
|
explicit |
Constructor.
| parent | The parent widget |
|
protected |
Initializes widgets which depend on the attributes of this layer.
|
signal |
Is emitted, whenever the display expression is successfully changed.
| expression | The expression that was applied |
| int QgsDualView::featureCount | ( | ) |
Returns the number of features on the layer.
|
signal |
Is emitted, whenever the filter changes.
| int QgsDualView::filteredFeatureCount | ( | ) |
Returns the number of features which are currently visible, according to the filter restrictions.
|
inline |
|
inline |
| void QgsDualView::init | ( | QgsVectorLayer * | layer, |
| QgsMapCanvas * | mapCanvas, | ||
| const QgsFeatureRequest & | request = QgsFeatureRequest(), |
||
| QgsAttributeEditorContext | context = QgsAttributeEditorContext() |
||
| ) |
Has to be called to initialize the dual view.
| layer | The layer which should be used to fetch features |
| mapCanvas | The mapCanvas (used for the FilterMode QgsAttributeTableFilterModel::ShowVisible |
| request | Use a modified request to limit the shown features |
| context | The context in which this view is shown |
|
inline |
Returns the model which has the information about all features (not only filtered)
|
slot |
saveEditChanges
|
slot |
Set the current edit selection in the AttributeEditor mode.
| fids | A list of edited features (Currently only one at a time is supported) |
| void QgsDualView::setFeatureSelectionManager | ( | QgsIFeatureSelectionManager * | featureSelectionManager | ) |
| void QgsDualView::setFilteredFeatures | ( | QgsFeatureIds | filteredFeatures | ) |
Set a list of currently visible features.
| filteredFeatures | A list of feature ids |
| void QgsDualView::setFilterMode | ( | QgsAttributeTableFilterModel::FilterMode | filterMode | ) |
Set the filter mode.
| filterMode |
| void QgsDualView::setRequest | ( | const QgsFeatureRequest & | request | ) |
| void QgsDualView::setSelectedOnTop | ( | bool | selectedOnTop | ) |
Toggle the selectedOnTop flag.
If enabled, selected features will be moved to top.
| selectedOnTop | True: Show selected features on top. False: Use defined sorting column. |
| void QgsDualView::setView | ( | QgsDualView::ViewMode | view | ) |
Change the current view mode.
| view | The view mode to set |
|
friend |
1.8.1.2