Libksieve

sieveeditorhelphtmlwidget.h
1 /*
2  SPDX-FileCopyrightText: 2013-2021 Laurent Montel <[email protected]>
3 
4  SPDX-License-Identifier: LGPL-2.0-or-later
5 */
6 #pragma once
7 
8 #include "ksieveui_export.h"
9 #include <QUrl>
10 #include <QWidget>
11 
12 namespace KPIMTextEdit
13 {
14 class SlideContainer;
15 }
16 
17 namespace KSieveUi
18 {
19 class SieveEditorWebEngineView;
20 class SieveEditorLoadProgressIndicator;
21 class FindBarWebEngineView;
22 class KSIEVEUI_EXPORT SieveEditorHelpHtmlWidget : public QWidget
23 {
24  Q_OBJECT
25 public:
26  explicit SieveEditorHelpHtmlWidget(QWidget *parent = nullptr);
27  ~SieveEditorHelpHtmlWidget() override;
28 
29  void openUrl(const QUrl &currentUrl);
30  Q_REQUIRED_RESULT QString title() const;
31 
32  Q_REQUIRED_RESULT QUrl currentUrl() const;
33 
34  void resetZoom();
35  void zoomOut();
36  void zoomIn();
37  void copy();
38 
39  Q_REQUIRED_RESULT bool hasSelection() const;
40  void selectAll();
41 
42  void find();
43 Q_SIGNALS:
44  void titleChanged(KSieveUi::SieveEditorHelpHtmlWidget *widget, const QString &title);
45  void progressIndicatorPixmapChanged(KSieveUi::SieveEditorHelpHtmlWidget *widget, const QPixmap &);
46  void loadFinished(KSieveUi::SieveEditorHelpHtmlWidget *widget, bool success);
47  void copyAvailable(bool);
48 
49 private:
50  void slotTitleChanged(const QString &title);
51  void slotFinished(bool b);
52  void slotLoadStarted();
53  void slotPixmapChanged(const QPixmap &pixmap);
54  void slotLoadFinished(bool success);
55  void slotSelectionChanged();
56  QString mTitle;
57  SieveEditorWebEngineView *mWebView = nullptr;
58  SieveEditorLoadProgressIndicator *mProgressIndicator = nullptr;
59  KPIMTextEdit::SlideContainer *mSliderContainer = nullptr;
60  KSieveUi::FindBarWebEngineView *mFindBar = nullptr;
61  qreal mZoomFactor = 100;
62 };
63 }
64 
StandardShortcut find(const QKeySequence &keySeq)
KIOCORE_EXPORT CopyJob * copy(const QUrl &src, const QUrl &dest, JobFlags flags=DefaultFlags)
const QList< QKeySequence > & zoomOut()
const QList< QKeySequence > & selectAll()
const QList< QKeySequence > & zoomIn()
This file is part of the KDE documentation.
Documentation copyright © 1996-2021 The KDE developers.
Generated on Fri Apr 16 2021 23:09:34 by doxygen 1.8.11 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.