* src/plugins/vaious: upgrade to new report interface
svn: r6838
This commit is contained in:
@@ -44,7 +44,9 @@ import gtk
|
||||
#------------------------------------------------------------------------
|
||||
import BaseDoc
|
||||
from SubstKeywords import SubstKeywords
|
||||
from PluginUtils import Report, ReportOptions, ReportUtils, register_report
|
||||
from PluginUtils import register_report
|
||||
from ReportBase import Report, ReportUtils, ReportOptions, \
|
||||
CATEGORY_DRAW, MODE_GUI, MODE_BKI, MODE_CLI
|
||||
pt2cm = ReportUtils.pt2cm
|
||||
cm2pt = ReportUtils.cm2pt
|
||||
|
||||
@@ -161,7 +163,7 @@ class GenChart:
|
||||
# AncestorChart
|
||||
#
|
||||
#------------------------------------------------------------------------
|
||||
class AncestorChart(Report.Report):
|
||||
class AncestorChart(Report):
|
||||
|
||||
def __init__(self,database,person,options_class):
|
||||
"""
|
||||
@@ -183,7 +185,7 @@ class AncestorChart(Report.Report):
|
||||
compress - Whether to compress chart.
|
||||
title - Title of the report displayed on top.
|
||||
"""
|
||||
Report.Report.__init__(self,database,person,options_class)
|
||||
Report.__init__(self,database,person,options_class)
|
||||
|
||||
(self.max_generations,self.pgbrk) \
|
||||
= options_class.get_report_generations()
|
||||
@@ -417,14 +419,14 @@ class AncestorChart(Report.Report):
|
||||
#
|
||||
#
|
||||
#------------------------------------------------------------------------
|
||||
class AncestorChartOptions(ReportOptions.ReportOptions):
|
||||
class AncestorChartOptions(ReportOptions):
|
||||
|
||||
"""
|
||||
Defines options and provides handling interface.
|
||||
"""
|
||||
|
||||
def __init__(self,name,person_id=None):
|
||||
ReportOptions.ReportOptions.__init__(self,name,person_id)
|
||||
ReportOptions.__init__(self,name,person_id)
|
||||
|
||||
def set_new_options(self):
|
||||
# Options specific for this report
|
||||
@@ -513,10 +515,10 @@ class AncestorChartOptions(ReportOptions.ReportOptions):
|
||||
#------------------------------------------------------------------------
|
||||
register_report(
|
||||
name = 'ancestor_chart2',
|
||||
category = Report.CATEGORY_DRAW,
|
||||
category = CATEGORY_DRAW,
|
||||
report_class = AncestorChart,
|
||||
options_class = AncestorChartOptions,
|
||||
modes = Report.MODE_GUI | Report.MODE_BKI | Report.MODE_CLI,
|
||||
modes = MODE_GUI | MODE_BKI | MODE_CLI,
|
||||
translated_name = _("Ancestor Graph"),
|
||||
status = _("Stable"),
|
||||
author_name = "Donald N. Allingham",
|
||||
|
||||
Reference in New Issue
Block a user