Messagelib

zoomactionmenu.h
1/*
2 SPDX-FileCopyrightText: 2015-2024 Laurent Montel <montel@kde.org>
3
4 SPDX-License-Identifier: LGPL-2.0-or-later
5*/
6
7#pragma once
8
9#include "webengineviewer_export.h"
10#include <KActionMenu>
12namespace WebEngineViewer
13{
14class ZoomActionMenuPrivate;
15/**
16 * @brief The ZoomActionMenu class
17 * @author Laurent Montel <montel@kde.org>
18 */
19class WEBENGINEVIEWER_EXPORT ZoomActionMenu : public KActionMenu
20{
21 Q_OBJECT
22public:
23 explicit ZoomActionMenu(QObject *parent = nullptr);
24 ~ZoomActionMenu() override;
25
26 void createZoomActions();
27
28 [[nodiscard]] QAction *zoomInAction() const;
29
30 [[nodiscard]] QAction *zoomOutAction() const;
31
32 [[nodiscard]] QAction *zoomResetAction() const;
33
34 void setActionCollection(KActionCollection *ac);
35
36 void setZoomFactor(qreal zoomFactor);
37 [[nodiscard]] qreal zoomFactor() const;
38
39 void setWebViewerZoomFactor(qreal zoomFactor);
40
41Q_SIGNALS:
42 void zoomChanged(qreal value);
43
44public Q_SLOTS:
45 void slotZoomIn();
46 void slotZoomOut();
47 void slotZoomReset();
48
49private:
50 std::unique_ptr<ZoomActionMenuPrivate> const d;
51};
52}
The ZoomActionMenu class.
This file is part of the KDE documentation.
Documentation copyright © 1996-2024 The KDE developers.
Generated on Mon Nov 18 2024 12:07:25 by doxygen 1.12.0 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.