define an analysis should keep settings
authorDiane Trout <diane@caltech.edu>
Thu, 23 Mar 2006 19:05:37 +0000 (19:05 +0000)
committerDiane Trout <diane@caltech.edu>
Thu, 23 Mar 2006 19:05:37 +0000 (19:05 +0000)
The define an analysis dialog should keep its values (as it doesn't do
a good job of validating input) (ticket:57) because when something is wrong
you'd have to then reenter everything.

qui/MussaWindow.cpp
qui/MussaWindow.hpp
qui/ThresholdWidget.cpp

index b84da1df21b0225fb9434f45842e94cfeb890e61..a132f33401b007274fd7895c3f5c6b554a373aa1 100644 (file)
@@ -209,11 +209,10 @@ void MussaWindow::about()
 
 void MussaWindow::createNewAnalysis()
 {
-  MussaSetupDialog *msd = new MussaSetupDialog(this);
   try {
-    if (msd->exec()) {
+    if (setup_analysis_dialog.exec()) {
       Mussa *m = 0;
-      m = msd->getMussa();
+      m = setup_analysis_dialog.getMussa();
       setAnalysis(m);
     } else {
       std::cout << "New mussa exp. aborted!\n";
@@ -222,7 +221,6 @@ void MussaWindow::createNewAnalysis()
     QString msg(e.what());
     QMessageBox::warning(this, tr("Create New Analysis"), msg);
   }
-  delete msd;
 }
 
 void MussaWindow::createSubAnalysis()
index ac8282073d324c5e50438ce560625d0466206648..96dd3d2153c1d17e3bee239270ee129a1b15f47c 100644 (file)
@@ -10,6 +10,7 @@
 
 #include "qui/MussaAlignedWindow.hpp"
 #include "qui/motif_editor/MotifEditor.hpp"
+#include "qui/mussa_setup_dialog/MussaSetupDialog.hpp"
 #include "qui/seqbrowser/SequenceBrowserWidget.hpp"
 #include "qui/ThresholdWidget.hpp"
 
@@ -66,6 +67,7 @@ protected:
   Mussa *analysis;
   std::list<MussaAlignedWindow *> aligned_windows;
   MotifEditor *motif_editor;
+  MussaSetupDialog setup_analysis_dialog;
 
   // display our wonderful mussa output
   SequenceBrowserWidget browser;
index a97f502938912e60e76228f4a5ecb034d45e9d6c..72e5e6816d1850a0cb83ec8e1e9c700e7c2278b3 100644 (file)
@@ -1,5 +1,4 @@
 #include <QHBoxLayout>
-#include <QLCDNumber>
 #include <QSlider>
 
 #include "qui/ThresholdWidget.hpp"