* src/ReportOptions.py (ReportOptions): Add base Options class.

* src/plugins/BookReport.py (BookOptions): Derive from base class.
* src/plugins/TimeLine.py (TimeLineOptions): Derive from base class.
* src/plugins/FtmStyleDescendants.py (FtmDescendantOptions):
Derive from base class.


svn: r3830
This commit is contained in:
Alex Roitman
2004-12-23 00:57:56 +00:00
parent ddad91aac4
commit 0ee41fb763
5 changed files with 167 additions and 17 deletions

View File

@@ -541,13 +541,16 @@ class BookListDisplay:
#
#
#------------------------------------------------------------------------
class BookOptions:
class BookOptions(ReportOptions.ReportOptions):
"""
Defines options and provides handling interface.
"""
def __init__(self,name,person_id=None):
ReportOptions.ReportOptions.__init__(self,name,person_id)
def set_new_options(self):
# Options specific for this report
self.options_dict = {
'bookname' : '',
@@ -558,9 +561,6 @@ class BookOptions:
False),
}
self.handler = ReportOptions.OptionHandler(name,
self.options_dict,person_id)
#-------------------------------------------------------------------------
#
# Book creation dialog

View File

@@ -1489,27 +1489,22 @@ class FtmDescendantReport(Report.Report):
#
#
#------------------------------------------------------------------------
class FtmDescendantOptions:
class FtmDescendantOptions(ReportOptions.ReportOptions):
"""
Defines options and provides handling interface.
"""
def __init__(self,name,person_id=None):
# Options specific for this report
self.options_dict = {}
self.options_help = {}
ReportOptions.ReportOptions.__init__(self,name,person_id)
def enable_options(self):
# Semi-common options that should be enabled for this report
self.enable_dict = {
'max_gen' : 10,
'page_breaks' : 0,
}
self.options_dict.update(self.enable_dict)
self.handler = ReportOptions.OptionHandler(name,
self.options_dict,person_id)
def make_default_style(self,default_style):
"""Make the default output style for the FTM Style Descendant report."""
font = BaseDoc.FontStyle()

View File

@@ -366,13 +366,16 @@ class TimeLine:
#
#
#------------------------------------------------------------------------
class TimeLineOptions:
class TimeLineOptions(ReportOptions.ReportOptions):
"""
Defines options and provides handling interface.
"""
def __init__(self,name,person_id=None):
ReportOptions.ReportOptions.__init__(self,name,person_id)
def set_new_options(self):
# Options specific for this report
self.options_dict = {
'sortby' : 0,
@@ -387,15 +390,12 @@ class TimeLineOptions:
"Whatever String You Wish"),
}
def enable_options(self):
# Semi-common options that should be enabled for this report
self.enable_dict = {
'filter' : 0,
}
self.options_dict.update(self.enable_dict)
self.handler = ReportOptions.OptionHandler(name,
self.options_dict,person_id)
def make_default_style(self,default_style):
"""Make the default output style for the Timeline report."""
f = BaseDoc.FontStyle()