File indexing completed on 2024-12-29 04:54:49
0001 /* 0002 SPDX-FileCopyrightText: 2015-2024 Laurent Montel <montel@kde.org> 0003 0004 SPDX-License-Identifier: GPL-2.0-only 0005 */ 0006 0007 #pragma once 0008 0009 #include "ksieveui_private_export.h" 0010 #include <QWidget> 0011 #include <memory> 0012 namespace TextCustomEditor 0013 { 0014 class PlainTextEditFindBar; 0015 } 0016 namespace TextAddonsWidgets 0017 { 0018 class SlideContainer; 0019 } 0020 0021 namespace KSieveUi 0022 { 0023 class SieveTextEdit; 0024 class SieveTextEditWidgetPrivate; 0025 class KSIEVEUI_TESTS_EXPORT SieveTextEditWidget : public QWidget 0026 { 0027 Q_OBJECT 0028 public: 0029 explicit SieveTextEditWidget(QWidget *parent = nullptr); 0030 SieveTextEditWidget(KSieveUi::SieveTextEdit *customTextEdit, QWidget *parent); 0031 ~SieveTextEditWidget() override; 0032 void setReadOnly(bool readOnly); 0033 0034 [[nodiscard]] KSieveUi::SieveTextEdit *textEdit() const; 0035 0036 public Q_SLOTS: 0037 void slotReplace(); 0038 void slotFind(); 0039 0040 private: 0041 KSIEVEUI_NO_EXPORT void initialize(KSieveUi::SieveTextEdit *custom = nullptr); 0042 std::unique_ptr<SieveTextEditWidgetPrivate> const d; 0043 }; 0044 }