Package Gnumed :: Package wxGladeWidgets :: Module wxgFormTemplateEditAreaPnl |
[frames] | no frames]

# Source Code for Module Gnumed.wxGladeWidgets.wxgFormTemplateEditAreaPnl

      1  #!/usr/bin/env python
      2  # -*- coding: utf-8 -*-
      3  # generated by wxGlade 0.5 on Mon Aug 20 14:02:38 2007 from /home/ncq/Projekte/gm-cvs/branches/HEAD/gnumed/gnumed/client/wxg/wxgFormTemplateEditAreaPnl.wxg
      4
      5  import wx
      6
      7 -class wxgFormTemplateEditAreaPnl(wx.ScrolledWindow):
      8 -    def __init__(self, *args, **kwds):
      9
     10          from Gnumed.wxpython import gmPhraseWheel, gmDocumentWidgets
     11
     12          # begin wxGlade: wxgFormTemplateEditAreaPnl.__init__
     13          kwds["style"] = wx.NO_BORDER | wx.TAB_TRAVERSAL
     14          wx.ScrolledWindow.__init__(self, *args, **kwds)
     15          self._PRW_name_long = gmPhraseWheel.cPhraseWheel(self, -1, "", style=wx.NO_BORDER)
     16          self._PRW_name_short = gmPhraseWheel.cPhraseWheel(self, -1, "", style=wx.NO_BORDER)
     17          self._TCTRL_external_version = wx.TextCtrl(self, -1, "", style=wx.NO_BORDER)
     18          self._PRW_template_type = gmPhraseWheel.cPhraseWheel(self, -1, "", style=wx.NO_BORDER)
     19          self._PRW_instance_type = gmDocumentWidgets.cDocumentTypeSelectionPhraseWheel(self, -1, "", style=wx.NO_BORDER)
     20          self._TCTRL_filename = wx.TextCtrl(self, -1, "")
     21          self._BTN_load = wx.Button(self, -1, _("&Template"), style=wx.BU_EXACTFIT)
     22          self._BTN_export = wx.Button(self, -1, _("Export"), style=wx.BU_EXACTFIT)
     23          self._CH_engine = wx.Choice(self, -1, choices=[_("OpenOffice"), _("LaTeX"), _("Image editor"), _("Gnuplot"), _("PDF form editor"), _("AbiWord")])
     24          self._CHBOX_active = wx.CheckBox(self, -1, _("active"))
     25          self._TCTRL_date_modified = wx.TextCtrl(self, -1, "", style=wx.NO_BORDER)
     26          self._TCTRL_modified_by = wx.TextCtrl(self, -1, "", style=wx.NO_BORDER)
     27
     28          self.__set_properties()
     29          self.__do_layout()
     30
     31          self.Bind(wx.EVT_BUTTON, self._on_load_button_pressed, self._BTN_load)
     32          self.Bind(wx.EVT_BUTTON, self._on_export_button_pressed, self._BTN_export)
     33          # end wxGlade
     34
     35 -    def __set_properties(self):
     36          # begin wxGlade: wxgFormTemplateEditAreaPnl.__set_properties
     37          self.SetScrollRate(10, 10)
     38          self._PRW_name_long.SetToolTipString(_("A long, descriptive name for this form template."))
     39          self._PRW_name_short.SetToolTipString(_("A short, catchy name for this template."))
     40          self._TCTRL_external_version.SetToolTipString(_("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."))
     41          self._PRW_template_type.SetToolTipString(_("The type of this template. The intended use case for this template."))
     42          self._PRW_instance_type.SetToolTipString(_("The document type under which to store forms generated from this template."))
     43          self._TCTRL_filename.SetToolTipString(_("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."))
     44          self._TCTRL_filename.Enable(False)
     45          self._BTN_load.SetToolTipString(_("Load template data from a file."))
     46          self._BTN_export.SetToolTipString(_("Export the form template into a file."))
     47          self._BTN_export.Enable(False)
     48          self._CH_engine.SetToolTipString(_("The form engine this template must be processed with."))
     49          self._CH_engine.SetSelection(0)
     50          self._CHBOX_active.SetToolTipString(_("Mark this checkbox if you want this template to be active in GNUmed."))
     51          self._CHBOX_active.SetValue(1)
     52          self._TCTRL_date_modified.Enable(False)
     53          self._TCTRL_modified_by.Enable(False)
     54          # end wxGlade
     55
     56 -    def __do_layout(self):
     57          # begin wxGlade: wxgFormTemplateEditAreaPnl.__do_layout
     58          __gzsr_main = wx.FlexGridSizer(7, 2, 2, 5)
     59          __szr_status = wx.BoxSizer(wx.HORIZONTAL)
     60          __szr_options = wx.BoxSizer(wx.HORIZONTAL)
     61          __szr_filename = wx.BoxSizer(wx.HORIZONTAL)
     62          __szr_line2 = wx.BoxSizer(wx.HORIZONTAL)
     63          __lbl_name_long = wx.StaticText(self, -1, _("Name"))
     64          __gzsr_main.Add(__lbl_name_long, 0, wx.ALIGN_CENTER_VERTICAL, 0)
     65          __gzsr_main.Add(self._PRW_name_long, 1, wx.EXPAND | wx.ALIGN_CENTER_VERTICAL, 0)
     66          __lbl_name_short = wx.StaticText(self, -1, _("Alias"))
     67          __gzsr_main.Add(__lbl_name_short, 0, wx.ALIGN_CENTER_VERTICAL, 0)
     68          __szr_line2.Add(self._PRW_name_short, 2, wx.RIGHT | wx.EXPAND | wx.ALIGN_CENTER_VERTICAL, 5)
     69          __lbl_external_version = wx.StaticText(self, -1, _("Version:"))
     70          __szr_line2.Add(__lbl_external_version, 0, wx.RIGHT | wx.ALIGN_CENTER_VERTICAL, 3)
     71          __szr_line2.Add(self._TCTRL_external_version, 0, wx.EXPAND | wx.ALIGN_CENTER_VERTICAL, 0)
     72          __gzsr_main.Add(__szr_line2, 1, wx.EXPAND, 0)
     73          __lbl_template_type = wx.StaticText(self, -1, _("Template type"))
     74          __gzsr_main.Add(__lbl_template_type, 0, wx.ALIGN_CENTER_VERTICAL, 0)
     75          __gzsr_main.Add(self._PRW_template_type, 1, wx.EXPAND | wx.ALIGN_CENTER_VERTICAL, 0)
     76          __lbl_instance_type = wx.StaticText(self, -1, _("Document type"))
     77          __gzsr_main.Add(__lbl_instance_type, 0, wx.ALIGN_CENTER_VERTICAL, 0)
     78          __gzsr_main.Add(self._PRW_instance_type, 1, wx.EXPAND | wx.ALIGN_CENTER_VERTICAL, 0)
     79          __lbl_filename = wx.StaticText(self, -1, _("Filename"))
     80          __gzsr_main.Add(__lbl_filename, 0, wx.ALIGN_CENTER_VERTICAL, 0)
     81          __szr_filename.Add(self._TCTRL_filename, 1, wx.EXPAND | wx.ALIGN_CENTER_VERTICAL, 0)
     82          __szr_filename.Add(self._BTN_load, 0, wx.LEFT | wx.RIGHT | wx.EXPAND | wx.ALIGN_CENTER_VERTICAL, 3)
     83          __szr_filename.Add(self._BTN_export, 0, wx.LEFT | wx.EXPAND | wx.ALIGN_CENTER_VERTICAL, 3)
     84          __gzsr_main.Add(__szr_filename, 1, wx.EXPAND, 0)
     85          __lbl_options = wx.StaticText(self, -1, _("Options"))
     86          __gzsr_main.Add(__lbl_options, 0, wx.ALIGN_CENTER_VERTICAL, 0)
     87          __lbl_engine = wx.StaticText(self, -1, _("Processed by:"))
     88          __szr_options.Add(__lbl_engine, 0, wx.RIGHT | wx.ALIGN_CENTER_VERTICAL, 5)
     89          __szr_options.Add(self._CH_engine, 0, wx.RIGHT | wx.TOP | wx.BOTTOM | wx.EXPAND | wx.ALIGN_CENTER_VERTICAL, 3)
     90          __szr_options.Add(self._CHBOX_active, 0, wx.LEFT | wx.EXPAND | wx.ALIGN_CENTER_VERTICAL, 3)
     91          __gzsr_main.Add(__szr_options, 1, wx.EXPAND, 0)
     92          __lbl_status = wx.StaticText(self, -1, _("Status"))
     93          __gzsr_main.Add(__lbl_status, 0, wx.ALIGN_CENTER_VERTICAL, 0)
     94          __lbl_modified_when = wx.StaticText(self, -1, _("Last modified:"))
     95          __szr_status.Add(__lbl_modified_when, 0, wx.RIGHT | wx.ALIGN_CENTER_VERTICAL, 3)
     96          __szr_status.Add(self._TCTRL_date_modified, 0, wx.RIGHT | wx.EXPAND | wx.ALIGN_CENTER_VERTICAL, 5)
     97          __lbl_modified_by = wx.StaticText(self, -1, _("by:"))
     98          __szr_status.Add(__lbl_modified_by, 0, wx.RIGHT | wx.ALIGN_CENTER_VERTICAL, 3)
     99          __szr_status.Add(self._TCTRL_modified_by, 0, wx.EXPAND | wx.ALIGN_CENTER_VERTICAL, 5)
    100          __gzsr_main.Add(__szr_status, 1, wx.EXPAND, 0)
    101          self.SetSizer(__gzsr_main)
    102          __gzsr_main.Fit(self)
    103          __gzsr_main.AddGrowableCol(1)
    104          # end wxGlade
    105
    106 -    def _on_load_button_pressed(self, event): # wxGlade: wxgFormTemplateEditAreaPnl.<event_handler>
    107          print "Event handler `_on_load_button_pressed' not implemented"
    108          event.Skip()
    109
    110 -    def _on_export_button_pressed(self, event): # wxGlade: wxgFormTemplateEditAreaPnl.<event_handler>
    111          print "Event handler `_on_export_button_pressed' not implemented"
    112          event.Skip()
    113
    114  # end of class wxgFormTemplateEditAreaPnl
    115