mirror of
https://github.com/RGBCube/serenity
synced 2025-07-27 02:37:36 +00:00
PixelPaint: Make images keep track of their path & title
The title is either "Untitled" (default), or the basename of the image after we've opened or saved it.
This commit is contained in:
parent
35456f035c
commit
abc40af809
5 changed files with 45 additions and 1 deletions
|
@ -30,6 +30,7 @@ public:
|
|||
virtual void image_did_modify_layer_stack() { }
|
||||
virtual void image_did_change() { }
|
||||
virtual void image_select_layer(Layer*) { }
|
||||
virtual void image_did_change_title(String const&) { }
|
||||
|
||||
protected:
|
||||
virtual ~ImageClient() = default;
|
||||
|
@ -76,6 +77,12 @@ public:
|
|||
|
||||
size_t index_of(Layer const&) const;
|
||||
|
||||
String const& path() const { return m_path; }
|
||||
void set_path(String);
|
||||
|
||||
String const& title() const { return m_title; }
|
||||
void set_title(String);
|
||||
|
||||
private:
|
||||
explicit Image(Gfx::IntSize const&);
|
||||
|
||||
|
@ -84,6 +91,9 @@ private:
|
|||
void did_change();
|
||||
void did_modify_layer_stack();
|
||||
|
||||
String m_path;
|
||||
String m_title;
|
||||
|
||||
Gfx::IntSize m_size;
|
||||
NonnullRefPtrVector<Layer> m_layers;
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue