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

def Eikazo::Widgets::SaneDevice::duplex_mode (   self  ) 

returns true, if the scanner is in ADF mode and if
    duplex scans are enabled (if possible)

Definition at line 678 of file Widgets.py.

00678                          :
        """ returns true, if the scanner is in ADF mode and if
            duplex scans are enabled (if possible)
        """
        if not self.adf_mode():
            return False
        optnames = self.getOptionNames()
        if 'source' in optnames:
            # avision, fujitsu
            try:
                return self._device.source == 'ADF Duplex'
            except AttributeError, errval:
                if str(errval) == 'Inactive option: source':
                    return False
                raise
        elif 'duplex' in optnames:
            # bh
            try:
                return self._device.duplex
            except AttributeError, errval:
                if str(errval) == 'Inactive option: duplex':
                    return False
                raise
        elif 'adf_mode' in optnames:
            # epson
            try:
                return self._device.adf_mode == 'Duplex'
            except AttributeError, errval:
                if str(errval) == 'Inactive option: adf_mode':
                    return False
                raise
        return False
        
gobject.signal_new("sane-geometry", SaneDevice, 
                   gobject.SIGNAL_RUN_FIRST | gobject.SIGNAL_ACTION,
                   gobject.TYPE_NONE,
                   ())
gobject.signal_new("sane-reload-params", SaneDevice, 
                   gobject.SIGNAL_RUN_FIRST | gobject.SIGNAL_ACTION,
                   gobject.TYPE_NONE,
                   ())


def _millimeters(val, opt, resol):


Generated by  Doxygen 1.6.0   Back to index