Package gen :: Package lib :: Module eventtype
[frames] | no frames]

Source Code for Module gen.lib.eventtype

  1  # 
  2  # Gramps - a GTK+/GNOME based genealogy program 
  3  # 
  4  # Copyright (C) 2000-2006  Donald N. Allingham 
  5  # 
  6  # This program is free software; you can redistribute it and/or modify 
  7  # it under the terms of the GNU General Public License as published by 
  8  # the Free Software Foundation; either version 2 of the License, or 
  9  # (at your option) any later version. 
 10  # 
 11  # This program is distributed in the hope that it will be useful, 
 12  # but WITHOUT ANY WARRANTY; without even the implied warranty of 
 13  # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the 
 14  # GNU General Public License for more details. 
 15  # 
 16  # You should have received a copy of the GNU General Public License 
 17  # along with this program; if not, write to the Free Software 
 18  # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA 
 19  # 
 20   
 21  # $Id: eventtype.py 10103 2008-02-24 13:55:55Z acraphae $ 
 22   
 23  """ 
 24  Provide the different event types 
 25  """ 
 26   
 27  #------------------------------------------------------------------------ 
 28  # 
 29  # Python modules 
 30  # 
 31  #------------------------------------------------------------------------ 
 32  from gettext import gettext as _ 
 33  #------------------------------------------------------------------------- 
 34  # 
 35  # GRAMPS modules 
 36  # 
 37  #------------------------------------------------------------------------- 
 38  from gen.lib.grampstype import GrampsType, init_map 
 39   
40 -class EventType(GrampsType):
41 """ 42 Event types. 43 """ 44 UNKNOWN = -1 45 CUSTOM = 0 46 MARRIAGE = 1 47 MARR_SETTL = 2 48 MARR_LIC = 3 49 MARR_CONTR = 4 50 MARR_BANNS = 5 51 ENGAGEMENT = 6 52 DIVORCE = 7 53 DIV_FILING = 8 54 ANNULMENT = 9 55 MARR_ALT = 10 56 ADOPT = 11 57 BIRTH = 12 58 DEATH = 13 59 ADULT_CHRISTEN = 14 60 BAPTISM = 15 61 BAR_MITZVAH = 16 62 BAS_MITZVAH = 17 63 BLESS = 18 64 BURIAL = 19 65 CAUSE_DEATH = 20 66 CENSUS = 21 67 CHRISTEN = 22 68 CONFIRMATION = 23 69 CREMATION = 24 70 DEGREE = 25 71 EDUCATION = 26 72 ELECTED = 27 73 EMIGRATION = 28 74 FIRST_COMMUN = 29 75 IMMIGRATION = 30 76 GRADUATION = 31 77 MED_INFO = 32 78 MILITARY_SERV = 33 79 NATURALIZATION = 34 80 NOB_TITLE = 35 81 NUM_MARRIAGES = 36 82 OCCUPATION = 37 83 ORDINATION = 38 84 PROBATE = 39 85 PROPERTY = 40 86 RELIGION = 41 87 RESIDENCE = 42 88 RETIREMENT = 43 89 WILL = 44 90 91 _CUSTOM = CUSTOM 92 _DEFAULT = BIRTH 93 94 _DATAMAP = [ 95 (UNKNOWN , _("Unknown"), "Unknown"), 96 (CUSTOM , _("Custom"), "Custom"), 97 (ADOPT , _("Adopted"), "Adopted"), 98 (BIRTH , _("Birth"), "Birth"), 99 (DEATH , _("Death"), "Death"), 100 (ADULT_CHRISTEN , _("Adult Christening"), "Adult Christening"), 101 (BAPTISM , _("Baptism"), "Baptism"), 102 (BAR_MITZVAH , _("Bar Mitzvah"), "Bar Mitzvah"), 103 (BAS_MITZVAH , _("Bas Mitzvah"), "Bas Mitzvah"), 104 (BLESS , _("Blessing"), "Blessing"), 105 (BURIAL , _("Burial"), "Burial"), 106 (CAUSE_DEATH , _("Cause Of Death"), "Cause Of Death"), 107 (CENSUS , _("Census"), "Census"), 108 (CHRISTEN , _("Christening"), "Christening"), 109 (CONFIRMATION , _("Confirmation"), "Confirmation"), 110 (CREMATION , _("Cremation"), "Cremation"), 111 (DEGREE , _("Degree"), "Degree"), 112 (EDUCATION , _("Education"), "Education"), 113 (ELECTED , _("Elected"), "Elected"), 114 (EMIGRATION , _("Emigration"), "Emigration"), 115 (FIRST_COMMUN , _("First Communion"), "First Communion"), 116 (IMMIGRATION , _("Immigration"), "Immigration"), 117 (GRADUATION , _("Graduation"), "Graduation"), 118 (MED_INFO , _("Medical Information"), "Medical Information"), 119 (MILITARY_SERV , _("Military Service"), "Military Service"), 120 (NATURALIZATION , _("Naturalization"), "Naturalization"), 121 (NOB_TITLE , _("Nobility Title"), "Nobility Title"), 122 (NUM_MARRIAGES , _("Number of Marriages"), "Number of Marriages"), 123 (OCCUPATION , _("Occupation"), "Occupation"), 124 (ORDINATION , _("Ordination"), "Ordination"), 125 (PROBATE , _("Probate"), "Probate"), 126 (PROPERTY , _("Property"), "Property"), 127 (RELIGION , _("Religion"), "Religion"), 128 (RESIDENCE , _("Residence"), "Residence"), 129 (RETIREMENT , _("Retirement"), "Retirement"), 130 (WILL , _("Will"), "Will"), 131 (MARRIAGE , _("Marriage"), "Marriage"), 132 (MARR_SETTL , _("Marriage Settlement"), "Marriage Settlement"), 133 (MARR_LIC , _("Marriage License"), "Marriage License"), 134 (MARR_CONTR , _("Marriage Contract"), "Marriage Contract"), 135 (MARR_BANNS , _("Marriage Banns"), "Marriage Banns"), 136 (ENGAGEMENT , _("Engagement"), "Engagement"), 137 (DIVORCE , _("Divorce"), "Divorce"), 138 (DIV_FILING , _("Divorce Filing"), "Divorce Filing"), 139 (ANNULMENT , _("Annulment"), "Annulment"), 140 (MARR_ALT , _("Alternate Marriage"), "Alternate Marriage"), 141 ] 142 143 _I2SMAP = init_map(_DATAMAP, 0, 1) 144 _S2IMAP = init_map(_DATAMAP, 1, 0) 145 _I2EMAP = init_map(_DATAMAP, 0, 2) 146 _E2IMAP = init_map(_DATAMAP, 2, 0) 147
148 - def __init__(self, value=None):
149 GrampsType.__init__(self, value)
150