CMainWindow::~CMainWindow() { m_virtualMachine.Pause(); m_virtualMachine.DestroyPadHandler(); m_virtualMachine.DestroyGSHandler(); #ifdef DEBUGGER_INCLUDED m_frameDebugger.reset(); m_debugger.reset(); #endif DELETEPTR(m_outputWnd); DELETEPTR(m_statusBar); DestroyAcceleratorTable(m_accTable); if(m_recordingAvi) { m_aviStream.Close(); m_recordingAvi = false; } CloseHandle(m_recordAviMutex); m_recordAviMutex = NULL; m_virtualMachine.Destroy(); }
bool ImageViewer::saveLabelledResult(QString path, QString ext) { if(!_srcOcvImage) return false; if(!_displayImage) return false; if(!_result_display) return false; QString path1 = QString("%1_0.%2").arg(path).arg(ext); QString path2 = QString("%1_1.%2").arg(path).arg(ext); IplImage* cv_result_display = QImageToIplImage(*_result_display); IplImage* scaled = cvCreateImage(cvSize(this->_orgWidth, this->_orgHeight), cv_result_display->depth, cv_result_display->nChannels); cvResize(cv_result_display, scaled, CV_INTER_CUBIC); QImage* temp = IplImageToQImage(scaled); bool ret1 = temp->save(path1, ext.toUtf8().constData()); DELETEPTR(temp); IplImage* cv_result_save = QImageToIplImage(*_result_save); cvResize(cv_result_save, scaled, CV_INTER_CUBIC); temp = IplImageToQImage(scaled); bool ret2 = temp->save(path2, ext.toUtf8().constData()); DELETEPTR(temp); cvReleaseImage(&cv_result_display); cvReleaseImage(&scaled); cvReleaseImage(&cv_result_save); return ret1 && ret2; }
/** * \brief Destructor */ UBMediaWidget::~UBMediaWidget() { unsetActionsParent(); DELETEPTR(mpMediaObject); DELETEPTR(mpSlider); DELETEPTR(mpPauseButton); DELETEPTR(mpPlayStopButton); DELETEPTR(mpAudioOutput); DELETEPTR(mpVideoWidget); DELETEPTR(mpCover); DELETEPTR(mpMediaContainer); DELETEPTR(mpSeekerLayout); DELETEPTR(mpLayout); }
void CSaveIconView::ThreadProc() { Framework::Win32::CClientDeviceContext deviceContext(m_hWnd); unsigned int nPixelFormat = ChoosePixelFormat(deviceContext, &m_PFD); SetPixelFormat(deviceContext, nPixelFormat, &m_PFD); m_hRC = wglCreateContext(deviceContext); wglMakeCurrent(deviceContext, m_hRC); glEnable(GL_TEXTURE_2D); glClearColor(1.0, 1.0, 1.0, 1.0); while(!m_threadOver) { while(m_mailBox.IsPending()) { m_mailBox.ReceiveCall(); } if(m_iconMesh) { m_iconMesh->Update(16.f / 1000.f); } Render(deviceContext); Sleep(16); } DELETEPTR(m_iconMesh); wglMakeCurrent(NULL, NULL); wglDeleteContext(m_hRC); }
AppWidget::~AppWidget() { DELETEPTR(mpRefreshButton); DELETEPTR(mpRefreshLayout); DELETEPTR(mpSettings); DELETEPTR(mpLogger); DELETEPTR(mpQtToJS); //DELETEPTR(mpJSToQt); DELETEPTR(mpSelectorLayout); DELETEPTR(mpSelectors); DELETEPTR(mpSplitter); DELETEPTR(mpLayout); }
bool ImageViewer::deleteImage() { if (CV_IS_IMAGE(_ocvImage)) { cvReleaseImage(&_ocvImage); _ocvImage = NULL; } if (CV_IS_IMAGE(labelImage)) { cvReleaseImage(&labelImage); labelImage = NULL; } if(CV_IS_IMAGE(_srcOcvImage)) { cvReleaseImage(&_srcOcvImage); _srcOcvImage = NULL; } DELETEPTR( _displayImage ); DELETEPTR( _labelMapImage ); DELETEPTR( _result_display ); DELETEPTR( _result_save ); _displayImage = new QImage(500, 500, QImage::Format_RGB32); _displayImage->fill(qRgb(128, 128, 128)); thickness = 5; bPaintable = false; lastPos = QPoint(-1, -1); updateObjectCount(0); isEraser = false; m_method = -1; _orgWidth = 0; _orgHeight = 0; DELETEPTR( brushInterface ); _polygonPointList.clear(); _polygonPointList_cv.clear(); update(); return true; }
SColorWidget::~SColorWidget() { DELETEPTR(mpColorPreview); DELETEPTR(mpAlphaPicker); DELETEPTR(mpBluePicker); DELETEPTR(mpGreenPicker); DELETEPTR(mpRedPicker); DELETEPTR(mpColorLabel); DELETEPTR(mpContainerLayout); DELETEPTR(mpContainer); }
void CMainWindow::ShowSettingsDialog(CSettingsDialogProvider* provider) { if(!provider) return; CScopedVmPauser vmPauser(m_virtualMachine); Framework::Win32::CModalWindow* pWindow = provider->CreateSettingsDialog(m_hWnd); pWindow->DoModal(); DELETEPTR(pWindow); provider->OnSettingsDialogDestroyed(); Redraw(); }
StrokesRecognizer::~StrokesRecognizer() { DELETEPTR(mpClearBttn); DELETEPTR(mpRecognizeBttn); DELETEPTR(mpCharacterResult); DELETEPTR(mpCanvas); DELETEPTR(mpToolsLayout); DELETEPTR(mpLayout); }
void CSaveIconView::LoadIcon() { DELETEPTR(m_iconMesh); if(m_save == NULL) return; try { boost::filesystem::path iconPath = m_save->GetIconPath(m_iconType); auto iconStream(Framework::CreateInputStdStream(iconPath.native())); IconPtr icon(new CIcon(iconStream)); m_iconMesh = new CIconMesh(icon); } catch(...) { } }
void CPS2VM::DestroyImpl() { DELETEPTR(m_ee->m_gs); m_nEnd = true; }
bool ImageViewer::openImage(const QString &fileName) { if ( !fileName.isEmpty() ) { deleteImage(); std::string sstr = fileName.toLocal8Bit().data(); IplImage* newImage = cvLoadImage( sstr.c_str(), 1 ); if ( !newImage ) { QMessageBox::warning( this, tr("提示"), tr("无法打开文件 %1.\n").arg(fileName), QMessageBox::Close); return false; } _orgWidth = newImage->width; _orgHeight = newImage->height; if (cv::max(newImage->width,newImage->height) > 800) { _scale = cv::max(newImage->width/600.0f, newImage->height/600.0f); _ocvImage = cvCreateImage(cvSize(newImage->width/_scale, newImage->height/_scale), 8, 3); cvResize(newImage,_ocvImage); } else if (newImage->width <= 250 || newImage->height <= 250) { _scale = cv::min(newImage->width/300.0f, newImage->height/300.0f); _ocvImage = cvCreateImage(cvSize(newImage->width/_scale,newImage->height/_scale),8,3); cvResize(newImage,_ocvImage); } else { _ocvImage = cvCreateImage(cvSize(newImage->width, newImage->height), 8, 3); cvCopy(newImage, _ocvImage); } if( !_srcOcvImage ) { _srcOcvImage = cvCreateImage(cvSize(_ocvImage->width, _ocvImage->height), _ocvImage->depth, _ocvImage->nChannels); cvCopy(_ocvImage, _srcOcvImage); } _srcWidth = _ocvImage->width; _srcHeight = _ocvImage->height; _labelMapImage = new QImage(_ocvImage->width, _ocvImage->height, QImage::Format_ARGB32); QImage _alphaImage(_ocvImage->width, _ocvImage->height, QImage::Format_Indexed8); _alphaImage.fill(255); _labelMapImage->setAlphaChannel(_alphaImage); _labelMapImage->fill(qRgb(0, 0, 0)); QImage *image = IplImageToQImage( _ocvImage ); setImage( *image ); DELETEPTR(image); if(CV_IS_IMAGE(newImage)) { cvReleaseImage(&newImage); newImage = 0; } } return true; }
UBTeacherGuidePageZeroWidget::~UBTeacherGuidePageZeroWidget() { DELETEPTR(mpPageNumberLabel); DELETEPTR(mpSessionTitle); DELETEPTR(mpSeparatorSessionTitle); DELETEPTR(mpAuthorsLabel); DELETEPTR(mpAuthors); DELETEPTR(mpSeparatorAuthors); DELETEPTR(mpCreationLabel); DELETEPTR(mpLastModifiedLabel); DELETEPTR(mpObjectivesLabel); DELETEPTR(mpObjectives); DELETEPTR(mpSeparatorObjectives); DELETEPTR(mpIndexLabel); DELETEPTR(mpKeywordsLabel); DELETEPTR(mpKeywords); DELETEPTR(mpSchoolLevelItemLabel); DELETEPTR(mpSchoolLevelBox); DELETEPTR(mpSchoolSubjectsItemLabel); DELETEPTR(mpSchoolSubjectsBox); DELETEPTR(mpSchoolTypeItemLabel); DELETEPTR(mpSchoolTypeBox); DELETEPTR(mpSeparatorIndex); DELETEPTR(mpLicenceLabel); DELETEPTR(mpLicenceBox); DELETEPTR(mpLicenceValueLabel); DELETEPTR(mpLicenceIcon); DELETEPTR(mpModePushButton); DELETEPTR(mpLicenceLayout); DELETEPTR(mpButtonTitleLayout); DELETEPTR(mpContainerWidgetLayout); DELETEPTR(mpContainerWidget); DELETEPTR(mpScrollArea); DELETEPTR(mpLayout); }
UBTGWidget::~UBTGWidget(){ DELETEPTR(mpPageZeroWidget); DELETEPTR(mpEditionWidget); DELETEPTR(mpPresentationWidget); }
void CPS2VM::CDROM0_Destroy() { SetIopCdImage(NULL); DELETEPTR(m_pCDROM0); }
void CPS2VM::CDROM0_Reset() { DELETEPTR(m_pCDROM0); CDROM0_Mount(CAppConfig::GetInstance().GetPreferenceString(PS2VM_CDROM0PATH)); }
void CPS2VM::DestroyPadHandlerImpl() { DELETEPTR(m_pad); }
void CPS2VM::DestroyGsImpl() { m_ee->m_gs->Release(); DELETEPTR(m_ee->m_gs); }
SColorPicker::~SColorPicker() { DELETEPTR(mpColorValue); DELETEPTR(mpIndicator); DELETEPTR(mpLayout); }
SColorPreview::~SColorPreview() { DELETEPTR(mpBackColor); DELETEPTR(mpForeColor); }
CELFSymbolView::~CELFSymbolView() { DELETEPTR(m_listView); }
SDrawingController::~SDrawingController() { DELETEPTR(mpBrush); }