Exemplo n.º 1
0
    def __init__(self, parent=None, width=800, height=800):
        """ 
        Initialisation

        parent : une application
        width,height : dimension de l'oscilloscpe
        """
        Frame.__init__(self)
        self.master.title("Oscilloscope - Diquélou - Toscer")

        # doit-on afficher la courbe de lissajoux
        self.drawXY = IntVar()
        
        # Modele
        self.time = 0
        # gestion des signaux X et Y
        self.signal_X   = None
        self.signal_Y   = None
        self.signal_XY = None
        # Vues
        self.view = Screen(parent=self)
        self.lissajoux = Screen(parent= self)
        # Controleurs
        self.control_time = TimeBase(parent=self)
        self.control_X = Generator(self,'X')
        self.control_Y = Generator(self, 'Y')



        # menu
        menuBar = MenuBar(self)
        menuBar.pack(fill="x");

        # Affichage Vues, Controleurs
        self.view.pack(fill="both")

        self.control_time.pack(side="left", fill="y")
     
        self.control_X.pack(side="left",fill="y")

        self.lissajoux.pack(fill="both", side="left", expand=1)

        self.control_Y.pack(side="right", fill="both")

        self.configure(width=width, height=height)
        self.master.protocol("WM_DELETE_WINDOW", self.quitter)
Exemplo n.º 2
0
    def __init__(self, parent=None, width=800, height=800):
        """ 
        Initialisation

        parent : une application
        width,height : dimension de l'oscilloscpe
        """
        Frame.__init__(self)
        self.master.title("Oscilloscope")

        # Barre de menu
        menuBar = MenuBar(parent=self)
        menuBar.pack(side="top")

        # Hauteur & largeur
        self.width = width
        self.height = height
        # Modele
        self.time = 0
        self.signal = None
        # Vues
        self.view = Screen(parent=self)
        # Controleurs
        self.control_time = TimeBase(parent=self)
        self.control_X = Generator(parent=self)
        self.control_Y = Generator(parent=self, name="Y")
        self.control_L = Lissajou(parent=self)
        self.signalSelected = SignalSelected(parent=self)

        # Affichage Vues, Controleurs
        self.signalSelected.pack(side="left", fill="y")
        self.view.pack(fill="both", expand=1)
        self.control_time.pack(fill="both", expand=1)
        self.control_X.pack(side="left", fill="both", expand=1)
        self.control_L.pack(side="left")
        self.control_Y.pack(side="right", fill="both", expand=1)
        self.configure(width=width, height=height)