-
Notifications
You must be signed in to change notification settings - Fork 37
core/itemimagegrab: ItemImageGrab
component
#137
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
base: master
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In general I prefer asynchronous operations like this to be done via QML elements.
In this case something like
ItemImageGrab {
function grab(item: Item, path: url, imageSize: size);
function grab(item: Item, path: url); // calls prev with image size
signal saved();
signal failed();
}
Really this is better suited to promises, whenever those get done.
Unfortunately, I have no idea how to make a custom qml object 😭 I'll try work on this in a few days I guess |
Create ItemImageGrab qml component
This reverts commit 13e8736.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
also format
Yeah sorry, forgot about that lol |
Also format
Quickshot coming soon™?
ItemImageGrab
component
Adds a custom QML component
ItemImageGrab
which can be used to grab and save items to an image file. The component provides 2 methods each with 2 overloads,grab
andcropAndGrab
.grab
is for grabbing and saving an item to a file asynchronously, whilecropAndGrab
does the same but allows cropping to a specific size when saving.