Manages joined fields for a vector layer.
More...
#include <qgsvectorlayerjoinbuffer.h>
Static Public Member Functions |
static QVector< int > | joinSubsetIndices (QgsVectorLayer *joinLayer, const QStringList &joinFieldsSubset) |
| Return a vector of indices for use in join based on field names from the layer.
|
Detailed Description
Manages joined fields for a vector layer.
Constructor & Destructor Documentation
QgsVectorLayerJoinBuffer::QgsVectorLayerJoinBuffer |
( |
QgsVectorLayer * |
layer = 0 | ) |
|
QgsVectorLayerJoinBuffer::~QgsVectorLayerJoinBuffer |
( |
| ) |
|
Member Function Documentation
Joins another vector layer to this layer.
- Parameters
-
joinInfo | join object containing join layer id, target and source field |
- Returns
- (since 2.6) whether the join was successfully added
Create a copy of the join buffer.
- Note
- added in 2.6
bool QgsVectorLayerJoinBuffer::containsJoins |
( |
| ) |
const |
|
inline |
Quick way to test if there is any join at all.
void QgsVectorLayerJoinBuffer::createJoinCaches |
( |
| ) |
|
Calls cacheJoinLayer() for all vector joins.
void QgsVectorLayerJoinBuffer::joinedFieldsChanged |
( |
| ) |
|
|
signal |
Emitted whenever the list of joined fields changes (e.g.
added join or joined layer's fields change)
- Note
- added in 2.6
Find out what is the first index of the join within fields.
Returns -1 if join is not present
- Note
- added in 2.6
const QgsVectorJoinInfo * QgsVectorLayerJoinBuffer::joinForFieldIndex |
( |
int |
index, |
|
|
const QgsFields & |
fields, |
|
|
int & |
sourceFieldIndex |
|
) |
| const |
Finds the vector join for a layer field index.
- Parameters
-
index | this layers attribute index |
fields | fields of the vector layer (including joined fields) |
sourceFieldIndex | Output: field's index in source layer |
QVector< int > QgsVectorLayerJoinBuffer::joinSubsetIndices |
( |
QgsVectorLayer * |
joinLayer, |
|
|
const QStringList & |
joinFieldsSubset |
|
) |
| |
|
static |
Return a vector of indices for use in join based on field names from the layer.
- Note
- added in 2.6
void QgsVectorLayerJoinBuffer::readXml |
( |
const QDomNode & |
layer_node | ) |
|
Reads joins from project file.
void QgsVectorLayerJoinBuffer::removeJoin |
( |
const QString & |
joinLayerId | ) |
|
Removes a vector layer join.
void QgsVectorLayerJoinBuffer::updateFields |
( |
QgsFields & |
fields | ) |
|
Updates field map with joined attributes.
- Parameters
-
fields | map to append joined attributes |
void QgsVectorLayerJoinBuffer::writeXml |
( |
QDomNode & |
layer_node, |
|
|
QDomDocument & |
document |
|
) |
| const |
Saves mVectorJoins to xml under the layer node.
The documentation for this class was generated from the following files: