def autoScaleScene(self):
    '\n        Selects a scaling factor that maximizes the scene within the window \n        frame without requiring scroll bars.  Intended to be called when\n        the window size is changed by the user and auto-scaling is turn on.\n\n        Returns:\n            True if scaling of this scene is done (no window resize)\n            False if the a window resize command was issued\n        '
    barheights = (self.menuBar().height() + self.statusBar().height())
    cwheight = ((self.height() - barheights) - self.__framedelta)
    heightsf = (float(cwheight) / float(self.__sceneheight))
    cwwidth = (self.width() - self.__framedelta)
    widthsf = (float(cwwidth) / float(self.__scenewidth))
    if (heightsf < widthsf):
        factor = heightsf
    else:
        factor = widthsf
    newcwheight = int(((factor * self.__sceneheight) + 0.5))
    newcwwidth = int(((factor * self.__scenewidth) + 0.5))
    if (self.isMaximized() or ((abs((cwheight - newcwheight)) <= self.__framedelta) and (abs((cwwidth - newcwwidth)) <= self.__framedelta))):
        self.scaleScene(factor, False)
        return True
    else:
        self.resize((newcwwidth + self.__framedelta), ((newcwheight + self.__framedelta) + barheights))
        return False
Selects a scaling factor that maximizes the scene within the window 
frame without requiring scroll bars.  Intended to be called when
the window size is changed by the user and auto-scaling is turn on.

Returns:
    True if scaling of this scene is done (no window resize)
    False if the a window resize command was issued
def autoScaleScene(self):
    '\n        Selects a scaling factor that maximizes the scene within the window \n        frame without requiring scroll bars.  Intended to be called when\n        the window size is changed by the user and auto-scaling is turn on.\n\n        Returns:\n            True if scaling of this scene is done (no window resize)\n            False if the a window resize command was issued\n        '
    barheights = (self.menuBar().height() + self.statusBar().height())
    cwheight = ((self.height() - barheights) - self.__framedelta)
    heightsf = (float(cwheight) / float(self.__sceneheight))
    cwwidth = (self.width() - self.__framedelta)
    widthsf = (float(cwwidth) / float(self.__scenewidth))
    if (heightsf < widthsf):
        factor = heightsf
    else:
        factor = widthsf
    newcwheight = int(((factor * self.__sceneheight) + 0.5))
    newcwwidth = int(((factor * self.__scenewidth) + 0.5))
    if (self.isMaximized() or ((abs((cwheight - newcwheight)) <= self.__framedelta) and (abs((cwwidth - newcwwidth)) <= self.__framedelta))):
        self.scaleScene(factor, False)
        return True
    else:
        self.resize((newcwwidth + self.__framedelta), ((newcwheight + self.__framedelta) + barheights))
        return False