ThresholdWidget::ThresholdWidget(QWidget *parent, int min, int max)
: QWidget(parent),
layout(0),
+ cur_bp_threshold(0),
basepair_spinner(0),
window_size_label(0),
percent_label(0)
void ThresholdWidget::setRange(int min, int max)
{
basepair_spinner->setRange(min, max);
- cur_bp_threshold = min;
- basepair_spinner->setValue(min);
+ if (cur_bp_threshold < min || cur_bp_threshold > max)
+ {
+ cur_bp_threshold = min;
+ basepair_spinner->setValue(min);
+ }
QString num;
num.setNum(max);
{
return cur_bp_threshold;
}
+
+void ThresholdWidget::reset(int min, int max, int threshold)
+{
+
+ cur_bp_threshold = threshold;
+ cur_percent_threshold = (int)(roundl(ratio() * 100));
+ setRange(min, max);
+ basepair_spinner->setValue(threshold);
+ updatePercentThreshold();
+
+}