Logo Search packages:      
Sourcecode: kde-guidance version File versions  Download package

def displayconfigabstraction::Screen::getAvailableRefreshRatesForResolution (   self,
  resolution_index 
)

Get the list of available refresh rates for the given resolution

Get the list of available refresh rates for the given resolution.

Keyword arguments:
resolution_index -- Index into the list of resolutions.

Returns a list of integers in Hz.

Definition at line 2015 of file displayconfigabstraction.py.

02015                                                                     :
        """Get the list of available refresh rates for the given resolution
        
        Get the list of available refresh rates for the given resolution.
        
        Keyword arguments:
        resolution_index -- Index into the list of resolutions.
        
        Returns a list of integers in Hz.
        """
        isize = self.available_sizes[resolution_index]
        if self.isResolutionLive():
            j = 0
            for size in self.x_live_screen.getAvailableSizes():
                (sw,sh,wm,hm) = size
                if isize==(sw,sh):
                    rates = self.x_live_screen.getAvailableRefreshRates(j)
                    rates.sort()
                    return rates
                j += 1
            assert False,"Can't find matching screen resolution"
        else:
            #
            rates = []
            for mode in self.mode_list:
                if isize==(mode.getWidth(),mode.getHeight()):
                    rates.append(mode.getVRefresh())

            rates.sort()
            return rates
    
    # Applying changes.
    
    def isResolutionLive(self):


Generated by  Doxygen 1.6.0   Back to index