Gnumed.timelinelib.time.typeinterface

Package Gnumed :: Package timelinelib :: Package time :: Module typeinterface |
[frames] | no frames]

# Source Code for Module Gnumed.timelinelib.time.typeinterface

      1  # Copyright (C) 2009, 2010, 2011  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 -class TimeType(object):
     20
     21 -    def time_string(self, time):
     22          raise NotImplementedError("time_string not implemented.")
     23
     24 -    def parse_time(self, time_string):
     25          raise NotImplementedError("parse_time not implemented.")
     26
     29
     30 -    def is_date_time_type(self):
     31          raise NotImplementedError("is_date_time_type not implemented.")
     32
     33 -    def format_period(self, time_period):
     34          raise NotImplementedError("format_period not implemented.")
     35
     36 -    def format_delta(self, time_period):
     37          raise NotImplementedError("format_delta not implemented.")
     38
     39 -    def get_min_time(self):
     40          raise NotImplementedError("return the min time for this time type.")
     41
     42 -    def get_max_time(self):
     43          raise NotImplementedError("return the max time for this time type.")
     44
     45 -    def choose_strip(self, metrics, config):
     46          raise NotImplementedError("choose_strip not implemented.")
     47
     48 -    def mult_timedelta(self, delta, num):
     49          raise NotImplementedError("mult_timedelta not implemented.")
     50
     51 -    def get_default_time_period(self):
     52          raise NotImplementedError("get_default_time_period not implemented.")
     53
     54 -    def now(self):
     55          raise NotImplementedError("now not implemented.")
     56
     57 -    def get_time_at_x(self, time_period, x_percent_of_width):
     58          """Return the time at pixel `x`."""
     59          raise NotImplementedError("get_time_for_x not implemented.")
     60
     61 -    def div_timedeltas(self, delta1, delta2):
     62          raise NotImplementedError("div_timedeltas not implemented.")
     63
     64 -    def get_max_zoom_delta(self):
     65          raise NotImplementedError("get_max_zoom_delta not implemented.")
     66
     67 -    def get_min_zoom_delta(self):
     68          raise NotImplementedError("get_max_zoom_delta not implemented.")
     69
     70 -    def get_zero_delta(self):
     71          raise NotImplementedError("get_zero_delta not implemented.")
     72
     73 -    def time_period_has_nonzero_time(self, time_period):
     74          raise NotImplementedError("time_period_has_nonzero_time not implemented.")
     75
     76 -    def get_name(self):
     77          raise NotImplementedError("get_name not implemented.")
     78
     79 -    def get_duplicate_functions(self):
     80          raise NotImplementedError("get_duplicate_functions not implemented.")
     81
     82 -    def half_delta(self, delta):
     83          raise NotImplementedError("half_delta not implemented.")
     84
     85 -    def margin_delta(self, delta):
     86          raise NotImplementedError("margin_delta not implemented.")
     87
     88 -    def event_date_string(self, time):
     89          raise NotImplementedError("eventtimes_equals not implemented.")
     90
     91 -    def event_time_string(self, time):
     92          raise NotImplementedError("eventtimes_equals not implemented.")
     93
     94 -    def eventtimes_equals(self, time1, time2):
     95          raise NotImplementedError("eventtimes_equals not implemented.")
     96
     97 -    def adjust_for_bc_years(self, time):
     98          raise NotImplementedError("adjust_for_zero_year not implemented.")
     99