Sonnet

configdialog.h
1/*
2 * configdialog.h
3 *
4 * SPDX-FileCopyrightText: 2004 Zack Rusin <zack@kde.org>
5 *
6 * SPDX-License-Identifier: LGPL-2.1-or-later
7 */
8#ifndef SONNET_CONFIGDIALOG_H
9#define SONNET_CONFIGDIALOG_H
10
11#include "sonnetui_export.h"
12#include <QDialog>
13
14#include <memory>
15
16namespace Sonnet
17{
18class ConfigDialogPrivate;
19/// The sonnet ConfigDialog
20class SONNETUI_EXPORT ConfigDialog : public QDialog
21{
23public:
24 explicit ConfigDialog(QWidget *parent);
25 ~ConfigDialog() override;
26
27 /**
28 * Sets the language/dictionary that will be selected by default
29 * in this config dialog.
30 * This overrides the setting in the config file.
31 *
32 * @param language the language which will be selected by default.
33 * @since 4.1
34 */
35 void setLanguage(const QString &language);
36 /**
37 * return selected language
38 * @since 4.8.1
39 */
40 QString language() const;
41
42protected Q_SLOTS:
43 virtual void slotOk();
44 virtual void slotApply();
45
47
48 /**
49 * This is emitted all the time when we change config and not just language
50 *
51 * @param language the language which the user has selected
52 * @since 4.1
53 */
54
56
57 /**
58 * This is emitted when configChanged
59 * @since 4.8.1
60 */
62
63private:
64 std::unique_ptr<ConfigDialogPrivate> const d;
65 Q_DISABLE_COPY(ConfigDialog)
66 Q_PRIVATE_SLOT(d, void slotConfigChanged())
67};
68}
69
70#endif
void languageChanged(const QString &language)
This is emitted all the time when we change config and not just language.
QString language() const
return selected language
void configChanged()
This is emitted when configChanged.
void setLanguage(const QString &language)
Sets the language/dictionary that will be selected by default in this config dialog.
The sonnet namespace.
QDialog(QWidget *parent, Qt::WindowFlags f)
Q_OBJECTQ_OBJECT
Q_SIGNALSQ_SIGNALS
Q_SLOTSQ_SLOTS
QObject * parent() const const
QWidget(QWidget *parent, Qt::WindowFlags f)
This file is part of the KDE documentation.
Documentation copyright © 1996-2025 The KDE developers.
Generated on Fri Jan 31 2025 12:00:47 by doxygen 1.13.2 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.