15 #ifndef QGSPROPERTYOVERRIDEBUTTON_H 16 #define QGSPROPERTYOVERRIDEBUTTON_H 24 #include <QToolButton> 52 Q_PROPERTY( QString usageInfo READ usageInfo WRITE setUsageInfo )
53 Q_PROPERTY(
bool active READ isActive WRITE setActive )
74 void init(
int propertyKey,
78 bool auxiliaryStorageEnabled = false );
88 void init(
int propertyKey,
92 bool auxiliaryStorageEnabled = false );
102 void init(
int propertyKey,
106 bool auxiliaryStorageEnabled = false );
123 int propertyKey()
const {
return mPropertyKey; }
128 bool isActive()
const {
return mProperty && mProperty.isActive(); }
153 void setUsageInfo(
const QString &info ) { mUsageInfo = info; updateGui(); }
174 void registerCheckedWidget( QWidget *widget,
bool natural =
true );
181 void registerEnabledWidget( QWidget *widget,
bool natural =
true );
188 void registerVisibleWidget( QWidget *widget,
bool natural =
true );
194 void registerExpressionWidget( QWidget *widget );
207 void updateFieldLists();
221 void setActive(
bool active );
229 void activated(
bool isActive );
232 void createAuxiliaryField();
235 void mouseReleaseEvent( QMouseEvent *event )
override;
239 void showDescriptionDialog();
240 void showExpressionDialog();
241 void showAssistant();
248 void setActivePrivate(
bool active );
251 int mPropertyKey = -1;
255 QStringList mFieldNameList;
256 QStringList mFieldTypeList;
258 QString mExpressionString;
261 QMenu *mDefineMenu =
nullptr;
262 QAction *mActionDataTypes =
nullptr;
263 QMenu *mFieldsMenu =
nullptr;
264 QMenu *mVariablesMenu =
nullptr;
265 QAction *mActionVariables =
nullptr;
267 QAction *mActionActive =
nullptr;
268 QAction *mActionDescription =
nullptr;
269 QAction *mActionExpDialog =
nullptr;
270 QAction *mActionExpression =
nullptr;
271 QAction *mActionPasteExpr =
nullptr;
272 QAction *mActionCopyExpr =
nullptr;
273 QAction *mActionClearExpr =
nullptr;
274 QAction *mActionAssistant =
nullptr;
275 QAction *mActionCreateAuxiliaryField =
nullptr;
280 QString mDataTypesString;
281 QString mInputDescription;
282 QString mFullDescription;
292 SiblingExpressionText,
296 SiblingWidget(
const QPointer<QWidget> &widgetPointer, SiblingType siblingType,
bool natural =
true )
297 : mWidgetPointer( widgetPointer )
298 , mSiblingType( siblingType )
299 , mNatural( natural )
301 QPointer<QWidget> mWidgetPointer;
302 SiblingType mSiblingType;
305 QList< SiblingWidget > mSiblingWidgets;
310 bool mAuxiliaryStorageEnabled =
false;
312 std::shared_ptr< QgsSymbol > mSymbol;
315 void aboutToShowMenu();
316 void menuActionTriggered( QAction *action );
318 void updateSiblingWidgets(
bool state );
322 #endif // QGSPROPERTYOVERRIDEBUTTON_H
Map canvas is a class for displaying all GIS data types on a canvas.
Abstract base class for QgsPropertyCollection like objects.
A store for object properties.
Definition for a property.
QMap< int, QgsPropertyDefinition > QgsPropertiesDefinition
Definition of available properties.
Abstract interface for generating an expression context.
DataType
Valid data types required by property.
Property requires a string value.
Represents a vector layer which manages a vector based data sets.