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