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