eb8be9867fce62f1c4a5b7abdd9924680dae1ce4
[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 <QToolBar>
9 #include "alg/mussa.hpp"
10 #include "qui/IntAction.hpp"
11 #include "qui/ZoomWidget.hpp"
12 #include "qui/seqbrowser/SequenceBrowserWidget.hpp"
13
14 //! Show sequence alignments
15 class MussaAlignedWindow : public QMainWindow
16 {
17   Q_OBJECT 
18
19 public:
20   //! construct an aligned window for an analysis and selected paths
21   MussaAlignedWindow(Mussa&, const std::set<int>&, QWidget *parent=0);
22
23 public slots:
24   //! use selected_paths[pathid] to set the starting position of our sequence
25   void setAlignment(int pathid);
26   //! toggle whether or not to show the aligned basepairs of a window
27   void toggleViewAlignment(int alignment_index);
28
29   //! just force updating the window
30   void update();
31
32 protected:
33   void setSelectedPaths(Mussa &m, const std::set<int>& sel_paths);
34   //! set menus (must be called after setSelectedPaths)
35   void setupMenus();
36   void computeMatchLines();
37   
38   Mussa& analysis;
39   //std::vector<Sequence> sequences;
40   //const std::set<int>& selected_paths;
41   std::vector<ExtendedConservedPath> selected_paths;
42   std::vector<bool> view_paths;
43   SequenceBrowserWidget browser;
44   QMenu pick_align_menu;
45   QMenu view_align_menu;
46   QAction *saveBrowserPixmapAction;
47   std::vector <IntAction *> pick_actions;
48   std::vector <IntAction *> view_actions;
49   ZoomWidget zoom;
50   QToolBar alignTB;
51 };
52 #endif