Пример #1
0
void EditViewBase::setupBaseActions(bool haveClipboard)
{
    // Actions all edit views will have

//    createAction("options_show_toolbar", SLOT(slotToggleToolBar()));
    createAction("options_show_statusbar", SLOT(slotToggleStatusBar()));
    createAction("options_configure", SLOT(slotConfigure()));
//    createAction("options_configure_keybindings", SLOT(slotEditKeys()));
//    createAction("options_configure_toolbars", SLOT(slotEditToolbars()));

    createAction("file_save", SIGNAL(saveFile()));
    createAction("file_close", SLOT(slotCloseWindow()));

    if (haveClipboard) {
        createAction("edit_cut", SLOT(slotEditCut()));
        createAction("edit_copy", SLOT(slotEditCopy()));
        createAction("edit_paste", SLOT(slotEditPaste()));
    }

    createAction("open_in_matrix", SLOT(slotOpenInMatrix()));
    createAction("open_in_percussion_matrix", SLOT(slotOpenInPercussionMatrix()));
    createAction("open_in_notation", SLOT(slotOpenInNotation()));
    createAction("open_in_event_list", SLOT(slotOpenInEventList()));
    createAction("open_in_pitch_tracker", SLOT(slotOpenInPitchTracker()));
    createAction("set_segment_start", SLOT(slotSetSegmentStartTime()));
    createAction("set_segment_duration", SLOT(slotSetSegmentDuration()));
}
Пример #2
0
void PlotWindow::createActions()
{
  mpaToggleLogX = new QAction("Log &X", this);
  mpaToggleLogX->setCheckable(true);
  mpaToggleLogX->setToolTip("Toggle x-axis logscale.");
  connect(mpaToggleLogX, SIGNAL(toggled(bool)), this, SLOT(toggleLogX(bool)));

  mpaToggleLogY = new QAction("Log &Y", this);
  mpaToggleLogY->setCheckable(true);
  mpaToggleLogY->setToolTip("Toggle y-axis logscale.");
  connect(mpaToggleLogY, SIGNAL(toggled(bool)), this, SLOT(toggleLogY(bool)));

  mpaPrint = new QAction("Print", this);
  mpaPrint ->setToolTip("Print Plot");
  mpaPrint -> setShortcut(Qt::CTRL + Qt::Key_P);
  connect(mpaPrint, SIGNAL(triggered()), this, SLOT(printPlot()));

  mpaSaveImage = new QAction("Save Image", this);
  mpaSaveImage ->setShortcut(Qt::CTRL + Qt::Key_S);
  mpaSaveImage ->setToolTip("Save Plot as Image");
  connect(mpaSaveImage, SIGNAL(triggered()), this, SLOT(printAsImage()));

  mpaSaveData = new QAction("Save Data", this);
  mpaSaveData ->setShortcut(Qt::CTRL + Qt::SHIFT + Qt::Key_S);
  mpaSaveData ->setToolTip("Save Data");
  connect(mpaSaveData, SIGNAL(triggered()), this, SLOT(slotSaveData()));

  mpaZoomOut = new QAction("Zoom out", this);
  mpaZoomOut ->setShortcut(Qt::CTRL + Qt::Key_0);
  mpaZoomOut ->setToolTip("Zoom out");
  connect(mpaZoomOut, SIGNAL(triggered()), this, SLOT(slotZoomOut()));

  mpaShowAll = new QAction("Show All", this);
  mpaShowAll ->setShortcut(Qt::CTRL + Qt::Key_A);
  mpaShowAll ->setToolTip("Show all curves");
  connect(mpaShowAll, SIGNAL(triggered()), this, SLOT(slotSelectAll()));

  mpaHideAll = new QAction("Hide All", this);
  mpaHideAll ->setShortcut(Qt::CTRL + Qt::Key_D);
  mpaHideAll ->setToolTip("Hide all curves");
  connect(mpaHideAll, SIGNAL(triggered()), this, SLOT(slotDeselectAll()));

  mpaCloseWindow = new QAction("Close", this);
  mpaCloseWindow->setObjectName("close");
  mpaCloseWindow->setShortcut(Qt::CTRL + Qt::Key_W);
  connect(mpaCloseWindow, SIGNAL(triggered()), this, SLOT(slotCloseWindow()));
}
Пример #3
0
AudioEffectWindow::AudioEffectWindow(QWidget *parent) :
    QMainWindow(parent),
    ui(new Ui::AudioEffectWindow)
{
    ui->setupUi(this);
    setWindowFlags(Qt::Window | Qt::FramelessWindowHint);

    connect(ui->pushButtonCloseWindow, SIGNAL(clicked()), SLOT(slotCloseWindow()));

    //Хорус
    _chorus.fDryMix = _chorus.fFeedback = _chorus.fMaxSweep = _chorus.fMinSweep = _chorus.fRate = _chorus.fWetMix = 0;
    _chorus.lChannel = 1 | 2;
    ui->verticalSliderChoorusfDryMix->setRange(-2000, 2000);
    ui->verticalSliderChorusfWetMix->setRange(-2000, 2000);
    ui->verticalSliderChorusfFeedback->setRange(-1000, 1000);
    ui->verticalSliderChorusfMaxSweep->setRange(0, 6000);
    ui->verticalSliderChorusfMinSweep->setRange(0, 6000);
    ui->verticalSliderChorusfRate->setRange(0, 1000);
    ui->comboBoxChorus->addItem("Flanger");
    ui->comboBoxChorus->addItem("Exaggerated");
    ui->comboBoxChorus->addItem("Motocycle");
    ui->comboBoxChorus->addItem("Devil");
    ui->comboBoxChorus->addItem("Who");
    ui->comboBoxChorus->addItem("Back chipmunk");
    ui->comboBoxChorus->addItem("Water");
    ui->comboBoxChorus->addItem("This is the airplane");
    connect(ui->checkBoxChorusActiv, SIGNAL(toggled(bool)), SLOT(slotChorusActiv(bool)));
    connect(ui->comboBoxChorus, SIGNAL(currentIndexChanged(int)), SLOT(slotChorusSetExample(int)));
    slotChorusActiv(false);
    connect(ui->verticalSliderChoorusfDryMix, SIGNAL(sliderMoved(int)), SLOT(slotChorusDryMix(int)));
    connect(ui->verticalSliderChorusfFeedback, SIGNAL(sliderMoved(int)), SLOT(slotChorusfFeedback(int)));
    connect(ui->verticalSliderChorusfMaxSweep, SIGNAL(sliderMoved(int)), SLOT(slotChorusMaxSweep(int)));
    connect(ui->verticalSliderChorusfMinSweep, SIGNAL(sliderMoved(int)), SLOT(slotChorusMinSweep(int)));
    connect(ui->verticalSliderChorusfRate, SIGNAL(sliderMoved(int)), SLOT(slotChorusRate(int)));
    connect(ui->verticalSliderChorusfWetMix, SIGNAL(sliderMoved(int)), SLOT(slotChorusWetMix(int)));

    //Реверберация
    _reverb.fDamp = _reverb.fDryMix = _reverb.fRoomSize = _reverb.fWetMix = _reverb.fWidth = _reverb.lMode = 0;
    _reverb.lChannel = 1 | 2;
    ui->verticalSliderReverbfDryMix->setRange(0, 1000);
    ui->verticalSliderReverbfWetMix->setRange(0, 3000);
    ui->verticalSliderReverbRoomSize->setRange(0, 1000);
    ui->verticalSliderReverbDamp->setRange(0, 1000);
    ui->verticalSliderReverbWidth->setRange(0, 1000);
    ui->verticalSliderRevebMode->setRange(1, 2);
    connect(ui->checkBoxReverbActiv, SIGNAL(toggled(bool)), SLOT(slotReverbActiv(bool)));
    slotReverbActiv(false);
    connect(ui->verticalSliderRevebMode, SIGNAL(sliderMoved(int)), SLOT(slotReverbMode(int)));
    connect(ui->verticalSliderReverbDamp, SIGNAL(sliderMoved(int)), SLOT(slotReverbDamp(int)));
    connect(ui->verticalSliderReverbfDryMix, SIGNAL(sliderMoved(int)), SLOT(slotReverbDryMix(int)));
    connect(ui->verticalSliderReverbfWetMix, SIGNAL(sliderMoved(int)), SLOT(slotReverbWetMix(int)));
    connect(ui->verticalSliderReverbRoomSize, SIGNAL(sliderMoved(int)), SLOT(slotReverbRoomSize(int)));
    connect(ui->verticalSliderReverbWidth, SIGNAL(sliderMoved(int)), SLOT(slotReverbWidth(int)));

    //Дисторшн
    _distortion.fDrive = _distortion.fDryMix = _distortion.fFeedback = _distortion.fVolume = _distortion.fWetMix = 0;
    _distortion.lChannel = 1 | 2;
    ui->verticalSliderDistortionDrive->setRange(0, 500);
    ui->verticalSliderDistortionDryMix->setRange(-500, 500);
    ui->verticalSliderDistortionWetMix->setRange(-500, 500);
    ui->verticalSliderDistortionFreedback->setRange(-100, 100);
    ui->verticalSliderDistortionVolume->setRange(0, 200);
    ui->comboBoxDistortion->addItem("Hard");
    ui->comboBoxDistortion->addItem("VeryHard");
    ui->comboBoxDistortion->addItem("Medium");
    ui->comboBoxDistortion->addItem("Soft");
    connect(ui->checkBoxDistortionActiv, SIGNAL(toggled(bool)), SLOT(slotDistrotionActiv(bool)));
    connect(ui->comboBoxDistortion, SIGNAL(currentIndexChanged(int)), SLOT(slotDistortionSetExample(int)));
    slotDistrotionActiv(false);
    connect(ui->verticalSliderDistortionDrive, SIGNAL(sliderMoved(int)), SLOT(slotDistrotionDrive(int)));
    connect(ui->verticalSliderDistortionDryMix, SIGNAL(sliderMoved(int)), SLOT(slotDistrotionDryMix(int)));
    connect(ui->verticalSliderDistortionFreedback, SIGNAL(sliderMoved(int)), SLOT(slotDistrotionFreedback(int)));
    connect(ui->verticalSliderDistortionVolume, SIGNAL(sliderMoved(int)), SLOT(slotDistrotionVolume(int)));
    connect(ui->verticalSliderDistortionWetMix, SIGNAL(sliderMoved(int)), SLOT(slotDistrotionWetMix(int)));

    //Фазер
    _phaser.fDryMix = _phaser.fFeedback = _phaser.fFreq = _phaser.fRange = _phaser.fRate = _phaser.fWetMix = 0;
    _phaser.lChannel = 1 | 2;
    ui->verticalSliderPhaserDryMix->setRange(-200, 200);
    ui->verticalSliderPhaserFeedback->setRange(-100, 100);
    ui->verticalSliderPhaserFreq->setRange(0, 1000);
    ui->verticalSliderPhaserRange->setRange(0, 100);
    ui->verticalSliderPhaserRate->setRange(0, 100);
    ui->verticalSliderPhaserWetMix->setRange(-200, 200);
    ui->comboBoxPhaser->addItem("Phase shift");
    ui->comboBoxPhaser->addItem("Slow invert");
    ui->comboBoxPhaser->addItem("Basic phase");
    ui->comboBoxPhaser->addItem("Phase w/ FB");
    ui->comboBoxPhaser->addItem("Med. phase");
    ui->comboBoxPhaser->addItem("Fast phase");
    ui->comboBoxPhaser->addItem("Invert w/FB");
    ui->comboBoxPhaser->addItem("Tremolo Wah");
    connect(ui->checkBoxPhaserActiv, SIGNAL(toggled(bool)), SLOT(slotPhaserActiv(bool)));
    connect(ui->comboBoxPhaser, SIGNAL(currentIndexChanged(int)), SLOT(slotPhaserSetExample(int)));
    slotPhaserActiv(false);
    connect(ui->verticalSliderPhaserDryMix, SIGNAL(sliderMoved(int)), SLOT(slotPhaserDryMix(int)));
    connect(ui->verticalSliderPhaserFeedback, SIGNAL(sliderMoved(int)), SLOT(slotPhaserFeedback(int)));
    connect(ui->verticalSliderPhaserFreq, SIGNAL(sliderMoved(int)), SLOT(slotPhaserFreq(int)));
    connect(ui->verticalSliderPhaserRange, SIGNAL(sliderMoved(int)), SLOT(slotPhaserRange(int)));
    connect(ui->verticalSliderPhaserRate, SIGNAL(sliderMoved(int)), SLOT(slotPhaserRate(int)));
    connect(ui->verticalSliderPhaserWetMix, SIGNAL(sliderMoved(int)), SLOT(slotPhaserWetMix(int)));

    //Вау- эффет
    _autowah.fDryMix = _autowah.fFeedback = _autowah.fFreq = _autowah.fRange = _autowah.fRate = _autowah.fWetMix = 0;
    _autowah.lChannel = 1 | 2;
    ui->verticalSliderAutowahDryMix->setRange(-200, 200);
    ui->verticalSliderAutowahWetMix->setRange(-200, 200);
    ui->verticalSliderAutowahFeedBack->setRange(-100, 100);
    ui->verticalSliderAutowahRate->setRange(0, 100);
    ui->verticalSliderAutowahRange->setRange(0, 100);
    ui->verticalSliderAutowahFreq->setRange(0, 1000);
    ui->comboBoxAutowah->addItem("Slow");
    ui->comboBoxAutowah->addItem("Fast");
    ui->comboBoxAutowah->addItem("Hi Fast");
    connect(ui->checkBoxAutowahActiv, SIGNAL(toggled(bool)), SLOT(slotAutowahActov(bool)));
    connect(ui->comboBoxAutowah, SIGNAL(currentIndexChanged(int)), SLOT(slotAutowahSetExample(int)));
    slotAutowahActov(false);
    connect(ui->verticalSliderAutowahDryMix, SIGNAL(sliderMoved(int)), SLOT(slotAutowahDryMix(int)));
    connect(ui->verticalSliderAutowahFeedBack, SIGNAL(sliderMoved(int)), SLOT(slotAutowahFeedBack(int)));
    connect(ui->verticalSliderAutowahFreq, SIGNAL(sliderMoved(int)), SLOT(slotAutowahFreq(int)));
    connect(ui->verticalSliderAutowahRange, SIGNAL(sliderMoved(int)), SLOT(slotAutowahRange(int)));
    connect(ui->verticalSliderAutowahRate, SIGNAL(sliderMoved(int)), SLOT(slotAutowahRate(int)));
    connect(ui->verticalSliderAutowahWetMix, SIGNAL(sliderMoved(int)), SLOT(slotAutowahWetMix(int)));

    //Затухание
    _damp.fTarget = _damp.fQuiet = _damp.fRate = _damp.fGain = _damp.fDelay = 0;
    _damp.lChannel = 1 | 2;
    ui->verticalSliderDampTarget->setRange(0, 100);
    ui->verticalSliderDampQuit->setRange(0, 100);
    ui->verticalSliderDampRate->setRange(0, 100);
    ui->verticalSliderDampGain->setRange(0, 10000);
    ui->verticalSliderDampDelay->setRange(0, 10000);
    connect(ui->checkBoxDampActiv, SIGNAL(toggled(bool)), SLOT(slotDampActiv(bool)));
    slotDampActiv(false);
    connect(ui->verticalSliderDampDelay, SIGNAL(sliderMoved(int)), SLOT(slotDampDelay(int)));
    connect(ui->verticalSliderDampGain, SIGNAL(sliderMoved(int)), SLOT(slotDampGain(int)));
    connect(ui->verticalSliderDampQuit, SIGNAL(sliderMoved(int)), SLOT(slotDampQuit(int)));
    connect(ui->verticalSliderDampRate, SIGNAL(sliderMoved(int)), SLOT(slotDampRate(int)));
    connect(ui->verticalSliderDampTarget, SIGNAL(sliderMoved(int)), SLOT(slotDampTarget(int)));

    //Питч
    _pitch.fPitchShift = 1.0f; _pitch.fSemitones  = 0; _pitch.lFFTsize = 2048; _pitch.lOsamp = 8; _pitch.lChannel = 1 | 2;
    ui->verticalSliderPitchShift->setRange(50, 200);
    ui->verticalSliderPitchSemitones->setRange(0, 1000);
    ui->verticalSliderPitchFFTsize->setRange(1, 8);
    ui->verticalSliderPitchOsamp->setRange(1, 8);
    connect(ui->checkBoxPitchActiv, SIGNAL(toggled(bool)), SLOT(slotPitchActiv(bool)));
    slotPitchActiv(false);
    connect(ui->verticalSliderPitchFFTsize, SIGNAL(sliderMoved(int)), SLOT(slotPitchFFTsize(int)));
    connect(ui->verticalSliderPitchOsamp, SIGNAL(sliderMoved(int)), SLOT(slotPitchOsamp(int)));
    connect(ui->verticalSliderPitchSemitones, SIGNAL(sliderMoved(int)), SLOT(slotPitchSemitones(int)));
    connect(ui->verticalSliderPitchShift, SIGNAL(sliderMoved(int)), SLOT(slotfPitchShift(int)));

    //Эхо
    _echo4.fDryMix = _echo4.fWetMix = _echo4.fFeedback = _echo4.fDelay = 0; _echo4.bStereo = true; _echo4.lChannel = 1 | 2;
    ui->verticalSliderEchoDryMix->setRange(-200, 200);
    ui->verticalSliderEchoWetMix->setRange(-200, 200);
    ui->verticalSliderEchoFeedBack->setRange(-100, 100);
    ui->verticalSliderEchoDelay->setRange(0, 100);
    ui->verticalSliderEchoStereo->setRange(0, 1);
    ui->comboBoxEcho->addItem("Small Echo");
    ui->comboBoxEcho->addItem("Many Echoes");
    ui->comboBoxEcho->addItem("Reverse Echoes");
    ui->comboBoxEcho->addItem("Robotic Voice");
    connect(ui->checkBoxEchoActiv, SIGNAL(toggled(bool)), SLOT(slotEcho4Activ(bool)));
    connect(ui->comboBoxEcho, SIGNAL(currentIndexChanged(int)), SLOT(slotEcho4SetExamle(int)));
    slotEcho4Activ(false);
    connect(ui->verticalSliderEchoDelay, SIGNAL(sliderMoved(int)), SLOT(slotEcho4Delay(int)));
    connect(ui->verticalSliderEchoDryMix, SIGNAL(sliderMoved(int)), SLOT(slotEcho4DryMix(int)));
    connect(ui->verticalSliderEchoFeedBack, SIGNAL(sliderMoved(int)), SLOT(slotEcho4Feedback(int)));
    connect(ui->verticalSliderEchoStereo, SIGNAL(sliderMoved(int)), SLOT(slotEcho4Stereo(int)));
    connect(ui->verticalSliderEchoWetMix, SIGNAL(sliderMoved(int)), SLOT(slotEcho4WetMix(int)));

    //Экволайзер
    _fEqfBandwidth = 4.9f;
   ui->verticalSliderEq80->setRange(-15, 15);
   ui->verticalSliderEq80->setValue(0);
   ui->verticalSliderEq170->setRange(-15, 15);
   ui->verticalSliderEq170->setValue(0);
   ui->verticalSliderEq310->setRange(-15, 15);
   ui->verticalSliderEq310->setValue(0);
   ui->verticalSliderEq600->setRange(-15, 15);
   ui->verticalSliderEq600->setValue(0);
   ui->verticalSliderEq1000->setRange(-15, 15);
   ui->verticalSliderEq1000->setValue(0);
   ui->verticalSliderEq3000->setRange(-15, 15);
   ui->verticalSliderEq3000->setValue(0);
   ui->verticalSliderEq6000->setRange(-15, 15);
   ui->verticalSliderEq6000->setValue(0);
   ui->verticalSliderEq10000->setRange(-15, 15);
   ui->verticalSliderEq10000->setValue(0);
   ui->verticalSliderEq12000->setRange(-15, 15);
   ui->verticalSliderEq12000->setValue(0);
   ui->verticalSliderEq14000->setRange(-15, 15);
   ui->verticalSliderEq14000->setValue(0);
    connect(ui->verticalSliderEq80, SIGNAL(sliderMoved(int)), SLOT(slotEq80(int)));
    connect(ui->verticalSliderEq170, SIGNAL(sliderMoved(int)), SLOT(slotEq170(int)));
    connect(ui->verticalSliderEq310, SIGNAL(sliderMoved(int)), SLOT(slotEq310(int)));
    connect(ui->verticalSliderEq600, SIGNAL(sliderMoved(int)), SLOT(slotEq600(int)));
    connect(ui->verticalSliderEq1000, SIGNAL(sliderMoved(int)), SLOT(slotEq1000(int)));
    connect(ui->verticalSliderEq3000, SIGNAL(sliderMoved(int)), SLOT(slotEq3000(int)));
    connect(ui->verticalSliderEq6000, SIGNAL(sliderMoved(int)), SLOT(slotEq6000(int)));
    connect(ui->verticalSliderEq10000, SIGNAL(sliderMoved(int)), SLOT(slotEq10000(int)));
    connect(ui->verticalSliderEq12000, SIGNAL(sliderMoved(int)), SLOT(slotEq12000(int)));
    connect(ui->verticalSliderEq14000, SIGNAL(sliderMoved(int)), SLOT(slotEq14000(int)));

}