Skip to content
This repository has been archived by the owner on Dec 14, 2021. It is now read-only.

Menu action for graph "Save as Image" #426

Closed
egraether opened this issue Jul 13, 2017 · 6 comments · Fixed by #1104
Closed

Menu action for graph "Save as Image" #426

egraether opened this issue Jul 13, 2017 · 6 comments · Fixed by #1104
Assignees
Labels
feature good first issue ideal for first-time contributors
Milestone

Comments

@egraether
Copy link
Contributor

No description provided.

@egraether egraether added this to the 2019.4 Beta milestone Aug 2, 2019
@egraether egraether self-assigned this Aug 2, 2019
@egraether egraether modified the milestones: 2019.4, 2020.1 Nov 19, 2019
@mlangkabel
Copy link
Contributor

Which menu shall this be added to?

@egraether
Copy link
Contributor Author

Edit, I guess

@miltolstoy
Copy link
Contributor

Hi!
Please assign this issue to me, I'll handle it.

As I see, there is no problem to convert QtGraphicsView to QPixMap and save on filesystem. I also found an entry point for this action - "Edit" menu setup code in main window. I spent some time digging how to reach QtGraphicsView from QtMainWindow, but don't have any significant result yet.
As I see, some actions are implemented by messages sending. If message should be dispatched, who should handle it?
Any advice will be highly appreciated.

@egraether
Copy link
Contributor Author

I spent some time digging how to reach QtGraphicsView from QtMainWindow, but don't have any significant result yet.

This is where we use messages. Please add a new message type, dispatch it in QtMainWindow when the save action is triggered and listen on it in QtGraphicsView, which has access to the graph pixmap.

@miltolstoy
Copy link
Contributor

Okay, one more question.
There is already implemented QImage QtGraphicsView::toQImage() method which captures full graph to image and adds export notice. Also there is a parent QPixmap QGraphicsView::grab() method that captures that part of a graph, which is currently displayed (it can be a small part if graph is zoomed or graph is huge enough).
Which capturing should be used?

@egraether
Copy link
Contributor Author

There already is a Save as Image option in the context menu of the Graph. This issue is about reusing this action, but trigger it from the Window menu. Just reuse the implementation of Save as Image from the context menu please.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
feature good first issue ideal for first-time contributors
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants