Skip to content

Commit

Permalink
Document api breakages and add more doxymentation
Browse files Browse the repository at this point in the history
  • Loading branch information
m-kuhn committed Dec 20, 2016
1 parent 590a51e commit 1ad6e0b
Show file tree
Hide file tree
Showing 5 changed files with 45 additions and 10 deletions.
27 changes: 19 additions & 8 deletions doc/api_break.dox
Expand Up @@ -261,6 +261,7 @@ should now call QgsCoordinateReferenceSystem::invalidateCache() and QgsCoordinat
- QgsRendererV2DataDefinedMenus was removed. Use QgsDataDefinedButton instead.
- QgsLegacyHelpers.
- QgsProviderCountCalcEvent and QgsProviderExtentCalcEvent. These classes were unused in QGIS core and unmaintained.
- QgsEditorWidgetConfig was removed. Use QVariantMap instead.


General changes {#qgis_api_break_3_0_global}
Expand Down Expand Up @@ -890,6 +891,7 @@ QgsFieldExpressionWidget {#qgis_api_break_3_0_QgsFieldExpressionWidget}
------------------------

- The setLayer( QgsVectorlayer* ) slot has been removed. Use the setLayer( QgsMapLayer* ) slot instead.
- registerGetExpressionContextCallback has been removed in favor of registerExpressionContextGenerator


QgsFields {#qgis_api_break_3_0_QgsFields}
Expand All @@ -899,12 +901,6 @@ QgsFields {#qgis_api_break_3_0_QgsFields}
- fieldNameIndex has been renamed to lookupField. See the API documentation for details.


QgsFieldExpressionWidget {#qgis_api_break_3_0_QgsFieldExpressionWidget}
------------------------

- registerGetExpressionContextCallback has been removed in favor of registerExpressionContextGenerator


QgsFieldProxyModel {#qgis_api_break_3_0_QgsFieldProxyModel}
------------------

Expand Down Expand Up @@ -971,8 +967,23 @@ plugins calling this method will need to be updated.
QgsEditorWidgetRegistry {#qgis_api_break_3_0_QgsEditorWidgetRegistry}
-----------------------

- The signature of isFieldSupported() has been changed to return an unsigned (how good it supports the given field)
and to const-correct it.
- The signature of isFieldSupported() has been changed to return an unsigned
integer (how good it supports the given field) and is now const.

QgsEditorWidgetFactory {#qgis_api_break_3_0_QgsEditorWidgetFactory}
----------------------

- `readEditorConfig` has been removed. The configuration is read and written
from and to a QVariantMap automatically.
- `readConfig` has been removed. The configuration is read and written
from and to a QVariantMap automatically.
- `writeConfig` has been removed. The configuration is read and written
from and to a QVariantMap automatically.
- `representValue` has been removed. Use QgsFieldKit::representValue() instead
- `sortValue` has been removed. Use QgsFieldKit::representValue() instead
- `alignmentFlag` has been removed. Use QgsFieldKit::representValue() instead
- `createCache` has been removed. Use QgsFieldKit::representValue() instead


QgsGraduatedRenderer {#qgis_api_break_3_0_QgsGraduatedRenderer}
--------------------
Expand Down
6 changes: 6 additions & 0 deletions python/core/qgsapplication.sip
Expand Up @@ -398,6 +398,12 @@ static void qtgui_UpdatePyArgv(PyObject *argvlist, int argc, char **argv)
*/
static QgsRuntimeProfiler* profiler();

/**
* Provides access to the field kit registry.
*
* @note Added in QGIS 3.0
*/
static QgsFieldKitRegistry* fieldKitRegistry();
public slots:

/** Causes the application instance to emit the settingsChanged() signal. This should
Expand Down
14 changes: 13 additions & 1 deletion src/core/qgsfieldkit.h
Expand Up @@ -21,6 +21,18 @@

class QgsVectorLayer;

/**
* \ingroup core
* A field kit helps to handle and display values for a field.
*
* It allows for using a shared configuration with the editor widgets
* for representation of attribute values.
* Field kits normally have one single instance which is managed by the
* QgsFieldKitRegistry. Custom field kits should be registered there and
* field kits for use within code should normally be obtained from there.
*
* This is an abstract base class and will always need to be subclassed.
*/
class CORE_EXPORT QgsFieldKit
{
public:
Expand Down Expand Up @@ -48,7 +60,7 @@ class CORE_EXPORT QgsFieldKit
/**
* If the default sort order should be overwritten for this widget, you can transform the value in here.
*
* @return By default the value is returned unmodified.
* @returns an unmodified value by default.
*
* @note Added in 3.0
*/
Expand Down
6 changes: 6 additions & 0 deletions src/core/qgsfieldkitregistry.h
Expand Up @@ -22,6 +22,12 @@

class QgsFieldKit;

/**
* \ingroup core
* The QgsFieldKitRegistry manages registered classes of QgsFieldKit.
* A reference to the QgsFieldKitRegistry can be obtained from
* QgsApplication::fieldKitRegistry().
*/
class CORE_EXPORT QgsFieldKitRegistry : public QObject
{
Q_OBJECT
Expand Down
2 changes: 1 addition & 1 deletion src/core/qgsvectorlayer.h
Expand Up @@ -794,7 +794,7 @@ class CORE_EXPORT QgsVectorLayer : public QgsMapLayer, public QgsExpressionConte
virtual QString loadNamedStyle( const QString &theURI, bool &theResultFlag ) override;

/** Read the symbology for the current layer from the Dom node supplied.
* @param node node that will contain the symbology definition for this layer.
* @param layerNode node that will contain the symbology definition for this layer.
* @param errorMessage reference to string that will be updated with any error messages
* @return true in case of success.
*/
Expand Down

0 comments on commit 1ad6e0b

Please sign in to comment.