digiKam
Loading...
Searching...
No Matches
previewtoolbar.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 : 2010-01-10
7 * Description : a tool bar for preview mode
8 *
9 * SPDX-FileCopyrightText: 2010-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 <QWidget>
20#include <QAction>
21
22// Local includes
23
24#include "digikam_export.h"
25
26class KConfigGroup;
27
28namespace Digikam
29{
30
31class EditorWindow;
32
33class DIGIKAM_EXPORT PreviewToolBar : public QWidget
34{
35 Q_OBJECT
36
37public:
38
40 {
41 PreviewOriginalImage = 0x00000001,
42 PreviewBothImagesHorz = 0x00000002,
43 PreviewBothImagesVert = 0x00000004,
44 PreviewBothImagesHorzCont = 0x00000008,
45 PreviewBothImagesVertCont = 0x00000010,
46 PreviewTargetImage = 0x00000020,
47 PreviewToggleOnMouseOver = 0x00000040,
48 NoPreviewMode = 0x00000080,
49
50 AllPreviewModes = PreviewOriginalImage | PreviewBothImagesHorz |
51 PreviewBothImagesVert | PreviewBothImagesHorzCont |
52 PreviewBothImagesVertCont | PreviewTargetImage |
53 PreviewToggleOnMouseOver,
54
55 UnSplitPreviewModes = PreviewOriginalImage | PreviewTargetImage | PreviewToggleOnMouseOver
56 };
57
58public:
59
60 explicit PreviewToolBar(QWidget* const parent = nullptr);
61 ~PreviewToolBar() override;
62
63 void setPreviewModeMask(int mask);
64
65 void setPreviewMode(PreviewMode mode);
66 PreviewMode previewMode() const;
67
68 void readSettings(const KConfigGroup& group);
69 void writeSettings(KConfigGroup& group);
70
71 void registerMenuActionGroup(EditorWindow* const editor);
72
73Q_SIGNALS:
74
76
77private Q_SLOTS:
78
79 void slotButtonReleased(int);
80 void slotActionTriggered(QAction*);
81
82private:
83
84 void setCheckedAction(int id);
85
86private:
87
88 class Private;
89 Private* const d = nullptr;
90};
91
92} // namespace Digikam
Definition editorwindow.h:68
Definition previewtoolbar.h:34
PreviewMode
Definition previewtoolbar.h:40
void signalPreviewModeChanged(int)
Definition datefolderview.cpp:34