Libksieve

sieveeditorhelphtmlwidget.h
1/*
2 SPDX-FileCopyrightText: 2013-2024 Laurent Montel <montel@kde.org>
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
12namespace TextAddonsWidgets
13{
14class SlideContainer;
15}
16
17namespace KSieveUi
18{
19class SieveEditorWebEngineView;
20class SieveEditorLoadProgressIndicator;
21class FindBarWebEngineView;
22class KSIEVEUI_EXPORT SieveEditorHelpHtmlWidget : public QWidget
23{
24 Q_OBJECT
25public:
26 explicit SieveEditorHelpHtmlWidget(QWidget *parent = nullptr);
27 ~SieveEditorHelpHtmlWidget() override;
28
29 void openUrl(const QUrl &currentUrl);
30 [[nodiscard]] QString title() const;
31
32 [[nodiscard]] QUrl currentUrl() const;
33
34 void resetZoom();
35 void zoomOut();
36 void zoomIn();
37 void copy();
38
39 [[nodiscard]] bool hasSelection() const;
40 void selectAll();
41
42 void find();
43Q_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
49private:
50 KSIEVEUI_NO_EXPORT void slotTitleChanged(const QString &title);
51 KSIEVEUI_NO_EXPORT void slotFinished(bool b);
52 KSIEVEUI_NO_EXPORT void slotLoadStarted();
53 KSIEVEUI_NO_EXPORT void slotPixmapChanged(const QPixmap &pixmap);
54 KSIEVEUI_NO_EXPORT void slotLoadFinished(bool success);
55 KSIEVEUI_NO_EXPORT void slotSelectionChanged();
56 QString mTitle;
57 SieveEditorWebEngineView *mWebView = nullptr;
58 SieveEditorLoadProgressIndicator *mProgressIndicator = nullptr;
59 TextAddonsWidgets::SlideContainer *mSliderContainer = nullptr;
60 KSieveUi::FindBarWebEngineView *mFindBar = nullptr;
61 qreal mZoomFactor = 100;
62};
63}
const QList< QKeySequence > & zoomIn()
const QList< QKeySequence > & zoomOut()
const QList< QKeySequence > & find()
const QList< QKeySequence > & copy()
const QList< QKeySequence > & selectAll()
This file is part of the KDE documentation.
Documentation copyright © 1996-2024 The KDE developers.
Generated on Tue Mar 26 2024 11:17:19 by doxygen 1.10.0 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.