MixerCurve::MixerCurve(QWidget *parent) : QFrame(parent), m_mixerUI(new Ui::MixerCurve) { m_mixerUI->setupUi(this); // setup some convienence pointers m_curve = m_mixerUI->CurveWidget; m_settings = m_mixerUI->CurveSettings; m_mixerUI->SettingsGroup->hide(); // create our spin delegate m_spinDelegate = new DoubleSpinDelegate(); // set the default mixer type setMixerType(MixerCurve::MIXERCURVE_THROTTLE); // paint the ui UpdateCurveUI(); // wire up our signals connect(m_mixerUI->CurveType, SIGNAL(currentIndexChanged(int)), this, SLOT(CurveTypeChanged())); connect(m_mixerUI->ResetCurve, SIGNAL(clicked()), this, SLOT(ResetCurve())); connect(m_mixerUI->PopupCurve, SIGNAL(clicked()), this, SLOT(PopupCurve())); connect(m_mixerUI->GenerateCurve, SIGNAL(clicked()), this, SLOT(GenerateCurve())); connect(m_curve, SIGNAL(curveUpdated()), this, SLOT(UpdateSettingsTable())); connect(m_settings, SIGNAL(cellChanged(int, int)), this, SLOT(SettingsTableChanged())); connect(m_mixerUI->CurveMin, SIGNAL(valueChanged(double)), this, SLOT(CurveMinChanged(double))); connect(m_mixerUI->CurveMax, SIGNAL(valueChanged(double)), this, SLOT(CurveMaxChanged(double))); connect(m_mixerUI->CurveStep, SIGNAL(valueChanged(double)), this, SLOT(GenerateCurve())); }
MixerCurve::MixerCurve(QWidget *parent) : QFrame(parent), m_mixerUI(new Ui::MixerCurvePlot) { m_mixerUI->setupUi(this); // setup some convienence pointers m_curve = m_mixerUI->CurveWidget; m_settings = m_mixerUI->CurveSettings; // by default mixcurve isn't used for curve2source m_mixerUI->CBCurve2Source->hide(); m_mixerUI->SettingsGroup->hide(); m_curve->showCommands(false); m_curve->showCommand("Reset", false); m_curve->showCommand("Popup", false); m_curve->showCommand("Commands", false); // create our spin delegate m_spinDelegate = new DoubleSpinDelegate(); // set the default mixer type setMixerType(MixerCurve::MIXERCURVE_THROTTLE); // setup and turn off advanced mode CommandActivated(); // paint the ui UpdateCurveUI(); // wire up our signals connect(m_mixerUI->CurveType, SIGNAL(currentIndexChanged(int)), this, SLOT(CurveTypeChanged())); connect(m_mixerUI->ResetCurve, SIGNAL(clicked()), this, SLOT(ResetCurve())); connect(m_mixerUI->PopupCurve, SIGNAL(clicked()),this,SLOT(PopupCurve())); connect(m_mixerUI->GenerateCurve, SIGNAL(clicked()), this, SLOT(GenerateCurve())); connect(m_curve, SIGNAL(curveUpdated()), this, SLOT(UpdateSettingsTable())); connect(m_curve, SIGNAL(commandActivated(MixerNode*)),this, SLOT(CommandActivated(MixerNode*))); connect(m_settings, SIGNAL(cellChanged(int,int)), this, SLOT(SettingsTableChanged())); connect(m_mixerUI->CurveMin, SIGNAL(valueChanged(double)), this, SLOT(CurveMinChanged(double))); connect(m_mixerUI->CurveMax, SIGNAL(valueChanged(double)), this, SLOT(CurveMaxChanged(double))); connect(m_mixerUI->CurveStep, SIGNAL(valueChanged(double)), this, SLOT(GenerateCurve())); }
void MixerCurve::CurveTypeChanged() { // setup the ui for this curvetype UpdateCurveUI(); }