ImageToolWidget::ImageToolWidget(QWidget *parent) : QWidget(parent) { ui.setupUi(this); // Register our mirror filter. qtRegisterImageFilter<MirrorFilter>(QLatin1String("MirrorFilter")); // Iterate through all registered filters and append them to the vector QStringList filters = QtImageFilterFactory::imageFilterList(); for (int i = 0; i < filters.count(); ++i) { m_imageFilters += QtImageFilterFactory::createImageFilter(filters[i]); } for (int i = 0; i < m_imageFilters.count(); ++i) { ui.FiltersCombo->addItem(m_imageFilters[i]->name()); } ui.FiltersCombo->insertItem(0, QLatin1String("--Choose filter--")); m_imageFilters.prepend((QtImageFilter*)0); QObject::connect(ui.LoadButton, SIGNAL(clicked()), this, SLOT(loadImage())); QObject::connect(ui.ReloadButton, SIGNAL(clicked()), this, SLOT(reloadImage())); QObject::connect(ui.FilterButton, SIGNAL(clicked()), this, SLOT(filterImage())); QObject::connect(ui.FiltersCombo, SIGNAL(currentIndexChanged(int)), this, SLOT(filterIndexChanged(int))); ui.FiltersCombo->setCurrentIndex(0); m_currentFilename = QLatin1String("images/qtlogo.png"); reloadImage(); }
void GLImageDrawable::setLiveStatus(bool flag) { GLVideoDrawable::setLiveStatus(flag); if(flag) { if(m_releasedImage) reloadImage(); if(m_frame) m_activeMemory += m_frame->pointerLength();; #ifdef DEBUG_MEMORY_USAGE qDebug() << "GLImageDrawable::setLiveStatus("<<flag<<"): "<<(QObject*)this<<" Active memory usage up to:"<<(m_activeMemory/1024/1024)<<"MB"; #endif if(m_needUpdate) { m_needUpdate = false; //updateTexture(); //updateGL(); } } else { if(m_frame) m_activeMemory -= m_frame->pointerLength();; #ifdef DEBUG_MEMORY_USAGE qDebug() << "GLImageDrawable::setLiveStatus("<<flag<<"): "<<(QObject*)this<<" Active memory usage down to:"<<(m_activeMemory/1024/1024)<<"MB"; #endif if(canReleaseImage() && m_allocatedMemory > IMAGE_ALLOCATION_CAP_MB*1024*1024) releaseImage(); } }
void effectWindow::onNewAf() { if(fw == 0) { fw = new flameWindow(); connect(fw, SIGNAL(accepted()), this, SLOT(reloadImage())); } fw->show(); }
RGBImage::RGBImage(const RGBImage& i) : RGBAlgorithm( i.doc()) , m_filename(i.filename()) , m_animationStyle(i.animationStyle()) , m_xOffset(i.xOffset()) , m_yOffset(i.yOffset()) { reloadImage(); }
/** \fn addLogopFilter \brief constructor */ addLogopFilter::addLogopFilter( ADM_coreVideoFilter *in,CONFcouple *setup) : ADM_coreVideoFilter(in,setup) { myImage=NULL; if(!setup || !ADM_paramLoad(setup,logo_param,&configuration)) { // Default value configuration.x=0; configuration.y=0; configuration.alpha=255; configuration.logo=NULL; } myName="logo"; reloadImage(); }
ImageViewer::ImageViewer(QWidget* parent) : QWidget(parent) { QHBoxLayout *layout = new QHBoxLayout(this); layout->setAlignment(Qt::AlignHCenter); m_svgWidget = new QSvgWidget(this); layout->addWidget(m_svgWidget); m_label = new QLabel(this); layout->addWidget(m_label); m_reloadRequestTimer = new QTimer(this); connect(m_reloadRequestTimer, SIGNAL(timeout()), this, SLOT(reloadImage())); }
/** \fn configure */ bool addLogopFilter::configure( void) { #define PX(x) &(configuration.x) diaElemFile file(0,(char **)PX(logo),QT_TRANSLATE_NOOP("logo","_Logo (jpg file):"), NULL, QT_TRANSLATE_NOOP("logo","Select JPEG file")); diaElemUInteger positionX(PX(x),QT_TRANSLATE_NOOP("logo","_X Position:"),0,info.width); diaElemUInteger positionY(PX(y),QT_TRANSLATE_NOOP("logo","_Y Position:"),0,info.height); diaElemUInteger alpha(PX(alpha),QT_TRANSLATE_NOOP("logo","_Alpha:"),0,255); diaElem *elems[4]={&file,&positionX,&positionY,&alpha}; if( diaFactoryRun(QT_TRANSLATE_NOOP("logo","Logo"),4,elems)) { if(false==reloadImage()) GUI_Error_HIG("Oops","Cannot load the logo"); return true; } return false; }
void RGBImage::setFilename(const QString& filename) { m_filename = filename; reloadImage(); }
void OptContentDock::fillInfo() { if (!document()->hasOptionalContent()) { return; } m_view->setModel(document()->optionalContentModel()); connect(m_view->model(), SIGNAL(dataChanged(QModelIndex, QModelIndex)), this, SLOT(reloadImage())); m_view->expandToDepth(1); }