From: Diane Trout Date: Tue, 21 Nov 2006 20:26:46 +0000 (+0000) Subject: quick option to show sequence properties window X-Git-Url: http://woldlab.caltech.edu/gitweb/?p=mussa.git;a=commitdiff_plain;h=d9fea8de8aa425558619bcb41668c033e1f01b10 quick option to show sequence properties window --- diff --git a/qui/MussaWindow.hpp b/qui/MussaWindow.hpp index 8afa91b..b538cc0 100644 --- a/qui/MussaWindow.hpp +++ b/qui/MussaWindow.hpp @@ -107,7 +107,7 @@ protected: MussaRef analysis; //! the default directory we should loand and save from boost::shared_ptr default_dir; - std::list > aligned_windows; + std::list aligned_windows; MotifEditor *motif_editor; MussaSetupDialog *setup_analysis_dialog; SubanalysisWindowRef subanalysis_window; @@ -159,5 +159,4 @@ protected slots: //! update annotations? void updateAnnotations(); }; - #endif diff --git a/qui/seqbrowser/SequenceBrowser.cpp b/qui/seqbrowser/SequenceBrowser.cpp index 99fbea7..7dab020 100644 --- a/qui/seqbrowser/SequenceBrowser.cpp +++ b/qui/seqbrowser/SequenceBrowser.cpp @@ -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 s) { GlSeqBrowser::push_sequence(s); diff --git a/qui/seqbrowser/SequenceBrowser.hpp b/qui/seqbrowser/SequenceBrowser.hpp index 1251dd2..37e95fb 100644 --- a/qui/seqbrowser/SequenceBrowser.hpp +++ b/qui/seqbrowser/SequenceBrowser.hpp @@ -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