File indexing completed on 2024-12-29 04:54:40

0001 /*
0002    SPDX-FileCopyrightText: 2013-2024 Laurent Montel <montel@kde.org>
0003 
0004    SPDX-License-Identifier: LGPL-2.0-or-later
0005 */
0006 #pragma once
0007 
0008 #include <QComboBox>
0009 
0010 namespace KSieveUi
0011 {
0012 class SieveEditorGraphicalModeWidget;
0013 class SelectAddressPartComboBox : public QComboBox
0014 {
0015     Q_OBJECT
0016 public:
0017     explicit SelectAddressPartComboBox(KSieveUi::SieveEditorGraphicalModeWidget *sieveGraphicalModeWidget, QWidget *parent = nullptr);
0018     ~SelectAddressPartComboBox() override;
0019 
0020     [[nodiscard]] QString code() const;
0021     void setCode(const QString &code, const QString &name, QString &error);
0022 
0023     [[nodiscard]] QStringList extraRequire() const;
0024 
0025 Q_SIGNALS:
0026     void valueChanged();
0027 
0028 private:
0029     void initialize();
0030     bool mHasSubaddressCapability = false;
0031 };
0032 }