ac8282073d324c5e50438ce560625d0466206648
[mussa.git] / qui / MussaWindow.hpp
1 #ifndef _MUSSAWINDOW_H_
2 #define _MUSSAWINDOW_H_
3
4 #include <list>
5
6 #include <QMainWindow>
7 #include <QPixmap>
8 #include <QSpinBox>
9 #include <QToolBar>
10
11 #include "qui/MussaAlignedWindow.hpp"
12 #include "qui/motif_editor/MotifEditor.hpp"
13 #include "qui/seqbrowser/SequenceBrowserWidget.hpp"
14 #include "qui/ThresholdWidget.hpp"
15
16 class QAction;
17 class QLabel;
18 class Mussa;
19
20 class MussaWindow : public QMainWindow
21 {
22   Q_OBJECT
23
24 public: 
25   MussaWindow(Mussa* analysis=0, QWidget *parent=0);
26
27   //! switch to a new analysis
28   void setAnalysis(Mussa *new_analysis);
29 public slots:
30   //! display an about box, contemplating the politics of the author list
31   void about();
32
33   //! \defgroup AnalysisFunctions Components related to running analyses
34   //\@{
35   //! open a window to collect the information needed to create a new analysis
36   void createNewAnalysis();
37   //! launch a sub analysis
38   void createSubAnalysis();
39   //\@}
40
41   //! \defgroup MotifHandling Handling of motif lists
42   //\@{
43   //! load motifs
44   void editMotifs();
45   void loadMotifList();
46   void saveMotifList();
47   void toggleMotifs();
48   //\@}
49
50   //! load a mussa parameter file (which specifies an analysis to run)
51   void loadMupa();
52   //! load a previously run analysis
53   void loadSavedAnalysis();
54   //! set the soft threshold used by the Nway_Path algorithm
55   void setSoftThreshold(int thres);
56
57   void showMussaToolbar();
58
59   //! open new window showing our alignment
60   void viewMussaAlignment();
61
62 signals:
63   void changedAnnotations();
64
65 protected:
66   Mussa *analysis;
67   std::list<MussaAlignedWindow *> aligned_windows;
68   MotifEditor *motif_editor;
69
70   // display our wonderful mussa output
71   SequenceBrowserWidget browser;
72   QToolBar mussaViewTB;
73   QSpinBox zoomBox;
74   ThresholdWidget threshold;
75   QLabel zoomLabel;
76   
77
78   QAction *aboutAction;
79   QAction *closeAction;
80   QAction *createNewAnalysisAction;
81   QAction *createSubAnalysisAction;
82   QAction *editMotifsAction;
83   QAction *loadMotifListAction;
84   QAction *loadMupaAction;
85   QAction *loadSavedAnalysisAction;
86   QAction *saveMotifListAction;
87   QAction *showMussaViewToolbarAction;
88   QAction *toggleMotifsAction;
89   QAction *saveBrowserPixmapAction;
90   QAction *whatsThisAction;
91   QAction *viewMussaAlignmentAction;
92
93   //! initialze the actions
94   void setupActions();
95   //! initialize this windows menu object
96   void setupMainMenu();
97   //! stub function to fill in QActions
98   void NotImplementedBox();
99
100 protected slots:  
101   //! update the SequenceBrowser with our analysis
102   void updateAnalysis();
103   //! update the view of conserved windows
104   void updateLinks();
105   //! update annotations?
106   void updateAnnotations();
107 };
108
109 #endif