#pragma once #include "Document/BrushStroke.h" #include "Document/Filters.h" #include "Document/HueSaturation.h" #include "Document/Selection.h" #include "IO/ImageImporter.h" #include "IO/ProjectStore.h" #include "IO/PSD/PSDTypes.h" #include #include #include #include #include #include #include // The private structs of EditorSession, its private base of types. struct SessionJobs { // A brush family's tip while another family is in use. struct ParkedTip { double diameter; double hardness; double opacity; }; struct ImportRequest { QList urls; std::optional point; std::function done; }; struct Decoded { std::optional asset; QString failure; }; // A Photoshop file read with its assets, or why not. struct PhotoshopRead { std::optional document; std::map assets; QString failure; // No layer records: a background alone, read merged next. bool layerless = false; }; struct Baked { std::map images; std::optional failure; }; // What an invert waits for and writes back. struct Inverting { QUuid layerID; bool mask; std::optional image; std::optional maskImage; std::function done; }; struct Inverted { std::optional image; std::optional failure; }; // The Magic tool's job, either mode, and its step's name. struct Wanding { SelectionMode mode; QUuid documentID; std::function done; QString name; }; struct Wanded { std::optional path; std::optional failure; }; struct Subjecting { SelectionMode mode; QUuid documentID; std::function done; }; struct Subjected { std::optional mask; std::optional failure; }; // The last stroke's end, for a Shift-click's line. struct LastBrushPoint { QPointF point; QUuid layerID; bool mask; }; struct PendingOpacityDigit { int digit; double time; }; // A raster edit's result on the way to the layer. struct RasterMade { std::optional output; std::optional failure; }; struct CommittingRaster { std::shared_ptr stroke; QString name; std::function alsoApply; std::function done; }; // A filter's preview, and its result for the layer. struct Filtered { std::optional image; std::optional failure; // The job's settings, which the preview was made with. FilterSettings settings; // Camera Raw's scope of the grade itself. std::optional scope = std::nullopt; // The grown layer it was made from: it shows there. std::optional placement = std::nullopt; }; struct FilterMade { std::optional asset; std::optional transform; std::optional failure; }; // The crop's resized project, or why it failed. struct Cropped { std::optional snapshot; std::optional failure; }; // Levels' result for the layer. struct Leveled { std::optional asset; std::optional failure; }; // A commit's caller, waiting for the preview or the result. struct Committing { QUuid editID; std::function done; }; // Hue/Saturation's pixels, or why they failed. struct Adjusted { std::optional pixels; std::optional failure; }; // The layers beneath an adjustment, drawn, or why not. struct AdjustmentInput { std::optional asset; std::optional failure; }; // A Hue/Saturation commit keeps its edit and its caller. struct CommittingHue { HueSaturationEdit edit; std::function done; }; // A merge worked out once: what goes, what it becomes. struct MergePlan { std::vector ids; QSet removed; QString name; std::optional parent; QUuid anchor; QString action; }; struct TransformDuplicate { std::vector copies; QSet source; QUuid primary; }; };