23 Commits

Author SHA1 Message Date
Nyall Dawson
7da8110536 Remove deprecated methods from QgsExpression
Now all evaluate/prepare/etc methods must be called using QgsExpressionContexts

Also remove most remaining traces of special variables. This brings some
user facing changes, such that existing expressions may need to be
updated if they used these old special variables (eg $scale,
$feature). These changes are noted in doc/qgis3_user_changes.dox
so that we can include them in the release notes.
2016-08-10 17:55:06 +10:00
Juergen E. Fischer
a90be95f7b sip sync 2016-02-14 03:50:49 +01:00
Nyall Dawson
9cc9d424ce Add extra check for deprecations to documentation test
This check tests that if a function has been declared deprecated
with either Q_DECL_DEPRECATED or has a @deprecated Doxygen note
then it MUST have both the Q_DECL_DEPRECATD and @deprecated note.

It's important that both are used, as Q_DECL_DEPRECATED allows
throwing a warning if that method is used in code, while the
@deprecated doxygen note gives an indication to devs/PyQGIS users
of why it's deprecated and what should be used instead.

Ideally we'd also test for SIP /Deprecated/ tags, but I can't
find any reliable way to do this.
2015-12-07 21:55:36 +11:00
Nyall Dawson
c49b5b777f Change a lot of arguments to const references in core/gui
Rationale:
- there was a lot of large objects passed by value, so potentially
there's a speed bump from this
- even for implicitly shared classes like QString/QList there's still
a (small) cost for copying the objects when there's no reason to
- it's the right thing to do!
2015-10-07 12:02:04 +11:00
Nyall Dawson
5e03016b3a Update QgsDataDefined for expression contexts 2015-08-22 19:01:40 +10:00
Matthias Kuhn
9c3d65ef7b QgsDataDefined: Implicit management for useExpression 2015-08-07 09:06:41 +10:00
Nyall Dawson
013e1da783 Tests and doxygen for QgsDataDefined 2015-08-07 09:05:47 +10:00
Juergen E. Fischer
9752c468c1 indentation update 2015-07-29 11:52:14 +02:00
Nyall Dawson
14fd976f06 Implicit sharing for QgsDataDefined 2015-05-08 16:25:39 +10:00
Nyall Dawson
6ad2f9f091 Some improvements to QgsDataDefined and QgsDataDefinedButton:
- enhanced methods for storing/retrieving QgsDataDefined in a
  string map
- add method to QgsDataDefinedButton to update parameters for a
  QgsDataDefined
- deprecate an unused method
- const correctness
2015-05-06 18:35:59 +10:00
vmora
0c5063fee6 Add method to create a QgsDataDefined from a string.
Automatically analyses to determine whether the string refers to
a column or is an expression.
2015-04-27 18:22:36 +10:00
Nyall Dawson
774e5d3012 Fix crash on QgsDataDefined copy (fix #12027) 2015-04-22 06:00:59 +10:00
Juergen E. Fischer
abd4a04399 sip update 2015-02-03 02:21:52 +01:00
Juergen E. Fischer
cce2eb50cb indentation update 2015-01-22 20:56:02 +01:00
vmora
6fb347d23f improve GUI consistency & UX for data-defined style
data defined buttons added to the gui
fixes #9881
2015-01-22 06:56:34 +11:00
Juergen E. Fischer
bff64fdef9 indentation update 2014-12-30 22:47:09 +01:00
Nyall Dawson
cee539aae8 Add missing const to equality operator 2014-12-12 06:20:58 +11:00
Nyall Dawson
bcc29ff5d0 Add methods to QgsDataDefined for reading and writing to XML 2014-12-10 19:53:16 +11:00
Juergen E. Fischer
9ceb5ceab6 sip sync 2014-11-21 01:17:21 +01:00
Nyall Dawson
44a334b095 Add hasDefaultValues method to QgsDataDefined, add some tests 2014-11-20 21:28:34 +11:00
Juergen E. Fischer
74e7314c36 update sip bindings II 2014-01-27 09:22:53 +01:00
Juergen E. Fischer
3854086d47 sip update 2013-06-23 16:00:24 +02:00
Larry Shaffer
45f374f428 Update labeling gui and add expression support as data defined value
- Add QgsDataDefined class
- Add QgsDataDefinedButton class
- Add data defined Python support
- Add standalone SVG selector dialog to QgsSvgSelectorWidget class

- Fix for #4607, show only pertinent fields when setting a data defined value
- Fix for #5048 and #5049, data defined settings are literally used
- Fix for #5726, number formatting does not work for expressions
- Fix for #7755, using bufferSize to enable/disable label buffer is confusing
- Fix for #7779, labels do not register in label collision engine; and for #4719, inactive options in labeling dialog
- Prepare label text's expression upfront when preparing layer; makes rendering much faster
- Change name of 'feature obstacles' to appropriate terminology
2013-05-20 12:22:29 -06:00