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