Home | Libraries | People | FAQ | More |
boost::ui::time_picker — Time picker widget.
// In header: <boost/ui/datetime.hpp> class time_picker : public boost::ui::widget { public: // construct/copy/destruct explicit time_picker(widget &); time_picker(); // public member functions std::time_t get_time_t() const; time_picker & set_time_t(std::time_t); std::tm get_tm() const; time_picker & set_tm(const std::tm &); boost::posix_time::time_duration posix_time_duration() const; time_picker & posix_time_duration(const boost::posix_time::time_duration &); template<typename Rep, typename Period> boost::chrono::duration< Rep, Period > boost_chrono_duration() const; template<typename Rep, typename Period> time_picker & chrono_duration(const boost::chrono::duration< Rep, Period > &); template<typename Rep, typename Period> std::chrono::duration< Rep, Period > chrono_duration() const; template<typename Rep, typename Period> time_picker & chrono_duration(const std::chrono::duration< Rep, Period > &); template<typename T> void get_time(T, T, T); time_picker & set_time(int, int, int); template<typename F, class ... Args> time_picker & on_change(F &&, Args &&...); // private member functions void get_time_raw(int *, int *, int *) const; int get_seconds() const; void set_seconds(boost::intmax_t); void on_change_raw(const boost::function< void()> &); detail_impl * get_impl(); const detail_impl * get_impl() const; };
Works with time in range [0 hours, 24 hours)
time_picker
public
construct/copy/destructexplicit time_picker(widget & parent);Creates widget.
time_picker();
time_picker
public member functionsstd::time_t get_time_t() const;Returns count of seconds since midnight in std::time_t format.
Throws: |
std::out_of_range If selected time is not compatible with std::time_t format |
time_picker & set_time_t(std::time_t t);Sets time in std::time_t format.
Throws: |
std::out_of_range If requested time is invalid |
std::tm get_tm() const;Returns local time in std::tm format at epoch start day (1900-01-01)
Throws: |
std::out_of_range If selected time is not compatible with std::tm format |
time_picker & set_tm(const std::tm & t);Sets local time in std::tm format.
Throws: |
std::out_of_range If requested time is invalid |
boost::posix_time::time_duration posix_time_duration() const;Returns boost::posix_time::time_duration.
See Also:
BOOST_UI_USE_DATE_TIME
Throws: |
std::out_of_range If time is out of range |
time_picker & posix_time_duration(const boost::posix_time::time_duration & d);Sets boost::posix_time::time_duration.
See Also:
BOOST_UI_USE_DATE_TIME
Throws: |
std::out_of_range If requested time is invalid |
template<typename Rep, typename Period> boost::chrono::duration< Rep, Period > boost_chrono_duration() const;Returns boost::chrono::duration.
See Also:
BOOST_UI_USE_CHRONO
Throws: |
std::out_of_range If time is out of range |
template<typename Rep, typename Period> time_picker & chrono_duration(const boost::chrono::duration< Rep, Period > & d);Sets boost::chrono::duration.
See Also:
BOOST_UI_USE_CHRONO
Throws: |
std::out_of_range If requested time is invalid |
template<typename Rep, typename Period> std::chrono::duration< Rep, Period > chrono_duration() const;Returns std::chrono::duration.
Throws: |
std::out_of_range If time is out of range |
template<typename Rep, typename Period> time_picker & chrono_duration(const std::chrono::duration< Rep, Period > & d);Sets std::chrono::duration.
Throws: |
std::out_of_range If requested time is invalid |
template<typename T> void get_time(T hours_ptr, T minutes_ptr, T seconds_ptr);Returns time.
time_picker & set_time(int hours, int minutes, int seconds);Sets time.
Throws: |
std::out_of_range If time is out of range |
template<typename F, class ... Args> time_picker & on_change(F && f, Args &&... args);Connects time change handler.