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