File indexing completed on 2024-05-12 16:16:02

0001 /*
0002    SPDX-FileCopyrightText: 2019-2023 Laurent Montel <montel@kde.org>
0003 
0004    SPDX-License-Identifier: GPL-2.0-or-later
0005 */
0006 
0007 #pragma once
0008 
0009 #include "textgrammarcheck_export.h"
0010 #include <QComboBox>
0011 namespace TextGrammarCheck
0012 {
0013 class LanguageInfo;
0014 class TEXTGRAMMARCHECK_EXPORT LanguageToolComboBox : public QComboBox
0015 {
0016     Q_OBJECT
0017 public:
0018     explicit LanguageToolComboBox(QWidget *parent = nullptr);
0019     ~LanguageToolComboBox() override;
0020 
0021     void setLanguage(const QString &str);
0022     Q_REQUIRED_RESULT QString language() const;
0023 
0024     void fillComboBox(const QVector<LanguageInfo> &info);
0025 
0026 private:
0027     TEXTGRAMMARCHECK_NO_EXPORT void fillComboBox();
0028     Q_DISABLE_COPY(LanguageToolComboBox)
0029 };
0030 }