Exemple #1
0
    def __init__(self, parent, layout=1):
        self.cwd = os.getcwd()
        self.p = Parameters(interface='GUI')
        self.parent = parent
        self.initialize()

        self.GUI = AutoSimVizGUI()

        if layout == 1:
            # only one column of input parameters:
            self.GUI.make_prmGUI(self.parent,
                                 self.p,
                                 sort_widgets=0,
                                 height=300,
                                 pane=0)
        else:
            # widgets sorted in columns:
            self.GUI.make_prmGUI(self.parent,
                                 self.p,
                                 sort_widgets=1,
                                 height=300,
                                 pane=1)
        help = '''
Interface to a squeeze film solver
'''

        self.GUI.make_buttonGUI(self.parent,
                                buttons=[('Simulate', self.simulate),
                                         ('Visualize', self.visualize)],
                                logo=None,
                                help=help)  # help=None to avoid help button

        self.accl, self.defm, self.load = \
                  self.GUI.make_curveplotGUI(self.parent, 3,
                                             placement='right')
Exemple #2
0
    def __init__(self, parent, layout='sort'):
        self.cwd = os.getcwd()        
        self.p = Parameters(interface='GUI')
        self.master = parent
        self.initialize()

        self.GUI = AutoSimVizGUI()

        if layout == 'sort':
            # widgets sorted in columns:
            self.GUI.make_prmGUI(self.master, self.p,
                                 sort_widgets=1,
                                 height=300, pane=1)
        else:
            # only one column of input parameters:
            self.GUI.make_prmGUI(self.master, self.p,
                                 sort_widgets=0,
                                 height=300, pane=0)

        help = """\
Simulate: run oscillator code for solving the
differential equation for the spring system.

Visualize: run Gnuplot to make plots in PNG and PostScript
format and on the screen (optional). Plots are stored
in the subdirectory with name equal to 'case'.
"""
        self.GUI.make_buttonGUI(self.master,
            buttons=[('Simulate', self.simulate),
                     ('Visualize', self.visualize)],
            logo=os.path.join(os.environ['scripting'],
                 'src','misc','figs','simviz2.xfig.t.gif'),
            help=None)
Exemple #3
0
    def __init__(self, parent, layout=1):
        self.cwd = os.getcwd()
        self.p = Parameters(interface="GUI")
        self.parent = parent
        self.initialize()

        self.GUI = AutoSimVizGUI()

        if layout == 1:
            # only one column of input parameters:
            self.GUI.make_prmGUI(self.parent, self.p, sort_widgets=0, height=300, pane=0)
        else:
            # widgets sorted in columns:
            self.GUI.make_prmGUI(self.parent, self.p, sort_widgets=1, height=300, pane=1)
        help = """
Interface to a squeeze film solver
"""

        self.GUI.make_buttonGUI(
            self.parent, buttons=[("Simulate", self.simulate), ("Visualize", self.visualize)], logo=None, help=help
        )  # help=None to avoid help button

        self.accl, self.defm, self.load = self.GUI.make_curveplotGUI(self.parent, 3, placement="right")
Exemple #4
0
def GUI(parameters, root):
    gui = AutoSimVizGUI()
    gui.make_prmGUI(root, parameters, height=300)
    Button(root, text='Quit', command=root.destroy).pack()
    root.mainloop()
    return parameters