15 #ifndef QGSDATADEFINEDBUTTON_H 16 #define QGSDATADEFINEDBUTTON_H 22 #include <QToolButton> 23 #include <QScopedPointer> 73 Q_PROPERTY(
QString usageInfo READ usageInfo WRITE setUsageInfo )
81 AnyType = String | Int | Double
83 Q_DECLARE_FLAGS( DataTypes,
DataType )
97 const QgsDataDefinedButton::DataTypes& datatypes = AnyType,
111 const QgsDataDefinedButton::DataTypes& datatypes = AnyType,
133 bool isActive()
const {
return mProperty.value(
"active" ).toInt(); }
185 void registerEnabledWidget(
QWidget* wdgt );
207 void registerCheckedWidget(
QWidget* wdgt );
231 void registerGetExpressionContextCallback( ExpressionContextCallback fnGetExpressionContext,
const void* context );
256 static QString anyStringDesc();
259 static QString intPosOneDesc();
261 static QString doublePosDesc();
262 static QString double0to1Desc();
264 static QString double180RotDesc();
265 static QString intTranspDesc();
266 static QString unitsMmMuDesc();
267 static QString unitsMmMuPercentDesc();
268 static QString colorNoAlphaDesc();
269 static QString colorAlphaDesc();
270 static QString textHorzAlignDesc();
271 static QString textVertAlignDesc();
272 static QString penJoinStyleDesc();
273 static QString blendModesDesc();
276 static QString paperSizeDesc();
277 static QString paperOrientationDesc();
278 static QString horizontalAnchorDesc();
279 static QString verticalAnchorDesc();
280 static QString gradientTypeDesc();
281 static QString gradientCoordModeDesc();
282 static QString gradientSpreadDesc();
283 static QString lineStyleDesc();
285 static QString fillStyleDesc();
286 static QString markerStyleDesc();
287 static QString customDashDesc();
293 void setActive(
bool active );
298 void disableEnabledWidgets(
bool disable );
303 void checkCheckedWidgets(
bool check );
310 void dataDefinedChanged(
const QString& definition );
316 void dataDefinedActivated(
bool active );
337 void showDescriptionDialog();
338 void showExpressionDialog();
339 void showAssistant();
341 void updateFieldLists();
353 QMenu* mVariablesMenu;
365 DataTypes mDataTypes;
374 QIcon mIconDataDefine;
375 QIcon mIconDataDefineOn;
376 QIcon mIconDataDefineError;
377 QIcon mIconDataDefineExpression;
378 QIcon mIconDataDefineExpressionOn;
379 QIcon mIconDataDefineExpressionError;
381 ExpressionContextCallback mExpressionContextCallback;
382 const void* mExpressionContextCallbackContext;
385 void aboutToShowMenu();
386 void menuActionTriggered(
QAction* action );
389 Q_DECLARE_OPERATORS_FOR_FLAGS( QgsDataDefinedButton::DataTypes )
392 #endif // QGSDATADEFINEDBUTTON_H
An assistant (wizard) dialog, accessible from a QgsDataDefinedButton.
A container class for data source field mapping or expression.
const QgsMapCanvas * mapCanvas() const
Returns the map canvas associated with the widget.
Map canvas is a class for displaying all GIS data types on a canvas.
virtual void setMapCanvas(QgsMapCanvas *canvas)
Sets the map canvas associated with the widget.
Expression contexts are used to encapsulate the parameters around which a QgsExpression should be eva...
QgsMapCanvas * mMapCanvas
QgsDataDefinedAssistant()
Represents a vector layer which manages a vector based data sets.