mirror of
https://github.com/qgis/QGIS.git
synced 2025-02-26 00:02:08 -05:00
Not perfect, but good for a quick warning if a new class or member has been added to the public API without Python bindings. The test only considers the name of members, since it seems to be impossible to test for the signature of a Python member. (So adding a new overloaded method without bindings will still unfortunately pass). You can avoid the test where bindings are not applicable: - for a whole class by placing "@note not available in Python bindings" in the class' Doxygen comments - or by placing the @note inside a member's Doxygen comments for a specific member Additionally, classes which aren't included in the API docs will not be tested.
51 lines
1.6 KiB
Plaintext
51 lines
1.6 KiB
Plaintext
/**
|
|
* @brief The QgsFieldComboBox is a combo box which displays the list of fields of a given layer.
|
|
* It might be combined with a QgsMapLayerComboBox to automatically update fields according to a chosen layer.
|
|
* If expression must be used, QgsFieldExpressionWidget shall be used instead.
|
|
* @see QgsMapLayerComboBox
|
|
* @note added in 2.3
|
|
*/
|
|
class QgsFieldComboBox : QComboBox
|
|
{
|
|
|
|
%TypeHeaderCode
|
|
#include "qgsfieldcombobox.h"
|
|
%End
|
|
|
|
public:
|
|
/**
|
|
* @brief QgsFieldComboBox creates a combo box to display the fields of a layer.
|
|
* The layer can be either manually given or dynamically set by connecting the signal QgsMapLayerComboBox::layerChanged to the slot setLayer.
|
|
*/
|
|
explicit QgsFieldComboBox( QWidget *parent /TransferThis/ = 0 );
|
|
|
|
//! setFilters allows fitering according to the type of field
|
|
void setFilters( const QgsFieldProxyModel::Filters& filters );
|
|
|
|
//! currently used filter on list of fields
|
|
QgsFieldProxyModel::Filters filters() const;
|
|
|
|
//! return the currently selected field
|
|
QString currentField() const;
|
|
|
|
//! Returns the currently used layer
|
|
QgsVectorLayer* layer() const;
|
|
|
|
signals:
|
|
//! the signal is emitted when the currently selected field changes
|
|
void fieldChanged( const QString& fieldName );
|
|
|
|
public slots:
|
|
//! set the layer of which the fields are listed
|
|
void setLayer( QgsVectorLayer* layer );
|
|
|
|
//! convenience slot to connect QgsMapLayerComboBox layer signal
|
|
void setLayer( QgsMapLayer* layer );
|
|
|
|
//! setField sets the currently selected field
|
|
void setField( const QString& fieldName );
|
|
|
|
protected slots:
|
|
void indexChanged( int i );
|
|
};
|