2022-08-19 15:59:36 +02:00
|
|
|
// Copyright (C) 2016 Denis Mingulov.
|
|
|
|
|
// Copyright (C) 2016 The Qt Company Ltd.
|
|
|
|
|
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0+ OR GPL-3.0 WITH Qt-GPL-exception-1.0
|
2010-06-18 11:02:48 +02:00
|
|
|
|
2016-03-18 07:55:01 +01:00
|
|
|
#pragma once
|
2010-06-18 11:02:48 +02:00
|
|
|
|
|
|
|
|
#include <coreplugin/editormanager/ieditor.h>
|
2022-07-08 18:51:09 +02:00
|
|
|
#include <coreplugin/editormanager/ieditorfactory.h>
|
2012-02-14 16:43:51 +01:00
|
|
|
#include <coreplugin/idocument.h>
|
2010-06-18 11:02:48 +02:00
|
|
|
|
2022-07-08 18:09:57 +02:00
|
|
|
namespace ImageViewer::Internal {
|
|
|
|
|
|
2010-06-18 11:02:48 +02:00
|
|
|
class ImageViewerFile;
|
|
|
|
|
|
|
|
|
|
class ImageViewer : public Core::IEditor
|
|
|
|
|
{
|
|
|
|
|
Q_OBJECT
|
2011-07-13 18:02:35 +02:00
|
|
|
|
2010-06-18 11:02:48 +02:00
|
|
|
public:
|
2020-09-24 09:42:16 +02:00
|
|
|
ImageViewer();
|
2015-06-01 17:55:31 +02:00
|
|
|
~ImageViewer() override;
|
2010-06-18 11:02:48 +02:00
|
|
|
|
2018-09-25 20:47:14 +03:00
|
|
|
Core::IDocument *document() const override;
|
2015-06-01 17:55:31 +02:00
|
|
|
QWidget *toolBar() override;
|
2010-06-18 11:02:48 +02:00
|
|
|
|
2015-06-01 17:55:31 +02:00
|
|
|
IEditor *duplicate() override;
|
2015-05-29 13:23:52 +02:00
|
|
|
|
2016-03-17 16:02:20 +01:00
|
|
|
void exportImage();
|
2018-01-12 15:32:10 +01:00
|
|
|
void exportMultiImages();
|
2022-05-07 03:50:41 +09:00
|
|
|
void copyDataUrl();
|
2012-05-10 15:14:21 +04:00
|
|
|
void imageSizeUpdated(const QSize &size);
|
2010-06-18 11:02:48 +02:00
|
|
|
void scaleFactorUpdate(qreal factor);
|
|
|
|
|
|
2010-06-18 11:02:50 +02:00
|
|
|
void switchViewBackground();
|
|
|
|
|
void switchViewOutline();
|
|
|
|
|
void zoomIn();
|
|
|
|
|
void zoomOut();
|
|
|
|
|
void resetToOriginalSize();
|
|
|
|
|
void fitToScreen();
|
2016-04-14 09:35:39 +02:00
|
|
|
void updateToolButtons();
|
2012-05-10 15:14:21 +04:00
|
|
|
void togglePlay();
|
|
|
|
|
|
2010-06-18 11:02:48 +02:00
|
|
|
private:
|
2020-09-24 09:42:16 +02:00
|
|
|
ImageViewer(const QSharedPointer<ImageViewerFile> &document);
|
2015-05-29 13:23:52 +02:00
|
|
|
void ctor();
|
2017-03-18 23:31:33 +02:00
|
|
|
void playToggled();
|
2015-05-29 13:23:52 +02:00
|
|
|
void updatePauseAction();
|
2013-06-07 10:38:26 +02:00
|
|
|
|
2011-09-16 15:00:41 +02:00
|
|
|
struct ImageViewerPrivate *d;
|
2010-06-18 11:02:48 +02:00
|
|
|
};
|
|
|
|
|
|
2022-07-08 18:51:09 +02:00
|
|
|
class ImageViewerFactory final : public Core::IEditorFactory
|
|
|
|
|
{
|
|
|
|
|
public:
|
|
|
|
|
ImageViewerFactory();
|
|
|
|
|
};
|
|
|
|
|
|
2022-07-08 18:09:57 +02:00
|
|
|
} // ImageViewer::Internal
|