author | pohly <pohly> | 2005-05-05 14:39:33 (UTC) |
---|---|---|
committer | pohly <pohly> | 2005-05-05 14:39:33 (UTC) |
commit | 39fbfd5eb7e45d73d38e8a2ce9437a3d7e1b8e91 (patch) (unidiff) | |
tree | 96e66fdc18dca4d4ab8611133e072f57dea224b9 /noncore/apps/opie-reader/util.h | |
parent | 279fc4fd1986074acbadd3a8e86fcf3968a8dd5c (diff) | |
download | opie-39fbfd5eb7e45d73d38e8a2ce9437a3d7e1b8e91.zip opie-39fbfd5eb7e45d73d38e8a2ce9437a3d7e1b8e91.tar.gz opie-39fbfd5eb7e45d73d38e8a2ce9437a3d7e1b8e91.tar.bz2 |
new opie-reader sources with support for ArriereGo, Reb input and flite output plugins
Diffstat (limited to 'noncore/apps/opie-reader/util.h') (more/less context) (show whitespace changes)
-rw-r--r-- | noncore/apps/opie-reader/util.h | 48 |
1 files changed, 0 insertions, 48 deletions
diff --git a/noncore/apps/opie-reader/util.h b/noncore/apps/opie-reader/util.h index f831ead..3964b5e 100644 --- a/noncore/apps/opie-reader/util.h +++ b/noncore/apps/opie-reader/util.h | |||
@@ -2,56 +2,8 @@ | |||
2 | #define __UTIL_H | 2 | #define __UTIL_H |
3 | 3 | ||
4 | #include <qstring.h> | 4 | #include <qstring.h> |
5 | #include <qdir.h> | ||
6 | #include <stdlib.h> | ||
7 | 5 | ||
8 | QString filesize(unsigned long l); | 6 | QString filesize(unsigned long l); |
9 | QString percent(unsigned long pos, unsigned long len); | 7 | QString percent(unsigned long pos, unsigned long len); |
10 | QString fmt(unsigned long pos, unsigned long len); | 8 | QString fmt(unsigned long pos, unsigned long len); |
11 | |||
12 | /** | ||
13 | * class with utility inline function(s) | ||
14 | * (in contrast to global functions they become available by just | ||
15 | * including util.h) | ||
16 | */ | ||
17 | class QTReaderUtil | ||
18 | { | ||
19 | public: | ||
20 | |||
21 | /** | ||
22 | * searches for a specific direcory inside OpieReader installation | ||
23 | * | ||
24 | * @param subdir name of sub directory inside installation directory which is needed | ||
25 | * @return full path name including that sub directory | ||
26 | * | ||
27 | * search order is (on all platforms): | ||
28 | * - OPIEDIR | ||
29 | * - QTDIR | ||
30 | * - READERDIR | ||
31 | */ | ||
32 | static QString getPluginPath( const char *subdir = "codecs/" ) | ||
33 | { | ||
34 | QString dirname; | ||
35 | dirname = getenv("OPIEDIR"); | ||
36 | dirname += "/plugins/reader/"; | ||
37 | dirname += subdir; | ||
38 | if (QDir(dirname).exists()) | ||
39 | return dirname; | ||
40 | |||
41 | dirname = getenv("QTDIR"); | ||
42 | dirname += "/plugins/reader/"; | ||
43 | dirname += subdir; | ||
44 | if (QDir(dirname).exists()) | ||
45 | return dirname; | ||
46 | |||
47 | dirname = getenv("READERDIR"); | ||
48 | dirname += "/"; | ||
49 | dirname += subdir; | ||
50 | if (QDir(dirname).exists()) | ||
51 | return dirname; | ||
52 | |||
53 | return ""; | ||
54 | } | ||
55 | }; | ||
56 | |||
57 | #endif | 9 | #endif |