int QProg::qt_metacall(QMetaObject::Call _c, int _id, void **_a) { _id = QWidget::qt_metacall(_c, _id, _a); if (_id < 0) return _id; if (_c == QMetaObject::InvokeMetaMethod) { switch (_id) { case 0: valueChanged((*reinterpret_cast< double(*)>(_a[1]))); break; case 1: setValue((*reinterpret_cast< double(*)>(_a[1]))); break; case 2: setMaxValue((*reinterpret_cast< double(*)>(_a[1]))); break; case 3: setMinValue((*reinterpret_cast< double(*)>(_a[1]))); break; case 4: setFontDim((*reinterpret_cast< int(*)>(_a[1]))); break; case 5: setPrecision((*reinterpret_cast< int(*)>(_a[1]))); break; case 6: setBarColor((*reinterpret_cast< QColor(*)>(_a[1]))); break; default: ; } _id -= 7; } #ifndef QT_NO_PROPERTIES else if (_c == QMetaObject::ReadProperty) { void *_v = _a[0]; switch (_id) { case 0: *reinterpret_cast< double*>(_v) = value(); break; case 1: *reinterpret_cast< double*>(_v) = minValue(); break; case 2: *reinterpret_cast< double*>(_v) = maxValue(); break; case 3: *reinterpret_cast< int*>(_v) = font(); break; case 4: *reinterpret_cast< int*>(_v) = numPrec(); break; case 5: *reinterpret_cast< QColor*>(_v) = color(); break; } _id -= 6; } else if (_c == QMetaObject::WriteProperty) { void *_v = _a[0]; switch (_id) { case 0: setValue(*reinterpret_cast< double*>(_v)); break; case 1: setMinValue(*reinterpret_cast< double*>(_v)); break; case 2: setMaxValue(*reinterpret_cast< double*>(_v)); break; case 3: setFontDim(*reinterpret_cast< int*>(_v)); break; case 4: setPrecision(*reinterpret_cast< int*>(_v)); break; case 5: setBarColor(*reinterpret_cast< QColor*>(_v)); break; } _id -= 6; } else if (_c == QMetaObject::ResetProperty) { _id -= 6; } else if (_c == QMetaObject::QueryPropertyDesignable) { _id -= 6; } else if (_c == QMetaObject::QueryPropertyScriptable) { _id -= 6; } else if (_c == QMetaObject::QueryPropertyStored) { _id -= 6; } else if (_c == QMetaObject::QueryPropertyEditable) { _id -= 6; } else if (_c == QMetaObject::QueryPropertyUser) { _id -= 6; } #endif // QT_NO_PROPERTIES return _id; }
void DoubleSlider::setValues(float val1, float val2) { if (val1 < val2) { setMinValue(val1); setMaxValue(val2); } else { setMinValue(val2); setMaxValue(val1); } }
void DoubleSlider::moveSlider(float mousePos) { if (leftSliderActive_ && !rightSliderActive_) setMinValue(mousePos); if (rightSliderActive_ && !leftSliderActive_) setMaxValue(mousePos); if (rightSliderActive_ && leftSliderActive_) { float mouseDiff = normalizedMousePos_ - mousePos; setMinValue(mV1_ - mouseDiff); setMaxValue(mV2_ - mouseDiff); } }
void SettingsConstraints::loadFromConfig(const String & path_to_constraints, const Poco::Util::AbstractConfiguration & config) { if (!config.has(path_to_constraints)) throw Exception("There is no path '" + path_to_constraints + "' in configuration file.", ErrorCodes::NO_ELEMENTS_IN_CONFIG); Poco::Util::AbstractConfiguration::Keys names; config.keys(path_to_constraints, names); for (const String & name : names) { String path_to_name = path_to_constraints + "." + name; Poco::Util::AbstractConfiguration::Keys constraint_types; config.keys(path_to_name, constraint_types); for (const String & constraint_type : constraint_types) { auto get_constraint_value = [&]{ return config.getString(path_to_name + "." + constraint_type); }; if (constraint_type == "min") setMinValue(name, get_constraint_value()); else if (constraint_type == "max") setMaxValue(name, get_constraint_value()); else if (constraint_type == "readonly") setReadOnly(name, true); else throw Exception("Setting " + constraint_type + " value for " + name + " isn't supported", ErrorCodes::NOT_IMPLEMENTED); } } }
caTable::caTable(QWidget *parent) : QTableWidget(parent) { setPrecisionMode(Channel); setLimitsMode(Channel); setPrecision(0); setMinValue(0.0); setMaxValue(1.0); for(int i=0; i< MaxRows; i++) { setFormat(i, 1); for(int j=0; j< MaxCols; j++) tableItem[i][j] = (QTableWidgetItem*) 0; } thisItemFont = this->font(); setColorMode(Static); setAlternatingRowColors(true); setSizePolicy(QSizePolicy::Expanding,QSizePolicy::Expanding); setEditTriggers(QTableWidget::NoEditTriggers); verticalHeader()->setDefaultSectionSize(20); horizontalHeader()->setResizeMode(QHeaderView::Stretch); defaultForeColor = palette().foreground().color(); createActions(); addAction(copyAct); connect(this, SIGNAL( cellDoubleClicked (int, int) ), this, SLOT(celldoubleclicked( int, int ) ) ); //connect(this, SIGNAL( cellClicked (int, int) ), this, SLOT(cellclicked( int, int ) ) ); }
bool IOAudioLevelControl::init(SInt32 initialValue, SInt32 minValue, SInt32 maxValue, IOFixed minDB, IOFixed maxDB, UInt32 channelID, const char *channelName, UInt32 cntrlID, UInt32 subType, UInt32 usage, OSDictionary *properties) { bool result = true; OSNumber *number; number = OSNumber::withNumber(initialValue, sizeof(SInt32)*8); if ((number == NULL) || !super::init(kIOAudioControlTypeLevel, number, channelID, channelName, cntrlID, subType, usage, properties)) { result = false; goto Done; } setMinValue(minValue); setMaxValue(maxValue); setMinDB(minDB); setMaxDB(maxDB); Done: if (number) { number->release(); } return result; }
void LinearGauge::loadSettings( QSettings& pSettings ) { // Scale Qt::Orientation orientation = (Qt::Orientation) pSettings.value("orientation", Qt::Vertical).toInt(); QwtThermo::ScalePos scalePosition = (QwtThermo::ScalePos) pSettings.value("scalePosition", QwtThermo::LeftScale).toInt(); setOrientation( orientation, scalePosition ); setMinValue( pSettings.value("minValue", 0).toDouble() ); setMaxValue( pSettings.value("maxValue", 10).toDouble() ); // Ticks setScaleMaxMinor( pSettings.value("scaleMaxMinor", 4).toInt() ); setScaleMaxMajor( pSettings.value("scaleMaxMajor", 12).toInt() ); scaleDraw()->enableComponent( QwtAbstractScaleDraw::Labels, pSettings.value("labels", true).toBool() ); setFont( QFont( pSettings.value("font").toString(), pSettings.value("fontSize", 8).toDouble()) ); // Pipe setValue( pSettings.value("value", 8).toDouble() ); setPipeWidth( pSettings.value("pipeWidth", 10).toInt() ); setFillBrush( QBrush( pSettings.value("pipeColor").toUInt() ) ); // Alarm setAlarmLevel( pSettings.value("alarmLevel", 7).toDouble() ); setAlarmBrush( QBrush( pSettings.value("alarmBrush").toUInt() ) ); setAlarmEnabled( pSettings.value("alarmEnabled").toBool() ); // Color setTextColor( pSettings.value("textColor").toUInt() ); setBackgroundColor( pSettings.value("backgroundColor").toUInt() ); AbstractGauge::loadSettings( pSettings ); }
void Slider::setLineStep (const double new_ls) { lineStep = new_ls; setMinValue(minValue); setMaxValue(maxValue); setValue(value); }
void Slider::setDirection (const DIRECT new_dir) { direction = new_dir; setMinValue(minValue); setMaxValue(maxValue); setValue(value); }
void Slider::reloadSlider() { slider->hide(); if (orientation == 0) { slider->setOrientation(Qt::Horizontal); slider->setGeometry(x()+10, height()/2-10, width()-20, 20); } else if (orientation == 1) { slider->setOrientation(Qt::Vertical); slider->setGeometry(width()/2-10, 10, 20, height()-20); } slider->setMinValue(-32768); slider->show(); setTickmarks (tickmarks); setTickInterval (tickInterval); setTracking (tracking); setPageStep(pageStep); setMainColor(mainColor); setTickmarksColor(tickmarksColor); setMinValue(minValue); setMaxValue(maxValue); if (direction == 0) slider->setValue((int)(-32768 + (value-minValue)/lineStep)); else if (direction == 1) slider->setValue((int)(-32768 + (maxValue-value)/lineStep)); setNewMask(); }
bool OSArgument::setMinValue(int minValue) { if (m_type == OSArgumentType::Double) { double test = (double)minValue; return setMinValue(test); } else if (m_type != OSArgumentType::Integer) { return false; } double maxValue = std::numeric_limits<int>::max(); if (hasDomain() && (m_domainType == OSDomainType::Interval)){ std::vector<int> domain = domainAsInteger(); if (domain.size() == 2){ maxValue = domain[1]; } } m_domainType = OSDomainType::Interval; m_domain.clear(); m_domain.push_back(QVariant(minValue)); m_domain.push_back(QVariant(maxValue)); onChange(); return true; }
int QwtCounter::qt_metacall(QMetaObject::Call _c, int _id, void **_a) { _id = QWidget::qt_metacall(_c, _id, _a); if (_id < 0) return _id; if (_c == QMetaObject::InvokeMetaMethod) { switch (_id) { case 0: buttonReleased((*reinterpret_cast< double(*)>(_a[1]))); break; case 1: valueChanged((*reinterpret_cast< double(*)>(_a[1]))); break; case 2: btnReleased(); break; case 3: btnClicked(); break; case 4: textChanged(); break; } _id -= 5; } #ifndef QT_NO_PROPERTIES else if (_c == QMetaObject::ReadProperty) { void *_v = _a[0]; switch (_id) { case 0: *reinterpret_cast< int*>(_v) = numButtons(); break; case 1: *reinterpret_cast< double*>(_v) = step(); break; case 2: *reinterpret_cast< double*>(_v) = minVal(); break; case 3: *reinterpret_cast< double*>(_v) = maxVal(); break; case 4: *reinterpret_cast< int*>(_v) = stepButton1(); break; case 5: *reinterpret_cast< int*>(_v) = stepButton2(); break; case 6: *reinterpret_cast< int*>(_v) = stepButton3(); break; case 7: *reinterpret_cast< double*>(_v) = value(); break; case 8: *reinterpret_cast< bool*>(_v) = editable(); break; } _id -= 9; } else if (_c == QMetaObject::WriteProperty) { void *_v = _a[0]; switch (_id) { case 0: setNumButtons(*reinterpret_cast< int*>(_v)); break; case 1: setStep(*reinterpret_cast< double*>(_v)); break; case 2: setMinValue(*reinterpret_cast< double*>(_v)); break; case 3: setMaxValue(*reinterpret_cast< double*>(_v)); break; case 4: setStepButton1(*reinterpret_cast< int*>(_v)); break; case 5: setStepButton2(*reinterpret_cast< int*>(_v)); break; case 6: setStepButton3(*reinterpret_cast< int*>(_v)); break; case 7: setValue(*reinterpret_cast< double*>(_v)); break; case 8: setEditable(*reinterpret_cast< bool*>(_v)); break; } _id -= 9; } else if (_c == QMetaObject::ResetProperty) { _id -= 9; } else if (_c == QMetaObject::QueryPropertyDesignable) { _id -= 9; } else if (_c == QMetaObject::QueryPropertyScriptable) { _id -= 9; } else if (_c == QMetaObject::QueryPropertyStored) { _id -= 9; } else if (_c == QMetaObject::QueryPropertyEditable) { _id -= 9; } else if (_c == QMetaObject::QueryPropertyUser) { _id -= 9; } #endif // QT_NO_PROPERTIES return _id; }
CNeuralNetworkStateModifier::CNeuralNetworkStateModifier(CStateProperties *originalState, unsigned int *l_dimensions, unsigned int l_numDim) : CStateModifier(getNumInitContinuousStates(originalState, l_dimensions, l_numDim),0) { this->originalState = originalState; this->numDim = l_numDim; dimensions = new unsigned int[numDim]; memcpy(dimensions, l_dimensions, sizeof(int) * numDim); normValues = false; for (unsigned int i = 0; i < getNumContinuousStates(); i++) { setMinValue(i, - 100000.0); setMaxValue(i, 100000.0); } input_mean = new ColumnVector(numDim); input_std = new ColumnVector(numDim); *input_mean = 0; *input_std = 1; // preserve normalization on the intervall [-1 1] for (unsigned int i = 0; i < numDim; i ++) { input_mean->element(i) = (originalState->getMaxValue(dimensions[i]) + originalState->getMinValue(dimensions[i])) / 2.0; input_std->element(i) = (originalState->getMaxValue(dimensions[i]) - originalState->getMinValue(dimensions[i])) / 2.0; } buffVector = new ColumnVector(numDim); }
CStateVariablesChooser::CStateVariablesChooser(unsigned int numContStates,unsigned int *l_contStatesInd,unsigned int numDiscStates,unsigned int *l_discStatesInd, CStateProperties *originalState) : CStateModifier(numContStates, numDiscStates) { contStatesInd = NULL; discStatesInd = NULL; if (numContStates > 0) { contStatesInd = new unsigned int[numContStates]; memcpy(contStatesInd, l_contStatesInd, sizeof(unsigned int) * numContStates); } if (numDiscStates > 0) { discStatesInd = new unsigned int[numDiscStates]; memcpy(discStatesInd, l_discStatesInd, sizeof(unsigned int) * numDiscStates); } this->originalState = originalState; for (int i = 0; i < getNumContinuousStates(); i++) { setMinValue(i, originalState->getMinValue(contStatesInd[i])); setMaxValue(i, originalState->getMaxValue(contStatesInd[i])); } for (int i = 0; i < getNumDiscreteStates(); i++) { setDiscreteStateSize(i, originalState->getDiscreteStateSize(discStatesInd[i])); } }
CNeuralNetworkStateModifier::CNeuralNetworkStateModifier(CStateProperties *originalState) : CStateModifier(getNumInitContinuousStates(originalState, NULL, 0),0) { this->originalState = originalState; for (unsigned int i = 0; i < getNumContinuousStates(); i++) { setMinValue(i, -10000.0); setMaxValue(i, 10000.0); } numDim = 0; dimensions = NULL; input_mean = new ColumnVector(numDim); input_std = new ColumnVector(numDim); *input_mean = 0; *input_std = 1; // preserve normalization on the intervall [-1 1] for (unsigned int i = 0; i < numDim; i ++) { input_mean->element(i) = (originalState->getMaxValue(dimensions[i]) + originalState->getMinValue(dimensions[i])) / 2.0; input_std->element(i) = (originalState->getMaxValue(dimensions[i]) - originalState->getMinValue(dimensions[i])) / 2.0; } buffVector = new ColumnVector(numDim); }
void QmitkNumberPropertyEditor::adjustFactors(short newDecimalPlaces, bool newShowPercents) { int oldMax = maxValue(); int oldMin = minValue(); m_DecimalPlaces = newDecimalPlaces; m_ShowPercents = newShowPercents; m_FactorPropertyToSpinbox = pow(10.0,m_DecimalPlaces); m_FactorSpinboxToDisplay = 1.0 / m_FactorPropertyToSpinbox; // commented line would set the default increase/decrease to 1.0, no matter how many decimal places are available //setLineStep( ROUND(m_FactorPropertyToSpinbox) ); if ( m_ShowPercents ) { m_FactorPropertyToSpinbox *= 100.0; //setLineStep( ROUND(0.01 *m_FactorPropertyToSpinbox) ); setSuffix("%"); } else { setSuffix(""); } setMinValue(oldMin); setMaxValue(oldMax); }
// ----------------------------------------------------------------------------- // // ----------------------------------------------------------------------------- void FindMaxima::readFilterParameters(AbstractFilterParametersReader* reader, int index) { reader->openFilterGroup(this, index); setSelectedCellArrayPath( reader->readDataArrayPath( "SelectedCellArrayPath", getSelectedCellArrayPath() ) ); setMinValue( reader->readValue( "MinValue", getMinValue() ) ); setNewCellArrayName( reader->readString( "NewCellArrayName", getNewCellArrayName() ) ); reader->closeFilterGroup(); }
/****************************************************************************** * Set the spin box as valid or invalid. * If newly invalid, the value is displayed as asterisks. * If newly valid, the value is set to the minimum value. */ void TimeSpinBox::setValid(bool valid) { if (valid && mInvalid) { mInvalid = false; if (value() < mMinimumValue) SpinBox2::setValue(mMinimumValue); setSpecialValueText(QString()); setMinValue(mMinimumValue); } else if (!valid && !mInvalid) { mInvalid = true; setMinValue(mMinimumValue - 1); setSpecialValueText(QString::fromLatin1("**:**")); SpinBox2::setValue(mMinimumValue - 1); } }
void Normalization::init(Normalization::Type nt, double max, double min, double threshold, double amp, double elong) { setType(nt); setMaxValue(max); setMinValue(min); setThreshold(threshold); setAmplitude(amp); setElongation(elong); }
void GridColorWidget::normalizationToggled(bool enabled) { if(enabled) { setMinValue(0.0f); setMidValue(0.5f); setMaxValue(1.0f); } }
void KDoubleSpinBox::setRange( double lower, double upper, double step, int precision ) { lower = kMin(upper, lower); upper = kMax(upper, lower); setPrecision( precision, true ); // disable bounds checking, since setMinValue( lower ); // it's done in set{Min,Max}Value setMaxValue( upper ); // anyway and we want lower, upper setLineStep( step ); // and step to have the right precision }
int QwtThermo::qt_metacall(QMetaObject::Call _c, int _id, void **_a) { _id = QWidget::qt_metacall(_c, _id, _a); if (_id < 0) return _id; if (_c == QMetaObject::InvokeMetaMethod) { switch (_id) { case 0: setValue((*reinterpret_cast< double(*)>(_a[1]))); break; default: ; } _id -= 1; } #ifndef QT_NO_PROPERTIES else if (_c == QMetaObject::ReadProperty) { void *_v = _a[0]; switch (_id) { case 0: *reinterpret_cast< bool*>(_v) = alarmEnabled(); break; case 1: *reinterpret_cast< double*>(_v) = alarmLevel(); break; case 2: *reinterpret_cast< ScalePos*>(_v) = scalePosition(); break; case 3: *reinterpret_cast< int*>(_v) = spacing(); break; case 4: *reinterpret_cast< int*>(_v) = borderWidth(); break; case 5: *reinterpret_cast< double*>(_v) = maxValue(); break; case 6: *reinterpret_cast< double*>(_v) = minValue(); break; case 7: *reinterpret_cast< int*>(_v) = pipeWidth(); break; case 8: *reinterpret_cast< double*>(_v) = value(); break; } _id -= 9; } else if (_c == QMetaObject::WriteProperty) { void *_v = _a[0]; switch (_id) { case 0: setAlarmEnabled(*reinterpret_cast< bool*>(_v)); break; case 1: setAlarmLevel(*reinterpret_cast< double*>(_v)); break; case 2: setScalePosition(*reinterpret_cast< ScalePos*>(_v)); break; case 3: setSpacing(*reinterpret_cast< int*>(_v)); break; case 4: setBorderWidth(*reinterpret_cast< int*>(_v)); break; case 5: setMaxValue(*reinterpret_cast< double*>(_v)); break; case 6: setMinValue(*reinterpret_cast< double*>(_v)); break; case 7: setPipeWidth(*reinterpret_cast< int*>(_v)); break; case 8: setValue(*reinterpret_cast< double*>(_v)); break; } _id -= 9; } else if (_c == QMetaObject::ResetProperty) { _id -= 9; } else if (_c == QMetaObject::QueryPropertyDesignable) { _id -= 9; } else if (_c == QMetaObject::QueryPropertyScriptable) { _id -= 9; } else if (_c == QMetaObject::QueryPropertyStored) { _id -= 9; } else if (_c == QMetaObject::QueryPropertyEditable) { _id -= 9; } else if (_c == QMetaObject::QueryPropertyUser) { _id -= 9; } #endif // QT_NO_PROPERTIES return _id; }
KSimTimeSpinBox::KSimTimeSpinBox(const KSimTimeBase & time, QWidget * parent, const char * name) : KSimDoubleUnitSpinBox(parent, name), m_time(time) { setMinValue(1e-10); setMaxValue(1e6); setLineStep(1e-3); init(); }
short ElemDDLSGOptions::importSGO(const ElemDDLSGOptions *sgo) { if (sgo->isStartValueSpecified()) { setStartValueSpec(TRUE); setStartValue(sgo->getStartValue()); } if (sgo->isIncrementSpecified()) { setIncrementSpec(TRUE); setIncrement(sgo->getIncrement()); } if (sgo->isMinValueSpecified()) { setMinValueSpec(TRUE); if (sgo->isNoMinValue()) setNoMinValue(TRUE); else setMinValue(sgo->getMinValue()); } if (sgo->isMaxValueSpecified()) { setMaxValueSpec(TRUE); if (sgo->isNoMaxValue()) setNoMaxValue(TRUE); else setMaxValue(sgo->getMaxValue()); } if (sgo->isCacheSpecified()) { setCacheSpec(TRUE); setCache(sgo->getCache()); } if (sgo->isCycleSpecified()) { setCycleSpec(TRUE); setCycle(sgo->isCycle()); } if (sgo->isResetSpecified()) { setResetSpec(); setReset(sgo->isReset()); } return 0; }
void CustomSpinBox::update() { if( !m_custom || m_custom->type != UCustom_Int ) return; setValue( m_custom->value->as_int ); setMinValue( m_custom->range->as_int.min ); setMaxValue( m_custom->range->as_int.max ); /* sync with Label */ parentWidget()->setEnabled( m_custom->is_active ); }
int caTable::qt_metacall(QMetaObject::Call _c, int _id, void **_a) { _id = QTableWidget::qt_metacall(_c, _id, _a); if (_id < 0) return _id; if (_c == QMetaObject::InvokeMetaMethod) { if (_id < 1) qt_static_metacall(this, _c, _id, _a); _id -= 1; } #ifndef QT_NO_PROPERTIES else if (_c == QMetaObject::ReadProperty) { void *_v = _a[0]; switch (_id) { case 0: *reinterpret_cast< QString*>(_v) = getPVS(); break; case 1: *reinterpret_cast< QString*>(_v) = getColumnSizes(); break; case 2: *reinterpret_cast< colMode*>(_v) = getColorMode(); break; case 3: *reinterpret_cast< int*>(_v) = getPrecision(); break; case 4: *reinterpret_cast< SourceMode*>(_v) = getPrecisionMode(); break; case 5: *reinterpret_cast< SourceMode*>(_v) = getLimitsMode(); break; case 6: *reinterpret_cast< double*>(_v) = getMaxValue(); break; case 7: *reinterpret_cast< double*>(_v) = getMinValue(); break; } _id -= 8; } else if (_c == QMetaObject::WriteProperty) { void *_v = _a[0]; switch (_id) { case 0: setPVS(*reinterpret_cast< QString*>(_v)); break; case 1: setColumnSizes(*reinterpret_cast< QString*>(_v)); break; case 2: setColorMode(*reinterpret_cast< colMode*>(_v)); break; case 3: setPrecision(*reinterpret_cast< int*>(_v)); break; case 4: setPrecisionMode(*reinterpret_cast< SourceMode*>(_v)); break; case 5: setLimitsMode(*reinterpret_cast< SourceMode*>(_v)); break; case 6: setMaxValue(*reinterpret_cast< double*>(_v)); break; case 7: setMinValue(*reinterpret_cast< double*>(_v)); break; } _id -= 8; } else if (_c == QMetaObject::ResetProperty) { _id -= 8; } else if (_c == QMetaObject::QueryPropertyDesignable) { _id -= 8; } else if (_c == QMetaObject::QueryPropertyScriptable) { _id -= 8; } else if (_c == QMetaObject::QueryPropertyStored) { _id -= 8; } else if (_c == QMetaObject::QueryPropertyEditable) { _id -= 8; } else if (_c == QMetaObject::QueryPropertyUser) { _id -= 8; } #endif // QT_NO_PROPERTIES return _id; }
Normalization &Normalization::operator=(const Normalization &nor) { if(this != &nor){ setMaxValue(nor.getMaxValue()); setMinValue(nor.getMinValue()); setThreshold(nor.getThreshold()); setType(nor.getType()); setAmplitude(nor.getAmplitude()); setElongation(nor.getElongation()); } return *this; }
/** * Reset the colorbar parameters. * @param cmap :: A new Mantid color map. * @param minValue :: A new minimum value. * @param maxValue :: A new maximum value. * @param minPositive :: A new minimum positive value for the log scale. * @param autoscaling :: Flag to set autoscaling of the color */ void InstrumentWidgetRenderTab::setupColorBar(const MantidColorMap &cmap, double minValue, double maxValue, double minPositive, bool autoscaling) { setMinValue(minValue, false); setMaxValue(maxValue, false); m_colorMapWidget->setMinPositiveValue(minPositive); m_colorMapWidget->setupColorBarScaling(cmap); m_autoscaling->blockSignals(true); m_autoscaling->setChecked(autoscaling); m_autoscaling->blockSignals(false); }
void RKSpinBox::setIntMode (int min, int max, int initial) { QValidator *new_validator = new QIntValidator (min, max, this); setMinValue (min); setMaxValue (max); setValue (initial); setValidator (new_validator); delete validator; validator = new_validator; mode = Integer; updateDisplay (); }
int caNumeric::qt_metacall(QMetaObject::Call _c, int _id, void **_a) { _id = ENumeric::qt_metacall(_c, _id, _a); if (_id < 0) return _id; #ifndef QT_NO_PROPERTIES if (_c == QMetaObject::ReadProperty) { void *_v = _a[0]; switch (_id) { case 0: *reinterpret_cast< QString*>(_v) = getPV(); break; case 1: *reinterpret_cast< QColor*>(_v) = getForeground(); break; case 2: *reinterpret_cast< QColor*>(_v) = getBackground(); break; case 3: *reinterpret_cast< SourceMode*>(_v) = getPrecisionMode(); break; case 4: *reinterpret_cast< bool*>(_v) = getFixedFormat(); break; case 5: *reinterpret_cast< SourceMode*>(_v) = getLimitsMode(); break; case 6: *reinterpret_cast< double*>(_v) = getMaxValue(); break; case 7: *reinterpret_cast< double*>(_v) = getMinValue(); break; } _id -= 8; } else if (_c == QMetaObject::WriteProperty) { void *_v = _a[0]; switch (_id) { case 0: setPV(*reinterpret_cast< QString*>(_v)); break; case 1: setForeground(*reinterpret_cast< QColor*>(_v)); break; case 2: setBackground(*reinterpret_cast< QColor*>(_v)); break; case 3: setPrecisionMode(*reinterpret_cast< SourceMode*>(_v)); break; case 4: setFixedFormat(*reinterpret_cast< bool*>(_v)); break; case 5: setLimitsMode(*reinterpret_cast< SourceMode*>(_v)); break; case 6: setMaxValue(*reinterpret_cast< double*>(_v)); break; case 7: setMinValue(*reinterpret_cast< double*>(_v)); break; } _id -= 8; } else if (_c == QMetaObject::ResetProperty) { _id -= 8; } else if (_c == QMetaObject::QueryPropertyDesignable) { _id -= 8; } else if (_c == QMetaObject::QueryPropertyScriptable) { _id -= 8; } else if (_c == QMetaObject::QueryPropertyStored) { _id -= 8; } else if (_c == QMetaObject::QueryPropertyEditable) { _id -= 8; } else if (_c == QMetaObject::QueryPropertyUser) { _id -= 8; } #endif // QT_NO_PROPERTIES return _id; }