SET(USE_ITK OFF)
SET(USE_BOOST ON)
OPTION(USE_WXWIDGETS "Use WxWidgets GUI" ON)
-OPTION(USE_QT4 "USE WxWidgets GUI" OFF)
+OPTION(USE_QT4 "USE QT4GUI" OFF)
OPTION(USE_XERCES "USE Xerces if you want to use an beta version of outputModel" OFF)
IF(USE_QT4)
IF(USE_WXWIDGETS)
- MESSAGE(STATUS "CANNOT USE QT WXWIDGETS IN SAME TIME")
+ MESSAGE(ERROR "CANNOT USE QT WXWIDGETS IN SAME TIME")
ENDIF(USE_WXWIDGETS)
ENDIF(USE_QT4)
+IF(QT4_FOUND)
+ IF (WIN32)
+ MESSAGE("So ... ${QT_DIR}")
+ INCLUDE_DIRECTORIES(${QT_DIR}/../include)
+ LINK_DIRECTORIES(${QT_DIR}/../lib)
+ ENDIF(WIN32)
+ENDIF(QT4_FOUND)
OPTION(USE_GDCM "Use gdcm 1.3" ON)
OPTION(USE_GDCM2 "Use gdcm 2.0.14 at least" OFF)
creaImageIOWxTreeView.cpp
creaImageIOWxOutputDlg.cpp
)
+ SOURCE_GROUP("Source Files\\GUI" FILES ${SOURCES_CREAIMAGEIO_WX})
endif()
+# USE QT, need to transform files (moc mechanism)
+IF (USE_QT4)
+ #cpp
+ FILE(GLOB QT_CPP
+ QtGUI/*.cpp QtGUI/*.cxx
+ )
+
+ # headers
+ SET(QT4_HEADERS_TO_WRAP
+ QtGUI/creaimageioqtreeview.h
+ QtGUI/mainwindow.h
+ )
+
+
+ QT4_WRAP_CPP(MOC_SOURCES ${QT4_HEADERS_TO_WRAP})
+ SOURCE_GROUP("Source Files\\GUI" FILES ${MOC_SOURCES})
+
+
+ # UI
+ FILE(GLOB UI_FILES QtGUI/*.ui)
+ QT4_WRAP_UI(UI_SOURCES ${UI_FILES})
+ #SOURCE_GROUP("UI Files" FILES ${UI_FILES})
+ SOURCE_GROUP("Source Files\\GUI" FILES ${UI_SOURCES})
+ENDIF(USE_QT4)
+
IF(USE_XERCES)
FILE(GLOB SOURCES_CREAIMAGEIO_OUTPUT
SOURCE_GROUP("Source Files" FILES ${SOURCES_CREAIMAGEIO})
SOURCE_GROUP("Header Files" FILES ${HEADER_CREAIMAGEIO})
-SOURCE_GROUP("Source Files\\GUI" FILES ${SOURCES_CREAIMAGEIO_WX})
if(BUILD_CREA_PACS)
SOURCE_GROUP("Source Files\\PACS" FILES ${SOURCES_CREAIMAGEIO_PACS})
SOURCE_GROUP("Header Files\\PACS" FILES ${HEADER_CREAIMAGEIO_PACS})
SOURCE_GROUP("Source Files\\Tree" FILES ${SOURCES_CREAIMAGEIO_TREE})
+
+
+IF(USE_WXWIDGETS)
+SET( GUI_SRCS
+ ${SOURCES_CREAIMAGEIO_WX}
+ )
+ELSE(USE_WXWIDGETS)
+SET( GUI_SRCS
+ ${QT_CPP}
+ ${UI_SOURCES}
+ ${MOC_SOURCES}
+ )
+ENDIF(USE_WXWIDGETS)
SET( PRIMITIVE_SRCS
${SOURCES_CREAIMAGEIO}
${HEADER_CREAIMAGEIO}
${SOURCES_CREAIMAGEIO_IMG_READER}
${SOURCES_CREAIMAGEIO_IMG_DICOM_READER}
- ${SOURCES_CREAIMAGEIO_WX}
+ ${GUI_SRCS}
${SOURCES_CREAIMAGEIO_TREE}
)
}
}
+const std::stringstream Gimmick::getSummary()
+{
+ const AddProgress& p = GetAddProgress();
+ std::stringstream mess;
+ mess << "Dirs \tscanned\t: " << p.GetNumberScannedDirs() << "\n";
+ mess << "Files\tscanned\t: " << p.GetNumberScannedFiles() << "\n";
+ mess << "Files\thandled\t: " << p.GetNumberHandledFiles() << "\n\n";
+ mess << "Files\tadded \t: " << p.GetNumberAddedFiles() << "\n\n";
+ return mess;
+}
+
}
\ No newline at end of file
/// Decide if attributes are available through database
void fillVectInfos(std::vector<std::string> i_attr, OutputAttr &infos);
+
+ /// Get Add Opertaion summary
+ const std::stringstream getSummary();
//=============================================
private:
SQLiteTreeHandler* mLocalDatabase;
for(int i=0; i<lgr; i++)
{
+ std::cout << names[i] << std::endl;
i_imgs.push_back( mReader->ReadImage(names[i]) );
}
}
//=================================================
void WxGimmickView::DisplayAddSummary()
{
- const Gimmick::AddProgress& p = mGimmick->GetAddProgress();
- std::stringstream mess;
- mess << "Dirs \tscanned\t: " << p.GetNumberScannedDirs() << "\n";
- mess << "Files\tscanned\t: " << p.GetNumberScannedFiles() << "\n";
- mess << "Files\thandled\t: " << p.GetNumberHandledFiles() << "\n\n";
- mess << "Files\tadded \t: " << p.GetNumberAddedFiles() << "\n\n";
- time_t end;
+ std::stringstream mess(mGimmick->getSummary());
+ time_t end;
time(&end);
mess << "time to scan :" << difftime(end,mstart) << "sec";
wxMessageBox(std2wx(mess.str()),_T("Addition result"),wxOK,this);