15 #ifndef QGSPROPERTYOVERRIDEBUTTON_H
16 #define QGSPROPERTYOVERRIDEBUTTON_H
24 #include <QToolButton>
53 Q_PROPERTY( QString usageInfo READ usageInfo WRITE setUsageInfo )
54 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 );
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 );
211 void registerLinkedWidget( QWidget *widget );
218 void updateFieldLists();
232 void setActive(
bool active );
238 void aboutToShowMenu();
239 void menuActionTriggered( QAction *action );
255 void mouseReleaseEvent( QMouseEvent *event )
override;
259 void showDescriptionDialog();
260 void showExpressionDialog();
261 void showAssistant();
268 void setActivePrivate(
bool active );
271 int mPropertyKey = -1;
275 QStringList mFieldNameList;
276 QStringList mFieldTypeList;
278 QString mExpressionString;
281 QMenu *mDefineMenu =
nullptr;
282 QAction *mActionDataTypes =
nullptr;
283 QMenu *mFieldsMenu =
nullptr;
284 QMenu *mVariablesMenu =
nullptr;
285 QAction *mActionVariables =
nullptr;
286 QMenu *mColorsMenu =
nullptr;
287 QAction *mActionColors =
nullptr;
289 QAction *mActionActive =
nullptr;
290 QAction *mActionDescription =
nullptr;
291 QAction *mActionExpDialog =
nullptr;
292 QAction *mActionExpression =
nullptr;
293 QAction *mActionPasteExpr =
nullptr;
294 QAction *mActionCopyExpr =
nullptr;
295 QAction *mActionClearExpr =
nullptr;
296 QAction *mActionAssistant =
nullptr;
297 QAction *mActionCreateAuxiliaryField =
nullptr;
302 QString mDataTypesString;
303 QString mInputDescription;
304 QString mFullDescription;
314 SiblingExpressionText,
319 SiblingWidget(
const QPointer<QWidget> &widgetPointer, SiblingType siblingType,
bool natural =
true )
320 : mWidgetPointer( widgetPointer )
321 , mSiblingType( siblingType )
322 , mNatural( natural )
324 QPointer<QWidget> mWidgetPointer;
325 SiblingType mSiblingType;
328 QList< SiblingWidget > mSiblingWidgets;
333 bool mAuxiliaryStorageEnabled =
false;
335 std::shared_ptr< QgsSymbol > mSymbol;
340 void updateSiblingWidgets(
bool state );
343 #endif // QGSPROPERTYOVERRIDEBUTTON_H