File indexing completed on 2024-04-21 14:55:37

0001 /*  This file is part of the KDE libraries
0002  *  Copyright 2010 John Layt <john@layt.net>
0003  *
0004  *  This library is free software; you can redistribute it and/or
0005  *  modify it under the terms of the GNU Library General Public
0006  *  License as published by the Free Software Foundation; either
0007  *  version 2 of the License, or (at your option) any later version.
0008  *
0009  *  This library is distributed in the hope that it will be useful,
0010  *  but WITHOUT ANY WARRANTY; without even the implied warranty of
0011  *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
0012  *  Library General Public License for more details.
0013  *
0014  *  You should have received a copy of the GNU Library General Public License
0015  *  along with this library; see the file COPYING.LIB.  If not, write to
0016  *  the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
0017  *  Boston, MA 02110-1301, USA.
0018  */
0019 
0020 #ifndef KLOCALE_WIN_P_H
0021 #define KLOCALE_WIN_P_H
0022 
0023 #include "klocale_p.h"
0024 
0025 #include <windows.h>
0026 
0027 class KLocaleWindowsPrivate : public KLocalePrivate
0028 {
0029 public:
0030     KLocaleWindowsPrivate(KLocale *q_ptr, KSharedConfig::Ptr config);
0031 
0032     KLocaleWindowsPrivate(KLocale *q_ptr,
0033                           const QString &language, const QString &country, KConfig *config);
0034 
0035     KLocaleWindowsPrivate(const KLocaleWindowsPrivate &rhs);
0036 
0037     KLocaleWindowsPrivate &operator=(const KLocaleWindowsPrivate &rhs);
0038 
0039     virtual ~KLocaleWindowsPrivate();
0040 
0041 protected:
0042 
0043     /**************************
0044      **   Country settings   **
0045      **************************/
0046 
0047     virtual QString systemCountry() const;
0048 
0049     /**************************
0050      **  Language settings   **
0051      **************************/
0052 
0053     virtual QStringList systemLanguageList() const;
0054 
0055     /***************************
0056      **   Encoding settings   **
0057      ***************************/
0058 
0059     virtual QByteArray systemCodeset() const;
0060 
0061     virtual const QByteArray encoding();
0062 
0063 private:
0064     QString windowsLocaleValue(LCTYPE key) const;
0065     LCID m_winLocaleId;
0066     // Encoding settings
0067     char m_win32SystemEncoding[3 + 7]; //"cp " + lang ID
0068 };
0069 
0070 #endif // KLOCALE_WIN_P_H