2016-12-04 17:23:37 +01:00
|
|
|
/***************************************************************************
|
2016-12-06 14:20:21 +01:00
|
|
|
qgsfieldformatter.sip - QgsFieldFormatter
|
2016-12-04 17:23:37 +01:00
|
|
|
|
|
|
|
---------------------
|
|
|
|
begin : 2.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. *
|
|
|
|
* *
|
|
|
|
***************************************************************************/
|
2016-12-06 14:20:21 +01:00
|
|
|
class QgsFieldFormatter
|
2016-12-04 17:23:37 +01:00
|
|
|
{
|
|
|
|
%TypeHeaderCode
|
2016-12-06 14:20:21 +01:00
|
|
|
#include "qgsfieldformatter.h"
|
2016-12-04 17:23:37 +01:00
|
|
|
%End
|
|
|
|
public:
|
2016-12-06 14:20:21 +01:00
|
|
|
QgsFieldFormatter();
|
2016-12-04 17:23:37 +01:00
|
|
|
|
2016-12-06 14:20:21 +01:00
|
|
|
virtual ~QgsFieldFormatter();
|
2016-12-04 17:23:37 +01:00
|
|
|
|
|
|
|
virtual QString id() const = 0;
|
|
|
|
|
|
|
|
virtual QString representValue( QgsVectorLayer* layer, int fieldIdx, const QVariantMap& config, const QVariant& cache, const QVariant& value ) const;
|
|
|
|
|
|
|
|
virtual QVariant sortValue( QgsVectorLayer* vl, int fieldIdx, const QVariantMap& config, const QVariant& cache, const QVariant& value ) const;
|
|
|
|
|
|
|
|
virtual Qt::AlignmentFlag alignmentFlag( QgsVectorLayer* vl, int fieldIdx, const QVariantMap& config ) const;
|
|
|
|
|
|
|
|
virtual QVariant createCache( QgsVectorLayer* vl, int fieldIdx, const QVariantMap& config ) const;
|
|
|
|
};
|