9d9ef731db486d041ef1ce83718ed6fe60984388
[mussa.git] / qui / SubanalysisWindow.hpp
1 #ifndef _SUBANALYSIS_H_
2 #define _SUBANALYSIS_H_
3
4 #include <QTableView>
5 #include <QPushButton>
6 #include <QSpinBox>
7 #include <QStringList>
8 #include <QWidget>
9
10 #include "qui/SequenceLocationModel.hpp"
11 #include "alg/mussa.hpp"
12
13 class SubanalysisWindow : public QWidget
14 {
15   Q_OBJECT 
16
17 public: 
18   SubanalysisWindow(MussaRef m, QWidget *parent = 0);
19
20   //! return a modifiable reference to our SequenceLocationModel
21   SequenceLocationModel& getModel();
22
23 public slots:
24   //! clear our model and close the window
25   void abort();
26   //! create a subanalysis and run it
27   void run();
28   //! provide a way for the model to tell us to update our gui
29   void modelUpdated(const QModelIndex&, int, int);
30   //! update our title
31   void updateTitle();
32
33 private:
34   //! keep track of what analysis we're attached to
35   MussaRef analysis;
36   QSpinBox *window;
37   QSpinBox *threshold;
38   QTableView *table;
39   QPushButton *ok;
40   QPushButton *cancel;
41
42   SequenceLocationModel model;
43 };
44
45 //! reference to a subanalysis window
46 typedef boost::shared_ptr<SubanalysisWindow> SubanalysisWindowRef;
47 #endif