meta data for this page
  •  

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
maemo:shared_code [2011/08/18 23:18]
grp4
maemo:shared_code [2011/08/18 23:19] (current)
grp4
Line 12: Line 12:
 some examples some examples
 <code python examples.py> <code python examples.py>
-        a= gtk.CheckButton("check button 1") +            def main(self): 
-        hbox.pack_start(aTrueTrue0)+        # place where fin info about pygtk http://www.pygtk.org/pygtk2tutorial/ 
 +        win = hildon.StackableWindow() 
 +      
 +        # Create and pack labels 
 +        vbox = gtk.VBox(False, 10) 
 +        hbox = gtk.HBox(False, 10) 
 +      
 +        #interface.. buttons, labels ,... etc 
 +        labelHeader = gtk.Label("MeHear") 
 +        labelSubHeader = gtk.Label("voice amplifier"
 +      
 +#        buttonGTK1 = gtk.Button("Record"
 +#        buttonGTK1.connect("clicked"self.record_button_clickedlabelSubHeader) 
 +      
 +        buttonGTK = gtk.ToggleButton("AMPlify"
 +        buttonGTK.connect("clicked", self.amplify_button_clickedlabelSubHeader)
                  
-        b= gtk.ToggleButton("check button 1") +        #a= gtk.CheckButton("check button 1") 
-        hbox.pack_start(b, True, True, 0)+        #hbox.pack_start(a, True, True, 0)
                  
-        = gtk.RadioButton(None, "radio button1") +        #b= gtk.ToggleButton("check button 1") 
-        hbox.pack_start(c, True, True, 0)+        #hbox.pack_start(b, True, True, 0)
                  
-        adjus = gtk.Adjustment(value=60lower=0, upper=100, step_incr=1, page_incr=0, page_size=0) +        #c = gtk.RadioButton(None"radio button1"
-        d = gtk.SpinButton(adjustment= adjus, climb_rate=0.1, digits=5+        #hbox.pack_start(c, True, True, 0)
-        hbox.pack_start(d, True, True, 0)+
                  
 +        #adjus = gtk.Adjustment(value=60, lower=0, upper=100, step_incr=1, page_incr=0, page_size=0)
 +        #d = gtk.SpinButton(adjustment= adjus, climb_rate=0.1, digits=5)
 +        #hbox.pack_start(d, True, True, 0)
 +        #hscrollbar = gtk.HSscrollbar(adjustment)
 +        
 +        #http://www.pygtk.org/pygtk2tutorial/sec-ComboWidget.html
         combo = gtk.Combo()         combo = gtk.Combo()
         combo.entry.set_text("text")         combo.entry.set_text("text")
Line 30: Line 50:
         combo.set_popdown_strings(slist)         combo.set_popdown_strings(slist)
         hbox.pack_start(combo, True, True, 0)         hbox.pack_start(combo, True, True, 0)
 +        
 +        hbox.pack_start(buttonGTK, True, True, 0)
 +     
 +        vbox.pack_start(labelHeader, True, True, 0)
 +        vbox.pack_start(labelSubHeader, True, True, 0)
 +        vbox.pack_start(hbox, True, True, 0)
 +        
 +        
 +     
 +        # Add label's box to window
 +        win.add(vbox)
 +     
 +        win.connect("delete_event", gtk.main_quit)
 +     
 +        win.show_all()
 +     
 +        gtk.main()
 </code> </code>