Nyall Dawson
4d5bae22b8
[FEATURE] Client side default field values
...
Allows an expression to be set for a vector layer field which
is used to evaluate a default value for this field.
A new method,
QgsVectorLayer::defaultValue( int index,
const QgsFeature& feature = QgsFeature(),
QgsExpressionContext* context = nullptr )
has been added which evaluates the default value for a given field
using the optionally passed feature and expression context. This
allows default values to utilise properties of the feature
which exist at the time of calling, such as digitized geometries.
The expression context parameter allows variables to be used
in default value expressions, making it easier to eg insert
a user's name, current datetime, project path, etc
Default values are set using QgsVectorLayer::setDefaultValueExpression()
and retrieved using defaultValueExpression()
2016-08-30 12:39:55 +10:00
..
2016-08-04 09:10:08 +02:00
2016-08-10 19:44:30 +02:00
2016-08-23 15:00:56 +02:00
2016-08-10 12:08:52 +02:00
2016-08-24 21:01:03 +10:00
2016-08-29 06:55:52 +02:00
2016-02-14 03:50:49 +01:00
2016-08-10 12:08:52 +02:00
2016-08-02 08:22:29 +02:00
2016-08-29 06:55:52 +02:00
2016-08-10 17:55:06 +10:00
2016-01-08 21:32:11 +01:00
2016-06-05 14:16:30 +10:00
2016-08-29 18:43:20 +02:00
2016-08-04 09:10:08 +02:00
2016-06-02 21:29:35 +02:00
2016-08-10 17:56:01 +10:00
2016-08-24 08:39:05 +07:00
2016-08-23 15:00:56 +02:00
2016-08-10 12:08:52 +02:00
2016-08-19 14:50:21 +02:00
2016-07-07 17:35:55 +02:00
2016-02-16 14:12:54 +11:00
2015-12-07 21:55:36 +11:00
2015-10-07 12:02:04 +11:00
2015-10-07 12:02:04 +11:00
2016-08-29 06:55:52 +02:00
2016-08-24 21:01:03 +10:00
2016-08-04 14:27:31 +02:00
2016-02-14 03:50:49 +01:00
2016-08-05 08:22:21 +02:00
2015-10-07 12:02:04 +11:00
2016-07-26 11:14:35 +10:00
2016-07-27 07:10:46 +10:00
2016-02-16 13:29:36 +01:00
2016-07-25 10:15:46 +10:00
2015-06-11 19:19:00 +02:00
2016-08-10 17:55:06 +10:00
2016-08-09 08:49:42 +02:00
2015-03-05 00:13:05 +07:00
2016-02-14 03:50:49 +01:00
2016-07-15 05:57:57 +10:00
2016-08-04 09:10:08 +02:00
2016-05-17 10:52:06 +10:00
2016-07-21 08:40:50 +10:00
2015-07-29 11:52:14 +02:00
2016-08-10 12:12:28 +02:00
2016-07-25 14:47:16 +10:00
2016-08-29 19:22:04 +02:00
2015-10-13 22:54:01 +02:00
2016-08-10 17:56:01 +10:00
2016-08-05 08:22:21 +02:00
2016-08-15 09:02:30 +10:00
2015-10-07 12:02:04 +11:00
2016-08-19 16:05:41 +02:00
2015-11-20 10:38:34 +11:00
2016-04-15 07:52:02 +10:00
2016-06-10 11:18:25 +10:00
2016-01-26 14:24:45 +11:00
2016-08-01 23:05:37 +02:00
2016-08-29 19:22:04 +02:00
2016-03-30 19:35:34 +11:00
2016-02-14 03:50:49 +01:00
2016-08-29 06:55:52 +02:00
2015-10-26 22:46:25 +11:00
2016-08-04 09:10:08 +02:00
2016-01-26 14:24:45 +11:00
2015-05-24 18:48:22 +02:00
2016-02-14 03:50:49 +01:00
2016-05-20 09:48:18 +10:00
2016-07-15 06:01:39 +10:00
2016-01-22 18:45:45 +11:00
2016-02-02 19:47:21 +11:00
2015-02-03 02:21:52 +01:00
2016-02-14 03:50:49 +01:00
2016-02-14 03:50:49 +01:00
2016-08-10 12:12:28 +02:00
2016-07-21 08:40:50 +10:00
2014-09-01 10:10:37 +07:00
2016-08-29 18:43:20 +02:00
2016-08-29 18:43:20 +02:00
2016-07-04 12:26:25 +10:00
2016-07-24 23:16:33 +02:00
2015-01-19 18:39:03 +07:00
2015-10-07 12:02:04 +11:00
2015-10-07 12:02:04 +11:00
2016-08-10 12:08:52 +02:00
2014-06-24 14:02:03 +07:00
2014-06-24 14:02:03 +07:00
2016-08-10 12:08:52 +02:00
2016-08-01 12:23:44 +02:00
2016-02-14 03:50:49 +01:00
2016-08-29 06:55:52 +02:00
2015-09-17 20:35:27 +10:00
2015-10-26 22:46:25 +11:00
2016-02-14 03:50:49 +01:00
2016-08-22 10:38:10 +08:00
2016-02-14 03:50:49 +01:00
2016-06-12 13:48:30 +02:00
2016-02-14 03:50:49 +01:00
2016-01-05 11:16:15 +11:00
2015-07-29 11:52:14 +02:00
2016-08-12 12:44:02 +02:00
2016-08-04 09:10:08 +02:00
2016-07-24 22:40:52 +02:00
2016-08-30 12:39:54 +10:00
2016-02-29 20:39:29 +08:00
2016-01-22 18:45:45 +11:00
2016-04-06 20:55:26 +10:00
2016-07-21 08:40:50 +10:00
2016-08-19 16:53:54 +02:00
2015-10-07 12:02:04 +11:00
2016-07-21 08:40:50 +10:00
2016-02-14 03:50:49 +01:00
2016-02-14 03:50:49 +01:00
2016-05-28 07:21:21 +10:00
2015-11-05 21:06:44 +01:00
2016-05-29 08:57:26 +02:00
2016-07-21 08:40:50 +10:00
2016-07-15 06:07:52 +10:00
2016-07-24 22:40:52 +02:00
2016-08-10 12:08:52 +02:00
2016-07-31 14:14:54 +02:00
2016-07-26 08:29:24 +10:00
2016-02-14 03:50:49 +01:00
2015-07-29 11:52:14 +02:00
2016-05-25 22:50:28 +02:00
2016-07-24 22:40:52 +02:00
2016-06-21 11:46:18 +02:00
2015-10-07 12:02:04 +11:00
2016-06-02 21:29:35 +02:00
2016-05-17 10:53:25 +10:00
2016-05-17 10:52:06 +10:00
2016-08-30 12:39:54 +10:00
2016-07-24 22:40:52 +02:00
2016-04-27 16:50:19 +08:00
2016-02-14 03:50:49 +01:00
2016-01-18 13:11:43 +01:00
2016-07-26 08:31:29 +10:00
2016-08-04 09:10:08 +02:00
2016-08-12 07:01:04 +10:00
2016-08-30 12:39:55 +10:00
2016-07-19 10:47:14 +02:00
2016-08-02 07:26:11 +10:00
2016-07-31 21:23:07 +10:00
2016-08-10 12:12:28 +02:00
2016-02-14 03:50:49 +01:00
2016-08-04 09:10:08 +02:00
2016-02-01 03:38:16 -05:00
2016-07-31 21:23:07 +10:00
2016-05-25 22:53:01 +02:00
2016-08-04 09:10:08 +02:00
2016-01-07 16:34:34 +01:00
2016-07-25 15:22:36 +10:00