diff options
| author | Carl Hetherington <cth@carlh.net> | 2022-12-01 22:30:58 +0100 |
|---|---|---|
| committer | Carl Hetherington <cth@carlh.net> | 2023-03-08 17:17:15 +0100 |
| commit | f4f5f6486105cc87f3b4f98bdf3bd5be74aa26a0 (patch) | |
| tree | 40e722e1d26bc18ab8df0d0594e1193929050fbf /src/wx/kdm_timing_panel.h | |
| parent | 64b8ca8c4f9064e5142633aa2676b20f0ea0f10d (diff) | |
Move UTC offset for KDMs from the cinema to the point of KDM creation (#2300).v2.17.6
Diffstat (limited to 'src/wx/kdm_timing_panel.h')
| -rw-r--r-- | src/wx/kdm_timing_panel.h | 20 |
1 files changed, 14 insertions, 6 deletions
diff --git a/src/wx/kdm_timing_panel.h b/src/wx/kdm_timing_panel.h index 7221ba722..f847992a7 100644 --- a/src/wx/kdm_timing_panel.h +++ b/src/wx/kdm_timing_panel.h @@ -18,6 +18,9 @@ */ + +#include "wx_util.h" +#include <dcp/utc_offset.h> #include <dcp/warnings.h> LIBDCP_DISABLE_WARNINGS #include <wx/wx.h> @@ -25,18 +28,19 @@ LIBDCP_ENABLE_WARNINGS #include <boost/date_time/posix_time/posix_time.hpp> #include <boost/signals2.hpp> -class wxDatePickerCtrl; + +class Choice; class TimePicker; +class wxDatePickerCtrl; + class KDMTimingPanel : public wxPanel { public: explicit KDMTimingPanel (wxWindow* parent); - /** @return KDM from time in local time */ - boost::posix_time::ptime from () const; - /** @return KDM until time in local time */ - boost::posix_time::ptime until () const; + dcp::LocalTime from() const; + dcp::LocalTime until() const; bool valid () const; @@ -44,11 +48,15 @@ public: private: void changed () const; - static boost::posix_time::ptime posix_time (wxDatePickerCtrl *, TimePicker *); + dcp::UTCOffset utc_offset() const; + + static dcp::LocalTime local_time(wxDatePickerCtrl *, TimePicker *, dcp::UTCOffset offset); wxDatePickerCtrl* _from_date; wxDatePickerCtrl* _until_date; TimePicker* _from_time; TimePicker* _until_time; + Choice* _utc_offset; wxStaticText* _warning; + std::vector<Offset> _offsets; }; |
