File indexing completed on 2024-10-06 09:35:56

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_MAC_P_H
0021 #define KLOCALE_MAC_P_H
0022 
0023 #include "klocale_p.h"
0024 
0025 #include <CoreFoundation/CoreFoundation.h>
0026 
0027 class KLocaleMacPrivate : public KLocalePrivate
0028 {
0029 public:
0030     KLocaleMacPrivate(KLocale *q_ptr, KSharedConfig::Ptr config);
0031 
0032     KLocaleMacPrivate(KLocale *q_ptr,
0033                       const QString &language, const QString &country, KConfig *config);
0034 
0035     KLocaleMacPrivate(const KLocaleMacPrivate &rhs);
0036 
0037     KLocaleMacPrivate &operator=(const KLocaleMacPrivate &rhs);
0038 
0039     virtual ~KLocaleMacPrivate();
0040 
0041 protected:
0042 
0043     /**************************
0044      **   Country settings   **
0045      **************************/
0046 
0047     virtual QString systemCountry() const;
0048 
0049     /***************************
0050      **   Encoding settings   **
0051      ***************************/
0052 
0053     virtual QByteArray systemCodeset() const;
0054 
0055 private:
0056     QString macLocaleValue(CFStringRef key) const;
0057     CFLocaleRef m_macLocale;
0058 };
0059 
0060 #endif // KLOCALE_MAC_P_H