Logo Search packages:      
Sourcecode: hgview version File versions  Download package

def hgviewlib::qt4::blockmatcher::BlockMatch::linkScrollBar (   self,
  sb,
  side 
)

Make the block list displayer be linked to the scrollbar

Definition at line 274 of file blockmatcher.py.

00274                                      :
        """
        Make the block list displayer be linked to the scrollbar
        """
        if self._sbar is None:
            self._sbar = {}
        self._sbar[side] = sb
        self.setUpdatesEnabled(False)
        self.setMaximum(sb.maximum(), side)
        self.setMinimum(sb.minimum(), side)
        self.setPageStep(sb.pageStep(), side)
        self.setValue(sb.value(), side)
        self.setUpdatesEnabled(True)
        self.connect(sb, SIGNAL('valueChanged(int)'), self.setValue)
        self.connect(sb, SIGNAL('rangeChanged(int, int)'), self.setRange)

        self.connect(self, SIGNAL('valueChanged(int, const QString &)'),
                     lambda v, s: side==s and sb.setValue(v))
        self.connect(self, SIGNAL('rangeChanged(int, int, const QString )'),
                     lambda v1, v2, s: side==s and sb.setRange(v1, v2))
        self.connect(self, SIGNAL('pageStepChanged(int, const QString )'),
                     lambda v, s: side==s and sb.setPageStep(v))
    
if __name__ == '__main__':


Generated by  Doxygen 1.6.0   Back to index