7#include "grammalectemanager.h"
9#include <KSharedConfig>
10#include <QStandardPaths>
13static const char myConfigGroupName[] =
"Grammalecte";
15using namespace TextGrammarCheck;
16GrammalecteManager::GrammalecteManager(
QObject *parent)
22GrammalecteManager::~GrammalecteManager() =
default;
24GrammalecteManager *GrammalecteManager::self()
26 static GrammalecteManager s_self;
30void GrammalecteManager::saveSettings()
33 grp.writeEntry(QStringLiteral(
"pythonpath"), mPythonPath);
34 grp.writeEntry(QStringLiteral(
"grammalectepath"), mGrammalectePath);
35 grp.writeEntry(QStringLiteral(
"options"), mOptions);
43void GrammalecteManager::setOptions(
const QStringList &saveOptions)
45 mOptions = saveOptions;
48void GrammalecteManager::loadSettings()
51 mPythonPath = grp.readEntry(QStringLiteral(
"pythonpath"));
55 mGrammalectePath = grp.readEntry(QStringLiteral(
"grammalectepath"));
56 mOptions = grp.readEntry(QStringLiteral(
"options"),
QStringList());
59QString GrammalecteManager::pythonPath()
const
64QString GrammalecteManager::grammalectePath()
const
66 return mGrammalectePath;
69void GrammalecteManager::setPythonPath(
const QString &pythonPath)
71 mPythonPath = pythonPath;
74void GrammalecteManager::setGrammalectePath(
const QString &grammalectePath)
76 mGrammalectePath = grammalectePath;
79#include "moc_grammalectemanager.cpp"
static KSharedConfig::Ptr openConfig(const QString &fileName=QString(), OpenFlags mode=FullConfig, QStandardPaths::StandardLocation type=QStandardPaths::GenericConfigLocation)
QString findExecutable(const QString &executableName, const QStringList &paths)
bool isEmpty() const const
This file is part of the KDE documentation.
Documentation copyright © 1996-2024 The KDE developers.
Generated on Mon Nov 18 2024 12:19:49 by
doxygen 1.12.0 written
by
Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.