Gnumed.wxGladeWidgets.wxgItemPickerDlg

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

# Source Code for Module Gnumed.wxGladeWidgets.wxgItemPickerDlg

      1  #!/usr/bin/env python
      2  # -*- coding: utf-8 -*-
      3  # generated by wxGlade 0.6.3 from "/home/ncq/Projekte/gm-git/gnumed/gnumed/client/wxg/wxgItemPickerDlg.wxg"
      4
      5  import wx
      6
      7  # begin wxGlade: extracode
      8  # end wxGlade
      9
     10
     11
     12 -class wxgItemPickerDlg(wx.Dialog):
     13 -    def __init__(self, *args, **kwds):
     14
     15          from Gnumed.wxpython import gmListWidgets
     16
     17          # begin wxGlade: wxgItemPickerDlg.__init__
     18          kwds["style"] = wx.DEFAULT_DIALOG_STYLE | wx.RESIZE_BORDER | wx.MAXIMIZE_BOX | wx.MINIMIZE_BOX | wx.THICK_FRAME
     19          wx.Dialog.__init__(self, *args, **kwds)
     20          self._LBL_msg = wx.StaticText(self, -1, _("label_1"))
     21          self._LCTRL_left = gmListWidgets.cReportListCtrl(self, -1, style=wx.LC_REPORT | wx.LC_HRULES | wx.LC_VRULES | wx.NO_BORDER)
     22          self._BTN_left2right = wx.Button(self, -1, _(u"→"), style=wx.BU_EXACTFIT)
     23          self._BTN_right2left = wx.Button(self, -1, _(u"←"), style=wx.BU_EXACTFIT)
     24          self._LCTRL_right = gmListWidgets.cReportListCtrl(self, -1, style=wx.LC_REPORT | wx.LC_HRULES | wx.LC_VRULES | wx.NO_BORDER)
     25          self._BTN_ok = wx.Button(self, wx.ID_OK, "")
     26          self._BTN_cancel = wx.Button(self, wx.ID_CANCEL, "")
     27          self._BTN_extra = wx.Button(self, -1, _("Extra"), style=wx.BU_EXACTFIT)
     28
     29          self.__set_properties()
     30          self.__do_layout()
     31
     32          self.Bind(wx.EVT_LIST_ITEM_DESELECTED, self._on_left_list_item_deselected, self._LCTRL_left)
     33          self.Bind(wx.EVT_LIST_ITEM_SELECTED, self._on_left_list_item_selected, self._LCTRL_left)
     34          self.Bind(wx.EVT_BUTTON, self._on_button_left2right_pressed, self._BTN_left2right)
     35          self.Bind(wx.EVT_BUTTON, self._on_button_right2left_pressed, self._BTN_right2left)
     36          self.Bind(wx.EVT_LIST_ITEM_DESELECTED, self._on_right_list_item_deselected, self._LCTRL_right)
     37          self.Bind(wx.EVT_LIST_ITEM_SELECTED, self._on_right_list_item_selected, self._LCTRL_right)
     38          self.Bind(wx.EVT_BUTTON, self._on_extra_button_pressed, self._BTN_extra)
     39          # end wxGlade
     40
     41 -    def __set_properties(self):
     42          # begin wxGlade: wxgItemPickerDlg.__set_properties
     43          self.SetSize((735, 350))
     44          self._BTN_left2right.SetFont(wx.Font(16, wx.DEFAULT, wx.NORMAL, wx.BOLD, 0, ""))
     45          self._BTN_left2right.SetToolTipString(_("Move selected items from left to right."))
     46          self._BTN_left2right.Enable(False)
     47          self._BTN_right2left.SetFont(wx.Font(16, wx.DEFAULT, wx.NORMAL, wx.BOLD, 0, ""))
     48          self._BTN_right2left.SetToolTipString(_("Move selected items from right to left."))
     49          self._BTN_right2left.Enable(False)
     50          self._BTN_cancel.SetToolTipString(_("Cancel picking items."))
     51          self._BTN_extra.Enable(False)
     52          self._BTN_extra.Hide()
     53          # end wxGlade
     54
     55 -    def __do_layout(self):
     56          # begin wxGlade: wxgItemPickerDlg.__do_layout
     57          __szr_main = wx.BoxSizer(wx.VERTICAL)
     58          __szr_action_buttons = wx.BoxSizer(wx.HORIZONTAL)
     59          __szr_lists = wx.BoxSizer(wx.HORIZONTAL)
     60          __szr_move_buttons = wx.BoxSizer(wx.VERTICAL)
     61          __szr_main.Add(self._LBL_msg, 0, wx.LEFT | wx.RIGHT | wx.TOP | wx.EXPAND, 3)
     62          __szr_lists.Add(self._LCTRL_left, 1, wx.EXPAND, 0)
     63          __szr_move_buttons.Add((20, 20), 2, wx.EXPAND, 0)
     64          __szr_move_buttons.Add(self._BTN_left2right, 0, wx.ALIGN_CENTER_HORIZONTAL, 0)
     65          __szr_move_buttons.Add((20, 20), 1, wx.EXPAND, 0)
     66          __szr_move_buttons.Add(self._BTN_right2left, 0, wx.ALIGN_CENTER_HORIZONTAL, 0)
     67          __szr_move_buttons.Add((20, 20), 1, wx.EXPAND, 0)
     68          __szr_lists.Add(__szr_move_buttons, 0, wx.LEFT | wx.RIGHT | wx.EXPAND, 5)
     69          __szr_lists.Add(self._LCTRL_right, 1, wx.EXPAND, 0)
     70          __szr_main.Add(__szr_lists, 1, wx.LEFT | wx.RIGHT | wx.TOP | wx.EXPAND, 3)
     71          __szr_action_buttons.Add((20, 20), 1, wx.EXPAND, 0)
     72          __szr_action_buttons.Add(self._BTN_ok, 0, wx.ALIGN_CENTER_VERTICAL, 0)
     73          __szr_action_buttons.Add((20, 20), 1, wx.EXPAND, 0)
     74          __szr_action_buttons.Add(self._BTN_cancel, 0, wx.ALIGN_CENTER_VERTICAL, 0)
     75          __szr_action_buttons.Add((20, 20), 1, wx.EXPAND, 0)
     76          __szr_action_buttons.Add(self._BTN_extra, 0, wx.ALIGN_CENTER_VERTICAL, 0)
     77          __szr_action_buttons.Add((20, 20), 1, wx.EXPAND | wx.ALIGN_CENTER_VERTICAL, 0)
     78          __szr_main.Add(__szr_action_buttons, 0, wx.ALL | wx.EXPAND, 3)
     79          self.SetSizer(__szr_main)
     80          self.Layout()
     81          # end wxGlade
     82
     83 -    def _on_button_left2right_pressed(self, event): # wxGlade: wxgItemPickerDlg.<event_handler>
     84          print "Event handler `_on_button_left2right_pressed' not implemented!"
     85          event.Skip()
     86
     87 -    def _on_button_right2left_pressed(self, event): # wxGlade: wxgItemPickerDlg.<event_handler>
     88          print "Event handler `_on_button_right2left_pressed' not implemented!"
     89          event.Skip()
     90
     91 -    def _on_left_list_item_deselected(self, event): # wxGlade: wxgItemPickerDlg.<event_handler>
     92          print "Event handler `_on_left_list_item_deselected' not implemented"
     93          event.Skip()
     94
     95 -    def _on_left_list_item_selected(self, event): # wxGlade: wxgItemPickerDlg.<event_handler>
     96          print "Event handler `_on_left_list_item_selected' not implemented"
     97          event.Skip()
     98
     99 -    def _on_right_list_item_deselected(self, event): # wxGlade: wxgItemPickerDlg.<event_handler>
    100          print "Event handler `_on_right_list_item_deselected' not implemented"
    101          event.Skip()
    102
    103 -    def _on_right_list_item_selected(self, event): # wxGlade: wxgItemPickerDlg.<event_handler>
    104          print "Event handler `_on_right_list_item_selected' not implemented"
    105          event.Skip()
    106
    107 -    def _on_extra_button_pressed(self, event):  # wxGlade: wxgItemPickerDlg.<event_handler>
    108          print "Event handler `_on_extra_button_pressed' not implemented"
    109          event.Skip()
    110
    111  # end of class wxgItemPickerDlg
    112
    113
    114  if __name__ == "__main__":
    115      app = wx.PySimpleApp(0)
    116      wx.InitAllImageHandlers()
    117      dialog_1 = wxgItemPickerDlg(None, -1, "")
    118      app.SetTopWindow(dialog_1)
    119      dialog_1.Show()
    120      app.MainLoop()
    121