-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathutils.h
41 lines (32 loc) · 861 Bytes
/
utils.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
#ifndef UTILS_H
#define UTILS_H
#include <osso-intl.h>
#include <time.h>
#include <stdint.h>
#include <QStringList>
typedef enum {
Time,
Hour12,
Time12,
TimeSeconds,
Minutes,
MinutesSeconds,
amPm,
DayOfWeek,
Date,
FullDateShort,
FullDateLong
} DateTime;
QString formatDateTime(time_t trigger, DateTime what);
QStringList daysFromWday(uint32_t mask_wday);
void showAlarmTimeBanner(time_t tick);
static inline size_t _strftime(char *s, size_t max, const char* format,
const struct tm *t)
{
return strftime(s, max, dgettext("hildon-libs", format), t);
}
bool is24HoursClock();
QString formatTimeMarkup(time_t tick, const QString &timeSize,
const QString &amPmSize, const QString &align,
bool seconds);
#endif // UTILS_H