File indexing completed on 2024-12-29 04:54:43
0001 /* 0002 SPDX-FileCopyrightText: 2013-2024 Laurent Montel <montel@kde.org> 0003 0004 SPDX-License-Identifier: LGPL-2.0-or-later 0005 */ 0006 0007 #pragma once 0008 0009 #include "ksieveui_private_export.h" 0010 #include <KSieveUi/AbstractRegexpEditorLineEdit> 0011 #include <QString> 0012 #include <QStringList> 0013 #include <QXmlStreamReader> 0014 namespace KSieveUi 0015 { 0016 class AbstractMoveImapFolderWidget; 0017 class AbstractSelectEmailLineEdit; 0018 namespace AutoCreateScriptUtil 0019 { 0020 [[nodiscard]] QString createMultiLine(const QString &str); 0021 [[nodiscard]] QString createList(const QString &str, QChar separator, bool addEndSemiColon = true); 0022 [[nodiscard]] QString createList(const QStringList &lst, bool addSemiColon = true, bool protectSlash = false); 0023 [[nodiscard]] QStringList createListFromString(QString str); 0024 [[nodiscard]] QString createAddressList(const QString &str, bool addSemiColon = true); 0025 [[nodiscard]] QString negativeString(bool isNegative); 0026 [[nodiscard]] QString tagValueWithCondition(const QString &tag, bool notCondition); 0027 [[nodiscard]] QString tagValue(const QString &tag); 0028 [[nodiscard]] QString strValue(QXmlStreamReader &element); 0029 [[nodiscard]] QStringList listValue(QXmlStreamReader &element); 0030 [[nodiscard]] QString listValueToStr(QXmlStreamReader &element); 0031 [[nodiscard]] QString fixListValue(QString valueStr); 0032 [[nodiscard]] QString quoteStr(const QString &str, bool protectSlash = true); 0033 void comboboxItemNotFound(const QString &searchItem, const QString &name, QString &error); 0034 [[nodiscard]] QString createFullWhatsThis(const QString &help, const QString &href); 0035 [[nodiscard]] QString protectSlash(QString str); 0036 [[nodiscard]] QString indentation(); 0037 [[nodiscard]] AbstractRegexpEditorLineEdit *createRegexpEditorLineEdit(QWidget *parent = nullptr); 0038 [[nodiscard]] QString generateConditionComment(const QString &comment); 0039 [[nodiscard]] QString loadConditionComment(QString originalComment, const QString &comment); 0040 KSIEVEUI_TESTS_EXPORT KSieveUi::AbstractMoveImapFolderWidget *createImapFolderWidget(); 0041 KSIEVEUI_TESTS_EXPORT KSieveUi::AbstractSelectEmailLineEdit *createSelectEmailsWidget(); 0042 } 0043 }