Home | Trees | Indices | Help |
|
---|
|
1 # -*- coding: UTF-8 -*- 2 # 3 # generated by wxGlade 4 # 5 6 import wx 7 8 # begin wxGlade: dependencies 9 import gettext 10 # end wxGlade 11 12 # begin wxGlade: extracode 13 from Gnumed.wxpython.gmPhraseWheel import cPhraseWheel 14 from Gnumed.wxpython.gmDocumentWidgets import cDocumentTypeSelectionPhraseWheel 15 # end wxGlade 16 17114 116 print("Event handler '_on_export_button_pressed' not implemented!") 117 event.Skip() 118 119 # end of class wxgFormTemplateEditAreaPnl 12020 # begin wxGlade: wxgFormTemplateEditAreaPnl.__init__ 21 kwds["style"] = kwds.get("style", 0) | wx.BORDER_NONE | wx.TAB_TRAVERSAL 22 wx.ScrolledWindow.__init__(self, *args, **kwds) 23 self._PRW_name_long = cPhraseWheel(self, wx.ID_ANY, "") 24 self._PRW_name_short = cPhraseWheel(self, wx.ID_ANY, "") 25 self._TCTRL_external_version = wx.TextCtrl(self, wx.ID_ANY, "") 26 self._CHBOX_active = wx.CheckBox(self, wx.ID_ANY, _("active")) 27 self._CHBOX_editable = wx.CheckBox(self, wx.ID_ANY, _("editable")) 28 self._PRW_template_type = cPhraseWheel(self, wx.ID_ANY, "") 29 self._PRW_instance_type = cDocumentTypeSelectionPhraseWheel(self, wx.ID_ANY, "") 30 self._CH_engine = wx.Choice(self, wx.ID_ANY, choices=[_("OpenOffice"), _("LaTeX"), _("Image editor"), _("Gnuplot"), _("PDF form editor"), _("AbiWord"), _("Xe(La)TeX"), _("Text (generic processing)")]) 31 self._TCTRL_filename = wx.TextCtrl(self, wx.ID_ANY, "") 32 self._BTN_load = wx.Button(self, wx.ID_ANY, _("&Load"), style=wx.BU_EXACTFIT) 33 self._BTN_export = wx.Button(self, wx.ID_ANY, _("Export"), style=wx.BU_EXACTFIT) 34 self._LBL_status = wx.StaticText(self, wx.ID_ANY, "") 35 36 self.__set_properties() 37 self.__do_layout() 38 39 self.Bind(wx.EVT_BUTTON, self._on_load_button_pressed, self._BTN_load) 40 self.Bind(wx.EVT_BUTTON, self._on_export_button_pressed, self._BTN_export)41 # end wxGlade 4244 # begin wxGlade: wxgFormTemplateEditAreaPnl.__set_properties 45 self.SetScrollRate(10, 10) 46 self._PRW_name_long.SetToolTip(_("A long, descriptive name for this form template.")) 47 self._PRW_name_short.SetToolTip(_("A short, catchy name for this template.")) 48 self._TCTRL_external_version.SetToolTip(_("External version information such as the exact version/release/revision of a paper form onto which to print data with the help of this template.")) 49 self._CHBOX_active.SetToolTip(_("Mark this checkbox if you want this template to be active in GNUmed.")) 50 self._CHBOX_active.SetValue(1) 51 self._CHBOX_editable.SetToolTip(_("Check here to be offered manual, generic, last-minute editing of the form after placeholder substitution but before final output generation (usually PDF) with those form engines to which it applies.")) 52 self._CHBOX_editable.SetValue(1) 53 self._PRW_template_type.SetToolTip(_("The type of this template. The intended use case for this template.")) 54 self._PRW_instance_type.SetToolTip(_("The document type under which to store forms generated from this template.")) 55 self._CH_engine.SetToolTip(_("The form engine this template must be processed with.")) 56 self._CH_engine.SetSelection(0) 57 self._TCTRL_filename.SetToolTip(_("Examplary filename. Mainly used for deriving a suitable file extension since that matters to some form engines. Most of the time this should already be set correctly when the template data is imported initially.")) 58 self._TCTRL_filename.Enable(False) 59 self._BTN_load.SetToolTip(_("Load template data from a file.")) 60 self._BTN_export.SetToolTip(_("Export the form template into a file.")) 61 self._BTN_export.Enable(False)62 # end wxGlade 6365 # begin wxGlade: wxgFormTemplateEditAreaPnl.__do_layout 66 __gzsr_main = wx.FlexGridSizer(9, 2, 2, 5) 67 __szr_template_buttons = wx.BoxSizer(wx.HORIZONTAL) 68 __szr_options = wx.BoxSizer(wx.HORIZONTAL) 69 __szr_version = wx.BoxSizer(wx.HORIZONTAL) 70 __lbl_name_long = wx.StaticText(self, wx.ID_ANY, _("Name")) 71 __gzsr_main.Add(__lbl_name_long, 0, wx.ALIGN_CENTER_VERTICAL, 0) 72 __gzsr_main.Add(self._PRW_name_long, 1, wx.ALIGN_CENTER_VERTICAL | wx.EXPAND, 0) 73 __lbl_name_short = wx.StaticText(self, wx.ID_ANY, _("Alias")) 74 __gzsr_main.Add(__lbl_name_short, 0, wx.ALIGN_CENTER_VERTICAL, 0) 75 __gzsr_main.Add(self._PRW_name_short, 2, wx.ALIGN_CENTER_VERTICAL | wx.EXPAND, 5) 76 __lbl_external_version = wx.StaticText(self, wx.ID_ANY, _("Version")) 77 __gzsr_main.Add(__lbl_external_version, 0, wx.ALIGN_CENTER_VERTICAL, 3) 78 __szr_version.Add(self._TCTRL_external_version, 0, wx.ALIGN_CENTER_VERTICAL | wx.EXPAND | wx.RIGHT, 10) 79 __szr_version.Add(self._CHBOX_active, 0, wx.ALIGN_CENTER_VERTICAL | wx.EXPAND | wx.RIGHT, 10) 80 __szr_version.Add(self._CHBOX_editable, 0, wx.ALIGN_CENTER_VERTICAL | wx.EXPAND, 0) 81 __szr_version.Add((20, 20), 1, wx.ALIGN_CENTER_VERTICAL | wx.EXPAND, 0) 82 __gzsr_main.Add(__szr_version, 1, wx.EXPAND, 0) 83 __lbl_template_type = wx.StaticText(self, wx.ID_ANY, _("Template type")) 84 __gzsr_main.Add(__lbl_template_type, 0, wx.ALIGN_CENTER_VERTICAL, 0) 85 __gzsr_main.Add(self._PRW_template_type, 1, wx.ALIGN_CENTER_VERTICAL | wx.EXPAND, 0) 86 __lbl_instance_type = wx.StaticText(self, wx.ID_ANY, _("Document type")) 87 __gzsr_main.Add(__lbl_instance_type, 0, wx.ALIGN_CENTER_VERTICAL, 0) 88 __gzsr_main.Add(self._PRW_instance_type, 1, wx.ALIGN_CENTER_VERTICAL | wx.EXPAND, 0) 89 __lbl_options = wx.StaticText(self, wx.ID_ANY, _("Processing")) 90 __gzsr_main.Add(__lbl_options, 0, wx.ALIGN_CENTER_VERTICAL, 0) 91 __szr_options.Add(self._CH_engine, 0, wx.ALIGN_CENTER_VERTICAL | wx.EXPAND | wx.RIGHT, 5) 92 __gzsr_main.Add(__szr_options, 1, wx.BOTTOM | wx.EXPAND | wx.TOP, 3) 93 __lbl_filename = wx.StaticText(self, wx.ID_ANY, _("Template")) 94 __gzsr_main.Add(__lbl_filename, 0, wx.ALIGN_CENTER_VERTICAL, 0) 95 __gzsr_main.Add(self._TCTRL_filename, 1, wx.ALIGN_CENTER_VERTICAL | wx.EXPAND, 0) 96 __gzsr_main.Add((20, 20), 0, wx.ALIGN_CENTER_VERTICAL | wx.EXPAND, 0) 97 __szr_template_buttons.Add((20, 20), 1, wx.ALIGN_CENTER_VERTICAL | wx.EXPAND, 0) 98 __szr_template_buttons.Add(self._BTN_load, 0, wx.ALIGN_CENTER_VERTICAL | wx.EXPAND | wx.RIGHT, 3) 99 __szr_template_buttons.Add(self._BTN_export, 0, wx.ALIGN_CENTER_VERTICAL | wx.EXPAND | wx.LEFT, 3) 100 __szr_template_buttons.Add((20, 20), 1, wx.ALIGN_CENTER_VERTICAL | wx.EXPAND, 0) 101 __gzsr_main.Add(__szr_template_buttons, 1, wx.EXPAND, 0) 102 __lbl_status = wx.StaticText(self, wx.ID_ANY, _("Status")) 103 __gzsr_main.Add(__lbl_status, 0, wx.ALIGN_CENTER_VERTICAL, 0) 104 __gzsr_main.Add(self._LBL_status, 0, wx.ALIGN_CENTER_VERTICAL | wx.EXPAND, 0) 105 self.SetSizer(__gzsr_main) 106 __gzsr_main.Fit(self) 107 __gzsr_main.AddGrowableCol(1) 108 self.Layout()109 # end wxGlade 110 112 print("Event handler '_on_load_button_pressed' not implemented!") 113 event.Skip()
Home | Trees | Indices | Help |
|
---|
Generated by Epydoc 3.0.1 on Sun Nov 10 02:55:34 2019 | http://epydoc.sourceforge.net |