mirror of
https://github.com/qgis/QGIS.git
synced 2025-06-19 00:02:48 -04:00
Bindings and API docs
This commit is contained in:
parent
1882cabea9
commit
aa87113995
@ -217,6 +217,24 @@ class QgsAttributeEditorContainer : QgsAttributeEditorElement
|
||||
* @note Added in QGIS 3.0
|
||||
*/
|
||||
virtual QgsAttributeEditorElement* clone(QgsAttributeEditorElement* parent) const /Factory/;
|
||||
|
||||
/**
|
||||
* The visibility expression is used in the attribute form to
|
||||
* show or hide this container based on an expression incorporating
|
||||
* the field value controlled by editor widgets.
|
||||
*
|
||||
* @note Added in QGIS 3.0
|
||||
*/
|
||||
QgsOptionalExpression visibilityExpression() const;
|
||||
|
||||
/**
|
||||
* The visibility expression is used in the attribute form to
|
||||
* show or hide this container based on an expression incorporating
|
||||
* the field value controlled by editor widgets.
|
||||
*
|
||||
* @note Added in QGIS 3.0
|
||||
*/
|
||||
void setVisibilityExpression( const QgsOptionalExpression& visibilityExpression );
|
||||
};
|
||||
|
||||
/** \ingroup core
|
||||
|
@ -53,6 +53,17 @@ class QgsFieldExpressionWidget : QWidget
|
||||
*/
|
||||
QString asExpression() const;
|
||||
|
||||
/**
|
||||
* Returns the currently selected field or expression. If a field is currently selected, the returned
|
||||
* value will be converted to a valid expression referencing this field (ie enclosing the field name with
|
||||
* appropriate quotations).
|
||||
*
|
||||
* Alias for asExpression()
|
||||
*
|
||||
* @note added in QGIS 3.0
|
||||
*/
|
||||
QString expression() const;
|
||||
|
||||
//! Returns the currently used layer
|
||||
QgsVectorLayer* layer() const;
|
||||
|
||||
@ -87,6 +98,14 @@ class QgsFieldExpressionWidget : QWidget
|
||||
//! sets the current field or expression in the widget
|
||||
void setField( const QString &fieldName );
|
||||
|
||||
/**
|
||||
* Sets the current expression text and if applicable also the field.
|
||||
* Alias for setField.
|
||||
*
|
||||
* @note Added in QGIS 3.0
|
||||
*/
|
||||
void setExpression( const QString& expression );
|
||||
|
||||
protected slots:
|
||||
//! open the expression dialog to edit the current or add a new expression
|
||||
void editExpression();
|
||||
|
@ -64,6 +64,21 @@ class QgsTabWidget : QTabWidget
|
||||
*/
|
||||
int realTabIndex( QWidget* widget );
|
||||
|
||||
/**
|
||||
* Is called internally whenever a new tab has been inserted.
|
||||
*
|
||||
* Is used to keep track of currently available and visible tabs.
|
||||
*
|
||||
* @note Added in QGIS 3.0
|
||||
*/
|
||||
virtual void tabInserted( int index );
|
||||
|
||||
/**
|
||||
* Is called internally whenever a tab has been removed.
|
||||
*
|
||||
* Is used to keep track of currently available and visible tabs.
|
||||
*
|
||||
* @note Added in QGIS 3.0
|
||||
*/
|
||||
virtual void tabRemoved( int index );
|
||||
};
|
||||
|
@ -220,7 +220,22 @@ class CORE_EXPORT QgsAttributeEditorContainer : public QgsAttributeEditorElement
|
||||
*/
|
||||
virtual QgsAttributeEditorElement* clone( QgsAttributeEditorElement* parent ) const override;
|
||||
|
||||
/**
|
||||
* The visibility expression is used in the attribute form to
|
||||
* show or hide this container based on an expression incorporating
|
||||
* the field value controlled by editor widgets.
|
||||
*
|
||||
* @note Added in QGIS 3.0
|
||||
*/
|
||||
QgsOptionalExpression visibilityExpression() const;
|
||||
|
||||
/**
|
||||
* The visibility expression is used in the attribute form to
|
||||
* show or hide this container based on an expression incorporating
|
||||
* the field value controlled by editor widgets.
|
||||
*
|
||||
* @note Added in QGIS 3.0
|
||||
*/
|
||||
void setVisibilityExpression( const QgsOptionalExpression& visibilityExpression );
|
||||
|
||||
private:
|
||||
|
@ -16,11 +16,11 @@
|
||||
#ifndef QGSOPTIONAL_H
|
||||
#define QGSOPTIONAL_H
|
||||
|
||||
|
||||
/**
|
||||
* \ingroup core
|
||||
*
|
||||
* \brief
|
||||
* QgsOptional is a container for other classes and adds an additional enabled/disabled flag.
|
||||
* \brief QgsOptional is a container for other classes and adds an additional enabled/disabled flag.
|
||||
*
|
||||
* Often it is used for configuration options which can be enabled or disabled but also have
|
||||
* more internal configuration information that should not be lost when disabling and re-enabling.
|
||||
|
@ -66,8 +66,23 @@ class GUI_EXPORT QgsTabWidget : public QTabWidget
|
||||
*/
|
||||
int realTabIndex( QWidget* widget );
|
||||
|
||||
virtual void tabInserted( int index );
|
||||
virtual void tabRemoved( int index );
|
||||
/**
|
||||
* Is called internally whenever a new tab has been inserted.
|
||||
*
|
||||
* Is used to keep track of currently available and visible tabs.
|
||||
*
|
||||
* @note Added in QGIS 3.0
|
||||
*/
|
||||
virtual void tabInserted( int index ) override;
|
||||
|
||||
/**
|
||||
* Is called internally whenever a tab has been removed.
|
||||
*
|
||||
* Is used to keep track of currently available and visible tabs.
|
||||
*
|
||||
* @note Added in QGIS 3.0
|
||||
*/
|
||||
virtual void tabRemoved( int index ) override;
|
||||
|
||||
private:
|
||||
void synchronizeIndexes();
|
||||
|
Loading…
x
Reference in New Issue
Block a user