Option::Option(QWidget *parent) : QDialog(parent) , threshold_value(0) , smoothMask(true) , tryflip(false) , method(true) , scale(1) , is_origin(true) , is_bgsub(false) , is_modup(true) , alpha(1.0) , beta(0) , nestVisible(false) , isAutoAdj1(false) , isAutoAdj2(false) , nestLimit(false) { //FaceDetection fc; ui.setupUi(this); ui.slider_thres->setRange(0, 255); ui.slider_thres->setValue(0); setthresValue(0); ui.slider_scale->setRange(100, 800); ui.slider_scale->setValue(100); setScaleValue(100); ui.slider_bright->setRange(0, 100); ui.slider_bright->setValue(0); ui.slider_contrast->setRange(100, 300); ui.slider_contrast->setValue(100); connect(ui.slider_bright, SIGNAL(valueChanged(int)), this, SLOT(setbrightValue(int))); connect(ui.doubleSpinBox_contrast, SIGNAL(valueChanged(double)), this, SLOT(setSpinBox())); connect(ui.slider_contrast, SIGNAL(valueChanged(int)), this, SLOT(setContrastValue(int))); connect(ui.slider_thres, SIGNAL(valueChanged(int)), this, SLOT(setthresValue(int))); connect(ui.doubleSpinBox, SIGNAL(valueChanged(double)), this, SLOT(setSpinBox())); connect(ui.slider_scale, SIGNAL(valueChanged(int)), this, SLOT(setScaleValue(int))); connect(ui.radioButton_flip1, SIGNAL(toggled(bool)), this, SLOT(rb_flip())); connect(ui.radioButton_mog2, SIGNAL(toggled(bool)), this, SLOT(rb_mod())); connect(ui.radioButton_bgup1, SIGNAL(toggled(bool)), this, SLOT(rb_bgup())); connect(ui.radioButton_origin1, SIGNAL(toggled(bool)), this, SLOT(rb_origin())); connect(ui.radioButton_slight2, SIGNAL(toggled(bool)), this, SLOT(rb_sight())); connect(ui.radioButton_smooth1, SIGNAL(toggled(bool)), this, SLOT(rb_smooth())); connect(ui.radioButton_autoSight1, SIGNAL(toggled(bool)), this, SLOT(rb_auto1())); connect(ui.radioButton_nest1, SIGNAL(toggled(bool)), this, SLOT(rb_nest())); connect(ui.radioButton_nestLimit, SIGNAL(toggled(bool)), this, SLOT(rb_nestLimit())); connect(ui.radioButton_adj21, SIGNAL(toggled(bool)), this, SLOT(rb_auto2())); }
QPxGraph::QPxGraph(QPxSettings *iset, devlist *idev, QString iname, int ttype, QWidget *p, Qt::WindowFlags fl) : QWidget(p,fl) { #ifndef QT_NO_DEBUG qDebug("STA: QPxGraph()"); #endif setMinimumSize(250, 150); settings = iset; devices = idev; name[0] = iname; test = ttype; showspeed= 1; forceAll = 1; lastX = 0; errcList = 0; scale[0] = NULL; scale[1] = NULL; margin_left = MARGIN_DEFL; margin_right = MARGIN_DEFR; margin_bottom = MARGIN_DEFB; taZone = 0; taLayer = 0; #ifdef CACHE_GRAPH img = NULL; #endif switch (test) { /* case TEST_RT: case TEST_WT: case TEST_JB: case TEST_FT: case TEST_TA: setContextMenuPolicy(Qt::NoContextMenu); break; */ case TEST_ERRC: scale[0] = new Scale(settings->scales.get(name[0])); // settings->loadScale(name); setScaleValue(256); setContextMenuPolicy(Qt::DefaultContextMenu); break; case TEST_JB: name[0] = "Jitter"; name[1] = "Asymm"; scale[0] = new Scale(settings->scales.get( name[0] )); scale[0]->type = Scale::Linear; scale[1] = new Scale(settings->scales.get( name[1] )); scale[1]->type = Scale::Linear; setScaleValue(2,0); setScaleValue(16,1); setContextMenuPolicy(Qt::NoContextMenu); break; default: setContextMenuPolicy(Qt::NoContextMenu); break; } setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Expanding); #ifndef QT_NO_DEBUG qDebug("END: QPxGraph()"); #endif }