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(MussaRef analysis=0, QWidget *parent=0);
35 //! reset any attached window
38 //! switch to a new analysis
39 void setAnalysis(MussaRef 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();
59 //! try to conver the mussa analysis_path to a title
63 //! \defgroup MotifHandling Handling of motif lists
72 //! load a mussa parameter file (which specifies an analysis to run)
74 //! load a previously run analysis
75 void loadSavedAnalysis();
76 //! set the soft threshold used by the Nway_Path algorithm
77 void setSoftThreshold(int thres);
78 //! update progress bar
79 void updateProgress(const std::string& description, int cur, int max);
81 //! open a new mussa window so one can compare analyses
82 void newMussaWindow();
84 void showMussaToolbar();
86 //! open new window showing our alignment
87 void viewMussaAlignment();
89 //! display mussagl manual
92 void assistantError(const QString message);
95 void changedAnnotations();
98 //! shared_ptr to our analysis
100 //! the default directory we should loand and save from
101 boost::filesystem::path default_dir;
102 std::list<boost::shared_ptr<MussaAlignedWindow> > aligned_windows;
103 MotifEditor *motif_editor;
104 MussaSetupDialog *setup_analysis_dialog;
105 SubanalysisWindowRef subanalysis_window;
107 // display our wonderful mussa output
108 SequenceBrowserWidget *browser;
109 QToolBar *mussaViewTB;
111 ThresholdWidget *threshold;
112 QProgressDialog *progress_dialog;
114 QAction *aboutAction;
115 QAction *closeAction;
116 QAction *createNewAnalysisAction;
117 QAction *createSubAnalysisAction;
118 QAction *saveAnalysisAction;
119 QAction *saveAnalysisAsAction;
120 QAction *editMotifsAction;
121 QAction *loadMotifListAction;
122 QAction *loadMupaAction;
123 QAction *loadSavedAnalysisAction;
124 QAction *mussaManualAssistantAction;
125 QAction *newMussaWindowAction;
126 QAction *saveMotifListAction;
127 QAction *showMussaViewToolbarAction;
128 QAction *toggleMotifsAction;
129 QAction *saveBrowserPixmapAction;
130 QAction *whatsThisAction;
131 QAction *viewMussaAlignmentAction;
133 QAssistantClient *manualAssistant;
135 //! initialze the actions
137 //! handle close events (AKA prompt if we should save)
138 void closeEvent(QCloseEvent *event);
139 //! initialize this windows menu object
140 void setupMainMenu();
141 //! initialize assistant client
142 void setupAssistant();
143 //! stub function to fill in QActions
144 void NotImplementedBox();
147 //! update the SequenceBrowser with our analysis
148 void updateAnalysis();
149 //! update the view of conserved windows
151 //! update annotations?
152 void updateAnnotations();