2 * Copyright 2004-2012, Haiku, Inc. All Rights Reserved.
3 * Distributed under the terms of the MIT License.
6 * Mike Berg <mike@berg-net.us>
7 * Julun <host.haiku@gmx.de>
8 * Hamish Morrison <hamish@lavabit.com>
14 #include <LayoutBuilder.h>
15 #include <TimeFormat.h>
21 class BOutlineListView
;
25 class TimeZoneListItem
;
26 class TimeZoneListView
;
30 class TimeZoneView
: public BGroupView
{
32 TimeZoneView(const char* name
);
33 virtual ~TimeZoneView();
35 virtual void AttachedToWindow();
36 virtual void MessageReceived(BMessage
* message
);
37 bool CheckCanRevert();
40 virtual void DoLayout();
43 void _UpdateDateTime(BMessage
* message
);
45 void _SetSystemTimeZone();
47 void _UpdatePreview();
48 void _UpdateCurrent();
49 BString
_FormatTime(const BTimeZone
& timeZone
);
51 void _ReadRTCSettings();
52 void _WriteRTCSettings();
53 void _UpdateGmtSettings();
54 void _ShowOrHidePreview();
57 void _BuildZoneMenu();
61 TimeZoneListView
* fZoneList
;
65 BRadioButton
* fLocalTime
;
66 BRadioButton
* fGmtTime
;
68 int32 fLastUpdateMinute
;
72 TimeZoneListItem
* fCurrentZoneItem
;
73 TimeZoneListItem
* fOldZoneItem
;
76 BTimeFormat fTimeFormat
;