2006-03-09 19:10:55 +00:00
|
|
|
#
|
|
|
|
# Gramps - a GTK+/GNOME based genealogy program
|
|
|
|
#
|
|
|
|
# Copyright (C) 2001-2006 Donald N. Allingham
|
2008-01-05 20:42:05 +00:00
|
|
|
# Copyright (C) 2008 Brian Matherly
|
2006-03-09 19:10:55 +00:00
|
|
|
#
|
|
|
|
# This program is free software; you can redistribute it and/or modify
|
|
|
|
# it under the terms of the GNU General Public License as published by
|
|
|
|
# the Free Software Foundation; either version 2 of the License, or
|
|
|
|
# (at your option) any later version.
|
|
|
|
#
|
|
|
|
# This program is distributed in the hope that it will be useful,
|
|
|
|
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
# GNU General Public License for more details.
|
|
|
|
#
|
|
|
|
# You should have received a copy of the GNU General Public License
|
|
|
|
# along with this program; if not, write to the Free Software
|
|
|
|
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
|
|
|
#
|
|
|
|
|
|
|
|
# $Id: Report.py 6044 2006-03-03 00:10:52Z rshura $
|
|
|
|
|
2007-08-29 19:37:58 +00:00
|
|
|
#The following is bad, we import lists here, and obtain pointers to them
|
|
|
|
#If in _PluginMgr the list changes, that is ok, if however the list is
|
|
|
|
#assigned to another pointer eg export_list = then in this module we
|
|
|
|
#still retain the old pointer! ==> all actions may not change the pointer
|
|
|
|
#Better would be to do: import _PluginMgr as PluginMgr and then access
|
|
|
|
# the list as PluginUtils.PluginMgr, or use a function that returns the pointer
|
|
|
|
# of the list.
|
2007-11-29 15:02:40 +00:00
|
|
|
from _MenuOptions import MenuOptions, \
|
2007-12-23 07:52:01 +00:00
|
|
|
NumberOption, FloatOption, BooleanOption, TextOption, \
|
2008-01-05 20:42:05 +00:00
|
|
|
EnumeratedListOption, PersonFilterOption, StringOption, ColourButtonOption, \
|
2008-01-02 08:43:19 +00:00
|
|
|
PersonOption, PersonListOption, SurnameColourOption
|
2006-03-11 01:12:06 +00:00
|
|
|
from _PluginMgr import \
|
|
|
|
register_export, register_import, \
|
|
|
|
register_tool, register_report, \
|
|
|
|
register_relcalc, relationship_class, \
|
|
|
|
textdoc_list, drawdoc_list, bookdoc_list, \
|
|
|
|
bkitems_list, cl_list, cli_tool_list, \
|
2006-03-11 01:18:37 +00:00
|
|
|
load_plugins, import_list, export_list,\
|
2007-08-29 19:37:58 +00:00
|
|
|
report_list, quick_report_list, tool_list, \
|
|
|
|
register_text_doc, register_draw_doc, register_book_doc,\
|
|
|
|
register_quick_report
|
2006-03-11 01:12:06 +00:00
|
|
|
|
2006-03-09 20:21:32 +00:00
|
|
|
import _Tool as Tool
|
2006-03-11 01:12:06 +00:00
|
|
|
import _Plugins as Plugins
|
2007-11-29 06:32:59 +00:00
|
|
|
import _PluginWindows as PluginWindows
|
2007-11-29 15:02:40 +00:00
|
|
|
|
|
|
|
# This needs to go above Tool and MenuOption as it needs both
|
|
|
|
class MenuToolOptions(MenuOptions,Tool.ToolOptions):
|
|
|
|
"""
|
|
|
|
The MenuToolOptions class implementes the ToolOptions
|
|
|
|
functionality in a generic way so that the user does not need to
|
|
|
|
be concerned with the graphical representation of the options.
|
|
|
|
|
|
|
|
The user should inherit the MenuToolOptions class and override the
|
|
|
|
add_menu_options function. The user can add options to the menu
|
|
|
|
and the MenuToolOptions class will worry about setting up the GUI.
|
|
|
|
"""
|
|
|
|
def __init__(self,name,person_id=None):
|
|
|
|
Tool.ToolOptions.__init__(self,name, person_id)
|
2007-12-30 05:41:16 +00:00
|
|
|
MenuOptions.__init__(self,None)
|
2007-12-13 05:31:13 +00:00
|
|
|
|
2007-11-29 15:02:40 +00:00
|
|
|
|