Main Page | Namespace List | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Namespace Members | Class Members | File Members | Related Pages

klocale.h

Go to the documentation of this file.
00001 #ifndef MINIKDE_KLOCALE_H
00002 #define MINIKDE_KLOCALE_H
00003 
00004 #include <qstring.h>
00005 #include <qdatetime.h>
00006 
00007 
00008 #define I18N_NOOP(x) x
00009 
00010 
00011 QString i18n(const char *text);
00012 QString i18n(const char *hint, const char *text);
00013 
00014 // Qt3's uic generates i18n( "msg", "comment" ) calls which conflict
00015 // with our i18n method. we use uic -tr tr2i18n to redirect
00016 // to the right i18n() function
00017 inline QString tr2i18n(const char* message, const char* =0) {
00018   return i18n( message);
00019 }
00020 
00021 class KLocale
00022 {
00023   public:
00024 
00025     QString formatDate(const QDate &pDate, bool shortFormat = false) const;
00026     QString formatTime(const QTime &pTime, bool includeSecs = false) const;
00027     QString formatDateTime(const QDateTime &pDateTime) const;
00028     QString formatDateTime(const QDateTime &pDateTime,
00029                            bool shortFormat,
00030                            bool includeSecs = false) const;
00031 
00032     QDate readDate(const QString &str, bool* ok = 0) const;
00033     QDate readDate( const QString &intstr, const QString &fmt, bool* ok = 0) const;
00034     QTime readTime(const QString &str, bool* ok = 0) const;
00035 
00036     bool use12Clock() const;
00037     bool weekStartsMonday() const;
00038     
00039     QString weekDayName(int,bool=false) const;
00040     QString monthName(int,bool=false) const;
00041 
00042     QString country() const;
00043 
00044     QString dateFormat() const;
00045     QString dateFormatShort() const;
00046     QString timeFormat() const;
00047 
00048   private:
00049     QTime readTime(const QString &str, bool seconds, bool *ok) const;
00050     QDate readDate(const QString &str, bool shortFormat, bool *ok) const;
00051 };
00052 
00053 #endif

Generated on Sat Nov 5 16:17:12 2005 for OPIE by  doxygen 1.4.2