void RenderedImage::merge(RenderedImage &other) { CoordinateMapper mapper(*this); Rect local = mapper.dataToPixel(other.dataRange()); startPainting(); m_painter->drawImage(local.toQRect(), other.m_image); stopPainting(); }
// ============= // PUBLIC SLOTS // ============= void SSBaseWidget::startPainting(){ //free up any old animation instance stopPainting(); //If a random plugin - grab one of the known plugins if(plugType=="random"){ QList<SSPlugin> valid = PluginSystem::findAllPlugins<SSPlugin>(REL_DIR); if(!valid.isEmpty()){ cplug = valid[ qrand()%valid.length() ]; } //grab a random plugin }else if(plugType!="none"){ cplug = PluginSystem::findPlugin<SSPlugin>(plugType, REL_DIR); } if(DEBUG){ qDebug() << " - Screen Saver:" << plugType << cplug.scriptURL() << cplug.isValid(); } if(cplug.isValid()){ this->setSource( cplug.scriptURL() ); if(plugType=="random"){ restartTimer->start(); } } }