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();
96 //! reference to our analysis
98 //! the default directory we should loand and save from
99 boost::filesystem::path default_dir;
100 std::list<boost::shared_ptr<MussaAlignedWindow> > aligned_windows;
101 MotifEditor *motif_editor;
102 MussaSetupDialog *setup_analysis_dialog;
103 boost::shared_ptr<SubanalysisWindow> subanalysis_window;
105 // display our wonderful mussa output
106 SequenceBrowserWidget *browser;
107 QToolBar *mussaViewTB;
109 ThresholdWidget *threshold;
110 QProgressDialog *progress_dialog;
112 QAction *aboutAction;
113 QAction *closeAction;
114 QAction *createNewAnalysisAction;
115 QAction *createSubAnalysisAction;
116 QAction *saveAnalysisAction;
117 QAction *saveAnalysisAsAction;
118 QAction *editMotifsAction;
119 QAction *loadMotifListAction;
120 QAction *loadMupaAction;
121 QAction *loadSavedAnalysisAction;
122 QAction *mussaManualAssistantAction;
123 QAction *newMussaWindowAction;
124 QAction *saveMotifListAction;
125 QAction *showMussaViewToolbarAction;
126 QAction *toggleMotifsAction;
127 QAction *saveBrowserPixmapAction;
128 QAction *whatsThisAction;
129 QAction *viewMussaAlignmentAction;
131 QAssistantClient *manualAssistant;
133 //! initialze the actions
135 //! handle close events (AKA prompt if we should save)
136 void closeEvent(QCloseEvent *event);
137 //! initialize this windows menu object
138 void setupMainMenu();
139 //! initialize assistant client
140 void setupAssistant();
141 //! stub function to fill in QActions
142 void NotImplementedBox();
145 //! update the SequenceBrowser with our analysis
146 void updateAnalysis();
147 //! update the view of conserved windows
149 //! update annotations?
150 void updateAnnotations();