Messagelib

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

KDE's Doxygen guidelines are available online.