def __build_prevbutton(self):
        ''' Builds and returns the 'previous' button for this panel. '''

        button = Button()
        button.Location = Point(2, 332)
        button.Size = Size(20, 24)
        button.Text = '<'
        button.Font = Font(button.Font, FontStyle.Bold)
        button.UseVisualStyleBackColor = True
        button.Click += self.__button_click_fired
        # note: this button's visibility is manipulated by __update
        return button
   def __build_prevbutton(self):
      ''' Builds and returns the 'previous' button for this panel. '''

      button = Button()
      button.Location = Point(2, 332)
      button.Size = Size(20, 24)
      button.Text = '<'
      button.Font = Font(button.Font, FontStyle.Bold)
      button.UseVisualStyleBackColor = True
      button.Click += self.__button_click_fired
      # note: this button's visibility is manipulated by __update
      return button
示例#3
0
        def setupMainWindow(self):
            self.MainWindow = self.Panel(0, 60)

            vert_spacer = 32
            offset = 15

            self.label_billes = Label()
            self.label_billes.Text = "Billes sur point de localisation"
            self.label_billes.Location = Point(15, offset)
            self.label_billes.Font = Font("Arial", 10.25, FontStyle.Bold)
            self.label_billes.AutoSize = True

            self.check_billes = CheckBox()
            self.check_billes.Location = Point(410, offset - 2)
            self.check_billes.Width = 30
            self.check_billes.Checked = False

            button_ext = Button()
            button_ext.Text = "Contour 'External' et overrides"
            button_ext.Font = Font("Arial", 10.25, FontStyle.Bold)
            button_ext.Location = Point(15, offset + vert_spacer)
            button_ext.Width = 375
            button_ext.Click += self.button_ext_Clicked

            self.check_ext = CheckBox()
            self.check_ext.Location = Point(410, offset + vert_spacer - 2)
            self.check_ext.Width = 30
            self.check_ext.Checked = False

            button_isoOK = Button()
            button_isoOK.Text = "Position de l'isocentre et point de localisation"
            button_isoOK.Font = Font("Arial", 10.25, FontStyle.Bold)
            button_isoOK.Location = Point(15, offset + vert_spacer * 2)
            button_isoOK.Width = 375
            button_isoOK.Click += self.button_isoOK_Clicked

            self.check_isoOK = CheckBox()
            self.check_isoOK.Location = Point(410,
                                              offset + vert_spacer * 2 - 2)
            self.check_isoOK.Width = 30
            self.check_isoOK.Checked = False

            button_segments = Button()
            button_segments.Text = "Les segments sont corrects/flashé au besoin"
            button_segments.Font = Font("Arial", 10.25, FontStyle.Bold)
            button_segments.Location = Point(15, offset + vert_spacer * 3)
            button_segments.Width = 375
            button_segments.Click += self.button_segments_Clicked

            self.check_segments = CheckBox()
            self.check_segments.Location = Point(410,
                                                 offset + vert_spacer * 3 - 2)
            self.check_segments.Width = 30
            self.check_segments.Checked = False

            button_beams_Rx = Button()
            button_beams_Rx.Text = "Faisceaux et prescription"
            button_beams_Rx.Font = Font("Arial", 10.25, FontStyle.Bold)
            button_beams_Rx.Location = Point(15, offset + vert_spacer * 4)
            button_beams_Rx.Width = 375
            button_beams_Rx.Click += self.button_beams_Clicked

            self.check_beams_Rx = CheckBox()
            self.check_beams_Rx.Location = Point(410,
                                                 offset + vert_spacer * 4 - 2)
            self.check_beams_Rx.Width = 30
            self.check_beams_Rx.Checked = False

            button_grid = Button()
            button_grid.Text = "La grille de dose est correcte"
            button_grid.Font = Font("Arial", 10.25, FontStyle.Bold)
            button_grid.Location = Point(15, offset + vert_spacer * 5)
            button_grid.Width = 375
            button_grid.Click += self.button_grid_Clicked

            self.check_grid = CheckBox()
            self.check_grid.Location = Point(410, offset + vert_spacer * 5 - 2)
            self.check_grid.Width = 30
            self.check_grid.Checked = False

            self.label_distribution_dose = Label()
            self.label_distribution_dose.Text = "Distribution de dose et clinical goals"
            self.label_distribution_dose.Location = Point(
                15, offset + vert_spacer * 6)
            self.label_distribution_dose.Font = Font("Arial", 10.25,
                                                     FontStyle.Bold)
            self.label_distribution_dose.AutoSize = True

            self.check_distribution_dose = CheckBox()
            self.check_distribution_dose.Location = Point(
                410, offset + vert_spacer * 6 - 2)
            self.check_distribution_dose.Width = 30
            self.check_distribution_dose.Checked = False

            self.label_noteMD = Label()
            self.label_noteMD.Text = "Vérif note de planif du MD                          NON"
            self.label_noteMD.Location = Point(15, offset + vert_spacer * 7)
            self.label_noteMD.Font = Font("Arial", 10.25, FontStyle.Bold)
            self.label_noteMD.AutoSize = True

            self.check_noteMD_non = CheckBox()
            self.check_noteMD_non.Location = Point(
                340, offset + vert_spacer * 7 - 2)
            self.check_noteMD_non.Width = 30
            self.check_noteMD_non.Checked = False

            self.label_OK1 = Label()
            self.label_OK1.Text = "OK"
            self.label_OK1.Location = Point(370, offset + vert_spacer * 7)
            self.label_OK1.Font = Font("Arial", 10.25, FontStyle.Bold)
            self.label_OK1.AutoSize = True

            self.check_noteMD_OK = CheckBox()
            self.check_noteMD_OK.Location = Point(410,
                                                  offset + vert_spacer * 7 - 2)
            self.check_noteMD_OK.Width = 30
            self.check_noteMD_OK.Checked = False

            self.label_DSP = Label()
            self.label_DSP.Text = "Vérif note positionnement: HT, DSPs, matching"
            self.label_DSP.Location = Point(15, offset + vert_spacer * 8)
            self.label_DSP.Font = Font("Arial", 10.25, FontStyle.Bold)
            self.label_DSP.AutoSize = True

            self.check_DSP = CheckBox()
            self.check_DSP.Location = Point(410, offset + vert_spacer * 8 - 2)
            self.check_DSP.Width = 30
            self.check_DSP.Checked = False

            self.label_mise_en_place = Label()
            self.label_mise_en_place.Text = "Vérif mise en place: ISO DICOM, struct, phase"
            self.label_mise_en_place.Location = Point(15,
                                                      offset + vert_spacer * 9)
            self.label_mise_en_place.Font = Font("Arial", 10.25,
                                                 FontStyle.Bold)
            self.label_mise_en_place.AutoSize = True

            self.check_mise_en_place = CheckBox()
            self.check_mise_en_place.Location = Point(
                410, offset + vert_spacer * 9 - 2)
            self.check_mise_en_place.Width = 30
            self.check_mise_en_place.Checked = False

            self.label_doctx = Label()
            self.label_doctx.Text = "Vérification Document de Tx                      NON"
            self.label_doctx.Location = Point(15, offset + vert_spacer * 10)
            self.label_doctx.Font = Font("Arial", 10.25, FontStyle.Bold)
            self.label_doctx.AutoSize = True

            self.check_doctx_non = CheckBox()
            self.check_doctx_non.Location = Point(
                340, offset + vert_spacer * 10 - 2)
            self.check_doctx_non.Width = 30
            self.check_doctx_non.Checked = False

            self.label_OK2 = Label()
            self.label_OK2.Text = "OK"
            self.label_OK2.Location = Point(370, offset + vert_spacer * 10)
            self.label_OK2.Font = Font("Arial", 10.25, FontStyle.Bold)
            self.label_OK2.AutoSize = True

            self.check_doctx_OK = CheckBox()
            self.check_doctx_OK.Location = Point(410,
                                                 offset + vert_spacer * 10 - 2)
            self.check_doctx_OK.Width = 30
            self.check_doctx_OK.Checked = False

            self.label_codestat = Label()
            self.label_codestat.Text = "Vérification des codes statistiques"
            self.label_codestat.Location = Point(15, offset + vert_spacer * 11)
            self.label_codestat.Font = Font("Arial", 10.25, FontStyle.Bold)
            self.label_codestat.AutoSize = True

            self.check_codestat = CheckBox()
            self.check_codestat.Location = Point(410,
                                                 offset + vert_spacer * 11 - 2)
            self.check_codestat.Width = 30
            self.check_codestat.Checked = False

            #Count up beamsets
            bs_text = ""
            num_bs = 0
            for bs in plan.BeamSets:
                bs_text += bs.DicomPlanLabel + ", "
                num_bs += 1

            self.label_results_header = Label()
            self.label_results_header.Text = "Résultats"
            self.label_results_header.Location = Point(
                15, offset + vert_spacer * 12.5)
            self.label_results_header.Font = Font("Arial", 11, FontStyle.Bold)
            self.label_results_header.AutoSize = True

            self.label_results = Label()
            self.label_results.Text = "Nombre de beamsets dans le plan: " + str(
                num_bs) + ' (' + bs_text[0:-2] + ')'
            self.label_results.Location = Point(15,
                                                offset + vert_spacer * 13.5)
            self.label_results.Font = Font(
                "Arial",
                10,
            )
            self.label_results.AutoSize = True

            self.label_reminder = Label()
            self.label_reminder.Text = "Rappel:\nRoulez le script de vérification pour chaque beamset"
            self.label_reminder.Location = Point(15,
                                                 offset + vert_spacer * 14.5)
            self.label_reminder.Font = Font("Arial", 10.25, FontStyle.Bold)
            self.label_reminder.ForeColor = Color.Red
            self.label_reminder.AutoSize = True

            self.MainWindow.Controls.Add(self.label_billes)
            self.MainWindow.Controls.Add(self.check_billes)

            self.MainWindow.Controls.Add(button_ext)
            self.MainWindow.Controls.Add(self.check_ext)

            self.MainWindow.Controls.Add(button_isoOK)
            self.MainWindow.Controls.Add(self.check_isoOK)

            self.MainWindow.Controls.Add(button_segments)
            self.MainWindow.Controls.Add(self.check_segments)

            self.MainWindow.Controls.Add(button_beams_Rx)
            self.MainWindow.Controls.Add(self.check_beams_Rx)

            self.MainWindow.Controls.Add(button_grid)
            self.MainWindow.Controls.Add(self.check_grid)

            self.MainWindow.Controls.Add(self.label_distribution_dose)
            self.MainWindow.Controls.Add(self.check_distribution_dose)

            self.MainWindow.Controls.Add(self.label_noteMD)
            self.MainWindow.Controls.Add(self.check_noteMD_non)
            self.MainWindow.Controls.Add(self.label_OK1)
            self.MainWindow.Controls.Add(self.check_noteMD_OK)

            self.MainWindow.Controls.Add(self.label_DSP)
            self.MainWindow.Controls.Add(self.check_DSP)

            self.MainWindow.Controls.Add(self.label_mise_en_place)
            self.MainWindow.Controls.Add(self.check_mise_en_place)

            self.MainWindow.Controls.Add(self.label_doctx)
            self.MainWindow.Controls.Add(self.check_doctx_non)
            self.MainWindow.Controls.Add(self.label_OK2)
            self.MainWindow.Controls.Add(self.check_doctx_OK)

            self.MainWindow.Controls.Add(self.label_codestat)
            self.MainWindow.Controls.Add(self.check_codestat)

            self.MainWindow.Controls.Add(self.label_results_header)
            self.MainWindow.Controls.Add(self.label_results)
            self.MainWindow.Controls.Add(self.label_reminder)
示例#4
0
        def setupMainWindow(self):
            self.MainWindow = self.Panel(0, 60)

            vert_spacer = 35
            offset = 20

            self.label_bonscan = Label()
            self.label_bonscan.Text = "Le bon scan est utilisé pour la planification"
            self.label_bonscan.Location = Point(15, offset)
            self.label_bonscan.Font = Font("Arial", 10.25, FontStyle.Bold)
            self.label_bonscan.AutoSize = True

            self.check_bonscan = CheckBox()
            self.check_bonscan.Location = Point(410, offset - 2)
            self.check_bonscan.Width = 30
            self.check_bonscan.Checked = False

            self.label_scanOK = Label()
            self.label_scanOK.Text = "Scan OK (artéfactes, étendu du scan, objets sur la table)"
            self.label_scanOK.Location = Point(15, offset + vert_spacer)
            self.label_scanOK.Font = Font("Arial", 10.25, FontStyle.Bold)
            self.label_scanOK.AutoSize = True

            self.check_scanOK = CheckBox()
            self.check_scanOK.Location = Point(410, offset + vert_spacer - 2)
            self.check_scanOK.Width = 30
            self.check_scanOK.Checked = False

            button_ext = Button()
            button_ext.Text = "Contour 'External' + overrides"
            button_ext.Font = Font("Arial", 10.25, FontStyle.Bold)
            button_ext.Location = Point(15, offset + vert_spacer * 2)
            button_ext.Width = 375
            button_ext.Click += self.button_ext_Clicked

            self.check_ext = CheckBox()
            self.check_ext.Location = Point(410, offset + vert_spacer * 2 - 2)
            self.check_ext.Width = 30
            self.check_ext.Checked = False

            self.label_contours = Label()
            self.label_contours.Text = "Les contours d'optimisation sont corrects"
            self.label_contours.Location = Point(15, offset + vert_spacer * 3)
            self.label_contours.Font = Font("Arial", 10.25, FontStyle.Bold)
            self.label_contours.AutoSize = True

            self.check_contours = CheckBox()
            self.check_contours.Location = Point(410,
                                                 offset + vert_spacer * 3 - 2)
            self.check_contours.Width = 30
            self.check_contours.Checked = False

            button_isoOK = Button()
            button_isoOK.Text = "Position de l'isocentre"
            button_isoOK.Font = Font("Arial", 10.25, FontStyle.Bold)
            button_isoOK.Location = Point(15, offset + vert_spacer * 4)
            button_isoOK.Width = 375
            button_isoOK.Click += self.button_isoOK_Clicked

            self.check_isoOK = CheckBox()
            self.check_isoOK.Location = Point(410,
                                              offset + vert_spacer * 4 - 2)
            self.check_isoOK.Width = 30
            self.check_isoOK.Checked = False

            button_beams_Rx = Button()
            button_beams_Rx.Text = "Faisceaux et prescription"
            button_beams_Rx.Font = Font("Arial", 10.25, FontStyle.Bold)
            button_beams_Rx.Location = Point(15, offset + vert_spacer * 5)
            button_beams_Rx.Width = 375
            button_beams_Rx.Click += self.button_beams_Clicked

            self.check_beams_Rx = CheckBox()
            self.check_beams_Rx.Location = Point(410,
                                                 offset + vert_spacer * 5 - 2)
            self.check_beams_Rx.Width = 30
            self.check_beams_Rx.Checked = False

            button_optimisation = Button()
            button_optimisation.Text = "Objectifs et paramètres d'optimisation"
            button_optimisation.Font = Font("Arial", 10.25, FontStyle.Bold)
            #button_optimisation.TextAlign = HorizontalAlignment.Center
            button_optimisation.Location = Point(15, offset + vert_spacer * 6)
            button_optimisation.Width = 375
            button_optimisation.Click += self.button_opt_Clicked

            self.check_optimisation = CheckBox()
            self.check_optimisation.Location = Point(
                410, offset + vert_spacer * 6 - 2)
            self.check_optimisation.Width = 30
            self.check_optimisation.Checked = False

            self.label_distribution_dose = Label()
            self.label_distribution_dose.Text = "Distribution de dose et clinical goals"
            self.label_distribution_dose.Location = Point(
                15, offset + vert_spacer * 7)
            self.label_distribution_dose.Font = Font("Arial", 10.25,
                                                     FontStyle.Bold)
            self.label_distribution_dose.AutoSize = True

            self.check_distribution_dose = CheckBox()
            self.check_distribution_dose.Location = Point(
                410, offset + vert_spacer * 7 - 2)
            self.check_distribution_dose.Width = 30
            self.check_distribution_dose.Checked = False

            #Count up beamsets
            bs_text = ""
            num_bs = 0
            for bs in plan.BeamSets:
                bs_text += bs.DicomPlanLabel + ", "
                num_bs += 1

            self.label_results_header = Label()
            self.label_results_header.Text = "Résultats"
            self.label_results_header.Location = Point(
                15, offset + vert_spacer * 9)
            self.label_results_header.Font = Font("Arial", 11, FontStyle.Bold)
            self.label_results_header.AutoSize = True

            self.label_results = Label()
            self.label_results.Text = "Nombre de beamsets dans le plan: " + str(
                num_bs) + ' (' + bs_text[0:-2] + ')'
            self.label_results.Location = Point(15, offset + vert_spacer * 10)
            self.label_results.Font = Font(
                "Arial",
                10,
            )
            self.label_results.AutoSize = True

            self.label_reminder = Label()
            self.label_reminder.Text = "Rappel:\nRoulez le script de vérification pour chaque beamset"
            self.label_reminder.Location = Point(15, offset + vert_spacer * 11)
            self.label_reminder.Font = Font("Arial", 10.25, FontStyle.Bold)
            self.label_reminder.ForeColor = Color.Red
            self.label_reminder.AutoSize = True

            self.MainWindow.Controls.Add(self.label_bonscan)
            self.MainWindow.Controls.Add(self.check_bonscan)

            self.MainWindow.Controls.Add(self.label_scanOK)
            self.MainWindow.Controls.Add(self.check_scanOK)

            self.MainWindow.Controls.Add(button_ext)
            self.MainWindow.Controls.Add(self.check_ext)

            self.MainWindow.Controls.Add(button_isoOK)
            self.MainWindow.Controls.Add(self.check_isoOK)

            self.MainWindow.Controls.Add(button_beams_Rx)
            self.MainWindow.Controls.Add(self.check_beams_Rx)

            self.MainWindow.Controls.Add(self.label_contours)
            self.MainWindow.Controls.Add(self.check_contours)

            self.MainWindow.Controls.Add(button_optimisation)
            self.MainWindow.Controls.Add(self.check_optimisation)

            self.MainWindow.Controls.Add(self.label_distribution_dose)
            self.MainWindow.Controls.Add(self.check_distribution_dose)

            self.MainWindow.Controls.Add(self.label_results_header)
            self.MainWindow.Controls.Add(self.label_results)
            self.MainWindow.Controls.Add(self.label_reminder)