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

Add copy to clipboard#999

Merged
egraether merged 1 commit intoCoatiSoftware:masterfrom
fsimonis:add-copy-to-clipboard
May 6, 2020
Merged

Add copy to clipboard#999
egraether merged 1 commit intoCoatiSoftware:masterfrom
fsimonis:add-copy-to-clipboard

Conversation

@fsimonis
Copy link
Contributor

@fsimonis fsimonis commented May 5, 2020

This PR adds the context option "Save to Clipboard" to the graph viewer. It is bundled together with the "Save as Image" action.
image

Motivation
I often use Sourcetrail alongside a discussion about a design or implementation decision with colleagues.
When such a discussion happens via teleconferencing tool, sending a snapshop of the graph is very useful, but is rather long or cumbersome procedure. Either Save, pick location and name, then open chat, find file, and finally load it; or use a system tool to copy a section of the screen and paste.
With this change, the above simply turns into "Save to Clipboard, open chat, paste"

Reviewers
I am not really happy with the internal name QtGraphicsView::copyGraph and the menu item Save to Clipboard of this feature, but couldn't come up with something better. Do you have suggestions?

Refactor image generation into separate function
@egraether egraether self-assigned this May 6, 2020
@egraether
Copy link
Contributor

Interesting use-case and idea. Implementation looks good to me. I think the naming is ok (would probably have named it the same way).

I tested it on macOS and it works. I can paste from clipboard into Mail, Slack, Skype, WhatsApp Web.

Thanks for implementing!

@egraether egraether merged commit f86a4af into CoatiSoftware:master May 6, 2020
mlangkabel pushed a commit that referenced this pull request May 8, 2020
* Refactor image generation into separate function
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants