Skip to content

Commit

Permalink
git-svn-id: svn+ssh://orchestra.med.harvard.edu/svn/megason/Code/GoFi…
Browse files Browse the repository at this point in the history
…gure2@983 ef826fda-c0ae-4237-af8e-f8dcbcf7929c
  • Loading branch information
Arnaud Gelas committed Mar 13, 2009
1 parent faf0f44 commit 7c9be19
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 37 deletions.
36 changes: 3 additions & 33 deletions trunk/CMakeLists.txt
Expand Up @@ -90,50 +90,20 @@ SET_SOURCE_FILES_PROPERTIES( ${QGOMAINWINDOW_MOC_SRC} PROPERTIES
OBJECT_DEPENDS "${QGOMAINWINDOW_UI_HDRS}" )

############################

# SET( QGOLUT_HDRS QGoLUTDialog.h )
# SET( QGOLUT_SRC QGoLUTDialog.cxx )

# QT4_WRAP_UI( QGOLUT_UI_HDRS LUTDialog.ui )
# QT4_WRAP_CPP( QGOLUT_MOC_SRC ${QGOLUT_HDRS} )

# SET_SOURCE_FILES_PROPERTIES( ${QGOLUT_SRC} PROPERTIES
# OBJECT_DEPENDS "${QGOLUT_UI_HDRS}" )
# SET_SOURCE_FILES_PROPERTIES( ${QGOLUT_MOC_SRC} PROPERTIES
# OBJECT_DEPENDS "${QGOLUT_UI_HDRS}" )

SET( QICONLOADER_SRC qticonloader.cxx )

############################

#ADD_LIBRARY( QGO ${LIBS_STYLE}
# ${QGOMAINWINDOW_SRC} ${QGOMAINWINDOW_MOC_SRC}
# ${QGOLUT_SRC} ${QGOLUT_MOC_SRC}
# ${QICONLOADER_SRC}
#)

# SET( QGO_LIBS
# QGO
# ${QMegaVTKAddOn} )

#TARGET_LINK_LIBRARIES( QGO
# ${QGO_LIBS} )

############################
#SUBDIRS( Testing )

############################
ADD_EXECUTABLE( gofigure
#MACOSX_BUNDLE
gofigure.cxx
${QGOMAINWINDOW_SRC} ${QGOMAINWINDOW_MOC_SRC}
# ${QGOLUT_SRC} ${QGOLUT_MOC_SRC}
${QICONLOADER_SRC}
${QGOMAINWINDOW_QRC} )
${QGOMAINWINDOW_SRC} ${QGOMAINWINDOW_MOC_SRC}
${QICONLOADER_SRC}
${QGOMAINWINDOW_QRC} )

TARGET_LINK_LIBRARIES( gofigure
# vtkVisuManagement
# QGO
QMegaVTKAddOn
${QT_LIBRARIES}
QVTK
Expand Down
20 changes: 16 additions & 4 deletions trunk/QGoMainWindow.cxx
Expand Up @@ -25,7 +25,7 @@ QGoMainWindow::QGoMainWindow( ) : m_PageView( 0 )

m_Convert = VTKConvertImageType::New();

m_PageView = new QImagePageViewTracer;
// m_PageView = new QImagePageViewTracer;
m_LUTDialog = new QGoLUTDialog( this );

QObject::connect( this->m_LUTDialog, SIGNAL( accepted( ) ),
Expand Down Expand Up @@ -308,6 +308,16 @@ void QGoMainWindow::DisplayImage( vtkImageData* iImage, QString iTag )

m_VTKImage = m_Convert->GetOutput();

//NOTE 13 March 2009: Dirty temporary tricks to handle the change of image
if( m_PageView )
{
delete m_PageView;
m_PageView = 0;
}
if( !m_PageView )
{
m_PageView = new QImagePageViewTracer;
}
m_PageView->SetImage( m_VTKImage );
// m_PageView->SetScalarBarVisibility( true );

Expand Down Expand Up @@ -415,25 +425,27 @@ void QGoMainWindow::openRecentFile()
QAction *action = qobject_cast<QAction *>(sender());
if (action)
{
delete m_PageView;
m_PageView = 0;
SetFileName(action->data().toString());
}
}
void QGoMainWindow::showprogressloading ()
{
QProgressDialog* Progressloading = new QProgressDialog("Loading images...", "Abort loading", 0, 100, this,Qt::WindowStaysOnTopHint);
QProgressBar* bar = new QProgressBar(this);

//Progressloading.setWindowModality(Qt::WindowModal);
Progressloading->setBar(bar);
for (int i = 0; i < 100; i++)
for (int i = 0; i < 100; i++)
{
Progressloading->setValue(i);

if (Progressloading->wasCanceled())
break;
bar->update();
bar->show();

}
Progressloading->setValue(100);
}

0 comments on commit 7c9be19

Please sign in to comment.