View Toolbar Action in View Menu.
authorBrandon King <kingb@caltech.edu>
Mon, 27 Feb 2006 21:53:02 +0000 (21:53 +0000)
committerBrandon King <kingb@caltech.edu>
Mon, 27 Feb 2006 21:53:02 +0000 (21:53 +0000)
qui/PathWindow.cxx
qui/PathWindow.h

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();
index 4677708a0c09a5090f6a48516daa6a2c7fdebbec..b98bb442526bb86fb93b3d8fb1ab20fc80d540f8 100644 (file)
@@ -39,6 +39,8 @@ public slots:
   void toggleMotifs();
   //\@}
 
+  void showMussaToolbar();
+
 protected:
   // display our wonderful mussa output
   PathScene *scene;
@@ -52,6 +54,7 @@ protected:
   QAction *loadMupaAction;
   QAction *loadSavedAnalysisAction;
   QAction *saveMotifListAction;
+  QAction *showMussaViewToolbarAction;
   QAction *toggleMotifsAction;
 
   //! initialze the actions