tcp: Fix 64 bit build with debugging features enabled.
[haiku.git] / src / preferences / time / ZoneView.h
blob6aa627942a8fe469e73b5353f0c5a0ddb4672b9b
1 /*
2 * Copyright 2004-2012, Haiku, Inc. All Rights Reserved.
3 * Distributed under the terms of the MIT License.
5 * Authors:
6 * Mike Berg <mike@berg-net.us>
7 * Julun <host.haiku@gmx.de>
8 * Hamish Morrison <hamish@lavabit.com>
9 */
10 #ifndef ZONE_VIEW_H
11 #define ZONE_VIEW_H
14 #include <LayoutBuilder.h>
15 #include <TimeFormat.h>
16 #include <TimeZone.h>
19 class BButton;
20 class BMessage;
21 class BOutlineListView;
22 class BPopUpMenu;
23 class BRadioButton;
24 class BTimeZone;
25 class TimeZoneListItem;
26 class TimeZoneListView;
27 class TTZDisplay;
30 class TimeZoneView : public BGroupView {
31 public:
32 TimeZoneView(const char* name);
33 virtual ~TimeZoneView();
35 virtual void AttachedToWindow();
36 virtual void MessageReceived(BMessage* message);
37 bool CheckCanRevert();
39 protected:
40 virtual void DoLayout();
42 private:
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();
56 void _InitView();
57 void _BuildZoneMenu();
59 void _Revert();
61 TimeZoneListView* fZoneList;
62 BButton* fSetZone;
63 TTZDisplay* fCurrent;
64 TTZDisplay* fPreview;
65 BRadioButton* fLocalTime;
66 BRadioButton* fGmtTime;
68 int32 fLastUpdateMinute;
69 bool fUseGmtTime;
70 bool fOldUseGmtTime;
72 TimeZoneListItem* fCurrentZoneItem;
73 TimeZoneListItem* fOldZoneItem;
74 bool fInitialized;
76 BTimeFormat fTimeFormat;
80 #endif // ZONE_VIEW_H