View Toolbar Action in View Menu.
[mussa.git] / qui / PathWindow.cxx
index c2f2e71a56660f1e78de33ad98e21b9c8f8a0979..279fa5637a9b1575763f62eb362565197b1a0074 100644 (file)
@@ -12,6 +12,8 @@
 #include "qui/PathScene.h"
 #include "qui/ThresholdWidget.h"
 
+#include <iostream>
+
 PathWindow::PathWindow(QWidget *) :
   closeAction(0) // initialize one of the pointers to null as a saftey flag
 {
@@ -73,6 +75,10 @@ void PathWindow::setupActions()
   connect(saveMotifListAction, SIGNAL(triggered()), 
           this, SLOT(saveMotifList()));
 
+  showMussaViewToolbarAction = new QAction(tr("Show Toolbar"), this);
+  connect(showMussaViewToolbarAction, SIGNAL(triggered()), 
+          this, SLOT(showMussaToolbar()));
+
   toggleMotifsAction = new QAction(tr("Toggle Motifs"), this);
   connect(toggleMotifsAction, SIGNAL(triggered()), 
           this, SLOT(toggleMotifs()));
@@ -95,6 +101,9 @@ void PathWindow::setupMainMenu()
   newMenu->addSeparator();
   newMenu->addAction(closeAction);
 
+  newMenu = menuBar()->addMenu(tr("&View"));
+  newMenu->addAction(showMussaViewToolbarAction);
+
   newMenu = menuBar()->addMenu(tr("&Help"));
   newMenu->addAction(aboutAction);
 }
@@ -143,6 +152,13 @@ void PathWindow::saveMotifList()
   NotImplementedBox();
 }
 
+void PathWindow::showMussaToolbar()
+{
+  std::clog << "isVis?" << mussaViewTB->isVisible() <<std::endl;
+  mussaViewTB->show();
+  std::clog << "isVis?" << mussaViewTB->isVisible() <<std::endl;
+}
+
 void PathWindow::toggleMotifs()
 {
   NotImplementedBox();