-rw-r--r-- | noncore/tools/clock/alarmdlgbase.ui | 154 | ||||
-rw-r--r-- | noncore/tools/clock/analogclock.cpp | 203 | ||||
-rw-r--r-- | noncore/tools/clock/analogclock.h | 49 | ||||
-rw-r--r-- | noncore/tools/clock/clockbase.ui | 921 | ||||
-rw-r--r-- | noncore/tools/clock/specification.html | 145 | ||||
-rw-r--r-- | noncore/tools/clock/tests.html | 203 |
6 files changed, 1675 insertions, 0 deletions
diff --git a/noncore/tools/clock/alarmdlgbase.ui b/noncore/tools/clock/alarmdlgbase.ui new file mode 100644 index 0000000..63759f3 --- a/dev/null +++ b/noncore/tools/clock/alarmdlgbase.ui | |||
@@ -0,0 +1,154 @@ | |||
1 | <!DOCTYPE UI><UI> | ||
2 | <class>AlarmDlgBase</class> | ||
3 | <widget> | ||
4 | <class>QDialog</class> | ||
5 | <property stdset="1"> | ||
6 | <name>name</name> | ||
7 | <cstring>AlarmDlgBase</cstring> | ||
8 | </property> | ||
9 | <property stdset="1"> | ||
10 | <name>geometry</name> | ||
11 | <rect> | ||
12 | <x>0</x> | ||
13 | <y>0</y> | ||
14 | <width>124</width> | ||
15 | <height>92</height> | ||
16 | </rect> | ||
17 | </property> | ||
18 | <property stdset="1"> | ||
19 | <name>caption</name> | ||
20 | <string>Form1</string> | ||
21 | </property> | ||
22 | <property> | ||
23 | <name>layoutMargin</name> | ||
24 | </property> | ||
25 | <vbox> | ||
26 | <property stdset="1"> | ||
27 | <name>margin</name> | ||
28 | <number>6</number> | ||
29 | </property> | ||
30 | <property stdset="1"> | ||
31 | <name>spacing</name> | ||
32 | <number>6</number> | ||
33 | </property> | ||
34 | <widget> | ||
35 | <class>QLayoutWidget</class> | ||
36 | <property stdset="1"> | ||
37 | <name>name</name> | ||
38 | <cstring>Layout1</cstring> | ||
39 | </property> | ||
40 | <hbox> | ||
41 | <property stdset="1"> | ||
42 | <name>margin</name> | ||
43 | <number>0</number> | ||
44 | </property> | ||
45 | <property stdset="1"> | ||
46 | <name>spacing</name> | ||
47 | <number>6</number> | ||
48 | </property> | ||
49 | <widget> | ||
50 | <class>QLabel</class> | ||
51 | <property stdset="1"> | ||
52 | <name>name</name> | ||
53 | <cstring>pixmap</cstring> | ||
54 | </property> | ||
55 | <property stdset="1"> | ||
56 | <name>scaledContents</name> | ||
57 | <bool>true</bool> | ||
58 | </property> | ||
59 | </widget> | ||
60 | <spacer> | ||
61 | <property> | ||
62 | <name>name</name> | ||
63 | <cstring>Spacer1</cstring> | ||
64 | </property> | ||
65 | <property stdset="1"> | ||
66 | <name>orientation</name> | ||
67 | <enum>Horizontal</enum> | ||
68 | </property> | ||
69 | <property stdset="1"> | ||
70 | <name>sizeType</name> | ||
71 | <enum>Expanding</enum> | ||
72 | </property> | ||
73 | <property> | ||
74 | <name>sizeHint</name> | ||
75 | <size> | ||
76 | <width>20</width> | ||
77 | <height>20</height> | ||
78 | </size> | ||
79 | </property> | ||
80 | </spacer> | ||
81 | <widget> | ||
82 | <class>QLabel</class> | ||
83 | <property stdset="1"> | ||
84 | <name>name</name> | ||
85 | <cstring>alarmDlgLabel</cstring> | ||
86 | </property> | ||
87 | <property stdset="1"> | ||
88 | <name>text</name> | ||
89 | <string>TextLabel1</string> | ||
90 | </property> | ||
91 | </widget> | ||
92 | </hbox> | ||
93 | </widget> | ||
94 | <widget> | ||
95 | <class>QLayoutWidget</class> | ||
96 | <property stdset="1"> | ||
97 | <name>name</name> | ||
98 | <cstring>Layout2</cstring> | ||
99 | </property> | ||
100 | <hbox> | ||
101 | <property stdset="1"> | ||
102 | <name>margin</name> | ||
103 | <number>0</number> | ||
104 | </property> | ||
105 | <property stdset="1"> | ||
106 | <name>spacing</name> | ||
107 | <number>6</number> | ||
108 | </property> | ||
109 | <widget> | ||
110 | <class>QLabel</class> | ||
111 | <property stdset="1"> | ||
112 | <name>name</name> | ||
113 | <cstring>TextLabel2</cstring> | ||
114 | </property> | ||
115 | <property stdset="1"> | ||
116 | <name>text</name> | ||
117 | <string>Snooze</string> | ||
118 | </property> | ||
119 | </widget> | ||
120 | <widget> | ||
121 | <class>QSpinBox</class> | ||
122 | <property stdset="1"> | ||
123 | <name>name</name> | ||
124 | <cstring>snoozeTime</cstring> | ||
125 | </property> | ||
126 | <property stdset="1"> | ||
127 | <name>suffix</name> | ||
128 | <string> mins</string> | ||
129 | </property> | ||
130 | <property stdset="1"> | ||
131 | <name>maxValue</name> | ||
132 | <number>60</number> | ||
133 | </property> | ||
134 | <property stdset="1"> | ||
135 | <name>lineStep</name> | ||
136 | <number>5</number> | ||
137 | </property> | ||
138 | </widget> | ||
139 | </hbox> | ||
140 | </widget> | ||
141 | <widget> | ||
142 | <class>QPushButton</class> | ||
143 | <property stdset="1"> | ||
144 | <name>name</name> | ||
145 | <cstring>cmdOk</cstring> | ||
146 | </property> | ||
147 | <property stdset="1"> | ||
148 | <name>text</name> | ||
149 | <string>Close</string> | ||
150 | </property> | ||
151 | </widget> | ||
152 | </vbox> | ||
153 | </widget> | ||
154 | </UI> | ||
diff --git a/noncore/tools/clock/analogclock.cpp b/noncore/tools/clock/analogclock.cpp new file mode 100644 index 0000000..bf358e2 --- a/dev/null +++ b/noncore/tools/clock/analogclock.cpp | |||
@@ -0,0 +1,203 @@ | |||
1 | /********************************************************************** | ||
2 | ** Copyright (C) 2000-2002 Trolltech AS. All rights reserved. | ||
3 | ** | ||
4 | ** This file is part of the Qtopia Environment. | ||
5 | ** | ||
6 | ** This file may be distributed and/or modified under the terms of the | ||
7 | ** GNU General Public License version 2 as published by the Free Software | ||
8 | ** Foundation and appearing in the file LICENSE.GPL included in the | ||
9 | ** packaging of this file. | ||
10 | ** | ||
11 | ** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE | ||
12 | ** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. | ||
13 | ** | ||
14 | ** See http://www.trolltech.com/gpl/ for GPL licensing information. | ||
15 | ** | ||
16 | ** Contact info@trolltech.com if any conditions of this licensing are | ||
17 | ** not clear to you. | ||
18 | ** | ||
19 | **********************************************************************/ | ||
20 | |||
21 | #include "analogclock.h" | ||
22 | |||
23 | #include <qlayout.h> | ||
24 | #include <qpainter.h> | ||
25 | #include <qtopia/global.h> | ||
26 | |||
27 | #include <math.h> | ||
28 | |||
29 | const double deg2rad = 0.017453292519943295769;// pi/180 | ||
30 | |||
31 | AnalogClock::AnalogClock( QWidget *parent, const char *name ) | ||
32 | : QFrame( parent, name ), clear(false) | ||
33 | { | ||
34 | setMinimumSize(50,50); | ||
35 | } | ||
36 | |||
37 | QSizePolicy AnalogClock::sizePolicy() const | ||
38 | { | ||
39 | return QSizePolicy( QSizePolicy::Expanding, QSizePolicy::Expanding ); | ||
40 | } | ||
41 | |||
42 | void AnalogClock::drawContents( QPainter *p ) | ||
43 | { | ||
44 | #if !defined(NO_DEBUG) | ||
45 | static bool first = true; | ||
46 | if ( first ) { | ||
47 | QTOPIA_PROFILE("first paint event"); | ||
48 | first = false; | ||
49 | } | ||
50 | #endif | ||
51 | |||
52 | QRect r = contentsRect(); | ||
53 | |||
54 | if ( r.width() < r.height() ) { | ||
55 | r.setY( (r.height() - r.width())/2 ); | ||
56 | r.setHeight( r.width() ); | ||
57 | } | ||
58 | |||
59 | QPoint center( r.x() + r.width() / 2, r.y() + r.height() / 2 ); | ||
60 | |||
61 | const int w_tick = r.width()/300+1; | ||
62 | const int w_sec = r.width()/400+1; | ||
63 | const int w_hour = r.width()/80+1; | ||
64 | |||
65 | QPoint l1( r.x() + r.width() / 2, r.y() + 2 ); | ||
66 | QPoint l2( r.x() + r.width() / 2, r.y() + 8 ); | ||
67 | |||
68 | QPoint h1( r.x() + r.width() / 2, r.y() + r.height() / 4 ); | ||
69 | QPoint h2( r.x() + r.width() / 2, r.y() + r.height() / 2 ); | ||
70 | |||
71 | QPoint m1( r.x() + r.width() / 2, r.y() + r.height() / 9 ); | ||
72 | QPoint m2( r.x() + r.width() / 2, r.y() + r.height() / 2 ); | ||
73 | |||
74 | QPoint s1( r.x() + r.width() / 2, r.y() + 8 ); | ||
75 | QPoint s2( r.x() + r.width() / 2, r.y() + r.height() / 2 ); | ||
76 | |||
77 | QColor color( clear ? backgroundColor() : black ); | ||
78 | QTime time = clear ? prevTime : currTime; | ||
79 | |||
80 | if ( clear && prevTime.secsTo(currTime) > 1 ) { | ||
81 | p->eraseRect( rect() ); | ||
82 | return; | ||
83 | } | ||
84 | |||
85 | if ( !clear ) { | ||
86 | // draw ticks | ||
87 | p->setPen( QPen( color, w_tick ) ); | ||
88 | for ( int i = 0; i < 12; i++ ) | ||
89 | p->drawLine( rotate( center, l1, i * 30 ), rotate( center, l2, i * 30 ) ); | ||
90 | } | ||
91 | |||
92 | if ( !clear || prevTime.minute() != currTime.minute() || | ||
93 | prevTime.hour() != currTime.hour() ) { | ||
94 | // draw hour pointer | ||
95 | h1 = rotate( center, h1, 30 * ( time.hour() % 12 ) + time.minute() / 2 ); | ||
96 | h2 = rotate( center, h2, 30 * ( time.hour() % 12 ) + time.minute() / 2 ); | ||
97 | p->setPen( color ); | ||
98 | p->setBrush( color ); | ||
99 | drawHand( p, h1, h2 ); | ||
100 | } | ||
101 | |||
102 | if ( !clear || prevTime.minute() != currTime.minute() ) { | ||
103 | // draw minute pointer | ||
104 | m1 = rotate( center, m1, time.minute() * 6 ); | ||
105 | m2 = rotate( center, m2, time.minute() * 6 ); | ||
106 | p->setPen( color ); | ||
107 | p->setBrush( color ); | ||
108 | drawHand( p, m1, m2 ); | ||
109 | } | ||
110 | |||
111 | // draw second pointer | ||
112 | s1 = rotate( center, s1, time.second() * 6 ); | ||
113 | s2 = rotate( center, s2, time.second() * 6 ); | ||
114 | p->setPen( QPen( color, w_sec ) ); | ||
115 | p->drawLine( s1, s2 ); | ||
116 | |||
117 | // cap | ||
118 | p->setBrush(color); | ||
119 | p->drawEllipse( center.x()-w_hour/2, center.y()-w_hour/2, w_hour, w_hour ); | ||
120 | |||
121 | if ( !clear ) | ||
122 | prevTime = currTime; | ||
123 | } | ||
124 | |||
125 | // Dijkstra's bisection algorithm to find the square root as an integer. | ||
126 | |||
127 | static uint int_sqrt(uint n) | ||
128 | { | ||
129 | if ( n >= UINT_MAX>>2 ) // n must be in the range 0...UINT_MAX/2-1 | ||
130 | return 2*int_sqrt( n/4 ); | ||
131 | uint h, p= 0, q= 1, r= n; | ||
132 | while ( q <= n ) | ||
133 | q <<= 2; | ||
134 | while ( q != 1 ) { | ||
135 | q >>= 2; | ||
136 | h= p + q; | ||
137 | p >>= 1; | ||
138 | if ( r >= h ) { | ||
139 | p += q; | ||
140 | r -= h; | ||
141 | } | ||
142 | } | ||
143 | return p; | ||
144 | } | ||
145 | |||
146 | void AnalogClock::drawHand( QPainter *p, QPoint p1, QPoint p2 ) | ||
147 | { | ||
148 | int hw = 7; | ||
149 | if ( contentsRect().height() < 100 ) | ||
150 | hw = 5; | ||
151 | |||
152 | int dx = p2.x() - p1.x(); | ||
153 | int dy = p2.y() - p1.y(); | ||
154 | int w = dx*dx+dy*dy; | ||
155 | int ix,iy; | ||
156 | w = int_sqrt(w*256); | ||
157 | iy = w ? (hw * dy * 16)/ w : dy ? 0 : hw; | ||
158 | ix = w ? (hw * dx * 16)/ w : dx ? 0 : hw; | ||
159 | |||
160 | // rounding dependent on sign | ||
161 | int nix, niy; | ||
162 | if ( ix < 0 ) { | ||
163 | nix = ix/2; | ||
164 | ix = (ix-1)/2; | ||
165 | } else { | ||
166 | nix = (ix+1)/2; | ||
167 | ix = ix/2; | ||
168 | } | ||
169 | if ( iy < 0 ) { | ||
170 | niy = iy/2; | ||
171 | iy = (iy-1)/2; | ||
172 | } else { | ||
173 | niy = (iy+1)/2; | ||
174 | iy = iy/2; | ||
175 | } | ||
176 | |||
177 | QPointArray pa(4); | ||
178 | pa[0] = p1; | ||
179 | pa[1] = QPoint( p2.x()+iy, p2.y()-nix ); | ||
180 | pa[2] = QPoint( p2.x()-niy, p2.y()+ix ); | ||
181 | pa[3] = p1; | ||
182 | |||
183 | p->drawPolygon( pa ); | ||
184 | } | ||
185 | |||
186 | void AnalogClock::display( const QTime& t ) | ||
187 | { | ||
188 | currTime = t; | ||
189 | clear = true; | ||
190 | repaint( false ); | ||
191 | clear = false; | ||
192 | repaint( false ); | ||
193 | } | ||
194 | |||
195 | QPoint AnalogClock::rotate( QPoint c, QPoint p, int a ) | ||
196 | { | ||
197 | double angle = deg2rad * ( - a + 180 ); | ||
198 | double nx = c.x() - ( p.x() - c.x() ) * cos( angle ) - | ||
199 | ( p.y() - c.y() ) * sin( angle ); | ||
200 | double ny = c.y() - ( p.y() - c.y() ) * cos( angle ) + | ||
201 | ( p.x() - c.x() ) * sin( angle ); | ||
202 | return QPoint( int(nx), int(ny) ); | ||
203 | } | ||
diff --git a/noncore/tools/clock/analogclock.h b/noncore/tools/clock/analogclock.h new file mode 100644 index 0000000..3aa035e --- a/dev/null +++ b/noncore/tools/clock/analogclock.h | |||
@@ -0,0 +1,49 @@ | |||
1 | /********************************************************************** | ||
2 | ** Copyright (C) 2000-2002 Trolltech AS. All rights reserved. | ||
3 | ** | ||
4 | ** This file is part of the Qtopia Environment. | ||
5 | ** | ||
6 | ** This file may be distributed and/or modified under the terms of the | ||
7 | ** GNU General Public License version 2 as published by the Free Software | ||
8 | ** Foundation and appearing in the file LICENSE.GPL included in the | ||
9 | ** packaging of this file. | ||
10 | ** | ||
11 | ** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE | ||
12 | ** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. | ||
13 | ** | ||
14 | ** See http://www.trolltech.com/gpl/ for GPL licensing information. | ||
15 | ** | ||
16 | ** Contact info@trolltech.com if any conditions of this licensing are | ||
17 | ** not clear to you. | ||
18 | ** | ||
19 | **********************************************************************/ | ||
20 | #ifndef ANALOGCLOCK_H | ||
21 | #define ANALOGCLOCK_H | ||
22 | |||
23 | #include <qdatetime.h> | ||
24 | #include <qframe.h> | ||
25 | |||
26 | class AnalogClock : public QFrame | ||
27 | { | ||
28 | Q_OBJECT | ||
29 | public: | ||
30 | AnalogClock( QWidget *parent=0, const char *name=0 ); | ||
31 | |||
32 | QSizePolicy sizePolicy() const; | ||
33 | |||
34 | void display( const QTime& time ); | ||
35 | |||
36 | protected: | ||
37 | void drawContents( QPainter *p ); | ||
38 | void drawHand( QPainter *p, QPoint, QPoint ); | ||
39 | |||
40 | private: | ||
41 | QPoint rotate( QPoint center, QPoint p, int angle ); | ||
42 | |||
43 | QTime currTime; | ||
44 | QTime prevTime; | ||
45 | bool clear; | ||
46 | }; | ||
47 | |||
48 | #endif | ||
49 | |||
diff --git a/noncore/tools/clock/clockbase.ui b/noncore/tools/clock/clockbase.ui new file mode 100644 index 0000000..91d0da0 --- a/dev/null +++ b/noncore/tools/clock/clockbase.ui | |||
@@ -0,0 +1,921 @@ | |||
1 | <!DOCTYPE UI><UI> | ||
2 | <class>ClockBase</class> | ||
3 | <widget> | ||
4 | <class>QWidget</class> | ||
5 | <property stdset="1"> | ||
6 | <name>name</name> | ||
7 | <cstring>ClockBase</cstring> | ||
8 | </property> | ||
9 | <property stdset="1"> | ||
10 | <name>geometry</name> | ||
11 | <rect> | ||
12 | <x>0</x> | ||
13 | <y>0</y> | ||
14 | <width>220</width> | ||
15 | <height>337</height> | ||
16 | </rect> | ||
17 | </property> | ||
18 | <property stdset="1"> | ||
19 | <name>caption</name> | ||
20 | <string>Clock</string> | ||
21 | </property> | ||
22 | <property> | ||
23 | <name>layoutMargin</name> | ||
24 | </property> | ||
25 | <vbox> | ||
26 | <property stdset="1"> | ||
27 | <name>margin</name> | ||
28 | <number>6</number> | ||
29 | </property> | ||
30 | <property stdset="1"> | ||
31 | <name>spacing</name> | ||
32 | <number>6</number> | ||
33 | </property> | ||
34 | <widget> | ||
35 | <class>QTabWidget</class> | ||
36 | <property stdset="1"> | ||
37 | <name>name</name> | ||
38 | <cstring>tabs</cstring> | ||
39 | </property> | ||
40 | <property> | ||
41 | <name>layoutMargin</name> | ||
42 | </property> | ||
43 | <property> | ||
44 | <name>layoutSpacing</name> | ||
45 | </property> | ||
46 | <widget> | ||
47 | <class>QWidget</class> | ||
48 | <property stdset="1"> | ||
49 | <name>name</name> | ||
50 | <cstring>tab</cstring> | ||
51 | </property> | ||
52 | <attribute> | ||
53 | <name>title</name> | ||
54 | <string>Clock</string> | ||
55 | </attribute> | ||
56 | <vbox> | ||
57 | <property stdset="1"> | ||
58 | <name>margin</name> | ||
59 | <number>4</number> | ||
60 | </property> | ||
61 | <property stdset="1"> | ||
62 | <name>spacing</name> | ||
63 | <number>4</number> | ||
64 | </property> | ||
65 | <widget> | ||
66 | <class>AnalogClock</class> | ||
67 | <property stdset="1"> | ||
68 | <name>name</name> | ||
69 | <cstring>analogClock</cstring> | ||
70 | </property> | ||
71 | </widget> | ||
72 | <widget> | ||
73 | <class>QLayoutWidget</class> | ||
74 | <property stdset="1"> | ||
75 | <name>name</name> | ||
76 | <cstring>Layout3</cstring> | ||
77 | </property> | ||
78 | <hbox> | ||
79 | <property stdset="1"> | ||
80 | <name>margin</name> | ||
81 | <number>0</number> | ||
82 | </property> | ||
83 | <property stdset="1"> | ||
84 | <name>spacing</name> | ||
85 | <number>6</number> | ||
86 | </property> | ||
87 | <widget> | ||
88 | <class>QFrame</class> | ||
89 | <property stdset="1"> | ||
90 | <name>name</name> | ||
91 | <cstring>Frame3</cstring> | ||
92 | </property> | ||
93 | <property stdset="1"> | ||
94 | <name>sizePolicy</name> | ||
95 | <sizepolicy> | ||
96 | <hsizetype>7</hsizetype> | ||
97 | <vsizetype>5</vsizetype> | ||
98 | </sizepolicy> | ||
99 | </property> | ||
100 | <property stdset="1"> | ||
101 | <name>frameShape</name> | ||
102 | <enum>NoFrame</enum> | ||
103 | </property> | ||
104 | <property stdset="1"> | ||
105 | <name>frameShadow</name> | ||
106 | <enum>Plain</enum> | ||
107 | </property> | ||
108 | <property stdset="1"> | ||
109 | <name>lineWidth</name> | ||
110 | <number>0</number> | ||
111 | </property> | ||
112 | </widget> | ||
113 | <widget> | ||
114 | <class>QLCDNumber</class> | ||
115 | <property stdset="1"> | ||
116 | <name>name</name> | ||
117 | <cstring>clockLcd</cstring> | ||
118 | </property> | ||
119 | <property stdset="1"> | ||
120 | <name>sizePolicy</name> | ||
121 | <sizepolicy> | ||
122 | <hsizetype>1</hsizetype> | ||
123 | <vsizetype>1</vsizetype> | ||
124 | </sizepolicy> | ||
125 | </property> | ||
126 | <property stdset="1"> | ||
127 | <name>minimumSize</name> | ||
128 | <size> | ||
129 | <width>0</width> | ||
130 | <height>23</height> | ||
131 | </size> | ||
132 | </property> | ||
133 | <property stdset="1"> | ||
134 | <name>frameShape</name> | ||
135 | <enum>NoFrame</enum> | ||
136 | </property> | ||
137 | <property stdset="1"> | ||
138 | <name>frameShadow</name> | ||
139 | <enum>Plain</enum> | ||
140 | </property> | ||
141 | <property stdset="1"> | ||
142 | <name>segmentStyle</name> | ||
143 | <enum>Flat</enum> | ||
144 | </property> | ||
145 | </widget> | ||
146 | <widget> | ||
147 | <class>QLabel</class> | ||
148 | <property stdset="1"> | ||
149 | <name>name</name> | ||
150 | <cstring>clockAmPm</cstring> | ||
151 | </property> | ||
152 | <property stdset="1"> | ||
153 | <name>font</name> | ||
154 | <font> | ||
155 | <pointsize>14</pointsize> | ||
156 | <bold>1</bold> | ||
157 | </font> | ||
158 | </property> | ||
159 | <property stdset="1"> | ||
160 | <name>text</name> | ||
161 | <string>...</string> | ||
162 | </property> | ||
163 | <property stdset="1"> | ||
164 | <name>alignment</name> | ||
165 | <set>AlignBottom|AlignLeft</set> | ||
166 | </property> | ||
167 | <property> | ||
168 | <name>vAlign</name> | ||
169 | </property> | ||
170 | </widget> | ||
171 | <widget> | ||
172 | <class>QFrame</class> | ||
173 | <property stdset="1"> | ||
174 | <name>name</name> | ||
175 | <cstring>Frame4</cstring> | ||
176 | </property> | ||
177 | <property stdset="1"> | ||
178 | <name>sizePolicy</name> | ||
179 | <sizepolicy> | ||
180 | <hsizetype>7</hsizetype> | ||
181 | <vsizetype>5</vsizetype> | ||
182 | </sizepolicy> | ||
183 | </property> | ||
184 | <property stdset="1"> | ||
185 | <name>frameShape</name> | ||
186 | <enum>NoFrame</enum> | ||
187 | </property> | ||
188 | <property stdset="1"> | ||
189 | <name>frameShadow</name> | ||
190 | <enum>Plain</enum> | ||
191 | </property> | ||
192 | </widget> | ||
193 | </hbox> | ||
194 | </widget> | ||
195 | <widget> | ||
196 | <class>QLabel</class> | ||
197 | <property stdset="1"> | ||
198 | <name>name</name> | ||
199 | <cstring>date</cstring> | ||
200 | </property> | ||
201 | <property stdset="1"> | ||
202 | <name>font</name> | ||
203 | <font> | ||
204 | <pointsize>16</pointsize> | ||
205 | <bold>1</bold> | ||
206 | </font> | ||
207 | </property> | ||
208 | <property stdset="1"> | ||
209 | <name>text</name> | ||
210 | <string>...</string> | ||
211 | </property> | ||
212 | <property stdset="1"> | ||
213 | <name>textFormat</name> | ||
214 | <enum>RichText</enum> | ||
215 | </property> | ||
216 | <property stdset="1"> | ||
217 | <name>alignment</name> | ||
218 | <set>AlignCenter</set> | ||
219 | </property> | ||
220 | <property> | ||
221 | <name>hAlign</name> | ||
222 | </property> | ||
223 | </widget> | ||
224 | </vbox> | ||
225 | </widget> | ||
226 | <widget> | ||
227 | <class>QWidget</class> | ||
228 | <property stdset="1"> | ||
229 | <name>name</name> | ||
230 | <cstring>tab</cstring> | ||
231 | </property> | ||
232 | <attribute> | ||
233 | <name>title</name> | ||
234 | <string>Stopwatch</string> | ||
235 | </attribute> | ||
236 | <vbox> | ||
237 | <property stdset="1"> | ||
238 | <name>margin</name> | ||
239 | <number>6</number> | ||
240 | </property> | ||
241 | <property stdset="1"> | ||
242 | <name>spacing</name> | ||
243 | <number>4</number> | ||
244 | </property> | ||
245 | <widget> | ||
246 | <class>QFrame</class> | ||
247 | <property stdset="1"> | ||
248 | <name>name</name> | ||
249 | <cstring>swFrame</cstring> | ||
250 | </property> | ||
251 | <property stdset="1"> | ||
252 | <name>sizePolicy</name> | ||
253 | <sizepolicy> | ||
254 | <hsizetype>5</hsizetype> | ||
255 | <vsizetype>7</vsizetype> | ||
256 | </sizepolicy> | ||
257 | </property> | ||
258 | <property stdset="1"> | ||
259 | <name>frameShape</name> | ||
260 | <enum>NoFrame</enum> | ||
261 | </property> | ||
262 | <property stdset="1"> | ||
263 | <name>frameShadow</name> | ||
264 | <enum>Raised</enum> | ||
265 | </property> | ||
266 | </widget> | ||
267 | <widget> | ||
268 | <class>QLayoutWidget</class> | ||
269 | <property stdset="1"> | ||
270 | <name>name</name> | ||
271 | <cstring>Layout7</cstring> | ||
272 | </property> | ||
273 | <property> | ||
274 | <name>layoutSpacing</name> | ||
275 | </property> | ||
276 | <grid> | ||
277 | <property stdset="1"> | ||
278 | <name>margin</name> | ||
279 | <number>0</number> | ||
280 | </property> | ||
281 | <property stdset="1"> | ||
282 | <name>spacing</name> | ||
283 | <number>0</number> | ||
284 | </property> | ||
285 | <widget row="1" column="3" > | ||
286 | <class>QLCDNumber</class> | ||
287 | <property stdset="1"> | ||
288 | <name>name</name> | ||
289 | <cstring>lapLcd</cstring> | ||
290 | </property> | ||
291 | <property stdset="1"> | ||
292 | <name>sizePolicy</name> | ||
293 | <sizepolicy> | ||
294 | <hsizetype>7</hsizetype> | ||
295 | <vsizetype>1</vsizetype> | ||
296 | </sizepolicy> | ||
297 | </property> | ||
298 | <property stdset="1"> | ||
299 | <name>maximumSize</name> | ||
300 | <size> | ||
301 | <width>32767</width> | ||
302 | <height>20</height> | ||
303 | </size> | ||
304 | </property> | ||
305 | <property stdset="1"> | ||
306 | <name>frameShape</name> | ||
307 | <enum>NoFrame</enum> | ||
308 | </property> | ||
309 | <property stdset="1"> | ||
310 | <name>numDigits</name> | ||
311 | <number>11</number> | ||
312 | </property> | ||
313 | <property stdset="1"> | ||
314 | <name>segmentStyle</name> | ||
315 | <enum>Flat</enum> | ||
316 | </property> | ||
317 | </widget> | ||
318 | <widget row="0" column="1" rowspan="2" colspan="1" > | ||
319 | <class>QLCDNumber</class> | ||
320 | <property stdset="1"> | ||
321 | <name>name</name> | ||
322 | <cstring>lapNumLcd</cstring> | ||
323 | </property> | ||
324 | <property stdset="1"> | ||
325 | <name>sizePolicy</name> | ||
326 | <sizepolicy> | ||
327 | <hsizetype>7</hsizetype> | ||
328 | <vsizetype>1</vsizetype> | ||
329 | </sizepolicy> | ||
330 | </property> | ||
331 | <property stdset="1"> | ||
332 | <name>frameShape</name> | ||
333 | <enum>NoFrame</enum> | ||
334 | </property> | ||
335 | <property stdset="1"> | ||
336 | <name>numDigits</name> | ||
337 | <number>2</number> | ||
338 | </property> | ||
339 | <property stdset="1"> | ||
340 | <name>segmentStyle</name> | ||
341 | <enum>Flat</enum> | ||
342 | </property> | ||
343 | </widget> | ||
344 | <widget row="0" column="0" rowspan="2" colspan="1" > | ||
345 | <class>QFrame</class> | ||
346 | <property stdset="1"> | ||
347 | <name>name</name> | ||
348 | <cstring>lapFrame</cstring> | ||
349 | </property> | ||
350 | <property stdset="1"> | ||
351 | <name>minimumSize</name> | ||
352 | <size> | ||
353 | <width>15</width> | ||
354 | <height>0</height> | ||
355 | </size> | ||
356 | </property> | ||
357 | <property stdset="1"> | ||
358 | <name>frameShape</name> | ||
359 | <enum>NoFrame</enum> | ||
360 | </property> | ||
361 | <property stdset="1"> | ||
362 | <name>frameShadow</name> | ||
363 | <enum>Raised</enum> | ||
364 | </property> | ||
365 | </widget> | ||
366 | <widget row="0" column="2" > | ||
367 | <class>QLabel</class> | ||
368 | <property stdset="1"> | ||
369 | <name>name</name> | ||
370 | <cstring>TextLabel4</cstring> | ||
371 | </property> | ||
372 | <property stdset="1"> | ||
373 | <name>text</name> | ||
374 | <string>Split</string> | ||
375 | </property> | ||
376 | <property stdset="1"> | ||
377 | <name>alignment</name> | ||
378 | <set>AlignTop|AlignRight</set> | ||
379 | </property> | ||
380 | <property> | ||
381 | <name>hAlign</name> | ||
382 | </property> | ||
383 | <property> | ||
384 | <name>vAlign</name> | ||
385 | </property> | ||
386 | </widget> | ||
387 | <widget row="0" column="3" > | ||
388 | <class>QLCDNumber</class> | ||
389 | <property stdset="1"> | ||
390 | <name>name</name> | ||
391 | <cstring>splitLcd</cstring> | ||
392 | </property> | ||
393 | <property stdset="1"> | ||
394 | <name>sizePolicy</name> | ||
395 | <sizepolicy> | ||
396 | <hsizetype>7</hsizetype> | ||
397 | <vsizetype>1</vsizetype> | ||
398 | </sizepolicy> | ||
399 | </property> | ||
400 | <property stdset="1"> | ||
401 | <name>maximumSize</name> | ||
402 | <size> | ||
403 | <width>32767</width> | ||
404 | <height>20</height> | ||
405 | </size> | ||
406 | </property> | ||
407 | <property stdset="1"> | ||
408 | <name>frameShape</name> | ||
409 | <enum>NoFrame</enum> | ||
410 | </property> | ||
411 | <property stdset="1"> | ||
412 | <name>numDigits</name> | ||
413 | <number>11</number> | ||
414 | </property> | ||
415 | <property stdset="1"> | ||
416 | <name>segmentStyle</name> | ||
417 | <enum>Flat</enum> | ||
418 | </property> | ||
419 | </widget> | ||
420 | <widget row="1" column="2" > | ||
421 | <class>QLabel</class> | ||
422 | <property stdset="1"> | ||
423 | <name>name</name> | ||
424 | <cstring>TextLabel3_2</cstring> | ||
425 | </property> | ||
426 | <property stdset="1"> | ||
427 | <name>text</name> | ||
428 | <string>Lap</string> | ||
429 | </property> | ||
430 | <property stdset="1"> | ||
431 | <name>alignment</name> | ||
432 | <set>AlignTop|AlignRight</set> | ||
433 | </property> | ||
434 | <property> | ||
435 | <name>hAlign</name> | ||
436 | </property> | ||
437 | <property> | ||
438 | <name>vAlign</name> | ||
439 | </property> | ||
440 | </widget> | ||
441 | </grid> | ||
442 | </widget> | ||
443 | <widget> | ||
444 | <class>QLayoutWidget</class> | ||
445 | <property stdset="1"> | ||
446 | <name>name</name> | ||
447 | <cstring>Layout5</cstring> | ||
448 | </property> | ||
449 | <hbox> | ||
450 | <property stdset="1"> | ||
451 | <name>margin</name> | ||
452 | <number>0</number> | ||
453 | </property> | ||
454 | <property stdset="1"> | ||
455 | <name>spacing</name> | ||
456 | <number>6</number> | ||
457 | </property> | ||
458 | <widget> | ||
459 | <class>QPushButton</class> | ||
460 | <property stdset="1"> | ||
461 | <name>name</name> | ||
462 | <cstring>stopStart</cstring> | ||
463 | </property> | ||
464 | <property stdset="1"> | ||
465 | <name>font</name> | ||
466 | <font> | ||
467 | <pointsize>14</pointsize> | ||
468 | <bold>1</bold> | ||
469 | </font> | ||
470 | </property> | ||
471 | <property stdset="1"> | ||
472 | <name>text</name> | ||
473 | <string>Start</string> | ||
474 | </property> | ||
475 | <property> | ||
476 | <name>whatsThis</name> | ||
477 | <string>Starts and stops the stopwatch.</string> | ||
478 | </property> | ||
479 | </widget> | ||
480 | <widget> | ||
481 | <class>QPushButton</class> | ||
482 | <property stdset="1"> | ||
483 | <name>name</name> | ||
484 | <cstring>reset</cstring> | ||
485 | </property> | ||
486 | <property stdset="1"> | ||
487 | <name>font</name> | ||
488 | <font> | ||
489 | <pointsize>14</pointsize> | ||
490 | <bold>1</bold> | ||
491 | </font> | ||
492 | </property> | ||
493 | <property stdset="1"> | ||
494 | <name>text</name> | ||
495 | <string>Lap/Split</string> | ||
496 | </property> | ||
497 | <property> | ||
498 | <name>whatsThis</name> | ||
499 | <string>Resets the stopwatch.</string> | ||
500 | </property> | ||
501 | </widget> | ||
502 | </hbox> | ||
503 | </widget> | ||
504 | </vbox> | ||
505 | </widget> | ||
506 | <widget> | ||
507 | <class>QWidget</class> | ||
508 | <property stdset="1"> | ||
509 | <name>name</name> | ||
510 | <cstring>tab</cstring> | ||
511 | </property> | ||
512 | <attribute> | ||
513 | <name>title</name> | ||
514 | <string>Alarm</string> | ||
515 | </attribute> | ||
516 | <vbox> | ||
517 | <property stdset="1"> | ||
518 | <name>margin</name> | ||
519 | <number>6</number> | ||
520 | </property> | ||
521 | <property stdset="1"> | ||
522 | <name>spacing</name> | ||
523 | <number>4</number> | ||
524 | </property> | ||
525 | <widget> | ||
526 | <class>QGroupBox</class> | ||
527 | <property stdset="1"> | ||
528 | <name>name</name> | ||
529 | <cstring>dailyGroup</cstring> | ||
530 | </property> | ||
531 | <property stdset="1"> | ||
532 | <name>title</name> | ||
533 | <string>Daily Alarm</string> | ||
534 | </property> | ||
535 | <property> | ||
536 | <name>layoutMargin</name> | ||
537 | </property> | ||
538 | <vbox> | ||
539 | <property stdset="1"> | ||
540 | <name>margin</name> | ||
541 | <number>6</number> | ||
542 | </property> | ||
543 | <property stdset="1"> | ||
544 | <name>spacing</name> | ||
545 | <number>6</number> | ||
546 | </property> | ||
547 | <widget> | ||
548 | <class>QCheckBox</class> | ||
549 | <property stdset="1"> | ||
550 | <name>name</name> | ||
551 | <cstring>dailyEnabled</cstring> | ||
552 | </property> | ||
553 | <property stdset="1"> | ||
554 | <name>text</name> | ||
555 | <string>Enabled</string> | ||
556 | </property> | ||
557 | <property> | ||
558 | <name>whatsThis</name> | ||
559 | <string>Check to enable the daily alarm</string> | ||
560 | </property> | ||
561 | </widget> | ||
562 | <widget> | ||
563 | <class>QLayoutWidget</class> | ||
564 | <property stdset="1"> | ||
565 | <name>name</name> | ||
566 | <cstring>Layout4</cstring> | ||
567 | </property> | ||
568 | <hbox> | ||
569 | <property stdset="1"> | ||
570 | <name>margin</name> | ||
571 | <number>0</number> | ||
572 | </property> | ||
573 | <property stdset="1"> | ||
574 | <name>spacing</name> | ||
575 | <number>6</number> | ||
576 | </property> | ||
577 | <widget> | ||
578 | <class>QSpinBox</class> | ||
579 | <property stdset="1"> | ||
580 | <name>name</name> | ||
581 | <cstring>dailyHour</cstring> | ||
582 | </property> | ||
583 | <property stdset="1"> | ||
584 | <name>minimumSize</name> | ||
585 | <size> | ||
586 | <width>40</width> | ||
587 | <height>0</height> | ||
588 | </size> | ||
589 | </property> | ||
590 | <property stdset="1"> | ||
591 | <name>wrapping</name> | ||
592 | <bool>true</bool> | ||
593 | </property> | ||
594 | <property stdset="1"> | ||
595 | <name>maxValue</name> | ||
596 | <number>23</number> | ||
597 | </property> | ||
598 | <property> | ||
599 | <name>whatsThis</name> | ||
600 | <string>Set the hour the alarm will sound.</string> | ||
601 | </property> | ||
602 | </widget> | ||
603 | <widget> | ||
604 | <class>QLabel</class> | ||
605 | <property stdset="1"> | ||
606 | <name>name</name> | ||
607 | <cstring>TextLabel2</cstring> | ||
608 | </property> | ||
609 | <property stdset="1"> | ||
610 | <name>sizePolicy</name> | ||
611 | <sizepolicy> | ||
612 | <hsizetype>4</hsizetype> | ||
613 | <vsizetype>1</vsizetype> | ||
614 | </sizepolicy> | ||
615 | </property> | ||
616 | <property stdset="1"> | ||
617 | <name>minimumSize</name> | ||
618 | <size> | ||
619 | <width>5</width> | ||
620 | <height>0</height> | ||
621 | </size> | ||
622 | </property> | ||
623 | <property stdset="1"> | ||
624 | <name>text</name> | ||
625 | <string>:</string> | ||
626 | </property> | ||
627 | </widget> | ||
628 | <widget> | ||
629 | <class>QSpinBox</class> | ||
630 | <property stdset="1"> | ||
631 | <name>name</name> | ||
632 | <cstring>dailyMinute</cstring> | ||
633 | </property> | ||
634 | <property stdset="1"> | ||
635 | <name>minimumSize</name> | ||
636 | <size> | ||
637 | <width>40</width> | ||
638 | <height>0</height> | ||
639 | </size> | ||
640 | </property> | ||
641 | <property stdset="1"> | ||
642 | <name>wrapping</name> | ||
643 | <bool>true</bool> | ||
644 | </property> | ||
645 | <property stdset="1"> | ||
646 | <name>maxValue</name> | ||
647 | <number>59</number> | ||
648 | </property> | ||
649 | <property stdset="1"> | ||
650 | <name>lineStep</name> | ||
651 | <number>5</number> | ||
652 | </property> | ||
653 | <property> | ||
654 | <name>whatsThis</name> | ||
655 | <string>Set the minute the alarm will sound.</string> | ||
656 | </property> | ||
657 | </widget> | ||
658 | <widget> | ||
659 | <class>QComboBox</class> | ||
660 | <item> | ||
661 | <property> | ||
662 | <name>text</name> | ||
663 | <string>AM</string> | ||
664 | </property> | ||
665 | </item> | ||
666 | <item> | ||
667 | <property> | ||
668 | <name>text</name> | ||
669 | <string>PM</string> | ||
670 | </property> | ||
671 | </item> | ||
672 | <property stdset="1"> | ||
673 | <name>name</name> | ||
674 | <cstring>dailyAmPm</cstring> | ||
675 | </property> | ||
676 | <property stdset="1"> | ||
677 | <name>minimumSize</name> | ||
678 | <size> | ||
679 | <width>50</width> | ||
680 | <height>0</height> | ||
681 | </size> | ||
682 | </property> | ||
683 | </widget> | ||
684 | <widget> | ||
685 | <class>QFrame</class> | ||
686 | <property stdset="1"> | ||
687 | <name>name</name> | ||
688 | <cstring>Frame5</cstring> | ||
689 | </property> | ||
690 | <property stdset="1"> | ||
691 | <name>sizePolicy</name> | ||
692 | <sizepolicy> | ||
693 | <hsizetype>7</hsizetype> | ||
694 | <vsizetype>5</vsizetype> | ||
695 | </sizepolicy> | ||
696 | </property> | ||
697 | <property stdset="1"> | ||
698 | <name>frameShape</name> | ||
699 | <enum>NoFrame</enum> | ||
700 | </property> | ||
701 | <property stdset="1"> | ||
702 | <name>frameShadow</name> | ||
703 | <enum>Plain</enum> | ||
704 | </property> | ||
705 | </widget> | ||
706 | </hbox> | ||
707 | </widget> | ||
708 | <widget> | ||
709 | <class>QLabel</class> | ||
710 | <property stdset="1"> | ||
711 | <name>name</name> | ||
712 | <cstring>TextLabel1</cstring> | ||
713 | </property> | ||
714 | <property stdset="1"> | ||
715 | <name>text</name> | ||
716 | <string>Days:</string> | ||
717 | </property> | ||
718 | </widget> | ||
719 | <widget> | ||
720 | <class>QFrame</class> | ||
721 | <property stdset="1"> | ||
722 | <name>name</name> | ||
723 | <cstring>daysFrame</cstring> | ||
724 | </property> | ||
725 | <property stdset="1"> | ||
726 | <name>frameShape</name> | ||
727 | <enum>NoFrame</enum> | ||
728 | </property> | ||
729 | <property stdset="1"> | ||
730 | <name>frameShadow</name> | ||
731 | <enum>Raised</enum> | ||
732 | </property> | ||
733 | </widget> | ||
734 | </vbox> | ||
735 | </widget> | ||
736 | <widget> | ||
737 | <class>QGroupBox</class> | ||
738 | <property stdset="1"> | ||
739 | <name>name</name> | ||
740 | <cstring>cdGroup</cstring> | ||
741 | </property> | ||
742 | <property stdset="1"> | ||
743 | <name>title</name> | ||
744 | <string>Countdown Alarm</string> | ||
745 | </property> | ||
746 | <property> | ||
747 | <name>layoutMargin</name> | ||
748 | </property> | ||
749 | <grid> | ||
750 | <property stdset="1"> | ||
751 | <name>margin</name> | ||
752 | <number>6</number> | ||
753 | </property> | ||
754 | <property stdset="1"> | ||
755 | <name>spacing</name> | ||
756 | <number>6</number> | ||
757 | </property> | ||
758 | <widget row="0" column="0" > | ||
759 | <class>QLabel</class> | ||
760 | <property stdset="1"> | ||
761 | <name>name</name> | ||
762 | <cstring>TextLabel3</cstring> | ||
763 | </property> | ||
764 | <property stdset="1"> | ||
765 | <name>sizePolicy</name> | ||
766 | <sizepolicy> | ||
767 | <hsizetype>4</hsizetype> | ||
768 | <vsizetype>1</vsizetype> | ||
769 | </sizepolicy> | ||
770 | </property> | ||
771 | <property stdset="1"> | ||
772 | <name>text</name> | ||
773 | <string>:</string> | ||
774 | </property> | ||
775 | </widget> | ||
776 | <widget row="0" column="0" > | ||
777 | <class>QLayoutWidget</class> | ||
778 | <property stdset="1"> | ||
779 | <name>name</name> | ||
780 | <cstring>Layout5</cstring> | ||
781 | </property> | ||
782 | <hbox> | ||
783 | <property stdset="1"> | ||
784 | <name>margin</name> | ||
785 | <number>0</number> | ||
786 | </property> | ||
787 | <property stdset="1"> | ||
788 | <name>spacing</name> | ||
789 | <number>6</number> | ||
790 | </property> | ||
791 | <widget> | ||
792 | <class>QSpinBox</class> | ||
793 | <property stdset="1"> | ||
794 | <name>name</name> | ||
795 | <cstring>cdHour</cstring> | ||
796 | </property> | ||
797 | <property stdset="1"> | ||
798 | <name>minimumSize</name> | ||
799 | <size> | ||
800 | <width>40</width> | ||
801 | <height>0</height> | ||
802 | </size> | ||
803 | </property> | ||
804 | <property stdset="1"> | ||
805 | <name>maxValue</name> | ||
806 | <number>999</number> | ||
807 | </property> | ||
808 | <property stdset="1"> | ||
809 | <name>lineStep</name> | ||
810 | <number>1</number> | ||
811 | </property> | ||
812 | </widget> | ||
813 | <widget> | ||
814 | <class>QSpinBox</class> | ||
815 | <property stdset="1"> | ||
816 | <name>name</name> | ||
817 | <cstring>cdMinute</cstring> | ||
818 | </property> | ||
819 | <property stdset="1"> | ||
820 | <name>minimumSize</name> | ||
821 | <size> | ||
822 | <width>40</width> | ||
823 | <height>0</height> | ||
824 | </size> | ||
825 | </property> | ||
826 | <property stdset="1"> | ||
827 | <name>wrapping</name> | ||
828 | <bool>true</bool> | ||
829 | </property> | ||
830 | <property stdset="1"> | ||
831 | <name>maxValue</name> | ||
832 | <number>55</number> | ||
833 | </property> | ||
834 | <property stdset="1"> | ||
835 | <name>lineStep</name> | ||
836 | <number>5</number> | ||
837 | </property> | ||
838 | </widget> | ||
839 | <widget> | ||
840 | <class>QPushButton</class> | ||
841 | <property stdset="1"> | ||
842 | <name>name</name> | ||
843 | <cstring>cdStartStop</cstring> | ||
844 | </property> | ||
845 | <property stdset="1"> | ||
846 | <name>text</name> | ||
847 | <string>Start</string> | ||
848 | </property> | ||
849 | </widget> | ||
850 | </hbox> | ||
851 | </widget> | ||
852 | <widget row="1" column="0" > | ||
853 | <class>QLCDNumber</class> | ||
854 | <property stdset="1"> | ||
855 | <name>name</name> | ||
856 | <cstring>cdLcd</cstring> | ||
857 | </property> | ||
858 | <property stdset="1"> | ||
859 | <name>frameShape</name> | ||
860 | <enum>NoFrame</enum> | ||
861 | </property> | ||
862 | <property stdset="1"> | ||
863 | <name>frameShadow</name> | ||
864 | <enum>Plain</enum> | ||
865 | </property> | ||
866 | <property stdset="1"> | ||
867 | <name>segmentStyle</name> | ||
868 | <enum>Flat</enum> | ||
869 | </property> | ||
870 | </widget> | ||
871 | </grid> | ||
872 | </widget> | ||
873 | <spacer> | ||
874 | <property> | ||
875 | <name>name</name> | ||
876 | <cstring>Spacer1</cstring> | ||
877 | </property> | ||
878 | <property stdset="1"> | ||
879 | <name>orientation</name> | ||
880 | <enum>Vertical</enum> | ||
881 | </property> | ||
882 | <property stdset="1"> | ||
883 | <name>sizeType</name> | ||
884 | <enum>Expanding</enum> | ||
885 | </property> | ||
886 | <property> | ||
887 | <name>sizeHint</name> | ||
888 | <size> | ||
889 | <width>20</width> | ||
890 | <height>20</height> | ||
891 | </size> | ||
892 | </property> | ||
893 | </spacer> | ||
894 | </vbox> | ||
895 | </widget> | ||
896 | </widget> | ||
897 | </vbox> | ||
898 | </widget> | ||
899 | <customwidgets> | ||
900 | <customwidget> | ||
901 | <class>AnalogClock</class> | ||
902 | <header location="local">analogclock.h</header> | ||
903 | <sizehint> | ||
904 | <width>50</width> | ||
905 | <height>50</height> | ||
906 | </sizehint> | ||
907 | <container>0</container> | ||
908 | <sizepolicy> | ||
909 | <hordata>3</hordata> | ||
910 | <verdata>3</verdata> | ||
911 | </sizepolicy> | ||
912 | <pixmap>image0</pixmap> | ||
913 | </customwidget> | ||
914 | </customwidgets> | ||
915 | <images> | ||
916 | <image> | ||
917 | <name>image0</name> | ||
918 | <data format="XPM.GZ" length="646">789c6dd2c10ac2300c00d07bbf2234b7229d1be245fc04c5a3201e4615f430059d0711ff5ddb2e6bb236ec90eed134cb5a19d8ef36602af5ecdbfeeac05dda0798d3abebde87e3faa374d3807fa0d633a52d38d8de6f679fe33fc776e196f53cd010188256a3600a292882096246517815ca99884606e18044a3a40d91824820924265a7923a2e8bcd05f33db1173e002913175f2a6be6d3294871a2d95fa00e8a94ee017b69d339d90df1e77c57ea072ede6758</data> | ||
919 | </image> | ||
920 | </images> | ||
921 | </UI> | ||
diff --git a/noncore/tools/clock/specification.html b/noncore/tools/clock/specification.html new file mode 100644 index 0000000..5913277 --- a/dev/null +++ b/noncore/tools/clock/specification.html | |||
@@ -0,0 +1,145 @@ | |||
1 | <html> | ||
2 | <title> | ||
3 | Clock Specification | ||
4 | </title> | ||
5 | |||
6 | <body> | ||
7 | |||
8 | <h1>Clock Specification</h1> | ||
9 | |||
10 | |||
11 | <!-- | ||
12 | <h2>Specification goals</h2> | ||
13 | This specification: | ||
14 | <ol> | ||
15 | <li> Describes all of the end-user stories and interactions. | ||
16 | (eg. the user can view a slide show of images from a digital camera). | ||
17 | <li> Lists all features, derived from end-user stories, | ||
18 | in enough detail to allow the definition of | ||
19 | tests for all features. | ||
20 | <li> Defines contraints and limitations on the application. | ||
21 | (eg. can view image sizes as large as 1MB). | ||
22 | <li>Aides the developer on focusing on the most important aspects of | ||
23 | the application and ensuring all important elements are completed. | ||
24 | </ol> | ||
25 | --> | ||
26 | |||
27 | <a name=description> | ||
28 | </a> | ||
29 | <!-- A one-line description of what this application is and does. | ||
30 | This description is then duplicated in the .desktop Comment and | ||
31 | the .control file description. | ||
32 | |||
33 | (eg. The image viewer allows viewing and very minor editing of image files.) | ||
34 | --> | ||
35 | The clock shows the time, a stopwatch and allows a daily alarm to be set. | ||
36 | <!-- A one-paragraph description of what this application is and does. | ||
37 | This description is then duplicated in the .desktop Comment and | ||
38 | the .control file description. | ||
39 | |||
40 | (eg. The image viewer allows viewing and very minor editing | ||
41 | of image files. It assists format conversion, beaming logos | ||
42 | to phones, captioning, etc.) | ||
43 | --> | ||
44 | <p> | ||
45 | The clock provides three functions: 1. Displays the current date and time. | ||
46 | 2. Provides a stopwatch. 3. Allows a daily alarm to be set and enabled/disabled. | ||
47 | </p> | ||
48 | |||
49 | <p> | ||
50 | Status: BT | ||
51 | </p> | ||
52 | |||
53 | <a name=usecases> | ||
54 | <h2>Use Cases</h2> | ||
55 | </a> | ||
56 | <!-- Describe real-world stories. Implicit in these use cases is | ||
57 | "these things are easy to do". | ||
58 | (eg. | ||
59 | Roving News Reporter | ||
60 | |||
61 | The journalist/cameraman takes photos with a digital camera, | ||
62 | loads them into the PDAs via CF card, adjusts the contrast, | ||
63 | blacks-out a license plate, adds a copyright caption, and | ||
64 | emails the image and short story to Reuters. | ||
65 | ) | ||
66 | |||
67 | Note: TITLEs may be used as identifiers in bug reports. | ||
68 | --> | ||
69 | <ul> | ||
70 | <li><b>Viewing Date and Time</b> | ||
71 | <p>While the PDA is in its cradle, the office worker uses it as a | ||
72 | desktop clock. | ||
73 | <li><b>Jogger</b> | ||
74 | <p>A jogger runs around a 400m track 6 times. He starts the stopwatch as | ||
75 | he starts, and presses a button each time he rounds the track. He can | ||
76 | observe the precise time taken for each lap. | ||
77 | <li><b>Setting Daily Alarm</b> | ||
78 | <p>The traveller sets an alarm to wake him up at 5:30 each morning. | ||
79 | <p>(not yet implemented: The traveller never wants to be woken on Saturday, | ||
80 | Sunday, or Wednesday; the traveller can easily press a "Snooze" button | ||
81 | to get a little more rest, but the alarm will sound again; he never | ||
82 | misses getting woken) | ||
83 | </ul> | ||
84 | |||
85 | <a name=features> | ||
86 | <h2>Features</h2> | ||
87 | </a> | ||
88 | <!-- features are brief | ||
89 | |||
90 | (eg. | ||
91 | * Slide show: view multiple images in sequence | ||
92 | * Configurable delay between images. | ||
93 | * Hardware-button-controlled stepping between images. | ||
94 | * Big images: view larger-than-available-RAM images in some formats. | ||
95 | * Formats: view JPEG, PNG, GIF format images. | ||
96 | * Scribbling: draw black or white lines on images. | ||
97 | * Save: in JPEG, PNG formats. | ||
98 | ) | ||
99 | |||
100 | Note: TITLEs may be used as identifiers in bug reports. | ||
101 | --> | ||
102 | |||
103 | <ul> | ||
104 | <li>Clock: Display an analog clock, digital clock and the date in one view. | ||
105 | <li>Stopwatch: Display an analog and digital stopwatch timer. | ||
106 | The digital timer has a resolution of 1/100 second. | ||
107 | <ul> | ||
108 | <li>Start/Stop: The [Select] hardware button must Start/Stop the stopwatch. | ||
109 | </ul> | ||
110 | <li>Daily Alarm: Allows a daily alarm to be enabled/disabled and set. | ||
111 | <ul> | ||
112 | <li>Audible Alarm: When the alarm is activated an audible alarm must be | ||
113 | sounded. | ||
114 | <li>Visual Alarm: When the alarm is activated a dialog box must be shown | ||
115 | with the alarm details. | ||
116 | </ul> | ||
117 | </ul> | ||
118 | |||
119 | <a name=prerequisites> | ||
120 | <h2>Prerequisites</h2> | ||
121 | </a> | ||
122 | <!-- | ||
123 | Describes unresolved limitations that cannot | ||
124 | be shown within the features list. | ||
125 | |||
126 | Describes memory and other requirements quantitatively. | ||
127 | |||
128 | This is a short list, mainly intended as a "known bugs" | ||
129 | list for missing features. | ||
130 | |||
131 | (eg. | ||
132 | * Stylus: required for Scribbling. | ||
133 | * Memory: requires 250 bytes per event, plus content strings. | ||
134 | ) | ||
135 | |||
136 | Note: TITLEs may be used as identifiers in bug reports. | ||
137 | --> | ||
138 | |||
139 | <ul> | ||
140 | <li>Alarm Server: requires a working alarm server for daily alarm function. | ||
141 | <li>Audible Alarm: requires speaker/buzzer. | ||
142 | </ul> | ||
143 | |||
144 | </body> | ||
145 | </html> | ||
diff --git a/noncore/tools/clock/tests.html b/noncore/tools/clock/tests.html new file mode 100644 index 0000000..4df5ead --- a/dev/null +++ b/noncore/tools/clock/tests.html | |||
@@ -0,0 +1,203 @@ | |||
1 | <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> | ||
2 | <html> | ||
3 | <head> | ||
4 | <title>Qtopia test</title> | ||
5 | <meta http-equiv="Content-Type" | ||
6 | content="text/html; charset=iso-8859-1"> | ||
7 | <meta content="Ed Baak" name="Author"> | ||
8 | </head> | ||
9 | <body> | ||
10 | <h1>Qtopia/Clock</h1> | ||
11 | <h2>Test cases</h2> | ||
12 | <br> | ||
13 | <br> | ||
14 | <h3> Basic Clock</h3> | ||
15 | <table cellpadding="2" cellspacing="2" border="1" | ||
16 | style="width: 100%; text-align: left;"> | ||
17 | <tbody> | ||
18 | <tr> | ||
19 | <th style="vertical-align: top; width: 20%;">Test Purpose<br> | ||
20 | </th> | ||
21 | <td style="vertical-align: top;">Verify that the basic clock | ||
22 | functionality works as expected.<br> | ||
23 | </td> | ||
24 | </tr> | ||
25 | <tr> | ||
26 | <th style="vertical-align: top; width: 15%;" width="20%">Test | ||
27 | Description<br> | ||
28 | </th> | ||
29 | <td style="vertical-align: top;"> | ||
30 | <ol> | ||
31 | <li>Start the clock. </li> | ||
32 | <li>Confirm that the Clock tab is displayed. </li> | ||
33 | <li>Check that the time displayed on the analog clock matches | ||
34 | the device system time. </li> | ||
35 | <li>Check that the time displayed on the digital clock matches | ||
36 | the device system time. </li> | ||
37 | <li>Check that the date displayed matches the device system | ||
38 | date.</li> | ||
39 | </ol> | ||
40 | </td> | ||
41 | </tr> | ||
42 | <tr> | ||
43 | <th style="vertical-align: top; width: 15%;" width="20%">Expected | ||
44 | TestResult<br> | ||
45 | </th> | ||
46 | <td style="vertical-align: top;">All the verification steps as | ||
47 | described in the Test Description must be met.<br> | ||
48 | </td> | ||
49 | </tr> | ||
50 | <tr> | ||
51 | <th style="vertical-align: top; width: 15%;" width="20%">Testnorm/Criteria<br> | ||
52 | </th> | ||
53 | <td style="vertical-align: top;">Exact Match<br> | ||
54 | </td> | ||
55 | </tr> | ||
56 | <tr> | ||
57 | <th style="vertical-align: top; width: 15%;" width="20%">Test | ||
58 | Suitability<br> | ||
59 | </th> | ||
60 | <td style="vertical-align: top;">Manual test<br> | ||
61 | </td> | ||
62 | </tr> | ||
63 | </tbody> | ||
64 | </table> | ||
65 | <br> | ||
66 | <br> | ||
67 | <h3> Stopwatch</h3> | ||
68 | <table cellpadding="2" cellspacing="2" border="1" | ||
69 | style="width: 100%; text-align: left;"> | ||
70 | <tbody> | ||
71 | <tr> | ||
72 | <th style="vertical-align: top; width: 20%;">Test Purpose<br> | ||
73 | </th> | ||
74 | <td style="vertical-align: top;">Verify that the clock app can be | ||
75 | used as a stopwatch.<br> | ||
76 | </td> | ||
77 | </tr> | ||
78 | <tr> | ||
79 | <th style="vertical-align: top; width: 15%;" width="20%">Test | ||
80 | Description<br> | ||
81 | </th> | ||
82 | <td style="vertical-align: top;"> | ||
83 | <ol> | ||
84 | <li>Click on the Stopwatch tab. </li> | ||
85 | <li>Confirm that the stopwatch reads 00:00:00.00 and that the | ||
86 | analog hands indicate 00:00. </li> | ||
87 | <li>Press the Start button and confirm that the analog and | ||
88 | digital timers count up (resolution 1 sec). </li> | ||
89 | <li>Press the Stop button and confirm that the timers have | ||
90 | stopped. The digital timer should show 1/100 sec resolution. </li> | ||
91 | <li>Press the Reset button and confirm that the stopwatch reads | ||
92 | 00:00:00.00 and that the analog hands indicate 00:00. </li> | ||
93 | <li>Press the Start button and wait 3 seconds. </li> | ||
94 | <li>Press the Lap/Split button and wait 3 seconds again.</li> | ||
95 | <li>Press Stop.</li> | ||
96 | <li>Verify that the lap counter reads 3.</li> | ||
97 | <li>Use the decrement button in front of the lap counter to | ||
98 | select lap 1.</li> | ||
99 | <li>Verify that the Split value reads a value of approx 3 | ||
100 | seconds and the Lap value is the same.</li> | ||
101 | <li>Use the increment button in front of the lap counter to | ||
102 | select lap 2.</li> | ||
103 | <li>Verify that the Split value reads a value of approx 6 | ||
104 | seconds (2 laps total) and the Lap value again is approx 3 seconds.</li> | ||
105 | <li>Use the increment button to select lap 3.</li> | ||
106 | <li>Verify that the Split value reads a value of approx 9 | ||
107 | seconds (3 laps total) and the Lap value is approx 3 seconds.</li> | ||
108 | <li>Verify that no other laps can be selected using the | ||
109 | incr/decr buttons that 1, 2 or 3.</li> | ||
110 | <li>Tap the Reset button.</li> | ||
111 | <li>Verify that all values are reset to 0, the lap counter is | ||
112 | reset to 1 and the incr/decr buttons are disabled.<br> | ||
113 | </li> | ||
114 | </ol> | ||
115 | </td> | ||
116 | </tr> | ||
117 | <tr> | ||
118 | <th style="vertical-align: top; width: 15%;" width="20%">Expected | ||
119 | TestResult<br> | ||
120 | </th> | ||
121 | <td style="vertical-align: top;">All the verification steps as | ||
122 | described in the Test Description must be met.<br> | ||
123 | </td> | ||
124 | </tr> | ||
125 | <tr> | ||
126 | <th style="vertical-align: top; width: 15%;" width="20%">Testnorm/Criteria<br> | ||
127 | </th> | ||
128 | <td style="vertical-align: top;">Exact Match, but the actual | ||
129 | values for the Lap and Split readouts depend on the timing of the | ||
130 | tester.<br> | ||
131 | </td> | ||
132 | </tr> | ||
133 | <tr> | ||
134 | <th style="vertical-align: top; width: 15%;" width="20%">Test | ||
135 | Suitability<br> | ||
136 | </th> | ||
137 | <td style="vertical-align: top;">Manual test<br> | ||
138 | </td> | ||
139 | </tr> | ||
140 | </tbody> | ||
141 | </table> | ||
142 | <br> | ||
143 | <br> | ||
144 | <h3> Daily alarm</h3> | ||
145 | <table cellpadding="2" cellspacing="2" border="1" | ||
146 | style="width: 100%; text-align: left;"> | ||
147 | <tbody> | ||
148 | <tr> | ||
149 | <th style="vertical-align: top; width: 20%;">Test Purpose<br> | ||
150 | </th> | ||
151 | <td style="vertical-align: top;">Verify that a daily alarm can be | ||
152 | set.<br> | ||
153 | </td> | ||
154 | </tr> | ||
155 | <tr> | ||
156 | <th style="vertical-align: top; width: 15%;" width="20%">Test | ||
157 | Description<br> | ||
158 | </th> | ||
159 | <td style="vertical-align: top;"> | ||
160 | <ol> | ||
161 | <li>Click on the Alarms tab. </li> | ||
162 | <li>Set the alarm time 1-5 minutes in the future and check the | ||
163 | Enabled box. </li> | ||
164 | <li>Confirm that when the alarm time is reached the alarm | ||
165 | sounds and a message box is displayed with the alarm details. </li> | ||
166 | <li>Set the alarm time 1-5 minutes in the future and uncheck | ||
167 | the Enabled box. </li> | ||
168 | <li>Confirm that when the alarm time is reached no alarm is | ||
169 | sounded. </li> | ||
170 | <li>Set the alarm time 1-5 minutes in the future, check | ||
171 | Enabled, and close the clock application. </li> | ||
172 | <li>Confirm that when the alarm time is reached the alarm | ||
173 | sounds and a message box is displayed with the alarm details.</li> | ||
174 | </ol> | ||
175 | </td> | ||
176 | </tr> | ||
177 | <tr> | ||
178 | <th style="vertical-align: top; width: 15%;" width="20%">Expected | ||
179 | TestResult<br> | ||
180 | </th> | ||
181 | <td style="vertical-align: top;">All the verification steps as | ||
182 | described in the Test Description must be met.<br> | ||
183 | </td> | ||
184 | </tr> | ||
185 | <tr> | ||
186 | <th style="vertical-align: top; width: 15%;" width="20%">Testnorm/Criteria<br> | ||
187 | </th> | ||
188 | <td style="vertical-align: top;">Exact Match<br> | ||
189 | </td> | ||
190 | </tr> | ||
191 | <tr> | ||
192 | <th style="vertical-align: top; width: 15%;" width="20%">Test | ||
193 | Suitability<br> | ||
194 | </th> | ||
195 | <td style="vertical-align: top;">Manual test<br> | ||
196 | </td> | ||
197 | </tr> | ||
198 | </tbody> | ||
199 | </table> | ||
200 | <br> | ||
201 | <br> | ||
202 | </body> | ||
203 | </html> | ||