QGIS/python/core/fieldformatter/qgsvaluerelationfieldformatter.sip

46 lines
1.8 KiB
Plaintext
Raw Normal View History

2016-12-04 17:23:37 +01:00
/***************************************************************************
qgsvaluerelationfieldformatter.sip - QgsValueRelationFieldFormatter
2016-12-04 17:23:37 +01:00
---------------------
begin : 3.12.2016
copyright : (C) 2016 by Matthias Kuhn
email : matthias@opengis.ch
***************************************************************************
* *
* This program is free software; you can redistribute it and/or modify *
* it under the terms of the GNU General Public License as published by *
* the Free Software Foundation; either version 2 of the License, or *
* (at your option) any later version. *
* *
***************************************************************************/
class QgsValueRelationFieldFormatter : QgsFieldFormatter
2016-12-04 17:23:37 +01:00
{
%TypeHeaderCode
#include "qgsvaluerelationfieldformatter.h"
2016-12-04 17:23:37 +01:00
%End
public:
struct ValueRelationItem
{
ValueRelationItem( const QVariant &key, const QString &value );
2016-12-04 17:23:37 +01:00
ValueRelationItem();
QVariant key;
QString value;
};
typedef QVector < QgsValueRelationFieldFormatter::ValueRelationItem > ValueRelationCache;
2016-12-04 17:23:37 +01:00
QgsValueRelationFieldFormatter();
2016-12-04 17:23:37 +01:00
QString id() const;
2016-12-04 18:16:31 +01:00
QString representValue( QgsVectorLayer *layer, int fieldIndex, const QVariantMap &config, const QVariant &cache, const QVariant &value ) const;
2016-12-04 17:23:37 +01:00
2016-12-04 18:16:31 +01:00
QVariant sortValue( QgsVectorLayer *layer, int fieldIndex, const QVariantMap &config, const QVariant &cache, const QVariant &value ) const;
2016-12-04 17:23:37 +01:00
2016-12-04 18:16:31 +01:00
QVariant createCache( QgsVectorLayer *layer, int fieldIndex, const QVariantMap &config ) const;
2016-12-04 17:23:37 +01:00
static QgsValueRelationFieldFormatter::ValueRelationCache createCache( const QVariantMap &config );
2016-12-04 17:23:37 +01:00
};