Esempio n. 1
0
    def _createPanel(self):
        self.hbox = gtk.HBox(True)
        self.window.add(self.hbox)

        # Test Buttons
        self.vboxTests = []
        self.vboxTests.append(gtk.VBox())
        self.vboxTests.append(gtk.VBox())
        self.vboxTests.append(gtk.VBox())
        for vbox in self.vboxTests:
            self.hbox.pack_start(vbox, expand=True)

        obj = gtk.Button ("Calendar Popup")
        obj.connect("clicked", self.onTest)
        self.vboxTests[0].pack_start(obj)
        
        obj = gtk.Button ("Weekday Picker")
        obj.connect("clicked", self.onTest)
        self.vboxTests[0].pack_start(obj)
        
        obj = gtk.Button ("Color Selector")
        obj.connect("clicked", self.onTest)
        self.vboxTests[1].pack_start(obj)
        
        #self.vboxTests[2].pack_start(hildon.ColorButton())
        
        obj = gtk.Button ("Add Home")
        obj.connect("clicked", self.onTest)
        self.vboxTests[0].pack_start(obj)
        
        obj = hildon.Controlbar()
        obj.set_range(0,30)
        obj.set_value(18)
        self.vboxTests[1].pack_start(obj)
        
        self.vboxTests[2].pack_start(hildon.DateEditor())
        
        obj = gtk.Button ("File Selector")
        obj.connect("clicked", self.onTest)
        self.vboxTests[0].pack_start(obj)
        
        obj = gtk.Button ("Password")
        obj.connect("clicked", self.onTest)
        self.vboxTests[2].pack_start(obj)
        
        obj = gtk.Button ("Sort")
        obj.connect("clicked", self.onTest)
        self.vboxTests[2].pack_start(obj)
        
        obj = gtk.Button ("File Details")
        obj.connect("clicked", self.onTest)
        self.vboxTests[0].pack_start(obj)
        
        obj = gtk.Button ("Font Selection")
        obj.connect("clicked", self.onTest)
        self.vboxTests[1].pack_start(obj)
        
        self.vboxTests[0].pack_start(hildon.HVolumebar())
        
        self.vboxTests[1].pack_start(hildon.VVolumebar())
        
        obj = gtk.Button ("Insert Object")
        obj.connect("clicked", self.onTest)
        self.vboxTests[2].pack_start(obj)
        
        obj = gtk.Button ("Note")
        obj.connect("clicked", self.onTest)
        self.vboxTests[2].pack_start(obj)
        
        self.vboxTests[2].pack_start(hildon.NumberEditor(0, 10))

        obj = hildon.RangeEditor()
        self.vboxTests[2].pack_start(obj)
        obj.set_range(-5, 12)
        obj.set_limits(-100, 100)
        
        obj = hildon.Seekbar()
        obj.set_total_time(180)
        obj.set_fraction(100)
        obj.set_position(30)
        self.vboxTests[0].pack_start(obj)
 def setUp(self):
     self.obj = hildon.RangeEditor()
     self.obj.set_range(1, 100)