quick option to show sequence properties window
authorDiane Trout <diane@caltech.edu>
Tue, 21 Nov 2006 20:26:46 +0000 (20:26 +0000)
committerDiane Trout <diane@caltech.edu>
Tue, 21 Nov 2006 20:26:46 +0000 (20:26 +0000)
qui/MussaWindow.hpp
qui/seqbrowser/SequenceBrowser.cpp
qui/seqbrowser/SequenceBrowser.hpp

index 8afa91b31b60d3efa72e08a4b543e8db6203996f..b538cc0faf353a9f51e7f4d426f784cd7ce18f99 100644 (file)
@@ -107,7 +107,7 @@ protected:
   MussaRef analysis;
   //! the default directory we should loand and save from
   boost::shared_ptr<QDir> default_dir;
-  std::list<boost::shared_ptr<MussaAlignedWindow> > aligned_windows;
+  std::list<MussaAlignedWindowRef> aligned_windows;
   MotifEditor *motif_editor;
   MussaSetupDialog *setup_analysis_dialog;
   SubanalysisWindowRef subanalysis_window;
@@ -159,5 +159,4 @@ protected slots:
   //! update annotations?
   void updateAnnotations();
 };
-
 #endif
index 99fbea7d69c047ffb490c0d7c6891facebb57af3..7dab0203177b616ed6a74c8b4b32c161d9040852 100644 (file)
@@ -22,7 +22,8 @@ SequenceBrowser::SequenceBrowser(QWidget *parent)
     rubberBand(0),
     popupMenu(new QMenu(this)),
     copySelectedSequenceAsFastaAction(new QAction(tr("&Copy as Fasta"), this)),
-    copySelectedSequenceAsStringAction(new QAction(tr("&Copy Sequence"), this))
+    copySelectedSequenceAsStringAction(new QAction(tr("&Copy Sequence"), this)),
+    editSequencePropertiesAction(new QAction(tr("Sequence &Properties"), this))
 { 
   connect(copySelectedSequenceAsFastaAction, SIGNAL(triggered()), 
           this, SLOT(copySelectedSequenceAsFasta()));
@@ -31,6 +32,9 @@ SequenceBrowser::SequenceBrowser(QWidget *parent)
   connect(copySelectedSequenceAsStringAction, SIGNAL(triggered()), 
           this, SLOT(copySelectedSequenceAsString()));
   popupMenu->addAction(copySelectedSequenceAsStringAction);
+  connect(editSequencePropertiesAction, SIGNAL(triggered()),
+          this, SLOT(editSequenceProperties()));
+  popupMenu->addAction(editSequencePropertiesAction);
 }
 
 SequenceBrowser::SequenceBrowser(const SequenceBrowser& sb, QWidget *parent)
@@ -139,6 +143,13 @@ void SequenceBrowser::displayContextMenu(const QPoint& point)
   popupMenu->popup(point);
 }
 
+void SequenceBrowser::editSequenceProperties()
+{
+  PropertiesWindowRef new_properties(new PropertiesWindow(sequences()));
+  properties = new_properties;
+  properties->show();
+}
+
 void SequenceBrowser::push_sequence(boost::shared_ptr<Sequence> s)
 {
   GlSeqBrowser::push_sequence(s);
index 1251dd2261c58559471bd7f0cfdd052c533b0d9c..37e95fb672349758cfda17ab125608ec81fbf3e7 100644 (file)
@@ -15,6 +15,7 @@
 #include "alg/mussa.hpp"
 #include "alg/glsequence.hpp"
 #include "alg/glseqbrowser.hpp"
+#include "qui/seqbrowser/seqproperties/PropertiesWindow.hpp"
 
 class QMouseEvent;
 class QRubberBand;
@@ -45,6 +46,7 @@ public slots:
   void copySelectedSequenceAsFasta();
   void copySelectedSequenceAsString();
   void displayContextMenu(const QPoint &p);
+  void editSequenceProperties();
   void setClipPlane(int z);
   //! set the center of the current viewport
   void setViewportCenter(float x);
@@ -80,5 +82,7 @@ protected:
   QMenu *popupMenu;
   QAction *copySelectedSequenceAsFastaAction;
   QAction *copySelectedSequenceAsStringAction;
+  QAction *editSequencePropertiesAction;
+  PropertiesWindowRef properties;
 };
 #endif