summaryrefslogtreecommitdiff
path: root/noncore/apps/tinykate/libkate/microkde/klocale.h
authorjowenn <jowenn>2002-11-10 21:08:01 (UTC)
committer jowenn <jowenn>2002-11-10 21:08:01 (UTC)
commite97a6da57804aa14907dec327fbae71bff9b383e (patch) (side-by-side diff)
tree15f6ee292dba24bdda72f5c72f6d2224c3516763 /noncore/apps/tinykate/libkate/microkde/klocale.h
parent7c012ee8cd16d8befacc6f6750711443fac0fd5e (diff)
downloadopie-e97a6da57804aa14907dec327fbae71bff9b383e.zip
opie-e97a6da57804aa14907dec327fbae71bff9b383e.tar.gz
opie-e97a6da57804aa14907dec327fbae71bff9b383e.tar.bz2
import of tiny kate. (saving not possible yet)
Diffstat (limited to 'noncore/apps/tinykate/libkate/microkde/klocale.h') (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/apps/tinykate/libkate/microkde/klocale.h53
1 files changed, 53 insertions, 0 deletions
diff --git a/noncore/apps/tinykate/libkate/microkde/klocale.h b/noncore/apps/tinykate/libkate/microkde/klocale.h
new file mode 100644
index 0000000..cff200b
--- a/dev/null
+++ b/noncore/apps/tinykate/libkate/microkde/klocale.h
@@ -0,0 +1,53 @@
+#ifndef MINIKDE_KLOCALE_H
+#define MINIKDE_KLOCALE_H
+
+#include <qstring.h>
+#include <qdatetime.h>
+
+
+#define I18N_NOOP(x) x
+
+
+QString i18n(const char *text);
+QString i18n(const char *hint, const char *text);
+
+// Qt3's uic generates i18n( "msg", "comment" ) calls which conflict
+// with our i18n method. we use uic -tr tr2i18n to redirect
+// to the right i18n() function
+inline QString tr2i18n(const char* message, const char* =0) {
+ return i18n( message);
+}
+
+class KLocale
+{
+ public:
+
+ QString formatDate(const QDate &pDate, bool shortFormat = false) const;
+ QString formatTime(const QTime &pTime, bool includeSecs = false) const;
+ QString formatDateTime(const QDateTime &pDateTime) const;
+ QString formatDateTime(const QDateTime &pDateTime,
+ bool shortFormat,
+ bool includeSecs = false) const;
+
+ QDate readDate(const QString &str, bool* ok = 0) const;
+ QDate readDate( const QString &intstr, const QString &fmt, bool* ok = 0) const;
+ QTime readTime(const QString &str, bool* ok = 0) const;
+
+ bool use12Clock() const;
+ bool weekStartsMonday() const;
+
+ QString weekDayName(int,bool=false) const;
+ QString monthName(int,bool=false) const;
+
+ QString country() const;
+
+ QString dateFormat() const;
+ QString dateFormatShort() const;
+ QString timeFormat() const;
+
+ private:
+ QTime readTime(const QString &str, bool seconds, bool *ok) const;
+ QDate readDate(const QString &str, bool shortFormat, bool *ok) const;
+};
+
+#endif