Package Gnumed :: Package timelinelib :: Package wxgui :: Package dialogs :: Package importics :: Module view |
[frames] | no frames]

# Source Code for Module Gnumed.timelinelib.wxgui.dialogs.importics.view

     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  import wx
    20
    21  from timelinelib.wxgui.framework import Dialog
    22  from timelinelib.wxgui.dialogs.importics.controller import ImportIcsDialogController
    23
    24
    25 -class ImportIcsDialog(Dialog):
    26      """
    27      <BoxSizerVertical>
    28          <StaticText
    29              name="VeventLocation"
    30              label="VEVENT.LOCATION"
    31              border="LEFT|TOP"
    32          />
    33          <CheckBox
    34              name="import_location"
    35              label="$(import_location_label)"
    36              border="ALL"
    37          />
    38          <StaticText
    39              name="ValarmTrigger"
    40              label="VALARM.TRIGGER"
    41              border="LEFT|TOP"
    42          />
    43          <CheckBox
    44              name ="trigger_as_start_time"
    45              label="$(trigger_as_start_time_label)"
    46              border="ALL"
    47          />
    48          <CheckBox
    49              name="trigger_as_alarm"
    50              label="$(trigger_as_alarm)"
    51              border="LEFT|BOTTOM"
    52          />
    53          <DialogButtonsCloseSizer
    54              border="ALL"
    55          />
    56      </BoxSizerVertical>
    57      """
    58
    59 -    def __init__(self, parent=None):
    60          Dialog.__init__(self, ImportIcsDialogController, parent, {
    61              "import_location_label": _("Import in event description"),
    62              "trigger_as_start_time_label": _("Use as start date of event"),
    63              "trigger_as_alarm": _("Use as event alarm time"),
    64          }, title=_("Options for ICS import"))
    65          self.controller.on_init()
    66          self._make_static_texts_bold()
    67
    68 -    def get_import_location(self):
    69          return self.import_location.GetValue()
    70
    71 -    def get_trigger_as_start_time(self):
    72          return self.trigger_as_start_time.GetValue()
    73
    74 -    def get_trigger_as_alarm(self):
    75          return self.trigger_as_alarm.GetValue()
    76
    77 -    def _make_static_texts_bold(self):
    78          f = self.VeventLocation.GetFont()
    79          f.SetWeight(wx.FONTWEIGHT_BOLD)
    80          self.VeventLocation.SetFont(f)
    81          self.ValarmTrigger.SetFont(f)
    82