summaryrefslogtreecommitdiff
path: root/library
authorllornkcor <llornkcor>2006-07-17 20:04:18 (UTC)
committer llornkcor <llornkcor>2006-07-17 20:04:18 (UTC)
commit3e77cb64e7ca0d89656e6665c1007bff6b34d609 (patch) (unidiff)
tree1708763bc99ed75de6c395093c9421b1bd0fe268 /library
parent20b8c8eb22b5498647430da49986f75b78cf2d79 (diff)
downloadopie-3e77cb64e7ca0d89656e6665c1007bff6b34d609.zip
opie-3e77cb64e7ca0d89656e6665c1007bff6b34d609.tar.gz
opie-3e77cb64e7ca0d89656e6665c1007bff6b34d609.tar.bz2
supply default arguments
Diffstat (limited to 'library') (more/less context) (ignore whitespace changes)
-rw-r--r--library/timestring.h32
1 files changed, 11 insertions, 21 deletions
diff --git a/library/timestring.h b/library/timestring.h
index b8d1aea..9a2889b 100644
--- a/library/timestring.h
+++ b/library/timestring.h
@@ -2,30 +2,20 @@
2** Copyright (C) 2000-2006 Trolltech AS. All rights reserved. 2** Copyright (C) 2000-2006 Trolltech AS. All rights reserved.
3** 3**
4** This file is part of the Qtopia Environment. 4** This file is part of the Qtopia Environment.
5** 5**
6** This program is free software; you can redistribute it and/or modify it 6** This program is free software; you can redistribute it and/or modify it
7** under the terms of the GNU General Public License as published by the 7** under the terms of the GNU General Public License as published by the
8** Free Software Foundation; either version 2 of the License, or (at your 8** Free Software Foundation; either version 2 of the License, or (at your
9** option) any later version. 9** option) any later version.
10** 10**
11** A copy of the GNU GPL license version 2 is included in this package as 11** A copy of the GNU GPL license version 2 is included in this package as
12** LICENSE.GPL. 12** LICENSE.GPL.
13** 13**
14** This program is distributed in the hope that it will be useful, but 14** This program is distributed in the hope that it will be useful, but
15** WITHOUT ANY WARRANTY; without even the implied warranty of 15** WITHOUT ANY WARRANTY; without even the implied warranty of
16** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 16** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
17** See the GNU General Public License for more details. 17** See the GNU General Public License for more details.
18** 18**
19** In addition, as a special exception Trolltech gives permission to link
20** the code of this program with Qtopia applications copyrighted, developed
21** and distributed by Trolltech under the terms of the Qtopia Personal Use
22** License Agreement. You must comply with the GNU General Public License
23** in all respects for all of the code used other than the applications
24** licensed under the Qtopia Personal Use License Agreement. If you modify
25** this file, you may extend this exception to your version of the file,
26** but you are not obligated to do so. If you do not wish to do so, delete
27** this exception statement from your version.
28**
29** See http://www.trolltech.com/gpl/ for GPL licensing information. 19** See http://www.trolltech.com/gpl/ for GPL licensing information.
30** 20**
31** Contact info@trolltech.com if any conditions of this licensing are 21** Contact info@trolltech.com if any conditions of this licensing are
@@ -51,7 +41,7 @@ class QObject;
51// you want it in 12 hour form. if ampm is true, then return 41// you want it in 12 hour form. if ampm is true, then return
52// it in 12 hour (am/pm) form otherwise return it in 24 hour form 42// it in 12 hour (am/pm) form otherwise return it in 24 hour form
53// in theory Qt 3,0 handles this better (hopefully obsoleteing this) 43// in theory Qt 3,0 handles this better (hopefully obsoleteing this)
54class DateFormat 44class DateFormat
55{ 45{
56public: 46public:
57 // date format type 1,2,4 = day,month,year 47 // date format type 1,2,4 = day,month,year
@@ -119,12 +109,12 @@ class TimeString
119{ 109{
120public: 110public:
121 111
122 //enum DateFormat { MonthDayYear, DayMonthYear, ISO8601, 112 //enum DateFormat { MonthDayYear, DayMonthYear, ISO8601,
123 //YearMonthDay = ISO8601 }; 113 //YearMonthDay = ISO8601 };
124 114
125 115
126//private: 116//private:
127 static QString shortDate( const QDate &d ) 117 static QString shortDate( const QDate &d )
128 { return shortDate( d, currentDateFormat() ); } 118 { return shortDate( d, currentDateFormat() ); }
129 static QString dateString( const QDate &d ) 119 static QString dateString( const QDate &d )
130 { return dateString( d, currentDateFormat() ); } 120 { return dateString( d, currentDateFormat() ); }
@@ -156,11 +146,11 @@ public:
156 static void disconnectChange(QObject*,const char* member); 146 static void disconnectChange(QObject*,const char* member);
157 147
158 // Not recommended to call these (they don't honor system ampm) 148 // Not recommended to call these (they don't honor system ampm)
159 static QString dateString( const QDateTime &t, bool ampm ); 149 static QString dateString( const QDateTime &t, bool ampm = false);
160 static QString timeString( const QTime &t, bool ampm, bool seconds ); 150 static QString timeString( const QTime &t, bool ampm, bool seconds );
161 static QString timeString( const QTime &t, bool ampm ); 151 static QString timeString( const QTime &t, bool ampm = false);
162 static QString shortTime( bool ampm, bool seconds ); 152 static QString shortTime( bool ampm, bool seconds );
163 static QString shortTime( bool ampm ); 153 static QString shortTime( bool ampm = false);
164 154
165 static QString numberDateString( const QDate &d, DateFormat ); 155 static QString numberDateString( const QDate &d, DateFormat );
166 static QString numberDateString( const QDate &d ) 156 static QString numberDateString( const QDate &d )
@@ -175,7 +165,7 @@ public:
175 165
176private: 166private:
177 static QString dateString( const QDateTime &t, bool ampm, bool seconds, DateFormat ); 167 static QString dateString( const QDateTime &t, bool ampm, bool seconds, DateFormat );
178 168
179 169
180}; 170};
181 171