Kross
translation.h
Go to the documentation of this file.
00001 /*************************************************************************** 00002 * translation.h 00003 * This file is part of the KDE project 00004 * copyright (C)2008 by Dag Andersen <danders@get2net.dk> 00005 * 00006 * This program is free software; you can redistribute it and/or 00007 * modify it under the terms of the GNU Library General Public 00008 * License as published by the Free Software Foundation; either 00009 * version 2 of the License, or (at your option) any later version. 00010 * This program is distributed in the hope that it will be useful, 00011 * but WITHOUT ANY WARRANTY; without even the implied warranty of 00012 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 00013 * Library General Public License for more details. 00014 * You should have received a copy of the GNU Library General Public License 00015 * along with this program; see the file COPYING. If not, write to 00016 * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, 00017 * Boston, MA 02110-1301, USA. 00018 ***************************************************************************/ 00019 00020 #ifndef KROSS_TRANSLATION_H 00021 #define KROSS_TRANSLATION_H 00022 00023 #include <QObject> 00024 #include <QVariantList> 00025 00026 class QString; 00027 00028 class KLocalizedString; 00029 00030 namespace Kross { 00031 00043 class TranslationModule: public QObject 00044 { 00045 Q_OBJECT 00046 00047 public: 00048 explicit TranslationModule(); 00049 virtual ~TranslationModule(); 00050 00051 public Q_SLOTS: 00053 QString i18n( const QString &text, const QVariantList &arguments = QVariantList() ) const; 00055 QString i18nc( const QString &context, const QString &text, const QVariantList &arguments = QVariantList() ) const; 00057 QString i18np( const QString &singular, const QString &plural, int number, const QVariantList &arguments = QVariantList() ) const; 00059 QString i18ncp( const QString &context, const QString &singular, const QString &plural, int number, const QVariantList &arguments = QVariantList() ) const; 00060 00061 protected: 00062 KLocalizedString substituteArguments( const KLocalizedString &kls, const QVariantList &arguments, int max = 99 ) const; 00063 00064 private: 00066 class Private; 00068 Private* const d; 00069 }; 00070 } 00071 00072 #endif 00073
KDE 4.6 API Reference