First (incomplete) rough draft of the Mussagl Manual
[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
17 class QAction;
18 class QLabel;
19 class Mussa;
20
21 class MussaWindow : public QMainWindow
22 {
23   Q_OBJECT
24
25 public: 
26   MussaWindow(Mussa* analysis=0, QWidget *parent=0);
27
28   //! switch to a new analysis
29   void setAnalysis(Mussa *new_analysis);
30 public slots:
31   //! display an about box, contemplating the politics of the author list
32   void about();
33
34   //! \defgroup AnalysisFunctions Components related to running analyses
35   //\@{
36   //! open a window to collect the information needed to create a new analysis
37   void createNewAnalysis();
38   //! launch a sub analysis
39   void createSubAnalysis();
40   //\@}
41
42   //! \defgroup MotifHandling Handling of motif lists
43   //\@{
44   //! load motifs
45   void editMotifs();
46   void loadMotifList();
47   void saveMotifList();
48   void toggleMotifs();
49   //\@}
50
51   //! load a mussa parameter file (which specifies an analysis to run)
52   void loadMupa();
53   //! load a previously run analysis
54   void loadSavedAnalysis();
55   //! set the soft threshold used by the Nway_Path algorithm
56   void setSoftThreshold(int thres);
57
58   void showMussaToolbar();
59
60   //! open new window showing our alignment
61   void viewMussaAlignment();
62
63 signals:
64   void changedAnnotations();
65
66 protected:
67   Mussa *analysis;
68   std::list<MussaAlignedWindow *> aligned_windows;
69   MotifEditor *motif_editor;
70   MussaSetupDialog setup_analysis_dialog;
71
72   // display our wonderful mussa output
73   SequenceBrowserWidget browser;
74   QToolBar mussaViewTB;
75   QSpinBox zoomBox;
76   ThresholdWidget threshold;
77   QLabel zoomLabel;
78   
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