Home | Trees | Indices | Help |
|
---|
|
1 # Copyright (C) 2009, 2010, 2011, 2012, 2013, 2014, 2015, 2016, 2017, 2018 Rickard Lindberg, Roger Lindberg 2 # 3 # This file is part of Timeline. 4 # 5 # Timeline is free software: you can redistribute it and/or modify 6 # it under the terms of the GNU General Public License as published by 7 # the Free Software Foundation, either version 3 of the License, or 8 # (at your option) any later version. 9 # 10 # Timeline is distributed in the hope that it will be useful, 11 # but WITHOUT ANY WARRANTY; without even the implied warranty of 12 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 # GNU General Public License for more details. 14 # 15 # You should have received a copy of the GNU General Public License 16 # along with Timeline. If not, see <http://www.gnu.org/licenses/>. 17 18 19 from timelinelib.calendar.num.timetype import NumTimeType 20 from timelinelib.canvas.data import TimePeriod 21 from timelinelib.wxgui.framework import Controller 22 from timelinelib.wxgui.framework import Panel 23 2426 27 """ 28 <BoxSizerVertical> 29 <BoxSizerHorizontal> 30 <TimePicker 31 name="start_time" 32 time_type="$(time_type)" 33 config="$(config)" 34 /> 35 <Spacer /> 36 <StaticText 37 label="$(to_label)" 38 name="to_label" 39 align="ALIGN_CENTER_VERTICAL" 40 /> 41 <Spacer /> 42 <TimePicker 43 name="end_time" 44 time_type="$(time_type)" 45 config="$(config)" 46 /> 47 </BoxSizerHorizontal> 48 <Spacer /> 49 <BoxSizerHorizontal> 50 <CheckBox 51 name="period_checkbox" 52 event_EVT_CHECKBOX="on_period_checkbox_changed" 53 label="$(period_checkbox_text)" /> 54 </BoxSizerHorizontal> 55 </BoxSizerVertical> 56 """ 57101 10259 Panel.__init__(self, NumPeriodPickerController, parent, { 60 "time_type": NumTimeType(), 61 "config": config, 62 "to_label": _("to"), 63 "period_checkbox_text": _("Period"), 64 })65 68 71 74 77 80 8385 return self.period_checkbox.GetValue()8688 self.period_checkbox.SetValue(show) 89 self.to_label.Show(show) 90 self.end_time.Show(show) 91 self.Layout()92 95 98104124106 return TimePeriod(self._get_start(), self._get_end())107109 self.view.SetStartValue(time_period.get_start_time()) 110 self.view.SetEndValue(time_period.get_end_time()) 111 self.view.SetShowPeriod(time_period.is_period())112 115 118120 if self.view.GetShowPeriod(): 121 return self.view.GetEndValue() 122 else: 123 return self._get_start()
Home | Trees | Indices | Help |
|
---|
Generated by Epydoc 3.0.1 on Thu Jul 23 01:55:31 2020 | http://epydoc.sourceforge.net |