Home · All Namespaces · All Classes · Main Classes |
00001 /*************************************************************************** 00002 ** 00003 ** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies). 00004 ** All rights reserved. 00005 ** Contact: Karoliina T. Salminen <karoliina.t.salminen@nokia.com> 00006 ** 00007 ** This file is part of duicontrolpanel. 00008 ** 00009 ** 00010 ** This library is free software; you can redistribute it and/or 00011 ** modify it under the terms of the GNU Lesser General Public 00012 ** License version 2.1 as published by the Free Software Foundation 00013 ** and appearing in the file LICENSE.LGPL included in the packaging 00014 ** of this file. 00015 ** 00016 ****************************************************************************/ 00017 00018 /* -*- Mode: C; indent-tabs-mode: s; c-basic-offset: 4; tab-width: 4 -*- */ 00019 /* vim:set et ai sw=4 ts=4 sts=4: tw=80 cino="(0,W2s,i2s,t0,l1,:0" */ 00020 #ifndef DCP_RETRANSLATOR_H 00021 #define DCP_RETRANSLATOR_H 00022 00023 #include <QObject> 00024 class MLocale; 00025 class DcpAppletMetadata; 00026 #include <QList> 00027 00028 typedef QList<DcpAppletMetadata*> DcpAppletMetadataList; 00029 00038 class DcpRetranslator : public QObject 00039 { 00040 Q_OBJECT 00041 public: 00042 static DcpRetranslator* instance(); 00043 ~DcpRetranslator(); 00044 static void destroy(); 00045 00046 void setMainCatalogName (const QString& catalogName); 00047 void ensureTranslationsAreLoaded(const DcpAppletMetadataList& list); 00048 void ensureTranslationLoaded(DcpAppletMetadata* metadata); 00049 void ensureTranslationsAreLoaded(const QStringList& catalogs); 00050 00051 public slots: 00052 void retranslate(); 00053 00054 protected: 00055 DcpRetranslator(); 00056 bool eventFilter(QObject *obj, QEvent *event); 00057 bool loadAppletTranslation ( 00058 MLocale &locale, 00059 const DcpAppletMetadata *metadata); 00060 bool loadTranslations (MLocale& locale, 00061 const QStringList& catalogList); 00062 class DcpRetranslatorPriv* priv; 00063 friend class Ut_DcpRetranslator; 00064 }; 00065 00066 #endif 00067
Copyright © 2009 Nokia Corporation | Generated on Tue Jul 5 2011 15:01:31 Doxygen 1.7.1 |
Meego control panel |