Пример #1
0
def output_tube(frame, element, master):
    def selected_element(event):
        standard = res_standard.combobox.get()
        diameter_in = res_diameter_in.combobox.get()
        color = res_color.combobox.get()

        # Getting the name from the database
        standard = SQLite.output_name_sen_and_tube_s(element, AFL.del_symbol(standard))
        diameter_in = SQLite.output_name_sen_and_tube_d_i(element, AFL.del_symbol(diameter_in))
        color = SQLite.output_name_sen_and_tube_c(element, AFL.del_symbol(color))

        result = AFL.intersection_3(standard, diameter_in, color)

        frame_result = FrameResult.FrameResult(master=master)
        frame_result.grid(row=10, column=0, columnspan=4)

        AFR.output_radiobutton(element, result, frame_result)

    frame.rowconfigure(2, {'minsize': 12.5})

    res_standard = Labels.Labels(frame=frame, row=0, col=0, pad_x=AGO.x_indent_40, message=_("Standard:"),
                                 width=AGO.width_0, parent=element, element='standard')  # Standard

    res_diameter_in = Labels.Labels(frame=frame, row=0, col=3, pad_x=AGO.x_indent_20, message=_("Inner diameter (mm):"),
                                    width=AGO.width_3, parent=element, element='diameter_in')  # Inner Diameter

    res_color = Labels.Labels(frame=frame, row=3, col=0, pad_x=AGO.x_indent_40, message=_("Color:"), width=AGO.width_0,
                              parent=element, element='color')  # Color

    res_standard.combobox.bind("<<ComboboxSelected>>", selected_element)
    res_diameter_in.combobox.bind("<<ComboboxSelected>>", selected_element)
    res_color.combobox.bind("<<ComboboxSelected>>", selected_element)
Пример #2
0
def output_sennit_standard(frame, parent, standard, master):
    def selected_element(event):
        wall_thickness = res_wall_thickness.combobox.get()
        diameter_in = res_diameter_in.combobox.get()
        diameter_out = res_diameter_out.combobox.get()

        # Getting the name from the database
        wall_thickness = SQLite.output_name_sen_and_tube_w_t(parent, AFL.del_symbol(wall_thickness))
        diameter_in = SQLite.output_name_sen_and_tube_d_i(parent, AFL.del_symbol(diameter_in))
        diameter_out = SQLite.output_name_sen_and_tube_d_o(parent, AFL.del_symbol(diameter_out))

        result = AFL.intersection_3(wall_thickness, diameter_in, diameter_out)

        frame_result = FrameResult.FrameResult(master=master)
        frame_result.grid(row=10, column=0, columnspan=4)

        AFR.output_radiobutton(parent, result, frame_result)

    frame.rowconfigure(2, {'minsize': 12.5})

    res_wall_thickness = Labels.Labels(frame=frame, row=0, col=0, pad_x=AGO.x_indent_40,
                                       message=_("Wall thickness (mm):"), width=AGO.width_0, parent=parent,
                                       element='wall_thickness', standard=standard)  # Wall thickness

    res_diameter_in = Labels.Labels(frame=frame, row=0, col=3, pad_x=AGO.x_indent_20, message=_("Inner diameter (mm):"),
                                    width=AGO.width_3, parent=parent, element='diameter_in',
                                    standard=standard)  # Inner diameter

    res_diameter_out = Labels.Labels(frame=frame, row=3, col=0, pad_x=AGO.x_indent_40,
                                     message=_("Outer diameter (mm):"), width=AGO.width_0, parent=parent,
                                     element='diameter_out', standard=standard)  # Outer diameter

    res_wall_thickness.combobox.bind("<<ComboboxSelected>>", selected_element)
    res_diameter_in.combobox.bind("<<ComboboxSelected>>", selected_element)
    res_diameter_out.combobox.bind("<<ComboboxSelected>>", selected_element)
Пример #3
0
def output_tube_standard(frame, parent, standard, master):
    def selected_element(event):
        diameter_in = res_diameter_in.combobox.get()
        color = res_color.combobox.get()

        # Getting the name from the database
        diameter_in = SQLite.output_name_sen_and_tube_d_i(
            parent, AFL.del_symbol(diameter_in))
        color = SQLite.output_name_sen_and_tube_c(parent,
                                                  AFL.del_symbol(color))

        result = AFL.intersection_2(diameter_in, color)

        frame_result = FrameResult.FrameResult(master=master)
        frame_result.grid(row=10, column=0, columnspan=4)

        AFR.output_radiobutton(parent, result, frame_result)

    res_color = Labels.Labels(frame=frame,
                              row=0,
                              col=0,
                              pad_x=AGO.x_indent_40,
                              message=_("Color:"),
                              width=AGO.width_0,
                              parent=parent,
                              element='color',
                              standard=standard)  # Color

    res_diameter_in = Labels.Labels(frame=frame,
                                    row=0,
                                    col=3,
                                    pad_x=AGO.x_indent_20,
                                    message=_("Inner diameter (mm):"),
                                    width=AGO.width_3,
                                    parent=parent,
                                    element='diameter_in',
                                    standard=standard)  # Inner Diameter

    res_diameter_in.combobox.bind("<<ComboboxSelected>>", selected_element)
    res_color.combobox.bind("<<ComboboxSelected>>", selected_element)
Пример #4
0
def output_cable(frame, element):
    Labels.Labels(frame=frame, row=0, col=0, pad_x=AGO.x_indent_40, message=_("Standard:"),
                  width=AGO.width_0)  # Standard

    Labels.Labels(frame=frame, row=0, col=3, pad_x=AGO.x_indent_20, message=_("Density of the cable:"),
                  width=AGO.width_3)  # Density
Пример #5
0
def output_wire(frame, element, master):
    def selected_element(event):
        standard = res_standard.combobox.get()
        wire_thickness = res_wire_thickness.combobox.get()
        color = res_color.combobox.get()
        mark = res_mark.combobox.get()
        section = res_section.combobox.get()

        # Getting the name from the database
        standard = SQLite.output_name_wire_s(element, AFL.del_symbol(standard))
        wire_thickness = SQLite.output_name_wire_w_t(
            element, AFL.del_symbol(wire_thickness))
        color = SQLite.output_name_wire_c(element, AFL.del_symbol(color))
        mark = SQLite.output_name_wire_m(element, AFL.del_symbol(mark))
        section = SQLite.output_name_wire_sec(element, AFL.del_symbol(section))

        result = AFL.intersection_5(standard, wire_thickness, color, mark,
                                    section)

        frame_result = FrameResult.FrameResult(master=master)
        frame_result.grid(row=10, column=0, columnspan=4)

        AFR.output_radiobutton(element, result, frame_result)

    frame.rowconfigure(2, {'minsize': 12.5})
    frame.rowconfigure(5, {'minsize': 12.5})

    res_standard = Labels.Labels(frame=frame,
                                 row=0,
                                 col=0,
                                 pad_x=AGO.x_indent_40,
                                 message=_("Standard:"),
                                 width=AGO.width_0,
                                 parent=element,
                                 element='standard')  # Standard

    res_wire_thickness = Labels.Labels(
        frame=frame,
        row=0,
        col=3,
        pad_x=AGO.x_indent_20,
        message=_("Wire thickness (mm):"),
        width=AGO.width_3,
        parent=element,
        element='wire_thickness')  # Wire thickness

    res_color = Labels.Labels(frame=frame,
                              row=3,
                              col=0,
                              pad_x=AGO.x_indent_40,
                              message=_("Color:"),
                              width=AGO.width_0,
                              parent=element,
                              element='color')  # Color

    res_mark = Labels.Labels(frame=frame,
                             row=3,
                             col=3,
                             pad_x=AGO.x_indent_20,
                             message=_("Mark:"),
                             width=AGO.width_3,
                             parent=element,
                             element='mark')  # Mark

    res_section = Labels.Labels(frame=frame,
                                row=6,
                                col=0,
                                pad_x=AGO.x_indent_40,
                                message=_("Section:"),
                                width=AGO.width_0,
                                parent=element,
                                element='section')  # Section

    res_standard.combobox.bind("<<ComboboxSelected>>", selected_element)
    res_wire_thickness.combobox.bind("<<ComboboxSelected>>", selected_element)
    res_color.combobox.bind("<<ComboboxSelected>>", selected_element)
    res_mark.combobox.bind("<<ComboboxSelected>>", selected_element)
    res_section.combobox.bind("<<ComboboxSelected>>", selected_element)