1 #ifndef _MUSSAWINDOW_H_
2 #define _MUSSAWINDOW_H_
5 #include <boost/shared_ptr.hpp>
9 #include <QProgressDialog>
13 #include "qui/MussaAlignedWindow.hpp"
14 #include "qui/motif_editor/MotifEditor.hpp"
15 #include "qui/mussa_setup_dialog/MussaSetupDialog.hpp"
16 #include "qui/seqbrowser/SequenceBrowserWidget.hpp"
17 #include "qui/SubanalysisWindow.hpp"
18 #include "qui/ThresholdWidget.hpp"
19 #include "qui/ZoomWidget.hpp"
26 class QAssistantClient;
28 class MussaWindow : public QMainWindow
33 MussaWindow(Mussa* analysis=0, QWidget *parent=0);
35 //! reset any attached window
38 //! switch to a new analysis
39 void setAnalysis(Mussa *new_analysis);
41 //! ask the user what to do if we're going to lose data
42 //! returns true if getting rid of this analysis is safe
43 bool isClearingAnalysisSafe();
46 //! display an about box, contemplating the politics of the author list
49 //! \defgroup AnalysisFunctions Components related to running analyses
51 //! open a window to collect the information needed to create a new analysis
52 void createNewAnalysis();
53 //! launch a sub analysis
54 void createSubAnalysis();
57 //! save an analysis after prompting for new name
58 void saveAnalysisAs();
61 //! \defgroup MotifHandling Handling of motif lists
70 //! load a mussa parameter file (which specifies an analysis to run)
72 //! load a previously run analysis
73 void loadSavedAnalysis();
74 //! set the soft threshold used by the Nway_Path algorithm
75 void setSoftThreshold(int thres);
76 //! update progress bar
77 void updateProgress(const std::string& description, int cur, int max);
79 //! open a new mussa window so one can compare analyses
80 void newMussaWindow();
82 void showMussaToolbar();
84 //! open new window showing our alignment
85 void viewMussaAlignment();
87 //! display mussagl manual
90 void assistantError(const QString message);
93 void changedAnnotations();
97 std::list<boost::shared_ptr<MussaAlignedWindow> > aligned_windows;
98 MotifEditor *motif_editor;
99 MussaSetupDialog setup_analysis_dialog;
100 SubanalysisWindow subanalysis_window;
102 // display our wonderful mussa output
103 SequenceBrowserWidget browser;
104 QToolBar mussaViewTB;
106 ThresholdWidget threshold;
107 QProgressDialog *progress_dialog;
109 QAction *aboutAction;
110 QAction *closeAction;
111 QAction *createNewAnalysisAction;
112 QAction *createSubAnalysisAction;
113 QAction *saveAnalysisAction;
114 QAction *saveAnalysisAsAction;
115 QAction *editMotifsAction;
116 QAction *loadMotifListAction;
117 QAction *loadMupaAction;
118 QAction *loadSavedAnalysisAction;
119 QAction *mussaManualAssistantAction;
120 QAction *newMussaWindowAction;
121 QAction *saveMotifListAction;
122 QAction *showMussaViewToolbarAction;
123 QAction *toggleMotifsAction;
124 QAction *saveBrowserPixmapAction;
125 QAction *whatsThisAction;
126 QAction *viewMussaAlignmentAction;
128 QAssistantClient *manualAssistant;
130 //! initialze the actions
132 //! handle close events (AKA prompt if we should save)
133 void closeEvent(QCloseEvent *event);
134 //! initialize this windows menu object
135 void setupMainMenu();
136 //! initialize assistant client
137 void setupAssistant();
138 //! stub function to fill in QActions
139 void NotImplementedBox();
142 //! update the SequenceBrowser with our analysis
143 void updateAnalysis();
144 //! update the view of conserved windows
146 //! update annotations?
147 void updateAnnotations();