digiKam
Loading...
Searching...
No Matches
editorstackview.h
Go to the documentation of this file.
1/* ============================================================
2 *
3 * This file is a part of digiKam project
4 * https://www.digikam.org
5 *
6 * Date : 2008-08-20
7 * Description : A widget stack to embed editor view.
8 *
9 * SPDX-FileCopyrightText: 2008-2024 by Gilles Caulier <caulier dot gilles at gmail dot com>
10 *
11 * SPDX-License-Identifier: GPL-2.0-or-later
12 *
13 * ============================================================ */
14
15#pragma once
16
17// Qt includes
18
19#include <QStackedWidget>
20
21// Local includes
22
23#include "digikam_export.h"
24
25namespace Digikam
26{
27
28class Canvas;
29class GraphicsDImgView;
30
31class DIGIKAM_EXPORT EditorStackView : public QStackedWidget
32{
33 Q_OBJECT
34
35public:
36
38 {
39 CanvasMode = 0,
40 ToolViewMode
41 };
42
43public:
44
45 explicit EditorStackView(QWidget* const parent = nullptr);
46 ~EditorStackView() override;
47
48 void setCanvas(Canvas* const canvas);
49 Canvas* canvas() const;
50
51 void setToolView(QWidget* const view);
52 QWidget* toolView() const;
53
54 void setViewMode(int mode);
55 int viewMode() const;
56
57 void increaseZoom();
58 void decreaseZoom();
59 void toggleFitToWindow();
60 void fitToSelect();
61 void zoomTo100Percent();
62
63 double zoomMax() const;
64 double zoomMin() const;
65 bool isZoomablePreview() const;
66
67Q_SIGNALS:
68
69 void signalZoomChanged(bool isMax, bool isMin, double zoom);
71
72public Q_SLOTS:
73
74 void setZoomFactor(double);
75 void slotZoomSliderChanged(int);
76
77private Q_SLOTS:
78
79 void slotZoomChanged(double);
80 void slotToggleOffFitToWindow(bool);
81
82private:
83
84 GraphicsDImgView* previewWidget() const;
85
86private:
87
88 class Private;
89 Private* const d = nullptr;
90};
91
92} // namespace Digikam
Definition canvas.h:44
Definition editorstackview.h:32
StackViewMode
Definition editorstackview.h:38
void signalZoomChanged(bool isMax, bool isMin, double zoom)
Definition graphicsdimgview.h:34
Definition datefolderview.cpp:34