| 1 |
/* |
| 2 |
* Copyright (C) 2021 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_IMAGEANNOTATORMOCK_H |
| 21 |
#define KSNIP_IMAGEANNOTATORMOCK_H |
| 22 |
|
| 23 |
#include <gmock/gmock.h> |
| 24 |
|
| 25 |
#include "src/gui/imageAnnotator/IImageAnnotator.h" |
| 26 |
|
| 27 |
class ImageAnnotatorMock : public IImageAnnotator |
| 28 |
{ |
| 29 |
public: |
| 30 |
MOCK_METHOD(QImage, image, (), (const, override)); |
| 31 |
MOCK_METHOD(QImage, imageAt, (int index), (const, override)); |
| 32 |
MOCK_METHOD(QAction*, undoAction, (), (override)); |
| 33 |
MOCK_METHOD(QAction*, redoAction, (), (override)); |
| 34 |
MOCK_METHOD(QSize, sizeHint, (), (const, override)); |
| 35 |
MOCK_METHOD(void, showAnnotator, (), (override)); |
| 36 |
MOCK_METHOD(void, showCropper, (), (override)); |
| 37 |
MOCK_METHOD(void, showScaler, (), (override)); |
| 38 |
MOCK_METHOD(void, showCanvasModifier, (), (override)); |
| 39 |
MOCK_METHOD(void, showRotator, (), (override)); |
| 40 |
MOCK_METHOD(void, showCutter, (), (override)); |
| 41 |
MOCK_METHOD(void, setSettingsCollapsed, (bool isCollapsed), (override)); |
| 42 |
MOCK_METHOD(void, hide, (), (override)); |
| 43 |
MOCK_METHOD(void, close, (), (override)); |
| 44 |
MOCK_METHOD(bool, isVisible, (), (const, override)); |
| 45 |
MOCK_METHOD(QWidget*, widget, (), (const, override)); |
| 46 |
|
| 47 |
MOCK_METHOD(void, loadImage, (const QPixmap &pixmap), (override)); |
| 48 |
MOCK_METHOD(int, addTab, (const QPixmap &pixmap, const QString &title, const QString &toolTip), (override)); |
| 49 |
MOCK_METHOD(void, updateTabInfo, (int index, const QString &title, const QString &toolTip), (override)); |
| 50 |
MOCK_METHOD(void, insertImageItem, (const QPointF &position, const QPixmap &pixmap), (override)); |
| 51 |
MOCK_METHOD(void, setSmoothPathEnabled, (bool enabled), (override)); |
| 52 |
MOCK_METHOD(void, setSaveToolSelection, (bool enabled), (override)); |
| 53 |
MOCK_METHOD(void, setSmoothFactor, (int factor), (override)); |
| 54 |
MOCK_METHOD(void, setSwitchToSelectToolAfterDrawingItem, (bool enabled), (override)); |
| 55 |
MOCK_METHOD(void, setSelectItemAfterDrawing, (bool enabled), (override)); |
| 56 |
MOCK_METHOD(void, setNumberToolSeedChangeUpdatesAllItems, (bool enabled), (override)); |
| 57 |
MOCK_METHOD(void, setTabBarAutoHide, (bool enabled), (override)); |
| 58 |
MOCK_METHOD(void, removeTab, (int index), (override)); |
| 59 |
MOCK_METHOD(void, setStickers, (const QStringList &stickerPaths, bool keepDefault), (override)); |
| 60 |
MOCK_METHOD(void, addTabContextMenuActions, (const QList<QAction*> &actions), (override)); |
| 61 |
MOCK_METHOD(void, setCanvasColor, (const QColor &color), (override)); |
| 62 |
MOCK_METHOD(void, setControlsWidgetVisible, (bool isVisible), (override)); |
| 63 |
}; |
| 64 |
|
| 65 |
#endif //KSNIP_IMAGEANNOTATORMOCK_H |