xref: /haiku/src/preferences/time/DateTimeView.h (revision cda5b8808fd0262f0fac472f6cfa809f846a83cf)
1 /*
2  * Copyright 2004-2007, Haiku, Inc. All Rights Reserved.
3  * Distributed under the terms of the MIT License.
4  *
5  * Authors:
6  *		Andrew McCall <mccall@@digitalparadise.co.uk>
7  *		Mike Berg <mike@berg-net.us>
8  *		Julun <host.haiku@gmx.de>
9  */
10 #ifndef DATE_TIME_VIEW_H
11 #define DATE_TIME_VIEW_H
12 
13 
14 #include <View.h>
15 
16 
17 class TDateEdit;
18 class TTimeEdit;
19 class BCalendarView;
20 class BRadioButton;
21 class TAnalogClock;
22 
23 
24 class DateTimeView : public BView {
25 	public:
26 						DateTimeView(BRect frame);
27 		virtual 		~DateTimeView();
28 
29 		virtual void 	AttachedToWindow();
30 		virtual void 	Draw(BRect updaterect);
31 		virtual void 	MessageReceived(BMessage *message);
32 
33 	private:
34 		void 			_InitView();
35 		void 			_ReadRTCSettings();
36 		void			_WriteRTCSettings();
37 		void			_UpdateGmtSettings();
38 		void 			_UpdateDateTime(BMessage *message);
39 
40 	private:
41 		BRadioButton 	*fLocalTime;
42 		BRadioButton 	*fGmtTime;
43 		TDateEdit 		*fDateEdit;
44 		TTimeEdit 		*fTimeEdit;
45 		BCalendarView 	*fCalendarView;
46 		TAnalogClock 	*fClock;
47 
48 		bool 			fUseGmtTime;
49 		bool			fInitialized;
50 };
51 
52 #endif	// DATE_TIME_VIEW_H
53 
54