setAlignment, as a target of a qt signal, needs to match type
[mussa.git] / qui / MussaAlignedWindow.hpp
1 #ifndef MUSSA_ALIGNED_WINDOW_H
2 #define MUSSA_ALIGNED_WINDOW_H
3
4 #include <set>
5
6 #include <QMainWindow>
7 #include <QMenu>
8 #include "alg/mussa.hpp"
9 #include "qui/IntAction.hpp"
10 #include "qui/seqbrowser/SequenceBrowserWidget.hpp"
11
12 //! Show sequence alignments
13 class MussaAlignedWindow : public QMainWindow
14 {
15   Q_OBJECT 
16
17 public:
18   //! construct an aligned window for an analysis and selected paths
19   MussaAlignedWindow(Mussa&, const std::set<int>&, QWidget *parent=0);
20
21 public slots:
22   //! use selected_paths[pathid] to set the starting position of our sequence
23   void setAlignment(int pathid);
24   //! toggle whether or not to show the aligned basepairs of a window
25   void toggleViewAlignment(size_t alignment_index);
26
27   //! just force updating the window
28   void update();
29
30 protected:
31   void setSelectedPaths(Mussa &m, const std::set<int>& sel_paths);
32   //! set menus (must be called after setSelectedPaths)
33   void setupMenus();
34   void computeMatchLines();
35   
36   Mussa& analysis;
37   //std::vector<Sequence> sequences;
38   //const std::set<int>& selected_paths;
39   std::vector<ExtendedConservedPath> selected_paths;
40   std::vector<bool> view_paths;
41   SequenceBrowserWidget browser;
42   QMenu pick_align_menu;
43   QMenu view_align_menu;
44   std::vector <IntAction *> pick_actions;
45   std::vector <IntAction *> view_actions;
46 };
47 #endif