Skip to content

core/itemimagegrab: ItemImageGrab component#137

Closed
soramanew wants to merge 2 commits intoquickshell-mirror:masterfrom
soramanew:master
Closed

core/itemimagegrab: ItemImageGrab component#137
soramanew wants to merge 2 commits intoquickshell-mirror:masterfrom
soramanew:master

Conversation

@soramanew
Copy link
Copy Markdown

@soramanew soramanew commented Jul 22, 2025

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 and cropAndGrab.

grab is for grabbing and saving an item to a file asynchronously, while cropAndGrab does the same but allows cropping to a specific size when saving.

Copy link
Copy Markdown
Member

@outfoxxed outfoxxed left a 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.

@soramanew
Copy link
Copy Markdown
Author

Unfortunately, I have no idea how to make a custom qml object 😭

I'll try work on this in a few days I guess

@soramanew soramanew requested a review from outfoxxed July 31, 2025 12:46
Copy link
Copy Markdown
Member

@outfoxxed outfoxxed left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

also format

@soramanew
Copy link
Copy Markdown
Author

also format

Yeah sorry, forgot about that lol

@soramanew soramanew requested a review from outfoxxed August 2, 2025 05:35
@soramanew soramanew changed the title core/qmlglobal: add saveToFile core/itemimagegrab: ItemImageGrab component Aug 6, 2025
@soramanew
Copy link
Copy Markdown
Author

.w.

@outfoxxed outfoxxed force-pushed the master branch 3 times, most recently from a92879d to 9bb2c04 Compare October 4, 2025 20:00
@outfoxxed outfoxxed force-pushed the master branch 2 times, most recently from 08c7fc2 to bcc3d42 Compare January 10, 2026 21:24
@outfoxxed outfoxxed force-pushed the master branch 5 times, most recently from ca90821 to 3cf65af Compare March 17, 2026 17:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants