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

void DPImage::checkImageScaling (  )  [protected, slot]

Called from a timeout event after resizing to see if the image resizing thread has done anything useful yet.

Definition at line 234 of file dpimage.cpp.

References ImageScaleThread::bestScaling(), Item::setChanged(), and ImageScaleThread::updateSettings().

{
      if ( !m_bSettingsChanged && (m_imageScaling == ImageScaleThread::SmoothScaled) )
      {
            // Image scaling is already at its best, so return
            return;
      }
      
      ImageScaleThread::BestScaling bs;
      QImage im = m_imageScaleThread.bestScaling( & bs );
      if ( bs > m_imageScaling )
      {
            m_imageScaling = bs;
            m_image = im;
            setChanged();
      }
      
      if ( !m_imageScaleThread.running() )
      {
            if ( m_imageScaleThread.updateSettings( m_imageURL, width(), height() ) )
            {
                  m_bSettingsChanged = false;
                  m_imageScaling = ImageScaleThread::Unscaled;
                  m_imageScaleThread.start();
            }
      }
}


Generated by  Doxygen 1.6.0   Back to index