Libksieve

sieveeditorhelphtmlwidget.h
1 /*
2  Copyright (C) 2013-2020 Laurent Montel <[email protected]>
3 
4  This library is free software; you can redistribute it and/or
5  modify it under the terms of the GNU Library General Public
6  License as published by the Free Software Foundation; either
7  version 2 of the License, or (at your option) any later version.
8 
9  This library is distributed in the hope that it will be useful,
10  but WITHOUT ANY WARRANTY; without even the implied warranty of
11  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12  Library General Public License for more details.
13 
14  You should have received a copy of the GNU Library General Public License
15  along with this library; see the file COPYING.LIB. If not, write to
16  the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
17  Boston, MA 02110-1301, USA.
18 */
19 #ifndef SIEVEEDITORHELPHTMLWIDGET_H
20 #define SIEVEEDITORHELPHTMLWIDGET_H
21 
22 #include "ksieveui_export.h"
23 #include <QWidget>
24 #include <QUrl>
25 
26 namespace KPIMTextEdit {
27 class SlideContainer;
28 }
29 
30 namespace KSieveUi {
31 class SieveEditorWebEngineView;
32 class SieveEditorLoadProgressIndicator;
33 class FindBarWebEngineView;
34 class KSIEVEUI_EXPORT SieveEditorHelpHtmlWidget : public QWidget
35 {
36  Q_OBJECT
37 public:
38  explicit SieveEditorHelpHtmlWidget(QWidget *parent = nullptr);
39  ~SieveEditorHelpHtmlWidget();
40 
41  void openUrl(const QUrl &currentUrl);
42  Q_REQUIRED_RESULT QString title() const;
43 
44  Q_REQUIRED_RESULT QUrl currentUrl() const;
45 
46  void resetZoom();
47  void zoomOut();
48  void zoomIn();
49  void copy();
50 
51  Q_REQUIRED_RESULT bool hasSelection() const;
52  void selectAll();
53 
54  void find();
55 Q_SIGNALS:
56  void titleChanged(KSieveUi::SieveEditorHelpHtmlWidget *widget, const QString &title);
57  void progressIndicatorPixmapChanged(KSieveUi::SieveEditorHelpHtmlWidget *widget, const QPixmap &);
58  void loadFinished(KSieveUi::SieveEditorHelpHtmlWidget *widget, bool success);
59  void copyAvailable(bool);
60 
61 private:
62  void slotTitleChanged(const QString &title);
63  void slotFinished(bool b);
64  void slotLoadStarted();
65  void slotPixmapChanged(const QPixmap &pixmap);
66  void slotLoadFinished(bool success);
67  void slotSelectionChanged();
68  QString mTitle;
69  SieveEditorWebEngineView *mWebView = nullptr;
70  SieveEditorLoadProgressIndicator *mProgressIndicator = nullptr;
71  KPIMTextEdit::SlideContainer *mSliderContainer = nullptr;
72  KSieveUi::FindBarWebEngineView *mFindBar = nullptr;
73  qreal mZoomFactor;
74 };
75 }
76 
77 #endif // SIEVEEDITORHELPHTMLWIDGET_H
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-2020 The KDE developers.
Generated on Sun May 24 2020 22:46:41 by doxygen 1.8.11 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.