AcquisitionSystemPage::AcquisitionSystemPage(QWidget *parent) : AcquisitionSystemLayout(parent), doubleValidator(this), intValidator(this), isInit(true), reset(false), isLostFocus(false), isReturnPressed(false), modified(false), isCheckAsked(false) { //Set a validator on the line edits, the values have to be integers. nbChannelsLineEdit->setValidator(&intValidator); samplingRateLineEdit->setValidator(&doubleValidator); offsetLineEdit->setValidator(&intValidator); voltageRangeLineEdit->setValidator(&intValidator); amplificationLineEdit->setValidator(&intValidator); connect(nbChannelsLineEdit,SIGNAL(returnPressed()),this,SLOT(nbChannelsLineEditReturnPressed())); connect(nbChannelsLineEdit,SIGNAL(editingFinished()),this,SLOT(nbChannelsLineEditLostFocus())); connect(resolutionComboBox,SIGNAL(activated(int)),this,SLOT(propertyModified())); connect(voltageRangeLineEdit,SIGNAL(textChanged(QString)),this,SLOT(propertyModified())); connect(amplificationLineEdit,SIGNAL(textChanged(QString)),this,SLOT(propertyModified())); connect(samplingRateLineEdit,SIGNAL(textChanged(QString)),this,SLOT(propertyModified())); connect(offsetLineEdit,SIGNAL(textChanged(QString)),this,SLOT(propertyModified())); }
void PointPropertyView::addLoad() const { if (sender()->objectName() == QLatin1String("add")) { static_cast<Point*>(members.first())->loads.append(Load()); propertyModified(members.first(),QByteArray("i").append(QByteArray::number(static_cast<Point*>(members.first())->loads.size()-1))); return; } int row = findChild<QVBoxLayout*>(QLatin1String("insert"))->indexOf(static_cast<QWidget*>(sender())); static_cast<Point*>(members.first())->loads.insert(row,Load()); propertyModified(members.first(),QByteArray("i").append(QByteArray::number(row))); }
void PointPropertyView::setLoad(int row, int column, const QString &text) const { static_cast<Point*>(members.first())->loads[row][column] = text.toDouble(); propertyModified(members.first(),QByteArray::number(row).append(' ').append(QByteArray::number(column))); loadModified(members.first(),0,column); distinationChanged(); }
LfpPage::LfpPage(QWidget* parent) : LfpLayout(parent),doubleValidator(this),modified(false),isInit(true){ //Set a validator on the line edits, the values have to be integers. samplingRateLineEdit->setValidator(&doubleValidator); connect(samplingRateLineEdit,SIGNAL(textChanged(QString)),this,SLOT(propertyModified())); }
MiscellaneousPage::MiscellaneousPage(QWidget* parent) : NeuroscopeMiscLayout(parent),doubleValidator(this),modified(false),isInit(true){ //Set a validator on the line edits, the values have to be integers or doubles. screenGainLineEdit->setValidator(&doubleValidator); connect(traceBackgroundButton,SIGNAL(clicked()),this,SLOT(updateTraceBackgroundImage())); connect(traceBackgroundLineEdit,SIGNAL(textChanged(QString)),this,SLOT(updateTraceBackgroundImage(QString))); connect(screenGainLineEdit,SIGNAL(textChanged(QString)),this,SLOT(propertyModified())); connect(traceBackgroundLineEdit,SIGNAL(textChanged(QString)),this,SLOT(propertyModified())); //Set an icon on the backgroundButton button traceBackgroundButton->setIcon(QIcon(":/shared-icons/folder-open")); }
void PointPropertyView::removeLoad() const { int row = findChild<QVBoxLayout*>(QLatin1String("remove"))->indexOf(static_cast<QWidget*>(sender())); static_cast<Point*>(members.first())->loads.removeAt(row); propertyModified(members.first(),QByteArray("r").append(QByteArray::number(row))); for (int i=0;i<6;++i) loadModified(members.first(),0,i); distinationChanged(); }
void CameraProperty::updatePropertyFromValue() { NetworkLock lock(this); lookFrom_ = camera_->getLookFrom(); lookTo_ = camera_->getLookTo(); lookUp_ = camera_->getLookUp(); aspectRatio_ = camera_->getAspectRatio(); nearPlane_ = camera_->getNearPlaneDist(); farPlane_ = camera_->getFarPlaneDist(); propertyModified(); }
ChannelColorsPage::ChannelColorsPage(QWidget* parent) : ChannelColorsLayout(parent) ,modified(false) { #if QT_VERSION < QT_VERSION_CHECK(5, 0, 0) colorTable->horizontalHeader()->setResizeMode( QHeaderView::ResizeToContents ); #else colorTable->horizontalHeader()->setSectionResizeMode( QHeaderView::ResizeToContents ); #endif connect(colorTable, SIGNAL(cellChanged(int,int)),this, SLOT(propertyModified())); connect(colorTable, SIGNAL(cellDoubleClicked(int,int)),this, SLOT(propertyModified())); connect(colorTable, SIGNAL(modified()),SLOT(propertyModified())); }
void CompositeProperty::set(const CompositeProperty* src) { NetworkLock lock; auto subProperties = src->getProperties(); if (subProperties.size() == this->properties_.size()) { for (size_t i = 0; i < subProperties.size(); i++) { this->properties_[i]->set(subProperties[i]); } propertyModified(); } else { LogWarn("CompositeProperty mismatch. Unable to link"); } }
void AdvancedMaterialProperty::phaseFunctionChanged() { ShadingFunctionKind shadingType = getPhaseFunctionEnum(); indexOfRefractionProp.setVisible(false); roughnessProp.setVisible(false); specularColorProp.setVisible(false); anisotropyProp.setVisible(false); if (shadingType == ShadingFunctionKind::HenyeyGreenstein) { anisotropyProp.setVisible(true); } else if (shadingType == ShadingFunctionKind::Schlick) { anisotropyProp.setVisible(true); } else if (shadingType == ShadingFunctionKind::BlinnPhong) { indexOfRefractionProp.setVisible(true); roughnessProp.setVisible(true); specularColorProp.setVisible(true); } else if (shadingType == ShadingFunctionKind::Ward) { indexOfRefractionProp.setVisible(true); roughnessProp.setVisible(true); specularColorProp.setVisible(true); } else if (shadingType == ShadingFunctionKind::CookTorrance) { indexOfRefractionProp.setVisible(true); roughnessProp.setVisible(true); specularColorProp.setVisible(true); } else if (shadingType == ShadingFunctionKind::AbcMicrofacet) { // TODO: Use better parameters anisotropyProp.setVisible(true); roughnessProp.setVisible(true); specularColorProp.setVisible(true); } else if (shadingType == ShadingFunctionKind::Ashikhmin) { indexOfRefractionProp.setVisible(true); roughnessProp.setVisible(true); specularColorProp.setVisible(true); } else if (shadingType == ShadingFunctionKind::Mix) { indexOfRefractionProp.setVisible(true); roughnessProp.setVisible(true); specularColorProp.setVisible(true); } propertyModified(); }
void Property::set(const Property* src) { propertyModified(); }
void Property::resetToDefaultState() { readOnly_.reset(); notifyObserversOnSetReadOnly(readOnly_); propertyModified(); }