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