~ubuntu-branches/ubuntu/trusty/grantlee/trusty

« back to all changes in this revision

Viewing changes to templates/lib/nulllocalizer_p.h

  • Committer: Bazaar Package Importer
  • Author(s): Scott Kitterman
  • Date: 2010-12-07 09:19:01 UTC
  • Revision ID: james.westby@ubuntu.com-20101207091901-hsfsvnkxdshv4k8g
Tags: 0.1.7-0ubuntu3
Revert previous upload and try again with the correct patch

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
/*
2
 
  This file is part of the Grantlee template system.
3
 
 
4
 
  Copyright (c) 2010 Stephen Kelly <steveire@gmail.com>
5
 
 
6
 
  This library is free software; you can redistribute it and/or
7
 
  modify it under the terms of the GNU Lesser General Public
8
 
  License as published by the Free Software Foundation; either version
9
 
  2.1 of the Licence, or (at your option) any later version.
10
 
 
11
 
  This library is distributed in the hope that it will be useful,
12
 
  but WITHOUT ANY WARRANTY; without even the implied warranty of
13
 
  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
14
 
  Lesser General Public License for more details.
15
 
 
16
 
  You should have received a copy of the GNU Lesser General Public
17
 
  License along with this library.  If not, see <http://www.gnu.org/licenses/>.
18
 
 
19
 
*/
20
 
 
21
 
#ifndef GRANTLEE_NULLLOCALIZER_P_H
22
 
#define GRANTLEE_NULLLOCALIZER_P_H
23
 
 
24
 
#include "abstractlocalizer.h"
25
 
 
26
 
namespace Grantlee
27
 
{
28
 
 
29
 
class NullLocalizer : public AbstractLocalizer
30
 
{
31
 
public:
32
 
  typedef QSharedPointer<NullLocalizer> Ptr;
33
 
  NullLocalizer();
34
 
  virtual ~NullLocalizer();
35
 
 
36
 
  virtual QString currentLocale() const;
37
 
  virtual void pushLocale(const QString &localeName);
38
 
  virtual void popLocale();
39
 
  virtual void loadCatalog( const QString &path, const QString &catalog );
40
 
  virtual void unloadCatalog( const QString &catalog );
41
 
 
42
 
  virtual QString localizeNumber( int number ) const;
43
 
  virtual QString localizeNumber( qreal number ) const;
44
 
  virtual QString localizeMonetaryValue( qreal value, const QString &currencyCode = QString() ) const;
45
 
  virtual QString localizeDate( const QDate &date, QLocale::FormatType formatType = QLocale::ShortFormat ) const;
46
 
  virtual QString localizeTime( const QTime &time, QLocale::FormatType formatType = QLocale::ShortFormat ) const;
47
 
  virtual QString localizeDateTime( const QDateTime& dateTime, QLocale::FormatType formatType = QLocale::ShortFormat ) const;
48
 
  virtual QString localizeString( const QString& string, const QVariantList &arguments = QVariantList() ) const;
49
 
  virtual QString localizeContextString( const QString& string, const QString& context, const QVariantList &arguments = QVariantList() ) const;
50
 
  virtual QString localizePluralContextString( const QString& string, const QString& pluralForm, const QString& context, const QVariantList &arguments = QVariantList() ) const;
51
 
  virtual QString localizePluralString( const QString& string, const QString& pluralForm, const QVariantList &arguments = QVariantList() ) const;
52
 
private:
53
 
  Q_DISABLE_COPY( NullLocalizer )
54
 
};
55
 
 
56
 
}
57
 
 
58
 
#endif