diff options
Diffstat (limited to 'src/wx/kdm_timing_panel.h')
| -rw-r--r-- | src/wx/kdm_timing_panel.h | 27 |
1 files changed, 21 insertions, 6 deletions
diff --git a/src/wx/kdm_timing_panel.h b/src/wx/kdm_timing_panel.h index 7221ba722..a6199534a 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,30 +28,42 @@ 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; + /** Give a UTC offset from a cinema that the user just selected. If the user + * never changed the UTC offset in the panel, the suggested UTC will be set. + */ + void suggest_utc_offset(dcp::UTCOffset offset); + boost::signals2::signal<void ()> TimingChanged; private: void changed () const; - static boost::posix_time::ptime posix_time (wxDatePickerCtrl *, TimePicker *); + void utc_offset_changed(); + 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; + bool _utc_offset_changed_once = false; wxStaticText* _warning; + std::vector<Offset> _offsets; }; |
