15 #ifndef QGSDATADEFINEDBUTTON_H
16 #define QGSDATADEFINEDBUTTON_H
24 #include <QToolButton>
46 Q_DECLARE_FLAGS( DataTypes, DataType )
60 DataTypes datatypes = AnyType,
61 QString description = QString( "" ) );
74 DataTypes datatypes = AnyType,
75 QString description = QString( "" ) );
77 QMap< QString, QString > definedProperty()
const {
return mProperty; }
82 bool isActive() {
return mProperty.value(
"active" ).toInt(); }
92 QString
getExpression()
const {
return mProperty.value(
"expression" ); }
97 QString
getField()
const {
return mProperty.value(
"field" ); }
124 void setUsageInfo(
const QString& info ) { mUsageInfo = info; updateGui(); }
129 void registerEnabledWidgets( QList<QWidget*> wdgts );
134 void registerEnabledWidget( QWidget* wdgt );
141 QList<QWidget*> registeredEnabledWidgets();
151 void registerCheckedWidgets( QList<QWidget*> wdgts );
156 void registerCheckedWidget( QWidget* wdgt );
163 QList<QWidget*> registeredCheckedWidgets();
173 static QString trString();
174 static QString boolDesc();
175 static QString anyStringDesc();
176 static QString intDesc();
177 static QString intPosDesc();
178 static QString intPosOneDesc();
179 static QString doubleDesc();
180 static QString doublePosDesc();
181 static QString doubleXYDesc();
182 static QString double180RotDesc();
183 static QString intTranspDesc();
184 static QString unitsMmMuDesc();
185 static QString unitsMmMuPercentDesc();
186 static QString colorNoAlphaDesc();
187 static QString colorAlphaDesc();
188 static QString textHorzAlignDesc();
189 static QString textVertAlignDesc();
190 static QString penJoinStyleDesc();
191 static QString blendModesDesc();
192 static QString svgPathDesc();
198 void setActive(
bool active );
203 void disableEnabledWidgets(
bool disable );
208 void checkCheckedWidgets(
bool check );
215 void dataDefinedChanged(
const QString& definition );
221 void dataDefinedActivated(
bool active );
224 void mouseReleaseEvent( QMouseEvent *event );
234 void setExpression( QString exp ) { mProperty.insert(
"expression", exp ); }
239 void setField( QString field ) { mProperty.insert(
"field", field ); }
242 void showDescriptionDialog();
243 void showExpressionDialog();
281 void aboutToShowMenu();
282 void menuActionTriggered( QAction* action );
285 Q_DECLARE_OPERATORS_FOR_FLAGS( QgsDataDefinedButton::DataTypes )
288 #endif // QGSDATADEFINEDBUTTON_H