BioXASCarbonFilterFarmActuator::BioXASCarbonFilterFarmActuator(const QString &deviceName, QObject *parent) : BioXASBeamlineComponent(deviceName, parent) { // Create actuator position control. position_ = new BioXASCarbonFilterFarmActuatorPositionControl(name()+"Position", "mm", this); addChildControl(position_); connect( position_, SIGNAL(valueChanged(double)), this, SLOT(onPositionControlValueChanged()) ); connect( position_, SIGNAL(statusValueChanged(double)), this, SLOT(onPositionControlStatusValueChanged()) ); connect( position_, SIGNAL(motorChanged(CLSMAXvMotor*)), this, SIGNAL(motorChanged(CLSMAXvMotor*)) ); connect( position_, SIGNAL(statusChanged(AMControl*)), this, SIGNAL(positionStatusChanged(AMControl*)) ); // Create actuator window control. window_ = new BioXASCarbonFilterFarmActuatorWindowControl(name()+"Window", this); addChildControl(window_); window_->setPositionControl(position_); connect( window_, SIGNAL(valueChanged(double)), this, SLOT(onWindowControlValueChanged()) ); connect( window_, SIGNAL(windowsChanged()), this, SIGNAL(windowsChanged()) ); // Create actuator filter control. filter_ = new BioXASCarbonFilterFarmActuatorFilterControl(name()+"Filter", "um", this); addChildControl(filter_); filter_->setWindowControl(window_); connect( filter_, SIGNAL(valueChanged(double)), this, SLOT(onFilterControlValueChanged()) ); connect( filter_, SIGNAL(filtersChanged()), this, SIGNAL(filtersChanged()) ); connect( filter_, SIGNAL(windowPreferencesChanged()), this, SIGNAL(windowPreferencesChanged()) ); }
void ViewmdaWidget1D::setModel(ViewmdaModel *M) { m_model=M; connect(m_model,SIGNAL(arrayChanged()),this,SLOT(slot_update_plot())); connect(m_model,SIGNAL(dimensionsChanged()),this,SLOT(slot_update_plot())); connect(m_model,SIGNAL(currentIndexChanged()),this,SLOT(slot_update_plot())); connect(m_model,SIGNAL(currentSliceChanged()),this,SLOT(slot_update_plot())); connect(m_model,SIGNAL(selectedPointsChanged()),this,SLOT(slot_update_plot())); connect(m_model,SIGNAL(selectedRectChanged()),this,SLOT(slot_update_plot())); connect(m_model,SIGNAL(zoomRectChanged()),this,SLOT(slot_update_plot())); connect(m_model,SIGNAL(windowsChanged()),this,SLOT(slot_update_plot())); }
/** * @brief MenuActions::createMenus * Puts the actions in menus and toolbars. */ void MenuActions::createMenus() { createActions(); connect(parent()->parent(), SIGNAL(windowsChanged()), this, SLOT(windowsChanged())); fileMenu = parent()->menuBar()->addMenu(tr("&File")); fileMenu->addAction(newAct); fileMenu->addAction(openAct); fileMenu->addAction(saveAct); fileMenu->addAction(saveAsAct); fileMenu->addSeparator(); fileMenu->addAction(closeWindowAct); fileMenu->addAction(exitAct); editMenu = parent()->menuBar()->addMenu(tr("&Edit")); editMenu->addAction(copyRowsAct); editMenu->addAction(removeRowsAct); windowMenu = parent()->menuBar()->addMenu(tr("&Window")); windowMenu->addAction(displaySidebarAct); windowMenu->addAction(displayFileToolbarAct); windowMenu->addAction(displayFileSizeAct); windowMenu->addSeparator(); helpMenu = parent()->menuBar()->addMenu(tr("&Help")); helpMenu->addAction(aboutAct); fileToolBar = parent()->addToolBar(tr("File")); fileToolBar->setFloatable(false); fileToolBar->setMovable(false); fileToolBar->setIconSize(QSize(22, 22)); fileToolBar->addAction(newAct); fileToolBar->addAction(openAct); fileToolBar->addAction(saveAct); QSettings settings; this->setMenubarVisible(settings.value("filetoolbarvisible", true).toBool()); this->setSidebarVisible(settings.value("sidebarvisible", true).toBool()); this->setFileSizeVisible(settings.value("filesizevisible", true).toBool()); }
void ViewmdaModel::autoSetWindows() { float minval=0,maxval=0; bool first=true; for (qint32 x=0; x<N1(); x++) for (qint32 y=0; y<N2(); y++) { real val=abs(get(x,y)); if ((first)||(val<minval)) minval=val; if ((first)||(val>maxval)) maxval=val; first=false; } m_window_min=0; m_window_max=maxval*1.2F; emit windowsChanged(); }
void ViewmdaModel::setSaturationWindowMax(float val) { if (m_saturation_window_max==val) return; m_saturation_window_max=val; emit windowsChanged(); }
void ViewmdaModel::setWindows(float minval,float maxval) { if ((m_window_min==minval)&&(m_window_max==maxval)) return; m_window_min=minval; m_window_max=maxval; emit windowsChanged(); }