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, 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();
86 //! display how many base pairs were copied on the status bar
87 void showBasePairsCopied(size_t);
90 //! open new window showing our alignment
91 void viewMussaAlignment();
93 //! display mussagl manual
96 void assistantError(const QString message);
99 void changedAnnotations();
100 void changedMotifs();
103 //! shared_ptr to our analysis
105 //! the default directory we should loand and save from
106 boost::shared_ptr<QDir> default_dir;
107 std::list<boost::shared_ptr<MussaAlignedWindow> > aligned_windows;
108 MotifEditor *motif_editor;
109 MussaSetupDialog *setup_analysis_dialog;
110 SubanalysisWindowRef subanalysis_window;
112 // display our wonderful mussa output
113 SequenceBrowserWidget *browser;
114 QToolBar *mussaViewTB;
116 ThresholdWidget *threshold;
117 QProgressDialog *progress_dialog;
119 QAction *aboutAction;
120 QAction *closeAction;
121 QAction *createNewAnalysisAction;
122 QAction *createSubAnalysisAction;
123 QAction *saveAnalysisAction;
124 QAction *saveAnalysisAsAction;
125 QAction *editMotifsAction;
126 QAction *loadMotifListAction;
127 QAction *loadMupaAction;
128 QAction *loadSavedAnalysisAction;
129 QAction *mussaManualAssistantAction;
130 QAction *newMussaWindowAction;
131 QAction *saveMotifListAction;
132 QAction *showMussaViewToolbarAction;
133 QAction *toggleMotifsAction;
134 QAction *saveBrowserPixmapAction;
135 QAction *whatsThisAction;
136 QAction *viewMussaAlignmentAction;
138 QAssistantClient *manualAssistant;
140 //! initialze the actions
142 //! handle close events (AKA prompt if we should save)
143 void closeEvent(QCloseEvent *event);
144 //! initialize this windows menu object
145 void setupMainMenu();
146 //! initialize assistant client
147 void setupAssistant();
148 //! stub function to fill in QActions
149 void NotImplementedBox();
152 //! update the SequenceBrowser with our analysis
153 void updateAnalysis();
154 //! update the view of conserved windows
156 //! update annotations?
157 void updateAnnotations();