kdelibs/kdeui/dialogs/kswitchlanguagedialog_p.h
Ivailo Monev 1a45508306 kdecore: reimplement KLocale
by using QLocale in KLocale and separating the date, time and numbers
conversion from translation KLocale actually gets extended locale
support from QLocale (which uses CLDR data v43 currently). translation
remains unaffected. for comparison here is the result of two function
calls the result of which should explain the whole change:
KLocale::allLanguagesList().size() = 669
KLocale::installedLanguages().size() = 68

the first number is locales Katie supports, the second being the
number of languages Katana is translated into

KSwitchLanguageDialog needs a rewrite but that is on the TODO

also copyrighting KCatalog to me because I rewrote it, for reference:
881b47b8ea

KCalendarSystem gets the middle finger - batteries not included for date
and time. extra calendar systems can, but are unlikely to be, supported
in the future

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2023-07-26 23:50:18 +03:00

81 lines
2.2 KiB
C++

/*
* This file is part of the KDE Libraries
* Copyright (C) 2007 Krzysztof Lichota (lichota@mimuw.edu.pl)
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Library General Public
* License as published by the Free Software Foundation; either
* version 2 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Library General Public License for more details.
*
* You should have received a copy of the GNU Library General Public License
* along with this library; see the file COPYING.LIB. If not, write to
* the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
* Boston, MA 02110-1301, USA.
*
*/
#ifndef _KSWITCHLANGUAGEDIALOG_H_
#define _KSWITCHLANGUAGEDIALOG_H_
#include <kdialog.h>
namespace KDEPrivate {
class KSwitchLanguageDialogPrivate;
/**
* @short Standard "switch application language" dialog box.
*
* This class provides "switch application language" dialog box that is used
* in KHelpMenu
*
* @author Krzysztof Lichota (lichota@mimuw.edu.pl)
* @internal
*/
class KSwitchLanguageDialog : public KDialog
{
Q_OBJECT
public:
/**
* Constructor. Creates a fully featured "Switch application language" dialog box.
* Note that this dialog is made modeless in the KHelpMenu class so
* the users may expect a modeless dialog.
*/
KSwitchLanguageDialog(QWidget *parent = nullptr);
virtual ~KSwitchLanguageDialog();
protected Q_SLOTS:
/**
* Activated when the Ok button has been clicked.
*/
virtual void slotOk();
void slotDefault();
/**
*Called when one of language buttons changes state.
*/
virtual void languageOnButtonChanged(const QString &);
/**
*Called to add one language button to dialog.
*/
virtual void slotAddLanguageButton();
/**
Called when "Remove" language button is clicked.
*/
virtual void removeButtonClicked();
private:
KSwitchLanguageDialogPrivate *const d;
friend class KSwitchLanguageDialogPrivate;
};
}
#endif