Skip to content

Commit

Permalink
Some sip changes and doxymentation
Browse files Browse the repository at this point in the history
  • Loading branch information
m-kuhn committed Nov 19, 2015
1 parent d2ac91b commit 5b59609
Show file tree
Hide file tree
Showing 4 changed files with 47 additions and 5 deletions.
1 change: 0 additions & 1 deletion python/core/qgseditformconfig.sip
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,6 @@ class QgsEditFormConfig : QObject
SuppressOff = 2 //!< Do not suppress feature form
};

explicit QgsEditFormConfig( QObject* parent = nullptr );

/**
* This is only useful in combination with EditorLayout::TabLayout.
Expand Down
9 changes: 9 additions & 0 deletions python/core/qgsvectorlayer.sip
Original file line number Diff line number Diff line change
Expand Up @@ -1098,6 +1098,15 @@ class QgsVectorLayer : QgsMapLayer
* Returns a list of tabs holding groups and fields
*/
QList< QgsAttributeEditorElement* > attributeEditorElements();

/**
* Get the configuration of the form used to represent this vector layer.
* This is a writable configuration that can directly be changed in place.
*
* @return The configuration of this layers' form
*/
QgsEditFormConfig* editFormConfig() const;

/**
* Clears all the tabs for the attribute editor form
*/
Expand Down
12 changes: 8 additions & 4 deletions src/core/qgseditformconfig.h
Original file line number Diff line number Diff line change
Expand Up @@ -308,8 +308,6 @@ class CORE_EXPORT QgsEditFormConfig : public QObject
SuppressOff = 2 //!< Do not suppress feature form
};

explicit QgsEditFormConfig( QObject* parent = nullptr );

/**
* This is only useful in combination with EditorLayout::TabLayout.
*
Expand Down Expand Up @@ -522,10 +520,16 @@ class CORE_EXPORT QgsEditFormConfig : public QObject
private slots:
void onRelationsLoaded();

private:

protected:
// Internal stuff

/**
* Create a new edit form config. Normally invoked by QgsVectorLayer
*/
explicit QgsEditFormConfig( QObject* parent = nullptr );

private:

/**
* Used internally to set the fields when they change.
* This should only be called from QgsVectorLayer for synchronization reasons
Expand Down
30 changes: 30 additions & 0 deletions src/core/qgsrulebasedlabeling.h
Original file line number Diff line number Diff line change
Expand Up @@ -37,9 +37,36 @@ class CORE_EXPORT QgsRuleBasedLabeling : public QgsAbstractVectorLayerLabeling
Registered //!< Something was registered
};

/**
* Get the labeling settings. May return a null pointer.
*/
QgsPalLayerSettings* settings() const { return mSettings; }

/**
* Determines if scale based labeling is active
*
* @return True if scale based labeling is active
*/
bool dependsOnScale() const { return mScaleMinDenom != 0 || mScaleMaxDenom != 0; }

/**
* The minimum scale at which this label rule should be applied
*
* E.g. Denominator 1000 is a scale of 1:1000, where a rule with minimum denominator
* of 900 will not be applied while a rule with 2000 will be applied.
*
* @return The minimum scale denominator
*/
int scaleMinDenom() const { return mScaleMinDenom; }

/**
* The maximum scale denominator at which this label rule should be applied
*
* E.g. Denominator 1000 is a scale of 1:1000, where a rule with maximum denominator
* of 900 will be applied while a rule with 2000 will not be applied.
*
* @return The maximum scale denominator
*/
int scaleMaxDenom() const { return mScaleMaxDenom; }
/**
* A filter that will check if this rule applies
Expand Down Expand Up @@ -186,6 +213,9 @@ class CORE_EXPORT QgsRuleBasedLabeling : public QgsAbstractVectorLayerLabeling
*/
bool isScaleOK( double scale ) const;

/**
* Initialize filters. Automatically called by setFilterExpression.
*/
void initFilter();

/**
Expand Down

0 comments on commit 5b59609

Please sign in to comment.