コード例 #1
0
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()));
}
コード例 #2
0
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)));
}
コード例 #3
0
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();
}
コード例 #4
0
ファイル: lfppage.cpp プロジェクト: CleitonAguiar/ndmanager
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()));
}
コード例 #5
0
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"));

}
コード例 #6
0
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();
}
コード例 #7
0
ファイル: cameraproperty.cpp プロジェクト: cgloger/inviwo
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();
}
コード例 #8
0
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()));
}
コード例 #9
0
ファイル: compositeproperty.cpp プロジェクト: sunwj/inviwo
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");
    }
}
コード例 #10
0
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();
}
コード例 #11
0
ファイル: property.cpp プロジェクト: Ojaswi/inviwo
void Property::set(const Property* src) {
    propertyModified();
}
コード例 #12
0
ファイル: property.cpp プロジェクト: Ojaswi/inviwo
void Property::resetToDefaultState() {
    readOnly_.reset();
    notifyObserversOnSetReadOnly(readOnly_);
    propertyModified();
}