From: dsarrut Date: Thu, 22 Jul 2010 05:55:30 +0000 (+0000) Subject: add wait icon to mouse pointer X-Git-Tag: v1.2.0~507 X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?a=commitdiff_plain;h=8adbd489ccd1f941b1fd6e04c4c2c71b3e22efc6;p=clitk.git add wait icon to mouse pointer --- diff --git a/vv/vvLabelImageLoaderWidget.cxx b/vv/vvLabelImageLoaderWidget.cxx index a4b7e41..6c36d62 100644 --- a/vv/vvLabelImageLoaderWidget.cxx +++ b/vv/vvLabelImageLoaderWidget.cxx @@ -71,8 +71,6 @@ void vvLabelImageLoaderWidget::SetText(QString t) //------------------------------------------------------------------------------ void vvLabelImageLoaderWidget::OpenImage() { - DD("OpenImage"); - // Browse for file QString Extensions = "Images files ( *.mhd *.hdr *.his)"; Extensions += ";;All Files (*)"; @@ -82,6 +80,7 @@ void vvLabelImageLoaderWidget::OpenImage() if (filename == "") return; // nothing to do // Open Image + QApplication::setOverrideCursor(QCursor(Qt::WaitCursor)); vvImageReader * mReader = new vvImageReader; mReader->SetInputFilename(filename.toStdString()); mReader->Update(IMAGE); @@ -109,9 +108,7 @@ void vvLabelImageLoaderWidget::OpenImage() return; } - DD(temp->GetScalarTypeAsITKString()); if (temp->GetScalarTypeAsITKString() != "unsigned_char") { - DD("Cast"); vtkImageData * p = vtkImageData::New(); p->SetExtent(temp->GetFirstVTKImageData()->GetExtent ()); // Only first ! could not be 4D p->SetScalarTypeToUnsignedChar(); @@ -129,6 +126,7 @@ void vvLabelImageLoaderWidget::OpenImage() // Set GUI mLabelInputInfo->setText(vtksys::SystemTools::GetFilenameName(filename.toStdString()).c_str()); + QApplication::restoreOverrideCursor(); emit accepted(); } //------------------------------------------------------------------------------