Logo Search packages:      
Sourcecode: gnome-mousetrap version File versions  Download package

def mouseTrap::mainGui::MainGui::buildInterface (   self  ) 

Builds the interface

Arguments:
- self: The main object pointer

Definition at line 81 of file mainGui.py.

00081                               :
        """
        Builds the interface
        
        Arguments:
        - self: The main object pointer
        """

        accelGroup = gtk.AccelGroup()
        self.add_accel_group( accelGroup )
        
        self.accelGroup = accelGroup
        
        self.set_title( "mouseTrap" )
        self.connect( "destroy", self.close)
        self.setWindowsIcon()
        
        self.vBox = gtk.VBox()

        self.buttonsBox = gtk.HButtonBox()

        self.prefButton = gtk.Button()
        self.prefButton.add(self._newStockImageButton(_("_Preferences"), gtk.STOCK_PREFERENCES))
        self.prefButton.connect("clicked", self._loadPreferences)
        self.buttonsBox.pack_start( self.prefButton )

        self.closeButton = gtk.Button()
        self.closeButton.add(self._newStockImageButton(_("_Exit"), gtk.STOCK_QUIT))
        self.closeButton.connect("clicked", self.close)
        self.buttonsBox.pack_start( self.closeButton )
        
        self.helpButton = gtk.Button()
        self.helpButton.add(self._newStockImageButton(_("_Help"), gtk.STOCK_HELP))
        self.helpButton.connect("clicked", self._loadHelp)
        self.buttonsBox.pack_start( self.helpButton )
       
        self.vBox.pack_start( self.buttonsBox )

        hBox = gtk.HBox()
        self.mapper = CoordsGui()
        hBox.pack_start(self.mapper, False, False )
        
        self.capture = gtk.Image()
        hBox.pack_start(self.capture, False, False )
        
        self.vBox.pack_end(hBox, False, False )
        
        hBox = gtk.HBox()
        showMapper = gtk.CheckButton( _("Start Point Mapper: ") )
        showMapper.set_active( self.settings.getboolean( "gui", "showPointMapper" ) )
        showMapper.connect("toggled", lambda x: self.mapper.show() 
                                      if x.get_active() else  self.mapper.hide())
        hBox.pack_start( showMapper, False, False )
        
        showCapture = gtk.CheckButton( _("Show Capture: ") )
        showCapture.set_active( self.settings.getboolean( "gui", "showCapture" ) )
        showCapture.connect("toggled", lambda x: self.capture.show() 
                                        if x.get_active() else  self.capture.hide())
        hBox.pack_start( showCapture, False, False )
        
        flipButton = gtk.Button( _("Flip Image") )
        flipButton.connect("clicked", self.recalcPoint, "flip" )
        hBox.pack_start( flipButton, False, False )
        
        recalcButton = gtk.Button( _("Recalc Point") )
        recalcButton.connect("clicked", self.recalcPoint )
        hBox.pack_start( recalcButton, False, False )
        
        self.vBox.pack_end(hBox, False, False )

        self.buttonsBox.show_all()
        self.vBox.show_all()
        self.add(self.vBox)
        self.show()
    
    def recalcPoint( self, widget, flip = ''):


Generated by  Doxygen 1.6.0   Back to index