Update mussa to build on ubuntu 10.04 with qt 4.6.2 +boost 1.40.0.1
[mussa.git] / qui / MussaWindow.hpp
index aff3c6ffbc9ef8d326556ac42bf95cc70fa2bb4e..bba3106191748925ffb57bc83c77b2ee7878ff3c 100644 (file)
@@ -4,18 +4,20 @@
 #include <list>
 #include <boost/shared_ptr.hpp>
 
+#include <QCloseEvent>
 #include <QDir>
 #include <QMainWindow>
 #include <QPixmap>
 #include <QProgressDialog>
 #include <QSpinBox>
 #include <QToolBar>
+#include <QProcess>
 
 #include "qui/MussaAlignedWindow.hpp"
 #include "qui/motif_editor/MotifEditor.hpp"
 #include "qui/mussa_setup_dialog/MussaSetupDialog.hpp"
 #include "qui/seqbrowser/SequenceBrowserWidget.hpp"
-#include "qui/SubanalysisWindow.hpp"
+#include "qui/subanalysis/SubanalysisWindow.hpp"
 #include "qui/ThresholdWidget.hpp"
 #include "qui/ZoomWidget.hpp"
 
@@ -25,14 +27,18 @@ class QLabel;
 class QStringList;
 class Mussa;
 class QAssistantClient;
+class MussaWindow;
+
+typedef boost::shared_ptr<MussaWindow> MussaWindowRef;
 
 class MussaWindow : public QMainWindow
 {
   Q_OBJECT
 
 public: 
-  MussaWindow(MussaRef analysis=0, QWidget *parent=0);
+  MussaWindow(MussaRef analysis, QWidget *parent=0);
 
+public:
   //! reset any attached window
   void clear();
 
@@ -57,6 +63,8 @@ public slots:
   void saveAnalysis();
   //! save an analysis after prompting for new name
   void saveAnalysisAs();
+  //! set the window modified flag
+  void updateAnalysisModified(bool);
   //! try to conver the mussa analysis_path to a title
   void updateTitle();
   //\@}
@@ -77,12 +85,15 @@ public slots:
   //! set the soft threshold used by the Nway_Path algorithm
   void setSoftThreshold(int thres);
   //! update progress bar
-  void updateProgress(const std::string& description, int cur, int max);
+  void updateProgress(const QString& description, int cur, int max);
 
   //! open a new mussa window so one can compare analyses
   void newMussaWindow();
 
   void showMussaToolbar();
+  //! display how many base pairs were copied on the status bar
+  void showBasePairsCopied(size_t);
+
 
   //! open new window showing our alignment
   void viewMussaAlignment();
@@ -100,8 +111,8 @@ protected:
   //! shared_ptr to our analysis
   MussaRef analysis;
   //! the default directory we should loand and save from
-  QDir default_dir;
-  std::list<boost::shared_ptr<MussaAlignedWindow> > aligned_windows;
+  boost::shared_ptr<QDir> default_dir;
+  std::list<MussaAlignedWindowRef> aligned_windows;
   MotifEditor *motif_editor;
   MussaSetupDialog *setup_analysis_dialog;
   SubanalysisWindowRef subanalysis_window;
@@ -132,7 +143,8 @@ protected:
   QAction *whatsThisAction;
   QAction *viewMussaAlignmentAction;
 
-  QAssistantClient *manualAssistant;
+  //QAssistantClient *manualAssistant;
+  QProcess *assistantProcess;
 
   //! initialze the actions
   void setupActions();
@@ -140,6 +152,8 @@ protected:
   void closeEvent(QCloseEvent *event);
   //! initialize this windows menu object
   void setupMainMenu();
+  //! initialize all of our widgets
+  void setupWidgets();
   //! initialize assistant client
   void setupAssistant();
   //! stub function to fill in QActions