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) (unidiff)
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) (show 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 @@
1#ifndef MINIKDE_KLOCALE_H
2#define MINIKDE_KLOCALE_H
3
4#include <qstring.h>
5#include <qdatetime.h>
6
7
8#define I18N_NOOP(x) x
9
10
11QString i18n(const char *text);
12QString i18n(const char *hint, const char *text);
13
14// Qt3's uic generates i18n( "msg", "comment" ) calls which conflict
15// with our i18n method. we use uic -tr tr2i18n to redirect
16// to the right i18n() function
17inline QString tr2i18n(const char* message, const char* =0) {
18 return i18n( message);
19}
20
21class KLocale
22{
23 public:
24
25 QString formatDate(const QDate &pDate, bool shortFormat = false) const;
26 QString formatTime(const QTime &pTime, bool includeSecs = false) const;
27 QString formatDateTime(const QDateTime &pDateTime) const;
28 QString formatDateTime(const QDateTime &pDateTime,
29 bool shortFormat,
30 bool includeSecs = false) const;
31
32 QDate readDate(const QString &str, bool* ok = 0) const;
33 QDate readDate( const QString &intstr, const QString &fmt, bool* ok = 0) const;
34 QTime readTime(const QString &str, bool* ok = 0) const;
35
36 bool use12Clock() const;
37 bool weekStartsMonday() const;
38
39 QString weekDayName(int,bool=false) const;
40 QString monthName(int,bool=false) const;
41
42 QString country() const;
43
44 QString dateFormat() const;
45 QString dateFormatShort() const;
46 QString timeFormat() const;
47
48 private:
49 QTime readTime(const QString &str, bool seconds, bool *ok) const;
50 QDate readDate(const QString &str, bool shortFormat, bool *ok) const;
51};
52
53#endif