Mussa aligned sequence view seems to work
[mussa.git] / qui / MussaAlignedWindow.hpp
index 10f7d168ac28dd7dce1270846efc34af31d09a63..d7b642e1e42415ec337330cddca129732648388b 100644 (file)
@@ -3,14 +3,17 @@
 
 #include <set>
 
-#include <QStatusBar>
-#include <QWidget>
+#include <QMainWindow>
+#include <QMenu>
 #include "alg/mussa.hpp"
+#include "qui/IntAction.hpp"
 #include "qui/seqbrowser/SequenceBrowserWidget.hpp"
 
 //! Show sequence alignments
-class MussaAlignedWindow : public QWidget
+class MussaAlignedWindow : public QMainWindow
 {
+  Q_OBJECT 
+
 public:
   //! construct an aligned window for an analysis and selected paths
   MussaAlignedWindow(Mussa&, const std::set<int>&, QWidget *parent=0);
@@ -18,16 +21,24 @@ public:
 public slots:
   //! use selected_paths[pathid] to set the starting position of our sequence
   void setAlignment(size_t pathid);
+  //! toggle whether or not to show the aligned basepairs of a window
+  void toggleViewAlignment(size_t alignment_index);
 
 protected:
   void setSelectedPaths(Mussa &m, const std::set<int>& sel_paths);
+  //! set menus (must be called after setSelectedPaths)
+  void setupMenus();
   void computeMatchLines();
   
   Mussa& analysis;
   //std::vector<Sequence> sequences;
   //const std::set<int>& selected_paths;
   std::vector<ExtendedConservedPath> selected_paths;
+  std::vector<bool> view_paths;
   SequenceBrowserWidget browser;
-  QStatusBar status;
+  QMenu pick_align_menu;
+  QMenu view_align_menu;
+  std::vector <IntAction *> pick_actions;
+  std::vector <IntAction *> view_actions;
 };
 #endif