#ifndef _THRESHOLD_WIDGET_H_
#define _THRESHOLD_WIDGET_H_
+#include <QHBoxLayout>
#include <QLabel>
#include <QSpinBox>
#include <QWidget>
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;
int threshold() const;
//! update percent threshold
void updatePercentThreshold();
+
+ void reset(int min, int max, int threshold);
public slots:
void setBasepairThreshold(int threshold);
void thresholdChanged(int new_threshold);
protected:
- QSpinBox basepair_spinner;
- QLabel window_size_label;
- QLabel percent_label;
+ void setupWidgets();
+ QHBoxLayout *layout;
+ QSpinBox *basepair_spinner;
+ QLabel *window_size_label;
+ QLabel *percent_label;
int cur_bp_threshold;
int cur_percent_threshold;