Skip to content

Commit aa87113

Browse files
committedSep 9, 2016
Bindings and API docs
1 parent 1882cab commit aa87113

File tree

6 files changed

+86
-4
lines changed

6 files changed

+86
-4
lines changed
 

‎python/core/qgsattributeeditorelement.sip

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -217,6 +217,24 @@ class QgsAttributeEditorContainer : QgsAttributeEditorElement
217217
* @note Added in QGIS 3.0
218218
*/
219219
virtual QgsAttributeEditorElement* clone(QgsAttributeEditorElement* parent) const /Factory/;
220+
221+
/**
222+
* The visibility expression is used in the attribute form to
223+
* show or hide this container based on an expression incorporating
224+
* the field value controlled by editor widgets.
225+
*
226+
* @note Added in QGIS 3.0
227+
*/
228+
QgsOptionalExpression visibilityExpression() const;
229+
230+
/**
231+
* The visibility expression is used in the attribute form to
232+
* show or hide this container based on an expression incorporating
233+
* the field value controlled by editor widgets.
234+
*
235+
* @note Added in QGIS 3.0
236+
*/
237+
void setVisibilityExpression( const QgsOptionalExpression& visibilityExpression );
220238
};
221239

222240
/** \ingroup core

‎python/gui/qgsfieldexpressionwidget.sip

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,17 @@ class QgsFieldExpressionWidget : QWidget
5353
*/
5454
QString asExpression() const;
5555

56+
/**
57+
* Returns the currently selected field or expression. If a field is currently selected, the returned
58+
* value will be converted to a valid expression referencing this field (ie enclosing the field name with
59+
* appropriate quotations).
60+
*
61+
* Alias for asExpression()
62+
*
63+
* @note added in QGIS 3.0
64+
*/
65+
QString expression() const;
66+
5667
//! Returns the currently used layer
5768
QgsVectorLayer* layer() const;
5869

@@ -87,6 +98,14 @@ class QgsFieldExpressionWidget : QWidget
8798
//! sets the current field or expression in the widget
8899
void setField( const QString &fieldName );
89100

101+
/**
102+
* Sets the current expression text and if applicable also the field.
103+
* Alias for setField.
104+
*
105+
* @note Added in QGIS 3.0
106+
*/
107+
void setExpression( const QString& expression );
108+
90109
protected slots:
91110
//! open the expression dialog to edit the current or add a new expression
92111
void editExpression();

‎python/gui/qgstabwidget.sip

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,21 @@ class QgsTabWidget : QTabWidget
6464
*/
6565
int realTabIndex( QWidget* widget );
6666

67+
/**
68+
* Is called internally whenever a new tab has been inserted.
69+
*
70+
* Is used to keep track of currently available and visible tabs.
71+
*
72+
* @note Added in QGIS 3.0
73+
*/
6774
virtual void tabInserted( int index );
75+
76+
/**
77+
* Is called internally whenever a tab has been removed.
78+
*
79+
* Is used to keep track of currently available and visible tabs.
80+
*
81+
* @note Added in QGIS 3.0
82+
*/
6883
virtual void tabRemoved( int index );
6984
};

‎src/core/qgsattributeeditorelement.h

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -220,7 +220,22 @@ class CORE_EXPORT QgsAttributeEditorContainer : public QgsAttributeEditorElement
220220
*/
221221
virtual QgsAttributeEditorElement* clone( QgsAttributeEditorElement* parent ) const override;
222222

223+
/**
224+
* The visibility expression is used in the attribute form to
225+
* show or hide this container based on an expression incorporating
226+
* the field value controlled by editor widgets.
227+
*
228+
* @note Added in QGIS 3.0
229+
*/
223230
QgsOptionalExpression visibilityExpression() const;
231+
232+
/**
233+
* The visibility expression is used in the attribute form to
234+
* show or hide this container based on an expression incorporating
235+
* the field value controlled by editor widgets.
236+
*
237+
* @note Added in QGIS 3.0
238+
*/
224239
void setVisibilityExpression( const QgsOptionalExpression& visibilityExpression );
225240

226241
private:

‎src/core/qgsoptional.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,11 +16,11 @@
1616
#ifndef QGSOPTIONAL_H
1717
#define QGSOPTIONAL_H
1818

19+
1920
/**
2021
* \ingroup core
2122
*
22-
* \brief
23-
* QgsOptional is a container for other classes and adds an additional enabled/disabled flag.
23+
* \brief QgsOptional is a container for other classes and adds an additional enabled/disabled flag.
2424
*
2525
* Often it is used for configuration options which can be enabled or disabled but also have
2626
* more internal configuration information that should not be lost when disabling and re-enabling.

‎src/gui/qgstabwidget.h

Lines changed: 17 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -66,8 +66,23 @@ class GUI_EXPORT QgsTabWidget : public QTabWidget
6666
*/
6767
int realTabIndex( QWidget* widget );
6868

69-
virtual void tabInserted( int index );
70-
virtual void tabRemoved( int index );
69+
/**
70+
* Is called internally whenever a new tab has been inserted.
71+
*
72+
* Is used to keep track of currently available and visible tabs.
73+
*
74+
* @note Added in QGIS 3.0
75+
*/
76+
virtual void tabInserted( int index ) override;
77+
78+
/**
79+
* Is called internally whenever a tab has been removed.
80+
*
81+
* Is used to keep track of currently available and visible tabs.
82+
*
83+
* @note Added in QGIS 3.0
84+
*/
85+
virtual void tabRemoved( int index ) override;
7186

7287
private:
7388
void synchronizeIndexes();

0 commit comments

Comments
 (0)
Please sign in to comment.