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