Gnumed.wxGladeWidgets.wxgPACSPluginPnl

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

# Source Code for Module Gnumed.wxGladeWidgets.wxgPACSPluginPnl

      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.gmListWidgets import cReportListCtrl
     14  from Gnumed.wxpython.gmTextCtrl import cTextCtrl
     15  # end wxGlade
     16
     17
     18 -class wxgPACSPluginPnl(wx.Panel):
     19 -        def __init__(self, *args, **kwds):
     20                  # begin wxGlade: wxgPACSPluginPnl.__init__
     21                  kwds["style"] = kwds.get("style", 0) | wx.BORDER_NONE | wx.TAB_TRAVERSAL
     22                  wx.Panel.__init__(self, *args, **kwds)
     23                  self.__lbl_host = wx.StaticText(self, wx.ID_ANY, _("Host:"))
     24                  self._TCTRL_host = cTextCtrl(self, wx.ID_ANY, "")
     25                  self.__lbl_port = wx.StaticText(self, wx.ID_ANY, _("Port:"))
     26                  self._TCTRL_port = cTextCtrl(self, wx.ID_ANY, "")
     27                  self.__lbl_user = wx.StaticText(self, wx.ID_ANY, _("User:"))
     28                  self._TCTRL_user = cTextCtrl(self, wx.ID_ANY, "")
     29                  self.__lbl_password = wx.StaticText(self, wx.ID_ANY, _("Password"))
     30                  self._TCTRL_password = wx.TextCtrl(self, wx.ID_ANY, "", style=wx.TE_PASSWORD)
     31                  self._BTN_connect = wx.Button(self, wx.ID_ANY, _("&Connect"), style=wx.BU_EXACTFIT)
     32                  self._LBL_PACS_identification = wx.StaticText(self, wx.ID_ANY, _("<not connected>"))
     33                  self._LBL_patient_identification = wx.StaticText(self, wx.ID_ANY, "")
     34                  self._LCTRL_studies = cReportListCtrl(self, wx.ID_ANY, style=wx.BORDER_NONE | wx.LC_REPORT)
     35                  self._LCTRL_series = cReportListCtrl(self, wx.ID_ANY, style=wx.BORDER_NONE | wx.LC_REPORT)
     36                  self._LCTRL_details = cReportListCtrl(self, wx.ID_ANY, style=wx.BORDER_NONE | wx.LC_REPORT)
     37                  self._BMP_preview = wx.lib.statbmp.GenStaticBitmap(self, wx.ID_ANY, wx.Bitmap(50, 50), style=wx.BORDER_SIMPLE)
     38                  self._BTN_previous_image = wx.Button(self, wx.ID_ANY, _(u"\u25c4"), style=wx.BU_EXACTFIT)
     39                  self._BTN_next_image = wx.Button(self, wx.ID_ANY, _(u"\u25ba"), style=wx.BU_EXACTFIT)
     40                  self._BTN_image_show = wx.Button(self, wx.ID_ANY, _("&Show"))
     41                  self._BTN_image_export = wx.Button(self, wx.ID_ANY, _("E&xport area"))
     42                  self._BTN_browse_study = wx.Button(self, wx.ID_ANY, _("Browse"), style=wx.BORDER_NONE | wx.BU_EXACTFIT)
     43                  self._BTN_studies_show = wx.Button(self, wx.ID_ANY, _("Show"))
     44                  self._BTN_studies_export = wx.Button(self, wx.ID_ANY, _("Export area"))
     45                  self._BTN_browse_patient = wx.Button(self, wx.ID_ANY, _("Browse"), style=wx.BORDER_NONE | wx.BU_EXACTFIT)
     46                  self._BTN_verify_patient_data = wx.Button(self, wx.ID_ANY, _("Verify"))
     47                  self._BTN_browse_pacs = wx.Button(self, wx.ID_ANY, _("Browse"), style=wx.BORDER_NONE | wx.BU_EXACTFIT)
     48                  self._BTN_upload = wx.Button(self, wx.ID_ANY, _("&Upload"))
     49                  self._BTN_modify_orthanc_content = wx.Button(self, wx.ID_ANY, _("Edit"))
     50
     51                  self.__set_properties()
     52                  self.__do_layout()
     53
     54                  self.Bind(wx.EVT_BUTTON, self._on_connect_button_pressed, self._BTN_connect)
     55                  self.Bind(wx.EVT_BUTTON, self._on_previous_image_button_pressed, self._BTN_previous_image)
     56                  self.Bind(wx.EVT_BUTTON, self._on_next_image_button_pressed, self._BTN_next_image)
     57                  self.Bind(wx.EVT_BUTTON, self._on_image_show_button_pressed, self._BTN_image_show)
     58                  self.Bind(wx.EVT_BUTTON, self._on_image_export_button_pressed, self._BTN_image_export)
     59                  self.Bind(wx.EVT_BUTTON, self._on_browse_study_button_pressed, self._BTN_browse_study)
     60                  self.Bind(wx.EVT_BUTTON, self._on_studies_show_button_pressed, self._BTN_studies_show)
     61                  self.Bind(wx.EVT_BUTTON, self._on_studies_export_button_pressed, self._BTN_studies_export)
     62                  self.Bind(wx.EVT_BUTTON, self._on_browse_patient_button_pressed, self._BTN_browse_patient)
     63                  self.Bind(wx.EVT_BUTTON, self._on_verify_patient_data_button_pressed, self._BTN_verify_patient_data)
     64                  self.Bind(wx.EVT_BUTTON, self._on_browse_pacs_button_pressed, self._BTN_browse_pacs)
     65                  self.Bind(wx.EVT_BUTTON, self._on_upload_button_pressed, self._BTN_upload)
     66                  self.Bind(wx.EVT_BUTTON, self._on_modify_orthanc_content_button_pressed, self._BTN_modify_orthanc_content)
     67                  # end wxGlade
     68
     69 -        def __set_properties(self):
     70                  # begin wxGlade: wxgPACSPluginPnl.__set_properties
     71                  self._TCTRL_host.SetToolTip(_("Enter the PACS host address."))
     72                  self._TCTRL_port.SetToolTip(_("Enter the PACS port."))
     73                  self._TCTRL_user.SetToolTip(_("Enter the PACS user."))
     74                  self._TCTRL_password.SetToolTip(_("Enter the PACS password. It will not be shown."))
     75                  self._BTN_connect.SetToolTip(_("Connect to PACS."))
     76                  self._LCTRL_details.SetFont(wx.Font(9, wx.MODERN, wx.NORMAL, wx.NORMAL, 0, ""))
     77                  self._BMP_preview.SetMinSize((50, 50))
     78                  self._BMP_preview.SetToolTip(_("Double-click: Display in external viewer.\n\nRight-click: Show context menu."))
     79                  self._BTN_previous_image.SetToolTip(_("Review previous image."))
     80                  self._BTN_previous_image.Enable(False)
     81                  self._BTN_next_image.SetToolTip(_("Preview next image."))
     82                  self._BTN_next_image.Enable(False)
     83                  self._BTN_image_show.SetToolTip(_("Show image in external viewer."))
     84                  self._BTN_image_show.Enable(False)
     85                  self._BTN_image_export.SetToolTip(_("Put image into export area."))
     86                  self._BTN_image_export.Enable(False)
     87                  self._BTN_browse_study.SetToolTip(_("Browse selected studies in web browser.\n\nRight-click for further options."))
     88                  self._BTN_browse_study.Enable(False)
     89                  self._BTN_studies_show.SetToolTip(_("Show selected studies in external viewer."))
     90                  self._BTN_studies_show.Enable(False)
     91                  self._BTN_studies_export.SetToolTip(_("Put selected studies into export area."))
     92                  self._BTN_studies_export.Enable(False)
     93                  self._BTN_browse_patient.SetToolTip(_("Browse patient studies in web browser."))
     94                  self._BTN_browse_patient.Enable(False)
     95                  self._BTN_verify_patient_data.SetToolTip(_("Verify DICOM data of patient in PACS."))
     96                  self._BTN_verify_patient_data.Enable(False)
     97                  self._BTN_browse_pacs.SetToolTip(_("Browse PACS."))
     98                  self._BTN_browse_pacs.Enable(False)
     99                  self._BTN_upload.SetToolTip(_("Upload DICOM files from a directory, recursively, into the Orthanc PACS\n\nIt does not matter what the currently active patient is. Orthanc will associate uploaded files with the patient found within the DICOM metadata and will create new patients as needed."))
    100                  self._BTN_upload.Enable(False)
    101                  self._BTN_modify_orthanc_content.SetToolTip(_("Modify some of Orthanc's content (such as patient IDs)."))
    102                  self._BTN_modify_orthanc_content.Enable(False)
    103                  # end wxGlade
    104
    105 -        def __do_layout(self):
    106                  # begin wxGlade: wxgPACSPluginPnl.__do_layout
    107                  __szr_main = wx.BoxSizer(wx.VERTICAL)
    108                  __szr_details = wx.BoxSizer(wx.HORIZONTAL)
    109                  __szr_metadata_image = wx.BoxSizer(wx.VERTICAL)
    110                  __szr_image_and_buttons = wx.BoxSizer(wx.HORIZONTAL)
    111                  __szr_pacs_buttons = wx.StaticBoxSizer(wx.StaticBox(self, wx.ID_ANY, _("PACS")), wx.VERTICAL)
    112                  __szr_patient_buttons = wx.StaticBoxSizer(wx.StaticBox(self, wx.ID_ANY, _("Patient")), wx.VERTICAL)
    113                  __szr_study_buttons = wx.StaticBoxSizer(wx.StaticBox(self, wx.ID_ANY, _("Study")), wx.VERTICAL)
    114                  self._SZR_image_buttons = wx.StaticBoxSizer(wx.StaticBox(self, wx.ID_ANY, _("Image")), wx.HORIZONTAL)
    115                  __szr_image_buttons_left = wx.BoxSizer(wx.VERTICAL)
    116                  __szr_prev_next = wx.BoxSizer(wx.HORIZONTAL)
    117                  __szr_studies_series = wx.BoxSizer(wx.VERTICAL)
    118                  __szr_PACS_details = wx.BoxSizer(wx.HORIZONTAL)
    119                  __szr_PACS_details.Add(self.__lbl_host, 0, wx.ALIGN_CENTER_VERTICAL | wx.RIGHT, 3)
    120                  __szr_PACS_details.Add(self._TCTRL_host, 1, wx.ALIGN_CENTER_VERTICAL | wx.RIGHT, 5)
    121                  __szr_PACS_details.Add(self.__lbl_port, 0, wx.ALIGN_CENTER_VERTICAL | wx.RIGHT, 3)
    122                  __szr_PACS_details.Add(self._TCTRL_port, 0, wx.ALIGN_CENTER_VERTICAL | wx.RIGHT, 5)
    123                  __szr_PACS_details.Add(self.__lbl_user, 0, wx.ALIGN_CENTER_VERTICAL | wx.RIGHT, 3)
    124                  __szr_PACS_details.Add(self._TCTRL_user, 1, wx.ALIGN_CENTER_VERTICAL | wx.RIGHT, 5)
    125                  __szr_PACS_details.Add(self.__lbl_password, 0, wx.ALIGN_CENTER_VERTICAL | wx.RIGHT, 3)
    126                  __szr_PACS_details.Add(self._TCTRL_password, 1, wx.ALIGN_CENTER_VERTICAL | wx.RIGHT, 5)
    127                  __szr_PACS_details.Add(self._BTN_connect, 0, wx.ALIGN_CENTER_VERTICAL | wx.RIGHT, 5)
    128                  __szr_main.Add(__szr_PACS_details, 0, wx.EXPAND | wx.LEFT | wx.RIGHT | wx.TOP, 3)
    129                  __szr_main.Add(self._LBL_PACS_identification, 0, wx.EXPAND | wx.LEFT | wx.RIGHT | wx.TOP, 3)
    130                  __szr_studies_series.Add(self._LBL_patient_identification, 0, wx.ALL | wx.EXPAND, 3)
    131                  __szr_studies_series.Add(self._LCTRL_studies, 3, wx.EXPAND | wx.TOP, 3)
    132                  __szr_studies_series.Add(self._LCTRL_series, 2, wx.EXPAND | wx.TOP, 3)
    133                  __szr_details.Add(__szr_studies_series, 1, wx.EXPAND | wx.RIGHT, 3)
    134                  __szr_metadata_image.Add(self._LCTRL_details, 1, wx.EXPAND, 0)
    135                  __szr_image_and_buttons.Add(self._BMP_preview, 0, wx.ALL, 2)
    136                  __szr_prev_next.Add(self._BTN_previous_image, 0, wx.ALIGN_CENTER | wx.RIGHT, 3)
    137                  __szr_prev_next.Add(self._BTN_next_image, 0, wx.ALIGN_CENTER, 3)
    138                  __szr_image_buttons_left.Add(__szr_prev_next, 0, wx.ALIGN_CENTER, 0)
    139                  __szr_image_buttons_left.Add(self._BTN_image_show, 0, wx.ALIGN_CENTER | wx.EXPAND | wx.TOP, 3)
    140                  __szr_image_buttons_left.Add(self._BTN_image_export, 0, wx.ALIGN_CENTER | wx.EXPAND | wx.TOP, 3)
    141                  self._SZR_image_buttons.Add(__szr_image_buttons_left, 0, wx.EXPAND | wx.LEFT | wx.RIGHT, 2)
    142                  __szr_image_and_buttons.Add(self._SZR_image_buttons, 0, wx.EXPAND | wx.LEFT | wx.RIGHT, 2)
    143                  __szr_study_buttons.Add(self._BTN_browse_study, 0, wx.ALIGN_CENTER, 0)
    144                  __szr_study_buttons.Add(self._BTN_studies_show, 0, wx.ALIGN_CENTER | wx.TOP, 3)
    145                  __szr_study_buttons.Add(self._BTN_studies_export, 0, wx.ALIGN_CENTER | wx.TOP, 3)
    146                  __szr_image_and_buttons.Add(__szr_study_buttons, 0, wx.EXPAND | wx.LEFT | wx.RIGHT, 2)
    147                  __szr_patient_buttons.Add(self._BTN_browse_patient, 0, wx.ALIGN_CENTER, 0)
    148                  __szr_patient_buttons.Add(self._BTN_verify_patient_data, 0, wx.ALIGN_CENTER | wx.TOP, 3)
    149                  __szr_image_and_buttons.Add(__szr_patient_buttons, 0, wx.EXPAND | wx.LEFT | wx.RIGHT, 2)
    150                  __szr_pacs_buttons.Add(self._BTN_browse_pacs, 0, wx.ALIGN_CENTER, 0)
    151                  __szr_pacs_buttons.Add(self._BTN_upload, 0, wx.ALIGN_CENTER | wx.TOP, 3)
    152                  __szr_pacs_buttons.Add(self._BTN_modify_orthanc_content, 0, wx.ALIGN_CENTER | wx.TOP, 3)
    153                  __szr_image_and_buttons.Add(__szr_pacs_buttons, 0, wx.EXPAND | wx.LEFT, 2)
    154                  __szr_metadata_image.Add(__szr_image_and_buttons, 0, wx.EXPAND | wx.TOP, 4)
    155                  __szr_details.Add(__szr_metadata_image, 1, wx.EXPAND, 0)
    156                  __szr_main.Add(__szr_details, 1, wx.EXPAND | wx.LEFT | wx.RIGHT | wx.TOP, 3)
    157                  self.SetSizer(__szr_main)
    158                  __szr_main.Fit(self)
    159                  self.Layout()
    160                  # end wxGlade
    161
    162 -        def _on_connect_button_pressed(self, event):  # wxGlade: wxgPACSPluginPnl.<event_handler>
    163                  print("Event handler '_on_connect_button_pressed' not implemented!")
    164                  event.Skip()
    165
    166 -        def _on_previous_image_button_pressed(self, event):  # wxGlade: wxgPACSPluginPnl.<event_handler>
    167                  print("Event handler '_on_previous_image_button_pressed' not implemented!")
    168                  event.Skip()
    169
    170 -        def _on_next_image_button_pressed(self, event):  # wxGlade: wxgPACSPluginPnl.<event_handler>
    171                  print("Event handler '_on_next_image_button_pressed' not implemented!")
    172                  event.Skip()
    173
    174 -        def _on_image_show_button_pressed(self, event):  # wxGlade: wxgPACSPluginPnl.<event_handler>
    175                  print("Event handler '_on_image_show_button_pressed' not implemented!")
    176                  event.Skip()
    177
    178 -        def _on_image_export_button_pressed(self, event):  # wxGlade: wxgPACSPluginPnl.<event_handler>
    179                  print("Event handler '_on_image_export_button_pressed' not implemented!")
    180                  event.Skip()
    181
    182 -        def _on_browse_study_button_pressed(self, event):  # wxGlade: wxgPACSPluginPnl.<event_handler>
    183                  print("Event handler '_on_browse_study_button_pressed' not implemented!")
    184                  event.Skip()
    185
    186 -        def _on_studies_show_button_pressed(self, event):  # wxGlade: wxgPACSPluginPnl.<event_handler>
    187                  print("Event handler '_on_studies_show_button_pressed' not implemented!")
    188                  event.Skip()
    189
    190 -        def _on_studies_export_button_pressed(self, event):  # wxGlade: wxgPACSPluginPnl.<event_handler>
    191                  print("Event handler '_on_studies_export_button_pressed' not implemented!")
    192                  event.Skip()
    193
    194 -        def _on_browse_patient_button_pressed(self, event):  # wxGlade: wxgPACSPluginPnl.<event_handler>
    195                  print("Event handler '_on_browse_patient_button_pressed' not implemented!")
    196                  event.Skip()
    197
    198 -        def _on_verify_patient_data_button_pressed(self, event):  # wxGlade: wxgPACSPluginPnl.<event_handler>
    199                  print("Event handler '_on_verify_patient_data_button_pressed' not implemented!")
    200                  event.Skip()
    201
    202 -        def _on_browse_pacs_button_pressed(self, event):  # wxGlade: wxgPACSPluginPnl.<event_handler>
    203                  print("Event handler '_on_browse_pacs_button_pressed' not implemented!")
    204                  event.Skip()
    205
    206 -        def _on_upload_button_pressed(self, event):  # wxGlade: wxgPACSPluginPnl.<event_handler>
    207                  print("Event handler '_on_upload_button_pressed' not implemented!")
    208                  event.Skip()
    209
    210 -        def _on_modify_orthanc_content_button_pressed(self, event):  # wxGlade: wxgPACSPluginPnl.<event_handler>
    211                  print("Event handler '_on_modify_orthanc_content_button_pressed' not implemented!")
    212                  event.Skip()
    213
    214  # end of class wxgPACSPluginPnl
    215