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