72 Commits

Author SHA1 Message Date
Denis Rouzaud
e48cf98edb run sipify 2017-12-06 07:19:50 -04:00
Denis Rouzaud
6e14854f90 [sipify] remove redundant private sections 2017-10-09 09:51:40 +02:00
Nyall Dawson
cdb0ace28e Try to fix sip item casting clashing between composer items and layout items
Add a temporary hack to QgsComposerItem subclassing to handle this
for now.
2017-07-25 12:54:58 +10:00
Denis Rouzaud
b52f7c2975 sipify core composer part 2 2017-06-20 15:36:04 +02:00
Nyall Dawson
39146517d2 Change QgsComposerItem to use opacity instead of transparency 2017-05-30 08:48:54 +10:00
Denis Rouzaud
85f3b81b55 remove double spaces in sip files
fix indentation
2017-05-03 08:02:14 +02:00
Denis Rouzaud
7b60d89d6c align pointer and reference in sip files batch 2 2017-05-01 20:00:51 +02:00
Nyall Dawson
77706a6447 Avoid multiple map/legend renders while loading compositions 2017-03-21 10:32:53 +10:00
Nyall Dawson
47683fca4f [needs-docs] Rename Outline and Border -> Stroke
This change is being driven by:

- need for consistent terminology in the api. Currently there's
a confusing mix of border/outline used
- need for consistent terminology in the gui - we have a mix
of "border"/"outline"/"pen"
- bringing QGIS into line with the standard terminology used
in other graphic editing programs
2017-02-22 19:22:45 +10:00
Denis Rouzaud
6c74e4ea5d spelling fixes 2017-01-12 22:01:50 +01:00
Harrissou Sant-anna
ef85cdcf83 Replace "eg" by "e.g." or "for example" 2016-12-30 00:03:22 +01:00
Nyall Dawson
25125b089e Remove deprecated composer methods 2016-09-14 07:20:17 +10: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
Nyall Dawson
4cfacf14e3 Make API more consistent
- rename methods with XML to Xml, CRS to Crs, WMS to Wms, ID to Id
- rename methods with SRS to Crs
- rename methods with abbreviations like "dest" to "destination"
- rename methods with abbreviations like "src" to "source"
2016-07-21 08:40:50 +10:00
Nyall Dawson
a240cd8f8e Replace doxygen MapComposer group with core/gui
Since the MapComposer group doesn't actually exist
2016-07-04 19:57:13 +10:00
Blottiere Paul
7a8a5411e0 [FEATURE][composer] Add tools for drawing polygon and polylines 2016-04-01 11:05:03 +11:00
Juergen E. Fischer
a90be95f7b sip sync 2016-02-14 03:50:49 +01:00
Nyall Dawson
c3a57434d9 Fix clazy 'pass small and trivially-copyable type by value' warnings 2016-02-02 19:47:21 +11: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
Matthias Kuhn
56ccb2b858 sipClass_Klass is deprecated for a long time: replace with sipType_Klass 2015-11-11 23:22:51 +01: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
43bcc0c2a5 Finish porting composer to expression contexts 2015-08-22 19:01:40 +10:00
Nyall Dawson
a0e35a3893 Switch some composer expressions to contexts 2015-08-22 19:01:39 +10:00
Juergen E. Fischer
9752c468c1 indentation update 2015-07-29 11:52:14 +02:00
Nyall Dawson
0912314f0c Fix crappy documentation (which I wrote) which came back to bite
me and wasted part of my life I'll never get back...
2015-06-22 21:53:44 +10:00
Nyall Dawson
7314047698 Fix missing doc strings due to invalid doxygen tags 2015-04-30 17:26:58 +10:00
Juergen E. Fischer
abd4a04399 sip update 2015-02-03 02:21:52 +01:00
Juergen E. Fischer
9ceb5ceab6 sip sync 2014-11-21 01:17:21 +01:00
Juergen E. Fischer
d4f64d9bde indentation update and typo fixes 2014-11-13 23:13:13 +01:00
Nyall Dawson
a57080cc71 [FEATURE][composer] Allow negative margins for label items
If negative margins are set for a label, the label contents will
begin outside the bounds of the label. This is desirable for
aligning label items with other items while allowing for optical
margin alignment for the label type.
2014-11-01 06:38:51 +11:00
Nyall Dawson
5b9210b91d [composer] Respect reference point when resizing scalebar and legend
Previously, the reference point (and data defined position/size) were
ignored when scalebars or legends resized themselves.

Fix #11321, #11380
2014-10-21 23:03:55 +11:00
Nyall Dawson
71fbe9c9ce [composer] Fixes to composer item sip bindings
- Added some missing /TransferThis/ arguments
- Ensure that correct item type is returned for all item types
2014-10-19 14:45:18 +11:00
Nyall Dawson
a5b5bd4c45 [composer] Fix new frames not inheriting outline color, clean up item api a bit 2014-10-09 19:56:59 +11:00
Nyall Dawson
8c502c19fc [composer] Fix pages are added but never removed with multiframe resizing 2014-09-29 22:19:08 +10:00
Nyall Dawson
8725c2df4b [composer] Fix ctrl modifier not applying to wheel events when in move item
content mode, add missing undo merge command for item zoom (refs #7974)
2014-09-29 19:21:01 +10:00
Nyall Dawson
ce2142585a [FEATURE][composer] Add checkbox and data defined button for controlling
whether an item is excluded from composer exports/printouts.
2014-09-26 16:03:31 +10:00
Nyall Dawson
7b84ccc9b1 [composer] Don't draw handles around locked items (fix #11059) 2014-08-25 22:58:42 +10:00
Juergen E. Fischer
07165eae79 indentation update 2014-08-17 13:37:34 +02:00
Nyall Dawson
4506b81537 [FEATURE][composer] Implement an item tree panel for composer windows
(fix #4358). Allows for selection of items, hiding/showing items,
toggling lock status of items and double-clicking to edit item id.
2014-07-30 20:01:05 +10:00
Nyall Dawson
200a3431e9 [composer] Add api method for toggling visibility of composer items 2014-07-28 20:22:23 +10:00
Nyall Dawson
3f076f0d30 [composer] Add function for getting a friendly display name for items 2014-07-28 19:46:12 +10:00
Nyall Dawson
f76c257f89 [composer] More cleanups - move font utils from QgsComposerItem to QgsComposerUtils, add tests 2014-07-19 22:01:58 +10:00
Nyall Dawson
e2d57d9b65 [composer] Clean up code, move some methods to QgsComposerUtils, const correctness, tests, doc improvements 2014-07-16 22:47:18 +10:00
Nyall Dawson
2041fc2480 [composer] Refactor QgsComposerItem:
- New class QgsComposerObject, which both QgsComposerItem and QgsComposerMultiFrame
derive from. This class contains the framework for data defined composition properties.
- New class QgsComposerUtils, containing helpful static functions previously in QgsComposerItem
- Test suites for data defined settings in QgsComposerObject and functions in QgsComposerUtils
2014-07-14 23:51:10 +10:00
Nyall Dawson
5b545d1eff Remove unused writeSettings, readSettings, removeSettings methods from QgsComposerItem 2014-07-12 00:10:21 +10:00
Nyall Dawson
a914d433b9 [composer] Composer items which set their own size must consider data defined width and height 2014-07-06 00:50:33 +10:00
Nyall Dawson
0fd99d2820 [FEATURE][composer] Data defined item rotation. Funded by Canton of Neuchâtel, Switzerland 2014-07-05 20:08:37 +10:00
Nyall Dawson
be5aeac3b7 [composer] Initial framework for data defined properties in compositions and composer items. Funded by Canton of Neuchâtel, Switzerland 2014-07-05 14:58:50 +10:00
Nyall Dawson
55ed628678 [composer] Improved method for setting/checking whether items are in a group 2014-07-04 20:25:46 +10:00
Sandro Mani
456adad745 Consider also font descent and baseline in QgsComposerLabel::adjustSizeToText. Funded by Sourcepole QGIS Enterprise. 2014-06-07 18:17:37 +10:00