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

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 <QObject>
0011 namespace TextGrammarCheck
0012 {
0013 class TEXTGRAMMARCHECK_EXPORT GrammalecteManager : public QObject
0014 {
0015     Q_OBJECT
0016 public:
0017     explicit GrammalecteManager(QObject *parent = nullptr);
0018     ~GrammalecteManager() override;
0019 
0020     static GrammalecteManager *self();
0021 
0022     Q_REQUIRED_RESULT QString pythonPath() const;
0023     Q_REQUIRED_RESULT QString grammalectePath() const;
0024 
0025     void setPythonPath(const QString &pythonPath);
0026     void setGrammalectePath(const QString &grammalectePath);
0027     Q_REQUIRED_RESULT QStringList options() const;
0028     void setOptions(const QStringList &saveOptions);
0029 
0030     void loadSettings();
0031     void saveSettings();
0032 
0033 private:
0034     Q_DISABLE_COPY(GrammalecteManager)
0035     QStringList mOptions;
0036     QString mPythonPath;
0037     QString mGrammalectePath;
0038 };
0039 }