]> Creatis software - clitk.git/commitdiff
add future signal "image is selected"
authordsarrut <dsarrut>
Thu, 27 May 2010 09:33:03 +0000 (09:33 +0000)
committerdsarrut <dsarrut>
Thu, 27 May 2010 09:33:03 +0000 (09:33 +0000)
vv/vvMainWindow.cxx
vv/vvMainWindow.h
vv/vvMainWindowBase.h

index a67721a7550c0308f3c48230677b05fa6eb9bbf9..8225ece82813bc69d8d440f45660362f154f23c0 100644 (file)
@@ -540,6 +540,13 @@ vvMainWindow::~vvMainWindow()
 }
 //------------------------------------------------------------------------------
 
+//------------------------------------------------------------------------------
+QTabWidget * vvMainWindow::GetTab()
+{
+  return tabWidget;
+}
+//------------------------------------------------------------------------------
+
 
 //------------------------------------------------------------------------------
 void vvMainWindow::MergeImages()
@@ -915,6 +922,7 @@ void vvMainWindow::UpdateTree()
 //------------------------------------------------------------------------------
 void vvMainWindow::CurrentImageChanged(std::string id)
 {
+  //  DD("CurrentImageChanged");
   int selected = 0;
   for (int i = 0; i < DataTree->topLevelItemCount(); i++) {
     if (DataTree->topLevelItem(i)->data(COLUMN_IMAGE_NAME,Qt::UserRole).toString().toStdString() == id) {
@@ -927,6 +935,8 @@ void vvMainWindow::CurrentImageChanged(std::string id)
 
   }
   DataTree->topLevelItem(selected)->setSelected(1);
+  //  DD(mSlicerManagers[selected]->GetFileName());
+  emit SelectedImageHasChanged(mSlicerManagers[selected]);
 }
 //------------------------------------------------------------------------------
 
index 6426dfdd14c5edb2dc1aa7adc2392c70b1cb6034..be50cb74dee6a2b61c897b28c71711befba74f42 100644 (file)
@@ -54,6 +54,7 @@ class vvMainWindow: public vvMainWindowBase,
   void ShowLastImage();
 
   virtual void UpdateCurrentSlicer();
+  virtual QTabWidget * GetTab();
   //vvMainWindowToolInfo * GetInfoForTool();
 //   void AddRunningTool(vvToolCreatorBase * tool);
 
index 3ec91c5abc7a3788082e4491faa9a8c7d5ff66fe..fffbc2810e0f37b8da2712fec359f2562319074d 100644 (file)
@@ -37,6 +37,7 @@ public:
 
   virtual void AddImage(vvImage::Pointer image,std::string filename) = 0;
   virtual void UpdateCurrentSlicer() = 0;
+  virtual QTabWidget * GetTab() = 0;
   const std::vector<vvSlicerManager*> & GetSlicerManagers() const { return mSlicerManagers; }
   QMenu * GetToolMenu() const { return mMenuTools; }
   QMenu * GetContextMenu() const { return mContextMenu; }
@@ -47,6 +48,7 @@ public:
 
 signals:
   void AnImageIsBeingClosed(vvSlicerManager *);
+  void SelectedImageHasChanged(vvSlicerManager *);
 
 protected:
   std::vector<vvSlicerManager*> mSlicerManagers;