コード例 #1
0
KstHsDialogI::KstHsDialogI(QWidget* parent, const char* name, bool modal, WFlags fl)
: KstDataDialog(parent, name, modal, fl) {
  _w = new HistogramDialogWidget(_contents);
  setMultiple(true);
  connect(_w->AutoBin, SIGNAL(clicked()), this, SLOT(autoBin()));
  connect(_w->_vector, SIGNAL(newVectorCreated(const QString&)), this, SIGNAL(modified()));
  connect(_w->_realTimeAutoBin, SIGNAL(clicked()), this, SLOT(updateButtons()));

  // signals for multiple edit mode
  connect(_w->_realTimeAutoBin, SIGNAL(clicked()), this, SLOT(setRealTimeAutoBinDirty()));
  connect(_w->NormIsPercent, SIGNAL(clicked()), this, SLOT(setNormIsPercentDirty()));
  connect(_w->NormIsFraction, SIGNAL(clicked()), this, SLOT(setNormIsFractionDirty()));
  connect(_w->PeakIs1, SIGNAL(clicked()), this, SLOT(setPeakIs1Dirty()));
  connect(_w->NormIsNumber, SIGNAL(clicked()), this, SLOT(setNormIsNumberDirty()));

  QColor qc = _w->_curveAppearance->color();
  _w->_curveAppearance->setValue(false, false, true, qc, 0, 0, 0, 1, 0);
}
コード例 #2
0
KstHsDialog::KstHsDialog(QWidget* parent, const char* name, bool modal, Qt::WindowFlags fl)
: KstDataDialog(parent) {
  _w = new Ui::HistogramDialogWidget();
  _w->setupUi(_contents);

  setMultiple(true);

  connect(_w->AutoBin, SIGNAL(clicked()), this, SLOT(autoBin()));
  connect(_w->_vector, SIGNAL(newVectorCreated(const QString&)), this, SIGNAL(modified()));
  connect(_w->_realTimeAutoBin, SIGNAL(clicked()), this, SLOT(updateButtons()));

  //
  // connections for multiple edit mode...
  //

  connect(_w->_realTimeAutoBin, SIGNAL(clicked()), this, SLOT(setRealTimeAutoBinDirty()));
  connect(_w->NormIsPercent, SIGNAL(clicked()), this, SLOT(setNormIsPercentDirty()));
  connect(_w->NormIsFraction, SIGNAL(clicked()), this, SLOT(setNormIsFractionDirty()));
  connect(_w->PeakIs1, SIGNAL(clicked()), this, SLOT(setPeakIs1Dirty()));
  connect(_w->NormIsNumber, SIGNAL(clicked()), this, SLOT(setNormIsNumberDirty()));

  //
  // connections for apply button...
  //

  connect(_w->_vector, SIGNAL(selectionChanged(const QString&)), this, SLOT(wasModifiedApply()));
  connect(_w->_vector, SIGNAL(selectionChangedLabel(const QString&)), this, SLOT(wasModifiedApply()));
  connect(_w->Min, SIGNAL(textChanged(const QString&)), this, SLOT(wasModifiedApply()));
  connect(_w->Max, SIGNAL(textChanged(const QString&)), this, SLOT(wasModifiedApply()));
  connect(_w->AutoBin, SIGNAL(clicked()), this, SLOT(wasModifiedApply()));
  connect(_w->_realTimeAutoBin, SIGNAL(clicked()), this, SLOT(wasModifiedApply()));
  connect(_w->NormIsPercent, SIGNAL(clicked()), this, SLOT(wasModifiedApply()));
  connect(_w->NormIsFraction, SIGNAL(clicked()), this, SLOT(wasModifiedApply()));
  connect(_w->NormIsNumber, SIGNAL(clicked()), this, SLOT(wasModifiedApply()));
  connect(_w->PeakIs1, SIGNAL(clicked()), this, SLOT(wasModifiedApply()));
  connect(_w->_curveAppearance, SIGNAL(changed()), this, SLOT(wasModifiedApply()));

  QColor qc = _w->_curveAppearance->color();
  _w->_curveAppearance->setValue(false, false, true, qc, 0, 0, 0, 1, 0);
  _w->N->setMinimumWidth(fontMetrics().width("888888") + QStyle::PM_ScrollBarExtent );
}