diff options
author | Konstantinos Sideris <sideris.konstantin@gmail.com> | 2018-03-14 21:31:09 +0200 |
---|---|---|
committer | Konstantinos Sideris <sideris.konstantin@gmail.com> | 2018-03-14 21:31:09 +0200 |
commit | 511c58d608eeec4899cff4d016d4d5d99fbff36f (patch) | |
tree | 69ca9bfee8df013ff31a63a7daaf49e1b51e5000 /include | |
parent | 1b5e18cb1a385eab99c807be4389e664cc93f9af (diff) |
Add context menu option to save images
fixes #265
Diffstat (limited to 'include')
-rw-r--r-- | include/timeline/TimelineItem.h | 2 | ||||
-rw-r--r-- | include/timeline/widgets/ImageItem.h | 4 |
2 files changed, 6 insertions, 0 deletions
diff --git a/include/timeline/TimelineItem.h b/include/timeline/TimelineItem.h index 69bb89e2..7c04e167 100644 --- a/include/timeline/TimelineItem.h +++ b/include/timeline/TimelineItem.h @@ -99,6 +99,8 @@ protected: private: void init(); + //! Add a context menu option to save the image of the timeline item. + void addSaveImageAction(ImageItem *image); template<class Widget> void setupLocalWidgetLayout(Widget *widget, diff --git a/include/timeline/widgets/ImageItem.h b/include/timeline/widgets/ImageItem.h index 210394bc..d8a12c22 100644 --- a/include/timeline/widgets/ImageItem.h +++ b/include/timeline/widgets/ImageItem.h @@ -48,6 +48,10 @@ public: QSize sizeHint() const override; +public slots: + //! Show a save as dialog for the image. + void saveAs(); + protected: void paintEvent(QPaintEvent *event) override; void mousePressEvent(QMouseEvent *event) override; |