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