File indexing completed on 2024-05-26 04:31:51

0001 /*
0002  * This file is part of the KDE Libraries
0003  * SPDX-FileCopyrightText: 2007 Krzysztof Lichota (lichota@mimuw.edu.pl)
0004  *
0005  * SPDX-License-Identifier: LGPL-2.0-or-later
0006  *
0007  */
0008 
0009 #ifndef _KSWITCHLANGUAGEDIALOG_H_
0010 #define _KSWITCHLANGUAGEDIALOG_H_
0011 
0012 #include <QDialog>
0013 
0014 namespace KDEPrivate
0015 {
0016 
0017 class KisKSwitchLanguageDialogPrivate;
0018 
0019 /**
0020  * @short Standard "switch application language" dialog box.
0021  *
0022  * This class provides "switch application language" dialog box that is used
0023  * in KisKHelpMenu
0024  *
0025  * @author Krzysztof Lichota (lichota@mimuw.edu.pl)
0026  * @internal
0027  */
0028 
0029 class KisKSwitchLanguageDialog : public QDialog
0030 {
0031     Q_OBJECT
0032 
0033 public:
0034     /**
0035         * Constructor. Creates a fully featured "Switch application language" dialog box.
0036         * Note that this dialog is made modeless in the KisKHelpMenu class so
0037         * the users may expect a modeless dialog.
0038         *
0039         * @param parent The parent of the dialog box. You should use the
0040         *        toplevel window so that the dialog becomes centered.
0041         */
0042     KisKSwitchLanguageDialog(QWidget *parent = nullptr);
0043 
0044     ~KisKSwitchLanguageDialog() override;
0045 
0046 protected Q_SLOTS:
0047     /**
0048     * Activated when the Ok button has been clicked.
0049     */
0050     virtual void slotOk();
0051     void slotDefault();
0052 
0053     /**
0054         Called when one of language buttons changes state.
0055     */
0056     virtual void languageOnButtonChanged(const QString &);
0057 
0058     /**
0059         Called to add one language button to dialog.
0060     */
0061     virtual void slotAddLanguageButton();
0062 
0063     /**
0064         Called when "Remove" language button is clicked.
0065     */
0066     virtual void removeButtonClicked();
0067 
0068 private:
0069     KisKSwitchLanguageDialogPrivate *const d;
0070 
0071     friend class KisKSwitchLanguageDialogPrivate;
0072 };
0073 
0074 }
0075 
0076 #endif