Exemplo n.º 1
0
void SliderSettingsDialog::updateInternalValues()
{
  switch (mChanged)
    {
      case VALUE:
        objectValueChanged();
        break;
      case ORIGVAL:
        originalValueChanged();
        break;
      case MIN:
        minValueChanged();
        break;
      case MAX:
        maxValueChanged();
        break;
      case TICKFACTOR:
        minorMajorFactorChanged();
        break;
      case TICKSIZE:
        minorTickSizeChanged();
        break;
      case NUMTICKS:
        numMinorTicksChanged();
        break;
      default:
        break;
    }
}
Exemplo n.º 2
0
/**
* Set a new min value and update the widget.
* @param value :: The new value
*/
void ColorMapWidget::setMinValue(double value) {
  setMinValueText(value);
  updateScale();
  if (!m_minValueBox->signalsBlocked()) {
    minValueChanged();
  }
}
Exemplo n.º 3
0
void Normalization::setMinValue(double min)
{
	if(minValue != min){
		minValue = min;

		emit minValueChanged(min);
	}
}
Exemplo n.º 4
0
void MgGaugeController::setMinValue(float arg)
{
    if (m_minValue != arg) {
        m_minValue = arg;
        Q_EMIT minValueChanged(arg);
        calculateProjectedAngle();
    }
}
Exemplo n.º 5
0
/**
  * Constructor.
  * @param type The scale type, e.g. "Linear" or "Log10"
  * @param parent A parent widget
  * @param minPositiveValue A minimum positive value for the Log10 scale
  */
ColorMapWidget::ColorMapWidget(int type,QWidget* parent,const double& minPositiveValue):
  QFrame(parent), m_minPositiveValue(minPositiveValue), m_dragging(false), m_y(0), m_dtype(), m_nth_power(2.0)
{
  m_scaleWidget = new QwtScaleWidget(QwtScaleDraw::RightScale);
  m_scaleWidget->setColorBarEnabled(true);
  m_scaleWidget->setColorBarWidth(20);
  m_scaleWidget->setAlignment(QwtScaleDraw::RightScale);
  m_scaleWidget->setLabelAlignment( Qt::AlignRight | Qt::AlignVCenter);
  m_scaleWidget->setCursor(Qt::OpenHandCursor);

  m_minValueBox = new QLineEdit();
  m_maxValueBox = new QLineEdit();
  m_minValueBox->setMinimumWidth(40);
  m_maxValueBox->setMinimumWidth(40);
  m_minValueBox->setMaximumWidth(60);
  m_maxValueBox->setMaximumWidth(60);
  m_minValueBox->setValidator(new QDoubleValidator(m_minValueBox));
  m_maxValueBox->setValidator(new QDoubleValidator(m_maxValueBox));
  //Ensure the boxes start empty, this is important for checking if values have been set from the scripting side
  m_minValueBox->setText("");
  m_maxValueBox->setText("");
  connect(m_minValueBox,SIGNAL(editingFinished()),this,SLOT(minValueChanged()));
  connect(m_maxValueBox,SIGNAL(editingFinished()),this,SLOT(maxValueChanged()));

  QVBoxLayout* lColormapLayout = new QVBoxLayout;
  lColormapLayout->addWidget(m_maxValueBox);
  lColormapLayout->addWidget(m_scaleWidget);
  lColormapLayout->addWidget(m_minValueBox);

  m_scaleOptions = new QComboBox;
  m_scaleOptions->addItem("Log10", QVariant(GraphOptions::Log10));
  m_scaleOptions->addItem("Linear", QVariant(GraphOptions::Linear));
  m_scaleOptions->addItem("Power", QVariant(GraphOptions::Power));
  m_scaleOptions->setCurrentIndex(m_scaleOptions->findData(type));
  connect(m_scaleOptions, SIGNAL(currentIndexChanged(int)), this, SLOT(scaleOptionsChanged(int)));

  // Controls for exponent for power scale type
  m_lblN = new QLabel(tr("n ="));
  m_lblN->setAlignment(Qt::AlignVCenter | Qt::AlignRight);
  m_dspnN = new DoubleSpinBox();
  m_dspnN->setValue(m_nth_power);
  connect(m_dspnN, SIGNAL(valueChanged(double)), this, SLOT(nPowerChanged(double)));

  QGridLayout* options_layout = new QGridLayout;
  options_layout->addWidget(m_scaleOptions, 1, 0, 1, 2);
  options_layout->addWidget(m_lblN, 2, 0);
  options_layout->addWidget(m_dspnN, 2, 1);
  options_layout->setRowStretch(0, 4);
  options_layout->setRowStretch(1, 1);
  options_layout->setRowStretch(2, 1);

  QHBoxLayout *colourmap_layout = new QHBoxLayout;
  colourmap_layout->addLayout(lColormapLayout);
  colourmap_layout->addLayout(options_layout);
  this->setLayout(colourmap_layout);

}
Exemplo n.º 6
0
void ArcStyle::setMinValue(double arg)
{
    if (m_minValue == arg)
        return;

    m_minValue = arg;
    m_factor = (360.0/(m_maxValue - m_minValue)) * 16.0;
    m_scale = 16.0 / m_factor;
    emit minValueChanged(arg);
}
Exemplo n.º 7
0
/**
* Respond to a mouse release event. Finish all dragging.
*/
void ColorMapWidget::mouseReleaseEvent(QMouseEvent * /*e*/) {
  if (!m_dragging)
    return;
  if (m_dtype == Bottom) {
    minValueChanged();
  } else {
    maxValueChanged();
  }
  QApplication::restoreOverrideCursor();
  m_dragging = false;
}
Exemplo n.º 8
0
		/// Send the minValueChanged signal
		void ColorMapWidget::minValueChanged()
		{
			emit minValueChanged(m_minValueBox->text().toDouble());
		}
void IntegerStyleRange1Out::setMinValue(const KSimBaseInt & min)
{
    m_min = min;
    emit minValueChanged(min.value());
}
Exemplo n.º 10
0
void Sensor::setMinValue(const int &min){
    if(m_min=min)
        return;
    m_min=min;
    emit minValueChanged();
}