1# 2# Gramps - a GTK+/GNOME based genealogy program 3# 4# Copyright (C) 2017 Nick Hall 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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. 19# 20 21"""class for generating dialogs for graphviz-based reports """ 22 23#------------------------------------------------------------------------------- 24# 25# Gramps modules 26# 27#------------------------------------------------------------------------------- 28from ._graphreportdialog import GraphReportDialog, BaseFormatComboBox 29from gramps.gen.plug.report import CATEGORY_TREE 30import gramps.gen.plug.docgen.treedoc as treedoc 31 32#----------------------------------------------------------------------- 33# 34# TreeReportDialog 35# 36#----------------------------------------------------------------------- 37class TreeReportDialog(GraphReportDialog): 38 39 def make_doc_menu(self): 40 """ 41 Build a menu of document types that are appropriate for 42 this graph report. 43 """ 44 self.format_menu = TreeFormatComboBox() 45 46 def get_category(self): 47 """ 48 Return the report category. 49 """ 50 return CATEGORY_TREE 51 52 def get_options(self): 53 """ 54 Return the graph options. 55 """ 56 return treedoc.TreeOptions() 57 58#------------------------------------------------------------------------------- 59# 60# TreeFormatComboBox 61# 62#------------------------------------------------------------------------------- 63class TreeFormatComboBox(BaseFormatComboBox): 64 FORMATS = treedoc.FORMATS 65