The simplest way of report the threshold was to reuse the current
threshold widget. However since it makes no sense to change the threshold
at on the aligned sequence level view, I added the ability to make
the widget read only.
subanalysis_window(window),
pick_align_menu(tr("Choose Alignment")),
view_align_menu(tr("View Alignment")),
subanalysis_window(window),
pick_align_menu(tr("Choose Alignment")),
view_align_menu(tr("View Alignment")),
setCentralWidget(&browser);
setCentralWidget(&browser);
+ // Add a threhold widget set to our current threshold and make it readonly
+ threshold_widget = new ThresholdWidget;
+ threshold_widget->setRange(analysis->get_threshold(),analysis->get_window());
+ threshold_widget->setBasepairThreshold(analysis->get_soft_threshold());
+ threshold_widget->setReadOnly(true);
+
alignTB = new QToolBar();
alignTB->addWidget(zoom);
alignTB = new QToolBar();
alignTB->addWidget(zoom);
+ alignTB->addWidget(threshold_widget);
addToolBar(alignTB);
ostringstream message;
addToolBar(alignTB);
ostringstream message;
#include "alg/mussa.hpp"
#include "qui/IntAction.hpp"
#include "qui/ZoomWidget.hpp"
#include "alg/mussa.hpp"
#include "qui/IntAction.hpp"
#include "qui/ZoomWidget.hpp"
+#include "qui/ThresholdWidget.hpp"
#include "qui/seqbrowser/SequenceBrowserWidget.hpp"
#include "qui/SubanalysisWindow.hpp"
#include "qui/seqbrowser/SequenceBrowserWidget.hpp"
#include "qui/SubanalysisWindow.hpp"
std::vector <IntAction *> pick_actions;
std::vector <IntAction *> view_actions;
ZoomWidget *zoom;
std::vector <IntAction *> pick_actions;
std::vector <IntAction *> view_actions;
ZoomWidget *zoom;
+ ThresholdWidget *threshold_widget;
updatePercentThreshold();
}
updatePercentThreshold();
}
+bool ThresholdWidget::isReadOnly() const
+{
+ return basepair_spinner->isReadOnly();
+}
+
+void ThresholdWidget::setReadOnly(bool read_only)
+{
+ basepair_spinner->setReadOnly(read_only);
+}
+
double ThresholdWidget::min_ratio() const
{
double ratio=((double)basepair_spinner->minimum()/
double ThresholdWidget::min_ratio() const
{
double ratio=((double)basepair_spinner->minimum()/
public:
ThresholdWidget(QWidget *parent = 0, int min=20, int max=30);
public:
ThresholdWidget(QWidget *parent = 0, int min=20, int max=30);
+
+ //! is the widget in read only mode
+ bool isReadOnly() const;
+ //! set the widget to specified read only state
+ void setReadOnly(bool);
//! return min_threshold/max_threshold
double min_ratio() const;
//! return min_threshold/max_threshold
double min_ratio() const;