991 Commits

Author SHA1 Message Date
Nyall Dawson
2a9e5206e9 Remove deprecated QgsAttributeEditor 2016-09-15 18:50:39 +10:00
Nyall Dawson
fe65063c2b Remove many deprecated methods 2016-09-15 18:34:15 +10:00
Nyall Dawson
de7475ae72 Merge pull request #3486 from nyalldawson/symbol
Symbology QGIS 3.0 todos
2016-09-15 05:59:28 +10:00
Nyall Dawson
03907605e3 Avoid new colors in ramp overwriting old colors 2016-09-14 19:17:26 +10:00
Nyall Dawson
31e1661006 Ensure that colors are always added to recent color list from style panel 2016-09-14 19:17:26 +10:00
Nyall Dawson
ec50cac2ef [FEATURE] New "preset" colors color ramp option
Allows use of a color ramp consisting of a list of selected colors.
Currently there's no way in QGIS to classify a renderer using
some list of colors you've previously selected. So you can modify
the colors manually after classifying, but that's a pain
if you're regularly using the same color scheme.

Basically, it's like the color brewer color ramp options but
allowing users to pick their own preset list of colors to use*

(Because Cynthia Brewer isn't the only cartographic color expert!)
2016-09-14 19:17:26 +10:00
Nyall Dawson
56e8b9cff5 Consolidate some duplicate code 2016-09-14 15:17:28 +10:00
Nyall Dawson
b7111775e8 Fix some QGIS 3.0 symbology todos 2016-09-14 09:33:58 +10:00
Nyall Dawson
6e2d511c2d Merge pull request #3478 from mbernasocchi/patch-2
qgsmessagebar.pushMessage timeout is not respected in python
2016-09-14 07:57:24 +10:00
Patrick Valsecchi
57d00949f7 Add an editor widget for QVariantList 2016-09-13 09:16:17 +02:00
Nyall Dawson
041ceeaf9a Remove unused size/scale slots from renderer widgets 2016-09-13 11:05:45 +10:00
Nyall Dawson
ae9023fe0f Remove last deprecated methods from symbology 2016-09-13 11:05:45 +10:00
Marco Bernasocchi
bb4e6b8fb8 qgsmessagebar timeout is not respected in python
the default timeout is not respected in python

gui/qgsmessagebar.sip:51:    void pushMessage( const QString &text, MessageLevel level = INFO, int duration = 0 );


https://qgis.org/api/qgsmessagebar_8h_source.html#l00090
void pushMessage( const QString &text, MessageLevel level = INFO, int duration = 5 ) { return pushMessage( QString::null, text, level, duration ); }
2016-09-11 11:14:29 +02:00
Matthias Kuhn
aa87113995 Bindings and API docs 2016-09-09 14:26:27 +02:00
Matthias Kuhn
ac41436de3 Add QgsTabWidget
This is almost like the QTabWidget but has additional methods for
showing and hiding individual tabs
2016-09-09 14:26:27 +02:00
Nyall Dawson
f16b3870fa Use QgsFilterLineEdit for Qgs(Double)SpinBox
Fixes issues with the current approach:
- poor appearance on certain environments (esp OSX)
- large area on spin boxes' right which "swallows" clicks
and blocks interactivity

Fix #12920
2016-09-08 22:10:36 +10:00
Nyall Dawson
d959384c8b Allow hiding clear button in QgsFilterLineEdit 2016-09-08 21:48:25 +10:00
Nyall Dawson
d71453d84a Add ability to set default values for QgsFilterLineEdit
and have clearing the widget reset to default rather than
null
2016-09-08 21:48:25 +10:00
Nyall Dawson
edcc247c3e Add unit tests for QgsFilterLineEdit, improve docs, add clearValue slot 2016-09-08 21:48:25 +10:00
Patrick Valsecchi
e533f0ccf8 Add widget to edit QVariantMap 2016-09-08 11:11:08 +02:00
Nyall Dawson
98f25f59e7 Rework QgsFilterLineEdit handling of clear button
Don't use a child button but instead paint the icon when
required. Improves interaction with the widget/clear
button.
2016-09-06 16:45:32 +10:00
Patrick Valsecchi
7169079f91 Smarter default edit widgets with plugins to pick them
Now the widgets factories can give a score on how good they could handle
a widget.

Additionaly, plugins can be added to choose a widget factory in function
of an external information. One of them uses a table in PostgresQL to
allow specification of the widget type and configuration.

I took the opportunity to remove a few deprecated method in relation to
this.
2016-09-05 14:22:17 +02:00
Nyall Dawson
99405864ca Add a changed signal to QgsEditorConfigWidget
And update default value expression preview whenever editor
config changes

Sponsored by DB Fahrwegdienste GmbH
2016-08-30 12:40:52 +10:00
Matthias Kuhn
a529b448e7 Revert "Merge pull request #3338 from pvalsecc/editor_widgets_selection"
This reverts commit bbafbf48872eda48a2be8876cc89a0770552c6ad, reversing
changes made to 13ac0434e10fc7edd1eca665ea7c8b6cb5fd212d.
2016-08-29 19:22:04 +02:00
Matthias Kuhn
b1448233e9 Move QgsMapLayerProxyModel and QgsMapLayerProxyModel to core
Because it's also useful for non-widget applications
2016-08-29 18:43:20 +02:00
Patrick Valsecchi
24bde35ce6 Smarter default edit widgets with plugins to pick them
Now the widgets factories can give a score on how good they could handle
a widget.

Additionaly, plugins can be added to choose a widget factory in function
of an external information. One of them uses a table in PostgresQL to
allow specification of the widget type and configuration.

I took the opportunity to remove a few deprecated method in relation to
this.
2016-08-29 07:42:50 +02:00
Nyall Dawson
b225a82b3e [FEATURE] Make color brewer and limited random ramp editors show
inline in style panel
2016-08-24 21:01:03 +10:00
Nyall Dawson
b7716aa7fb Docs + cleanups for color ramp dialogs 2016-08-24 21:01:03 +10:00
Nyall Dawson
cf9292cc6d Color ramp dialogs no longer edit ramps in place
Now the dialogs use a copy of the ramp, and the edited
ramp is retrieved by calling ramp() on the dialog after
it is executed.

Avoids pointer lifetime issues by storing and working
on a ramp pointer which the dialog does not have ownership
on.

Also fix a bunch of leaks relating to cloning color ramps.
2016-08-24 21:01:03 +10:00
Nyall Dawson
7413db79b0 Rename color ramp dialogs to match new ramp class names 2016-08-24 21:01:03 +10:00
Nyall Dawson
932e469e5f Rename color ramp classes to more sensible names
QgsVectorColorRamp -> QgsColorRamp
QgsVectorGradientColorRamp -> QgsGradientColorRamp
QgsRandomColors -> QgsRandomColorRamp
QgsRandomColorRamp -> QgsLimitedRandomColorRamp
QgsVectorColorBrewerColorRamp -> QgsColorBrewerColorRamp

These color ramps are used throughout all of QGIS (not
just in vector symbology) and the current names are
misleading.
2016-08-24 21:01:03 +10:00
Nyall Dawson
5735be131f [FEATURE] Make map unit scaling dialog show inline in style dock 2016-08-24 07:51:03 +10:00
Denis Rouzaud
f5aa28bb32 rename QgsFieldProxyModel::Filter All to AllTypes 2016-08-23 15:42:37 +02:00
Denis Rouzaud
7fdade1a3a remove some deprecated methods, rename QgsAnnotation::mapPositionFixed() to hasFixedMapPosition() 2016-08-23 15:00:56 +02:00
Nyall Dawson
8f4ca47b70 New QgsExpressionLineEdit widget
Consists of a filter line edit + button to open expression builder

This widget is a bit like the existing QgsFieldExpressionWidget,
but for cases where a combo box does not make sense. Eg, when
no fields are available for the expression to use.

It also has an optional multiline mode, which allows it to be
used in place of the full-blown QgsExpressionBuilderWidget when
space is a problem.
2016-08-22 08:39:33 +10:00
Matthias Kuhn
6ae2daa145 Respect the "showLabel" flag on attribute editor elements 2016-08-19 14:50:22 +02:00
Nyall Dawson
eb5cc0c731 Add method to reset vector layer for data defined button 2016-08-17 10:56:51 +10:00
Nyall Dawson
cd4bc8887b Vertically stack the color widget when in dock mode 2016-08-16 19:47:28 +10:00
Nyall Dawson
5407ae8a6a [FEATURE] Color dialog can be embedded in layer style panel
Now clicking color buttons inside the layer style panel causes
the color picker dialog to be opened inside the style panel itself
rather than as a separate dialog
2016-08-15 18:04:07 +10:00
Nyall Dawson
a2fe4c4f59 New method to find parent QgsPanelWidget for a widget 2016-08-15 17:56:21 +10:00
Denis Rouzaud
99ed790820 rename enum to avoid confusion 2016-08-12 11:04:29 +02:00
Denis Rouzaud
af1fee525a Move feature now benefits from Advanced Digitizing
QgsMapToolMoveFeature now inherits QgsMapToolAdvancedDigitizing
this allows to specify distance, angles, complex and multiple moves at once
it is now a click and click operation (similarly to the rotate feature map tool): so it can be cancelled once enabled with the right click
2016-08-11 08:06:43 +02:00
Matthias Kuhn
58ea21124e Streamline expression context generation (#3350)
* Save more data to QML

 * Virtual fields
 * Map tips
 * Display expression
 * Read only flag

* Streamline expression context generation

Whenever an object is able to generate an expression context it
implements the method createExpressionContext() declared in
QgsExpressionContextGenerator.

This makes a cleaner API and allows using QgsFieldExpressionWidget and
QgsDataDefinedButton from python because standard OO programming
approaches are used instead of callbacks and void pointers.

* Colorize output of doc and sip tests

* Fix build

* Fix sip complaints

* Fix rebase problems

* Workaround failing bindings test
2016-08-10 19:44:30 +02:00
Juergen E. Fischer
3f22a7a77f another scripts/replacev2.sh with minor manual fixes 2016-08-10 12:12:28 +02:00
Juergen E. Fischer
0688621046 scripts/replacev2.sh run 2016-08-10 12:08:52 +02:00
Martin Dobias
b4fe9002d8 [FEATURE] API to allow drag'n'drop of custom browser items
QgsDataItem implementations may provide hasDragEnabled(), mimeUri()
and QgsCustomDropHandler implementation to deal with drop of custom items.
2016-08-09 08:49:42 +02:00
Denis Rouzaud
820cc560b2 remove deprecated private helpers QgsMapToolIdentify::convertMeasurement and displayUnits 2016-08-08 09:10:57 +02:00
Denis Rouzaud
6f51a13cd6 remove QgisInterface::actionLayerSelectionSaveAs
this has been deprecated since 2.4 and returns null pointer since then.
did not write this in api_break to not overload the document
2016-08-08 09:10:57 +02:00
Denis Rouzaud
aa82141df7 remove deprecated QgisInterface::fileMenu 2016-08-08 08:34:53 +02:00
Nyall Dawson
26c1e09a58 Remove QgsColorDialog, rename QgsColorDialogV2 to QgsColorDialog
The last bits of missing functionality (handling native dialogs
and live updates) were ported across.
2016-08-06 13:24:36 +10:00