Debian Codegraph @

src/gui/imageAnnotator/KImageAnnotatorAdapter.h

raw symbols SCIP
1 /*
2 * Copyright (C) 2020 Damir Porobic <[email protected]>
3 *
4 * This program is free software; you can redistribute it and/or modify
5 * it under the terms of the GNU General Public License as published by
6 * the Free Software Foundation; either version 2 of the License, or
7 * (at your option) any later version.
8 *
9 * This program is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 * GNU General Public License for more details.
13 *
14 * You should have received a copy of the GNU General Public License
15 * along with this program; if not, write to the Free Software
16 * Foundation, Inc., 51 Franklin Street, Fifth Floor,
17 * Boston, MA 02110-1301, USA.
18 */
19
20 #ifndef KSNIP_KIMAGEANNOTATORADAPTER_H
21 #define KSNIP_KIMAGEANNOTATORADAPTER_H
22
23 #include <kImageAnnotator/KImageAnnotator.h>
24
25 #include "IImageAnnotator.h"
26
27 using kImageAnnotator::KImageAnnotator;
28
29 class KImageAnnotatorAdapter : public IImageAnnotator
30 {
31 Q_OBJECT
32 public:
33 explicit KImageAnnotatorAdapter();
34 ~KImageAnnotatorAdapter() override;
35 QImage image() const override;
36 QImage imageAt(int index) const override;
37 QAction *undoAction() override;
38 QAction *redoAction() override;
39 QSize sizeHint() const override;
40 void showAnnotator() override;
41 void showCropper() override;
42 void showScaler() override;
43 void showCanvasModifier() override;
44 void showRotator() override;
45 void showCutter() override;
46 void setSettingsCollapsed(bool isCollapsed) override;
47 void hide() override;
48 void close() override;
49 bool isVisible() const override;
50 QWidget* widget() const override;
51
52 public slots:
53 void loadImage(const QPixmap &pixmap) override;
54 int addTab(const QPixmap &pixmap, const QString &title, const QString &toolTip) override;
55 void updateTabInfo(int index, const QString &title, const QString &toolTip) override;
56 void insertImageItem(const QPointF &position, const QPixmap &pixmap) override;
57 void setSmoothPathEnabled(bool enabled) override;
58 void setSaveToolSelection(bool enabled) override;
59 void setSmoothFactor(int factor) override;
60 void setSwitchToSelectToolAfterDrawingItem(bool enabled) override;
61 void setSelectItemAfterDrawing(bool enabled) override;
62 void setNumberToolSeedChangeUpdatesAllItems(bool enabled) override;
63 void setTabBarAutoHide(bool enabled) override;
64 void removeTab(int index) override;
65 void setStickers(const QStringList &stickerPaths, bool keepDefault) override;
66 void addTabContextMenuActions(const QList<QAction*> & actions) override;
67 void setCanvasColor(const QColor &color) override;
68 void setControlsWidgetVisible(bool isVisible) override;
69
70 private:
71 KImageAnnotator *mKImageAnnotator;
72 };
73
74 #endif //KSNIP_KIMAGEANNOTATORADAPTER_H