refactoring de la boîte de dialogue de sélection de la chanson (début).
[minwii.git] / src / app / minwii.py
1 # -*- coding: utf-8 -*-
2 """
3 l'application winwii
4
5 $Id$
6 $URL$
7 """
8
9 from pgu.gui import Desktop
10 from pgu.gui import QUIT
11 from widgets.home import Home
12 from widgets.playingscreen import SongPlayingScreen, PlayingScreen
13 from synth import Synth
14 from eventutils import EventDispatcher
15 from musicxml import musicXml2Song
16 from config import SONG_FILE_PATH
17
18 class MinWii(object):
19
20 def __init__(self) :
21 app = Desktop()
22 synth = Synth()
23 synth.program_select(0, 0, 0)
24
25 if True :
26 home = Home(songPath=SONG_FILE_PATH)
27 home.connect(QUIT, app.quit)
28 app.run(home)
29 app.close(home)
30
31 song = musicXml2Song('/Users/pinbe/dev/minwii/src/songs/chansons/etoile_neige.xml', printNotes=True)
32 playingScreen = SongPlayingScreen(synth, song)
33 #playingScreen = PlayingScreen(synth)
34 playingScreen.run()
35 EventDispatcher.reset()