1/*
2 This file is part of the KDE Libraries
3 SPDX-FileCopyrightText: 2007 Krzysztof Lichota <lichota@mimuw.edu.pl>
4
5 SPDX-License-Identifier: LGPL-2.0-or-later
6*/
7
8#ifndef _KSWITCHLANGUAGEDIALOG_H_
9#define _KSWITCHLANGUAGEDIALOG_H_
10
11#include <kxmlgui_export.h>
12
13#include <QDialog>
14
15namespace KDEPrivate
16{
17KXMLGUI_EXPORT void setApplicationSpecificLanguage(const QByteArray &languageCode);
18KXMLGUI_EXPORT void initializeLanguages();
19
20class KSwitchLanguageDialogPrivate;
21
22/*!
23 * \brief Standard "switch application language" dialog box.
24 *
25 * This class provides "switch application language" dialog box that is used
26 * in KHelpMenu.
27 * \internal
28 */
29
30class KSwitchLanguageDialog : public QDialog
31{
32 Q_OBJECT
33
34public:
35 /*!
36 * \brief Constructs a fully featured "Switch application language" dialog box.
37 *
38 * Note that this dialog is made modeless in the KHelpMenu class so
39 * the users may expect a modeless dialog.
40 *
41 * \a parent The parent of the dialog box. You should use the
42 * toplevel window so that the dialog becomes centered.
43 *
44 * \a name Internal name of the widget. This name in not used in the
45 * caption.
46 *
47 * \a modal If false, this widget will be modeless and must be
48 * made visible using QWidget::show(). Otherwise it will be
49 * modal and must be made visible using QWidget::exec().
50 */
51 explicit KSwitchLanguageDialog(QWidget *parent = nullptr);
52
53 ~KSwitchLanguageDialog() override;
54
55protected Q_SLOTS:
56 /*!
57 * \brief Activated when the Ok button has been clicked.
58 */
59 virtual void slotOk();
60 void slotDefault();
61
62 /*!
63 \brief Called when one of the language buttons changes state.
64 */
65 virtual void languageOnButtonChanged(const QString &);
66
67 /*!
68 \brief Called to add one language button to dialog.
69 */
70 virtual void slotAddLanguageButton();
71
72 /*!
73 \brief Called when "Remove" language button is clicked.
74 */
75 virtual void removeButtonClicked();
76
77private:
78 KSwitchLanguageDialogPrivate *const d;
79
80 friend class KSwitchLanguageDialogPrivate;
81};
82
83}
84
85#endif
86

source code of kxmlgui/src/kswitchlanguagedialog_p.h