51 Q_PROPERTY( QString usageInfo READ usageInfo WRITE setUsageInfo )
52 Q_PROPERTY(
bool active READ isActive WRITE setActive )
72 void init(
int propertyKey,
76 bool auxiliaryStorageEnabled = false );
86 void init(
int propertyKey,
90 bool auxiliaryStorageEnabled = false );
100 void init(
int propertyKey,
104 bool auxiliaryStorageEnabled = false );
121 int propertyKey()
const {
return mPropertyKey; }
126 bool isActive()
const {
return mProperty && mProperty.isActive(); }
151 void setUsageInfo(
const QString &info ) { mUsageInfo = info; updateGui(); }
172 void registerCheckedWidget( QWidget *widget,
bool natural =
true );
179 void registerEnabledWidget( QWidget *widget,
bool natural =
true );
186 void registerVisibleWidget( QWidget *widget,
bool natural =
true );
192 void registerExpressionWidget( QWidget *widget );
209 void registerLinkedWidget( QWidget *widget );
215 void updateFieldLists();
229 void setActive(
bool active );
235 void aboutToShowMenu();
236 void menuActionTriggered( QAction *action );
252 void mouseReleaseEvent( QMouseEvent *event )
override;
256 void showDescriptionDialog();
257 void showExpressionDialog();
258 void showAssistant();
265 void setActivePrivate(
bool active );
268 QString getColor()
const;
270 int mPropertyKey = -1;
274 QStringList mFieldNameList;
275 QStringList mFieldDisplayNameList;
276 QList< QIcon > mFieldIcons;
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 );
Abstract interface for generating an expression context.