Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add export as SVG/PNG to style manager #2198

Merged
merged 1 commit into from Jul 7, 2015

Conversation

Projects
None yet
3 participants
@NathanW2
Copy link
Member

commented Jul 6, 2015

This PR adds Export as PNG and Export as SVG options to the symbol manager to export selected items to images. Quite handy for custom legends, documents, etc

This isn't a complete PR and still needs work. Pushed for early review and ideas.

TODO

  • SIP Bindings
  • Rename normal Export -> "Export to style file"
@@ -135,6 +136,31 @@ bool QgsStyleV2::saveSymbol( QString name, QgsSymbolV2* symbol, int groupid, QSt
return true;
}

void QgsStyleV2::exportSymbol( QString folder, QString name, QString format, QSize size )

This comment has been minimized.

Copy link
@nyalldawson

nyalldawson Jul 6, 2015

Contributor

why not move the guts of this (the part which does the actual exporting of the symbol) to QgsSymbolV2 and then call that from here? Might be more flexible that way, as you'd then be able to call it from anywhere you got access to a symbol...

This comment has been minimized.

Copy link
@NathanW2

NathanW2 Jul 6, 2015

Author Member

I thought about the same thing after I pushed it up. I will do that as it makes more sense.

@nyalldawson

This comment has been minimized.

Copy link
Contributor

commented Jul 6, 2015

@NathanW2 looks good to me :)

@NathanW2 NathanW2 merged commit 217931f into qgis:master Jul 7, 2015

1 check passed

continuous-integration/travis-ci/pr The Travis CI build passed
Details

@NathanW2 NathanW2 deleted the NathanW2:export_symbols branch Jul 7, 2015

@slarosa

This comment has been minimized.

Copy link
Member

commented Jul 7, 2015

@NathanW2 nice, anyway I am getting a crash if color ramp tab is selected, shouldn't we avoid the exporting for the color ramps?

@NathanW2

This comment has been minimized.

Copy link
Member Author

commented Jul 7, 2015

Yep. I will have a look into it.

On Wed, Jul 8, 2015 at 1:57 AM, Salvatore Larosa notifications@github.com
wrote:

@NathanW2 https://github.com/NathanW2 nice, anyway I am getting a crash
if color ramp tab is selected, shouldn't we avoid the exporting for the
color ramps?


Reply to this email directly or view it on GitHub
#2198 (comment).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.