Skip to content

Commit

Permalink
Fix warnings, add missing sip bindings
Browse files Browse the repository at this point in the history
  • Loading branch information
nyalldawson committed Aug 20, 2015
1 parent acbf283 commit 6a3357f
Show file tree
Hide file tree
Showing 6 changed files with 391 additions and 303 deletions.
18 changes: 18 additions & 0 deletions python/core/qgsvectorlayer.sip
Original file line number Diff line number Diff line change
Expand Up @@ -1242,6 +1242,24 @@ class QgsVectorLayer : QgsMapLayer
*/
bool simplifyDrawingCanbeApplied( const QgsRenderContext& renderContext, QgsVectorSimplifyMethod::SimplifyHint simplifyHint ) const;

/**
* @brief Return the field properties that have been set for the given field.
* Field UI properties hold extra UI information for a field that can be used in the UI.
* @param fieldName The field name to get the field properties for.
* @return Return the UI properties set for the field. Returns a new QgsFieldUIProperties if
* none is currently set for the field.
* @note added in QGIS 2.12
*/
QgsFieldUIProperties fieldUIProperties( QString fieldName );

/**
* @brief Set the the field UI properties for a given field.
* @param fieldName The field name.
* @param props The properties to assign to a field.
* @note added in QGIS 2.12
*/
void setFieldUIProperties( QString fieldName, QgsFieldUIProperties props );

public slots:
/**
* Select feature by its ID
Expand Down
44 changes: 44 additions & 0 deletions python/gui/attributetable/qgsfieldconditionalformatwidget.sip
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@

/** \ingroup gui
* \class QgsFieldConditionalFormatWidget
* A widget for customising conditional formatting options.
* \note added in QGIS 2.12
*/
class QgsFieldConditionalFormatWidget : QWidget
{
%TypeHeaderCode
#include <attributetable/qgsfieldconditionalformatwidget.h>
%End

public:

/** Constructor for QgsFieldConditionalFormatWidget.
* @param parent parent widget
*/
explicit QgsFieldConditionalFormatWidget( QWidget *parent /TransferThis/ = 0 );

/** Switches the widget to the rules page.
*/
void viewRules();

/** Sets the vector layer associated with the widget.
* @param theLayer vector layer
*/
void setLayer( QgsVectorLayer* theLayer );

/** Switches the widget to the edit style mode for the specified style.
* @param index index of conditional style to edit
* @param style initial conditional styling options
*/
void editStyle( int index, QgsConditionalStyle style );

/** Resets the formatting options to their default state.
*/
void reset();

signals:

/** Emitted when the conditional styling rules are updated.
*/
void rulesUpdates();
};
1 change: 1 addition & 0 deletions python/gui/gui.sip
Original file line number Diff line number Diff line change
Expand Up @@ -131,6 +131,7 @@
%Include attributetable/qgsfeaturelistviewdelegate.sip
%Include attributetable/qgsfeaturemodel.sip
%Include attributetable/qgsfeatureselectionmodel.sip
%Include attributetable/qgsfieldconditionalformatwidget.sip
%Include attributetable/qgsifeatureselectionmanager.sip

%Include layertree/qgscustomlayerorderwidget.sip
Expand Down
6 changes: 4 additions & 2 deletions src/core/qgsvectorlayer.h
Original file line number Diff line number Diff line change
Expand Up @@ -1758,15 +1758,17 @@ class CORE_EXPORT QgsVectorLayer : public QgsMapLayer
* @brief Return the field properties that have been set for the given field.
* Field UI properties hold extra UI information for a field that can be used in the UI.
* @param fieldName The field name to get the field properties for.
* @return Return the UI properties set for the field. Returns a new \class QgsFieldUIProperties if
* the none is currently set for the field.
* @return Return the UI properties set for the field. Returns a new QgsFieldUIProperties if
* none is currently set for the field.
* @note added in QGIS 2.12
*/
QgsFieldUIProperties fieldUIProperties( QString fieldName );

/**
* @brief Set the the field UI properties for a given field.
* @param fieldName The field name.
* @param props The properties to assign to a field.
* @note added in QGIS 2.12
*/
void setFieldUIProperties( QString fieldName, QgsFieldUIProperties props );

Expand Down
Loading

0 comments on commit 6a3357f

Please sign in to comment.