void MainWindow::changeMdiMode(int index) { Mode mode = ( index == -1 ) ? m_areaMode : (Mode)ui->mdiAreaMode->itemData(index).toInt() ; if( mode == Default) { if( ! m_subImage) m_subImage = new SubMdiWindowsImage("Image Finale", ui->mdiArea); if( ! m_subImageSource1) m_subImageSource1 = new SubMdiWindowsImage("Image Source1", ui->mdiArea); if( ! m_subImageSource2) m_subImageSource2 = new SubMdiWindowsImage("Image Source2", ui->mdiArea); if( ! m_subResults ) { m_subResults = new SubMdiWindowsResults("Donnees issues du traitement", ui->mdiArea); connect(ui->actionSauvegarder_les_donn_es_acquises, SIGNAL(triggered() ), m_subResults, SLOT(saveIntoFile() ) ); connect(m_subResults, SIGNAL(resultFile(QString,bool) ) ,ui->statusbar, SLOT(showMessage(QString) ) ); } m_subImageSource1->showNormal(); m_subImageSource2->showNormal(); m_subImage->showNormal(); m_subResults->showNormal(); if( m_areaMode == Tabulation ) ui->mdiArea->setViewMode( QMdiArea::SubWindowView ); int midX = ui->mdiArea->size().width()/2; int midY = ui->mdiArea->size().height()/2; m_subImageSource1->systemMove(0,0); m_subImageSource2->systemMove(midX,0); m_subImageSource1->systemResize(midX, midY); m_subImageSource2->systemResize(midX, midY); m_subImage->systemMove(0,midY); m_subResults->systemMove(midX,midY); m_subImage->systemResize(midX, midY); m_subResults->systemResize(midX, midY); ui->mdiArea->reductAllExcept( std::set<SubMdiWindows *>({m_subImage, m_subImageSource1, m_subImageSource2, m_subResults}) ); }
void SubMdiWindowsResults::saveIntoFile(void) { QString file = QFileDialog::getSaveFileName(); if(file != "") saveIntoFile(file); }
void Player::exit() { saveIntoFile(); //DR_SAVE_DELETE(mCurrentSektor); DR_SAVE_DELETE(mCamera); }