/** @brief fetch output and inputs clips */ virtual void setupAndProcess( const OFX::RenderArguments& args ) { _renderArgs = args; _renderWindowSize.x = ( _renderArgs.renderWindow.x2 - _renderArgs.renderWindow.x1 ); _renderWindowSize.y = ( _renderArgs.renderWindow.y2 - _renderArgs.renderWindow.y1 ); try { setup( args ); } catch( exception::Common& ) { progressEnd(); // if the host is trying to abort the rendering return without error if( _effect.abort() ) { return; } throw; } catch(...) { progressEnd(); // if the host is trying to abort the rendering return without error if( _effect.abort() ) { return; } throw; } // Call the base class process member this->process(); }
MainWindow::MainWindow(QWidget *parent) : QMainWindow(parent), ui(new Ui::MainWindow) { ui->setupUi(this); storage = new PicStorage; mProgress = new QProgressDialog(this); mProgress->setWindowModality(Qt::WindowModal); mProgress->setMinimumDuration(1000); connect(storage, SIGNAL(message(QString)), ui->plainTextEdit, SLOT(appendPlainText(QString))); connect(ui->actionImport, SIGNAL(triggered(bool)), this, SLOT(onImport())); connect(ui->actionLoad, SIGNAL(triggered(bool)), this, SLOT(onLoad())); connect(ui->actionSetStorage, SIGNAL(triggered(bool)), this, SLOT(onSetRoot())); // connect(ui->actionImport, SIGNAL(triggered(bool)), this, SLOT(onImport())); // connect(ui->actionImport, SIGNAL(triggered(bool)), this, SLOT(onImport())); connect(storage, SIGNAL(progressStart(int,QString)), this, SLOT(showProgress(int,QString))); connect(storage, SIGNAL(progress(int)), this, SLOT(progress(int))); connect(storage, SIGNAL(progressEnd()), mProgress, SLOT(reset())); }
MainWindow::MainWindow(QWidget *parent) : QMainWindow(parent), ui(new Ui::MainWindow), mSelected(NULL) { ui->setupUi(this); connect(ui->findButton, SIGNAL(clicked(bool)), this, SLOT(onLeftButton())); connect(ui->infoButton, SIGNAL(clicked(bool)), this, SLOT(onRightButton())); connect(ui->filterTypeComboBox, SIGNAL(currentIndexChanged(int)), this, SLOT(onFilterSelected())); connect(ui->filterComboBox, SIGNAL(currentTextChanged(QString)), this, SLOT(onFilterChanged())); connect(ui->filterLineEdit, SIGNAL(textChanged(QString)), this, SLOT(onFilterChanged())); QSqlDatabase db = QSqlDatabase::addDatabase("QSQLITE"); db.setDatabaseName("database.sqlite"); db.open(); mProgress = new QProgressDialog(this); mProgress->setWindowTitle(tr("Resistance is futile")); mPrinter = new PrintHelper(this); mPrintDialog = new PrintSelectDialog(this); mTracks = new TracksModel(this); mFiles = new FilesModel(mTracks, this); mProperties = new PropertyModel(mTracks, this); mTags = new TagsModel(mTracks, this); mFilter = new FilterModel(mTracks, this); mFilter->setSourceModel(mTracks); mSettings = new SettingsDialog(mTracks, this); connect(mTracks, SIGNAL(progressStart(int,QString)), this, SLOT(onProgressInit(int,QString))); connect(mTracks, SIGNAL(progress(int)), mProgress, SLOT(setValue(int))); connect(mTracks, SIGNAL(progressEnd()), mProgress, SLOT(reset())); ui->dbView->setModel(mFilter); connect(ui->dbView->selectionModel(), SIGNAL(currentChanged(QModelIndex,QModelIndex)), this, SLOT(onTrackSelected(QModelIndex))); connect(mTracks, SIGNAL(recordSelected(Record*)), this, SLOT(onSelected(Record*))); connect(mTracks, SIGNAL(dbChanged()), this, SLOT(onDBChanged())); connect(mTracks, SIGNAL(tagsChanged()), this, SLOT(onTagsChanged())); connect(mTracks, SIGNAL(recordChanged()), this, SLOT(onRecordChanged())); connect(mTracks, SIGNAL(recordSelected(Record*)), this, SLOT(onRecordChanged())); connect(ui->filesView, SIGNAL(doubleClicked(QModelIndex)), this, SLOT(onFileActivated(QModelIndex))); connect(ui->actionSaveTrack, SIGNAL(triggered(bool)), mTracks, SLOT(saveRecord())); connect(ui->actionNewTrack, SIGNAL(triggered(bool)), mTracks, SLOT(newRecord())); connect(ui->actionCancelChanges, SIGNAL(triggered(bool)), mTracks, SLOT(revertRecord())); connect(ui->actionPlayTrack, SIGNAL(triggered(bool)), this, SLOT(onPlayPlus())); connect(ui->actionPlayTrackMinus, SIGNAL(triggered(bool)), this, SLOT(onPlayMinus())); connect(ui->actionPrint, SIGNAL(triggered(bool)), this, SLOT(onPrint())); connect(ui->actionAddFolder, SIGNAL(triggered(bool)), this, SLOT(onSetStorage())); connect(ui->actionExport, SIGNAL(triggered(bool)), this, SLOT(onExport())); connect(ui->actionImport, SIGNAL(triggered(bool)), this, SLOT(onImport())); connect(ui->actionSettings, SIGNAL(triggered(bool)), this, SLOT(onSettings())); connect(ui->actionFilterFilesOnly, SIGNAL(toggled(bool)), this, SLOT(onFFilter(bool))); connect(ui->actionFilterFullInfo, SIGNAL(toggled(bool)), this, SLOT(onIFFilter(bool))); connect(ui->actionFilterInfoOnly, SIGNAL(toggled(bool)), this, SLOT(onIFilter(bool))); connect(ui->addTagButton, SIGNAL(clicked(bool)), this, SLOT(onAddTag())); connect(ui->removeTagButton, SIGNAL(clicked(bool)), this, SLOT(onRemoveTag())); connect(ui->addFileButton, SIGNAL(clicked(bool)), this, SLOT(onAddFile())); connect(ui->deleteFileButton, SIGNAL(clicked(bool)), this, SLOT(onDeleteFile())); connect(ui->moveFileButton, SIGNAL(clicked(bool)), this, SLOT(onMoveFile())); connect(ui->autoFileButton, SIGNAL(clicked(bool)), this, SLOT(onAutoFile())); // no logic yet ui->moveFileButton->setVisible(false); ui->filesView->setModel(mFiles); ui->propertyView->setModel(mProperties); ui->propertyView->setItemDelegateForColumn( PropertyModel::valueColumn, new ComboCheckBoxDelegate(this, ", ")); ui->tagsView->setModel(mTags); load(); }
void ProgressReporter::emitProgressEnd(Progress& p) { forwardCallToPluginDirector(&PluginDirector::onProgressEnd, p); emit progressEnd(p); }
/** @brief called before any MP is done */ virtual void postProcess() { progressEnd(); }