-//====================================================================
-vvMainWindow::vvMainWindow() {
- setupUi(this); // this sets up the GUI
-
- mInputPathName = "";
-
- //Init the contextMenu
- this->setContextMenuPolicy(Qt::CustomContextMenu);
- contextActions.resize(0);
- QAction* actionOpen_new_image = contextMenu.addAction(QIcon(QString::fromUtf8(":/new/prefix1/icons/fileopen.png")),
- tr("Open new Image"));
- connect(actionOpen_new_image,SIGNAL(triggered()),this,SLOT(OpenImages()));
- contextActions.push_back(actionOpen_new_image);
-
- contextMenu.addSeparator();
-
- QAction* actionClose_Image = contextMenu.addAction(QIcon(QString::fromUtf8(":/new/prefix1/icons/exit.png")),
- tr("Close Current Image"));
- connect(actionClose_Image,SIGNAL(triggered()),this,SLOT(CloseImage()));
- contextActions.push_back(actionClose_Image);
-
- QAction* actionReload_image = contextMenu.addAction(QIcon(QString::fromUtf8(":/new/prefix1/icons/rotateright.png")),
- tr("Reload Current Image"));
- connect(actionReload_image,SIGNAL(triggered()),this,SLOT(ReloadImage()));
- contextActions.push_back(actionReload_image);
-
- QAction* actionSave_image = contextMenu.addAction(QIcon(QString::fromUtf8(":/new/prefix1/icons/filesave.png")),
- tr("Save Current Image"));
- connect(actionSave_image,SIGNAL(triggered()),this,SLOT(SaveAs()));
- contextActions.push_back(actionSave_image);
-
- contextMenu.addSeparator();
-
- QAction* actionCrop_image = contextMenu.addAction(QIcon(QString::fromUtf8(":/new/prefix1/icons/crop.png")),
- tr("Crop Current Image"));
- connect(actionCrop_image,SIGNAL(triggered()),this,SLOT(CropImage()));
- contextActions.push_back(actionCrop_image);
-
- QAction* actionSplit_image = contextMenu.addAction(QIcon(QString::fromUtf8(":/new/prefix1/icons/cut.png")),
- tr("Split Current Image"));
- connect(actionSplit_image,SIGNAL(triggered()),this,SLOT(SplitImage()));
- contextActions.push_back(actionSplit_image);
-
- contextMenu.addSeparator();
-
- contextMenu.addAction(actionAdd_VF_to_current_Image);
- contextActions.push_back(actionAdd_VF_to_current_Image);
-
- QAction* actionAdd_Overlay_to_current_Image = menuOverlay->addAction(QIcon(QString::fromUtf8(":/new/prefix1/icons/GPSup.png")),
- tr("Add overlay image to current image"));
- contextMenu.addAction(actionAdd_Overlay_to_current_Image);
- contextActions.push_back(actionAdd_Overlay_to_current_Image);
-
- connect(actionAdd_Overlay_to_current_Image,SIGNAL(triggered()), this,SLOT(SelectOverlayImage()));
-
- contextMenu.addAction(actionAdd_fusion_image);
- connect(actionAdd_fusion_image,SIGNAL(triggered()),this,SLOT(AddFusionImage()));
- contextActions.push_back(actionAdd_fusion_image);
-
-
- //init the DataTree
- mSlicerManagers.resize(0);
-
- QStringList header;
- header.append("");
- header.append("TL");
- header.append("TR");
- header.append("BL");
- header.append("BR");
- header.append("");
- header.append("");
- header.append("Name");
-
- DataTree->setHeaderLabels(header);
- DataTree->resizeColumnToContents(COLUMN_TREE);
- DataTree->resizeColumnToContents(COLUMN_UL_VIEW);
- DataTree->resizeColumnToContents(COLUMN_UR_VIEW);
- DataTree->resizeColumnToContents(COLUMN_DL_VIEW);
- DataTree->resizeColumnToContents(COLUMN_DR_VIEW);
- DataTree->resizeColumnToContents(COLUMN_CLOSE_IMAGE);
- DataTree->resizeColumnToContents(COLUMN_RELOAD_IMAGE);
- DataTree->resizeColumnToContents(COLUMN_IMAGE_NAME);
-
- viewMode = 1;
- documentation = new vvDocumentation();
- help_dialog = new vvHelpDialog();
- dicomSeriesSelector = new vvDicomSeriesSelector();
-
- inverseButton->setEnabled(0);
- actionAdd_Overlay_to_current_Image->setEnabled(0);
- actionSave_As->setEnabled(0);
- actionAdd_VF_to_current_Image->setEnabled(0);
- actionAdd_fusion_image->setEnabled(0);
-
- //init the sliders
- verticalSliders.push_back(NOVerticalSlider);
- verticalSliders.push_back(NEVerticalSlider);
- verticalSliders.push_back(SOVerticalSlider);
- verticalSliders.push_back(SEVerticalSlider);
-
- for (int i =0; i < 4; i++)
- verticalSliders[i]->hide();
-
- horizontalSliders.push_back(NOHorizontalSlider);
- horizontalSliders.push_back(NEHorizontalSlider);
- horizontalSliders.push_back(SOHorizontalSlider);
- horizontalSliders.push_back(SEHorizontalSlider);
-
- for (int i =0; i < 4; i++)
- horizontalSliders[i]->hide();
-
-
- connect(NOVerticalSlider,SIGNAL(valueChanged(int)),this,SLOT(NOVerticalSliderChanged()));
- connect(NEVerticalSlider,SIGNAL(valueChanged(int)),this,SLOT(NEVerticalSliderChanged()));
- connect(SOVerticalSlider,SIGNAL(valueChanged(int)),this,SLOT(SOVerticalSliderChanged()));
- connect(SEVerticalSlider,SIGNAL(valueChanged(int)),this,SLOT(SEVerticalSliderChanged()));
-
- connect(NOHorizontalSlider,SIGNAL(valueChanged(int)),this,SLOT(NOHorizontalSliderMoved()));
- connect(NEHorizontalSlider,SIGNAL(valueChanged(int)),this,SLOT(NEHorizontalSliderMoved()));
- connect(SOHorizontalSlider,SIGNAL(valueChanged(int)),this,SLOT(SOHorizontalSliderMoved()));
- connect(SEHorizontalSlider,SIGNAL(valueChanged(int)),this,SLOT(SEHorizontalSliderMoved()));
-
- //connect everything
- connect(actionMaximum_Intensity_Projection,SIGNAL(triggered()),this,SLOT(ComputeMIP()));
- connect(actionCompute_mid_position_image,SIGNAL(triggered()),this,SLOT(ComputeMidPosition()));
- connect(actionDeformable_Registration,SIGNAL(triggered()),this,SLOT(ComputeDeformableRegistration()));
- connect(actionWarp_image_with_vector_field,SIGNAL(triggered()),this,SLOT(WarpImage()));
- connect(actionLoad_images,SIGNAL(triggered()),this,SLOT(OpenImages()));
- connect(actionOpen_Dicom,SIGNAL(triggered()),this,SLOT(OpenDicom()));
- connect(actionOpen_Dicom_Struct,SIGNAL(triggered()),this,SLOT(OpenDCStructContour()));
- connect(actionOpen_VTK_contour,SIGNAL(triggered()),this,SLOT(OpenVTKContour()));
- connect(actionOpen_Multiple_Images_As_One,SIGNAL(triggered()),this,SLOT(MergeImages()));
- connect(actionOpen_Image_With_Time,SIGNAL(triggered()),this,SLOT(OpenImageWithTime()));
- connect(actionMerge_images_as_n_dim_t, SIGNAL(triggered()), this, SLOT(MergeImagesWithTime()));
- connect(actionSave_As,SIGNAL(triggered()),this,SLOT(SaveAs()));
- connect(actionExit,SIGNAL(triggered()),this,SLOT(close()));
- connect(actionAdd_VF_to_current_Image,SIGNAL(triggered()),this,SLOT(OpenField()));
- connect(actionNavigation_Help,SIGNAL(triggered()),this,SLOT(ShowHelpDialog()));
- connect(actionDocumentation,SIGNAL(triggered()),this,SLOT(ShowDocumentation()));
-
- ///////////////////////////////////////////////
- contextMenu.addAction(actionResampler);
- connect(actionResampler,SIGNAL(triggered()),this,SLOT(ResampleCurrentImage()));
- connect(actionSegmentation,SIGNAL(triggered()),this,SLOT(SegmentationOnCurrentImage()));
- connect(actionSurface_Viewer,SIGNAL(triggered()),this,SLOT(SurfaceViewerLaunch()));
- ///////////////////////////////////////////////
-
- actionNorth_East_Window->setEnabled(0);
- actionNorth_West_Window->setEnabled(0);
- actionSouth_East_Window->setEnabled(0);
- actionSouth_West_Window->setEnabled(0);
-
- connect(actionNorth_East_Window,SIGNAL(triggered()),this,SLOT(SaveNEScreenshot()));
- connect(actionNorth_West_Window,SIGNAL(triggered()),this,SLOT(SaveNOScreenshot()));
- connect(actionSouth_East_Window,SIGNAL(triggered()),this,SLOT(SaveSEScreenshot()));
- connect(actionSouth_West_Window,SIGNAL(triggered()),this,SLOT(SaveSOScreenshot()));
-
- connect(DataTree,SIGNAL(itemSelectionChanged()),this,SLOT(ImageInfoChanged()));
- connect(DataTree,SIGNAL(itemClicked(QTreeWidgetItem*, int)),this,
- SLOT(DisplayChanged(QTreeWidgetItem*, int)));
-
- connect(viewButton,SIGNAL(clicked()),this, SLOT(ChangeViewMode()) );
- connect(windowSpinBox,SIGNAL(editingFinished()),this,SLOT(WindowLevelEdited()));
- connect(levelSpinBox,SIGNAL(editingFinished()),this,SLOT(WindowLevelEdited()));
- connect(colorMapComboBox,SIGNAL(currentIndexChanged(int)),this,SLOT(UpdateColorMap()));
- connect(presetComboBox,SIGNAL(currentIndexChanged(int)),this,SLOT(UpdateWindowLevel()));
- connect(inverseButton,SIGNAL(clicked()),this,SLOT(SwitchWindowLevel()));
-
-
- connect(this,SIGNAL(customContextMenuRequested(QPoint)),this,SLOT(ShowContextMenu(QPoint)));
-
- connect(linkPanel,SIGNAL(addLink(QString,QString)),this,SLOT(AddLink(QString,QString)));
- connect(linkPanel,SIGNAL(removeLink(QString,QString)),this,SLOT(RemoveLink(QString,QString)));
- connect(overlayPanel,SIGNAL(VFPropertyUpdated(int,int,int)),this,SLOT(SetVFProperty(int,int,int)));
- connect(overlayPanel,SIGNAL(OverlayPropertyUpdated(int)),this,SLOT(SetOverlayProperty(int)));
- connect(overlayPanel,SIGNAL(FusionPropertyUpdated(int,int,double,double)),
- this,SLOT(SetFusionProperty(int,int,double,double)));
- connect(landmarksPanel,SIGNAL(UpdateRenderWindows()),this,SLOT(UpdateRenderWindows()));
-
- playMode = 0;//pause
- mFrameRate = 10;
- playButton->setEnabled(0);
- frameRateLabel->setEnabled(0);
- frameRateSpinBox->setEnabled(0);
- connect(playButton, SIGNAL(clicked()),this,SLOT(PlayPause()));
- connect(frameRateSpinBox, SIGNAL(valueChanged(int)),this,SLOT(ChangeFrameRate(int)));
-
- goToCursorPushButton->setEnabled(0);
- connect(goToCursorPushButton, SIGNAL(clicked()),this,SLOT(GoToCursor()));
-
- NOViewWidget->hide();
- NEViewWidget->hide();
- SOViewWidget->hide();
- SEViewWidget->hide();
-
- //Recently opened files
- std::list<std::string> recent_files = GetRecentlyOpenedImages();
- if ( not recent_files.empty() )
- {
- QMenu * rmenu = new QMenu("Recently opened files...");
- rmenu->setIcon(QIcon(QString::fromUtf8(":/new/prefix1/icons/open.png")));
- menuFile->insertMenu(actionOpen_Image_With_Time,rmenu);
- for (std::list<std::string>::iterator i = recent_files.begin();i!=recent_files.end();i++)
- {
- QAction* current=new QAction(QIcon(QString::fromUtf8(":/new/prefix1/icons/open.png")),
- (*i).c_str(),this);
- rmenu->addAction(current);
- connect(current,SIGNAL(triggered()),this,SLOT(OpenRecentImage()));
- }
- }
-}
-//====================================================================
+//------------------------------------------------------------------------------
+vvMainWindow::vvMainWindow():vvMainWindowBase()
+{
+ setupUi(this); // this sets up the GUI
+
+ mInputPathName = "";
+ mMenuTools = menuTools;
+ mContextMenu = &contextMenu;
+ mMenuExperimentalTools = menuExperimental;
+ mMainWidget = this;
+ mCurrentTime = -1;
+ mCurrentSelectedImageId = "";
+
+ //Init the contextMenu
+ this->setContextMenuPolicy(Qt::CustomContextMenu);
+ contextActions.resize(0);
+ QAction* actionOpen_new_image = contextMenu.addAction(QIcon(QString::fromUtf8(":/common/icons/fileopen.png")),
+ tr("O&pen new Image"));
+ actionOpen_new_image->setShortcut(QKeySequence(tr("Ctrl+O")));
+ connect(actionOpen_new_image,SIGNAL(triggered()),this,SLOT(OpenImages()));
+ contextActions.push_back(actionOpen_new_image);
+ contextMenu.addSeparator();
+
+ QAction* actionClose_Image = contextMenu.addAction(QIcon(QString::fromUtf8(":/common/icons/exit.png")),
+ tr("Close Current Image"));
+ connect(actionClose_Image,SIGNAL(triggered()),this,SLOT(CloseImage()));
+ contextActions.push_back(actionClose_Image);
+
+ QAction* actionReload_image = contextMenu.addAction(QIcon(QString::fromUtf8(":/common/icons/rotateright.png")),
+ tr("Reload Current Image"));
+ connect(actionReload_image,SIGNAL(triggered()),this,SLOT(ReloadImage()));
+ contextActions.push_back(actionReload_image);
+
+ QAction* actionSave_image = contextMenu.addAction(QIcon(QString::fromUtf8(":/common/icons/filesave.png")),
+ tr("Save Current Image"));
+ connect(actionSave_image,SIGNAL(triggered()),this,SLOT(SaveAs()));
+ contextActions.push_back(actionSave_image);
+
+ contextMenu.addSeparator();
+
+ // QAction* actionCrop_image = contextMenu.addAction(QIcon(QString::fromUtf8(":/common/icons/crop.png")),
+ // tr("Crop Current Image"));
+ // connect(actionCrop_image,SIGNAL(triggered()),this,SLOT(CropImage()));
+ // contextActions.push_back(actionCrop_image);
+
+ QAction* actionSplit_image = contextMenu.addAction(QIcon(QString::fromUtf8(":/common/icons/cut.png")),
+ tr("Split Current Image"));
+ connect(actionSplit_image,SIGNAL(triggered()),this,SLOT(SplitImage()));
+ contextActions.push_back(actionSplit_image);
+
+ contextMenu.addSeparator();
+
+ contextMenu.addAction(actionAdd_VF_to_current_Image);
+ contextActions.push_back(actionAdd_VF_to_current_Image);
+
+ QAction* actionAdd_Overlay_to_current_Image = menuOverlay->addAction(QIcon(QString::fromUtf8(":/common/icons/GPSup.png")),
+ tr("Add overlay image to current image"));
+ contextMenu.addAction(actionAdd_Overlay_to_current_Image);
+ contextActions.push_back(actionAdd_Overlay_to_current_Image);
+
+ connect(actionAdd_Overlay_to_current_Image,SIGNAL(triggered()), this,SLOT(SelectOverlayImage()));
+
+ contextMenu.addAction(actionAdd_fusion_image);
+ connect(actionAdd_fusion_image,SIGNAL(triggered()),this,SLOT(AddFusionImage()));
+ contextActions.push_back(actionAdd_fusion_image);
+
+ // TRIAL DS
+ /*
+ QMenu * m = new QMenu(menubar);
+ m->setTitle("TOTO");
+ // m->setObjectName(QString::fromUtf8("TOTOTO"));
+ contextMenu.addMenu(m);
+ QAction * a = m->addAction(QIcon(QString::fromUtf8(":/common/icons/GPSup.png")),
+ tr("BIDON"));
+ QAction * b = m->addAction(QIcon(QString::fromUtf8(":/common/icons/GPSup.png")),
+ tr("BIDON2"));
+ m->addAction(a);
+ m->addAction(b);
+ connect(a,SIGNAL(triggered()),this,SLOT(AddFusionImage()));
+ */
+
+ //init the DataTree
+ mSlicerManagers.resize(0);
+
+ QStringList header;
+ header.append("");
+ header.append("TL");
+ header.append("TR");
+ header.append("BL");
+ header.append("BR");
+ header.append("");
+ header.append("");
+ header.append("Name");
+
+ DataTree->setHeaderLabels(header);
+ DataTree->resizeColumnToContents(COLUMN_TREE);
+ DataTree->resizeColumnToContents(COLUMN_UL_VIEW);
+ DataTree->resizeColumnToContents(COLUMN_UR_VIEW);
+ DataTree->resizeColumnToContents(COLUMN_DL_VIEW);
+ DataTree->resizeColumnToContents(COLUMN_DR_VIEW);
+ DataTree->resizeColumnToContents(COLUMN_CLOSE_IMAGE);
+ DataTree->resizeColumnToContents(COLUMN_RELOAD_IMAGE);
+ DataTree->resizeColumnToContents(COLUMN_IMAGE_NAME);
+
+ viewMode = 1;
+ documentation = new vvDocumentation();
+ help_dialog = new vvHelpDialog();
+ dicomSeriesSelector = new vvDicomSeriesSelector();
+
+ inverseButton->setEnabled(0);
+ actionAdd_Overlay_to_current_Image->setEnabled(0);
+ actionSave_As->setEnabled(0);
+ actionAdd_VF_to_current_Image->setEnabled(0);
+ actionAdd_fusion_image->setEnabled(0);
+
+ //init the sliders
+ verticalSliders.push_back(NOVerticalSlider);
+ verticalSliders.push_back(NEVerticalSlider);
+ verticalSliders.push_back(SOVerticalSlider);
+ verticalSliders.push_back(SEVerticalSlider);
+
+ for (int i =0; i < 4; i++)
+ verticalSliders[i]->hide();
+
+ horizontalSliders.push_back(NOHorizontalSlider);
+ horizontalSliders.push_back(NEHorizontalSlider);
+ horizontalSliders.push_back(SOHorizontalSlider);
+ horizontalSliders.push_back(SEHorizontalSlider);
+
+ for (int i =0; i < 4; i++)
+ horizontalSliders[i]->hide();
+
+
+ connect(NOVerticalSlider,SIGNAL(valueChanged(int)),this,SLOT(NOVerticalSliderChanged()));
+ connect(NEVerticalSlider,SIGNAL(valueChanged(int)),this,SLOT(NEVerticalSliderChanged()));
+ connect(SOVerticalSlider,SIGNAL(valueChanged(int)),this,SLOT(SOVerticalSliderChanged()));
+ connect(SEVerticalSlider,SIGNAL(valueChanged(int)),this,SLOT(SEVerticalSliderChanged()));
+
+ connect(NOHorizontalSlider,SIGNAL(valueChanged(int)),this,SLOT(NOHorizontalSliderMoved()));
+ connect(NEHorizontalSlider,SIGNAL(valueChanged(int)),this,SLOT(NEHorizontalSliderMoved()));
+ connect(SOHorizontalSlider,SIGNAL(valueChanged(int)),this,SLOT(SOHorizontalSliderMoved()));
+ connect(SEHorizontalSlider,SIGNAL(valueChanged(int)),this,SLOT(SEHorizontalSliderMoved()));
+
+ //connect everything
+ connect(actionMaximum_Intensity_Projection,SIGNAL(triggered()),this,SLOT(ComputeMIP()));
+ connect(actionCompute_mid_position_image,SIGNAL(triggered()),this,SLOT(ComputeMidPosition()));
+ connect(actionDeformable_Registration,SIGNAL(triggered()),this,SLOT(ComputeDeformableRegistration()));
+ connect(actionWarp_image_with_vector_field,SIGNAL(triggered()),this,SLOT(WarpImage()));
+ connect(actionLoad_images,SIGNAL(triggered()),this,SLOT(OpenImages()));
+ connect(actionOpen_Dicom,SIGNAL(triggered()),this,SLOT(OpenDicom()));
+ connect(actionOpen_Dicom_Struct,SIGNAL(triggered()),this,SLOT(OpenDCStructContour()));
+ connect(actionOpen_VTK_contour,SIGNAL(triggered()),this,SLOT(OpenVTKContour()));
+ connect(actionOpen_Multiple_Images_As_One,SIGNAL(triggered()),this,SLOT(MergeImages()));
+ connect(actionOpen_Image_With_Time,SIGNAL(triggered()),this,SLOT(OpenImageWithTime()));
+ connect(actionMerge_images_as_n_dim_t, SIGNAL(triggered()), this, SLOT(MergeImagesWithTime()));
+ connect(actionSave_As,SIGNAL(triggered()),this,SLOT(SaveAs()));
+ connect(actionExit,SIGNAL(triggered()),this,SLOT(close()));
+ connect(actionAdd_VF_to_current_Image,SIGNAL(triggered()),this,SLOT(OpenField()));
+ connect(actionNavigation_Help,SIGNAL(triggered()),this,SLOT(ShowHelpDialog()));
+ connect(actionDocumentation,SIGNAL(triggered()),this,SLOT(ShowDocumentation()));
+
+ ///////////////////////////////////////////////
+ connect(actionSegmentation,SIGNAL(triggered()),this,SLOT(SegmentationOnCurrentImage()));
+ connect(actionSurface_Viewer,SIGNAL(triggered()),this,SLOT(SurfaceViewerLaunch()));
+ ///////////////////////////////////////////////
+
+ actionNorth_East_Window->setEnabled(0);
+ actionNorth_West_Window->setEnabled(0);
+ actionSouth_East_Window->setEnabled(0);
+ actionSouth_West_Window->setEnabled(0);
+
+ connect(actionNorth_East_Window,SIGNAL(triggered()),this,SLOT(SaveNEScreenshot()));
+ connect(actionNorth_West_Window,SIGNAL(triggered()),this,SLOT(SaveNOScreenshot()));
+ connect(actionSouth_East_Window,SIGNAL(triggered()),this,SLOT(SaveSEScreenshot()));
+ connect(actionSouth_West_Window,SIGNAL(triggered()),this,SLOT(SaveSOScreenshot()));
+
+ connect(DataTree,SIGNAL(itemSelectionChanged()),this,SLOT(ImageInfoChanged()));
+ connect(DataTree,SIGNAL(itemClicked(QTreeWidgetItem*, int)),this,
+ SLOT(DisplayChanged(QTreeWidgetItem*, int)));
+
+ connect(viewButton,SIGNAL(clicked()),this, SLOT(ChangeViewMode()) );
+ connect(windowSpinBox,SIGNAL(editingFinished()),this,SLOT(WindowLevelEdited()));
+ connect(levelSpinBox,SIGNAL(editingFinished()),this,SLOT(WindowLevelEdited()));
+ connect(colorMapComboBox,SIGNAL(currentIndexChanged(int)),this,SLOT(UpdateColorMap()));
+ connect(presetComboBox,SIGNAL(currentIndexChanged(int)),this,SLOT(UpdateWindowLevel()));
+ connect(inverseButton,SIGNAL(clicked()),this,SLOT(SwitchWindowLevel()));
+
+
+ connect(this,SIGNAL(customContextMenuRequested(QPoint)),this,SLOT(ShowContextMenu(QPoint)));
+
+ connect(linkPanel,SIGNAL(addLink(QString,QString)),this,SLOT(AddLink(QString,QString)));
+ connect(linkPanel,SIGNAL(removeLink(QString,QString)),this,SLOT(RemoveLink(QString,QString)));
+ connect(overlayPanel,SIGNAL(VFPropertyUpdated(int,int,int,int)),this,SLOT(SetVFProperty(int,int,int,int)));
+ connect(overlayPanel,SIGNAL(OverlayPropertyUpdated(int)),this,SLOT(SetOverlayProperty(int)));
+ connect(overlayPanel,SIGNAL(FusionPropertyUpdated(int,int,double,double)),
+ this,SLOT(SetFusionProperty(int,int,double,double)));
+ connect(landmarksPanel,SIGNAL(UpdateRenderWindows()),this,SLOT(UpdateRenderWindows()));
+
+ playMode = 0;//pause
+ mFrameRate = 10;
+ playButton->setEnabled(0);
+ frameRateLabel->setEnabled(0);
+ frameRateSpinBox->setEnabled(0);
+ connect(playButton, SIGNAL(clicked()),this,SLOT(PlayPause()));
+ connect(frameRateSpinBox, SIGNAL(valueChanged(int)),this,SLOT(ChangeFrameRate(int)));
+
+ goToCursorPushButton->setEnabled(0);
+ connect(goToCursorPushButton, SIGNAL(clicked()),this,SLOT(GoToCursor()));
+
+ NOViewWidget->hide();
+ NEViewWidget->hide();
+ SOViewWidget->hide();
+ SEViewWidget->hide();
+
+ //Recently opened files
+ std::list<std::string> recent_files = GetRecentlyOpenedImages();
+ if ( !recent_files.empty() ) {
+ QMenu * rmenu = new QMenu("Recently opened files...");
+ rmenu->setIcon(QIcon(QString::fromUtf8(":/common/icons/open.png")));
+ menuFile->insertMenu(actionOpen_Image_With_Time,rmenu);
+ for (std::list<std::string>::iterator i = recent_files.begin(); i!=recent_files.end(); i++) {
+ QAction* current=new QAction(QIcon(QString::fromUtf8(":/common/icons/open.png")),
+ (*i).c_str(),this);
+ rmenu->addAction(current);
+ connect(current,SIGNAL(triggered()),this,SLOT(OpenRecentImage()));
+ }
+ }
+
+ // Adding all new tools (insertion in the menu)
+ vvToolManager::GetInstance()->InsertToolsInMenu(this);
+
+ if (!CLITK_EXPERIMENTAL)
+ menuExperimental->menuAction()->setVisible(false);
+}
+//------------------------------------------------------------------------------
+
+
+//------------------------------------------------------------------------------