Package Gnumed :: Package timelinelib :: Package drawing :: Module interface :: Class Strip
[frames] | no frames]

Class Strip

source code

object --+
         |
        Strip

An interface for strips.

The different strips are implemented in subclasses below.

The timeline is divided in major and minor strips. The minor strip might for example be days, and the major strip months. Major strips are divided with a solid line and minor strips with dotted lines. Typically maximum three major strips should be shown and the rest will be minor strips.

Instance Methods
 
label(self, time, major=False)
Return the label for this strip at the given time when used as major or minor strip.
source code
 
start(self, time)
Return the start time for this strip and the given time.
source code
 
increment(self, time)
Increment the given time so that it points to the start of the next strip.
source code
 
get_font(self, time_period)
Return the preferred font for this strip
source code

Inherited from object: __delattr__, __format__, __getattribute__, __hash__, __init__, __new__, __reduce__, __reduce_ex__, __repr__, __setattr__, __sizeof__, __str__, __subclasshook__

Properties

Inherited from object: __class__

Method Details

start(self, time)

source code 

Return the start time for this strip and the given time.

For example, if the time is 2008-08-31 and the strip is month, the start would be 2008-08-01.