Esempio n. 1
0
  /**
   * This displays a gray advanced stretch.
   *
   * @param grayStretch
   * @param grayHist
   */
  void AdvancedStretchDialog::enableGrayMode(Stretch &grayStretch,
      Histogram &grayHist) {
    destroyCurrentStretches();

    p_grayStretch = new AdvancedStretch(grayHist, grayStretch,
                                        "Gray", QColor(Qt::gray));
    layout()->addWidget(p_grayStretch);
    updateGeometry();

    connect(p_grayStretch, SIGNAL(stretchChanged()),
            this, SIGNAL(stretchChanged()));
  }
Esempio n. 2
0
  /**
   * This cleans up memory from currently displayed advanced
   * stretches. No stretches are visible after this is called.
   */
  void AdvancedStretchDialog::destroyCurrentStretches() {
    if(p_redStretch) {
      layout()->removeWidget(p_redStretch);
      disconnect(p_redStretch, SIGNAL(stretchChanged()),
                 this, SIGNAL(stretchChanged()));
      delete p_redStretch;
      p_redStretch = NULL;
    }

    if(p_grnStretch) {
      layout()->removeWidget(p_grnStretch);
      disconnect(p_grnStretch, SIGNAL(stretchChanged()),
                 this, SIGNAL(stretchChanged()));
      delete p_grnStretch;
      p_grnStretch = NULL;
    }

    if(p_bluStretch) {
      layout()->removeWidget(p_bluStretch);
      disconnect(p_bluStretch, SIGNAL(stretchChanged()),
                 this, SIGNAL(stretchChanged()));
      delete p_bluStretch;
      p_bluStretch = NULL;
    }

    if(p_grayStretch) {
      layout()->removeWidget(p_grayStretch);
      disconnect(p_grayStretch, SIGNAL(stretchChanged()),
                 this, SIGNAL(stretchChanged()));
      delete p_grayStretch;
      p_grayStretch = NULL;
    }
  }
Esempio n. 3
0
void LinearLayoutAttached::setStretchFactor(int f)
{
    if (m_stretch != f) {
        m_stretch = f;
        emit stretchChanged(reinterpret_cast<QGraphicsLayoutItem*>(parent()), m_stretch);
    }
}
void DeclarativeStatusBarAttached::setStretch(int stretch)
{
  if (d->stretch == stretch)
    return;

  d->stretch = stretch;
  emit stretchChanged();
}
void DeclarativeBoxLayoutAttached::setStretch(int stretch)
{
  if (stretch == d->stretch)
    return;

  d->stretch = stretch;
  emit stretchChanged(stretch);
}
Esempio n. 6
0
  /**
   * This displays RGB advanced stretches.
   *
   * @param redStretch
   * @param redHist
   * @param grnStretch
   * @param grnHist
   * @param bluStretch
   * @param bluHist
   */
  void AdvancedStretchDialog::enableRgbMode(Stretch &redStretch,
      Histogram &redHist,
      Stretch &grnStretch, Histogram &grnHist,
      Stretch &bluStretch, Histogram &bluHist) {
    destroyCurrentStretches();

    p_redStretch = new AdvancedStretch(redHist, redStretch,
                                       "Red", QColor(Qt::red));
    layout()->addWidget(p_redStretch);

    p_grnStretch = new AdvancedStretch(grnHist, grnStretch,
                                       "Green", QColor(Qt::green));
    layout()->addWidget(p_grnStretch);

    p_bluStretch = new AdvancedStretch(bluHist, bluStretch,
                                       "Blue", QColor(Qt::blue));
    layout()->addWidget(p_bluStretch);
    updateGeometry();

    connect(p_redStretch, SIGNAL(stretchChanged()),
            this, SIGNAL(stretchChanged()));
    connect(p_grnStretch, SIGNAL(stretchChanged()),
            this, SIGNAL(stretchChanged()));
    connect(p_bluStretch, SIGNAL(stretchChanged()),
            this, SIGNAL(stretchChanged()));
  }
Esempio n. 7
0
void AxesWindow::on_YStretchSpin_valueChanged(double value)
{
	stretchChanged(1, value);
}