QgsFieldConditionalFormatWidget::QgsFieldConditionalFormatWidget( QWidget *parent ) : QWidget( parent ) , mLayer( 0 ) , mEditIndex( 0 ) , mEditing( false ) , mSymbol( 0 ) { setupUi( this ); mDeleteButton->hide(); connect( mFieldCombo, SIGNAL( fieldChanged( QString ) ), SLOT( fieldChanged( QString ) ) ); connect( fieldRadio, SIGNAL( clicked() ), SLOT( reloadStyles() ) ); connect( rowRadio, SIGNAL( clicked() ), SLOT( reloadStyles() ) ); connect( mNewButton, SIGNAL( clicked() ), SLOT( addNewRule() ) ); connect( mSaveRule, SIGNAL( clicked() ), SLOT( saveRule() ) ); connect( mCancelButton, SIGNAL( clicked() ), SLOT( cancelRule() ) ); connect( mDeleteButton, SIGNAL( clicked() ), SLOT( deleteRule() ) ); connect( listView, SIGNAL( clicked( QModelIndex ) ), SLOT( ruleClicked( QModelIndex ) ) ); connect( btnChangeIcon , SIGNAL( clicked() ), SLOT( updateIcon() ) ); connect( btnBuildExpression , SIGNAL( clicked() ), SLOT( setExpression() ) ); connect( mPresetsList , SIGNAL( currentIndexChanged( int ) ), SLOT( presetSet( int ) ) ); btnBackgroundColor->setAllowAlpha( true ); btnBackgroundColor->setShowNoColor( true ); btnTextColor->setAllowAlpha( true ); btnTextColor->setShowNoColor( true ); mPresetsModel = new QStandardItemModel( listView ); mModel = new QStandardItemModel( listView ); listView->setModel( mModel ); mPresetsList->setModel( mPresetsModel ); setPresets( defaultPresets() ); }
//----------------------------------------------------------------------------------------- // MirSynth //----------------------------------------------------------------------------------------- MirSynth::MirSynth (audioMasterCallback audioMaster) : AudioEffectX (audioMaster, kNumPrograms, kNumParams) { out_buffer = new float [2]; voice_buffer = new float [2]; globals = new cGlobals(); Glob = globals; Glob->sampleRate = getSampleRate(); Glob->sampleTime = 1.0f / Glob->sampleRate; lfo[0] = new cLFO(1, &(Glob->zLfoRate[0]), &(Glob->parameters[kLfo1PhaseShift]->value), &(Glob->parameters[kLfo1Delay]->value), &(Glob->parameters[kLfo1Fade]->value), &(Glob->iLfoWave[0]), &(Glob->parameters[kLfo1Mono]->value), &(Glob->lfoValue[0])); lfo[1] = new cLFO(2, &(Glob->zLfoRate[1]), &(Glob->parameters[kLfo2PhaseShift]->value), &(Glob->parameters[kLfo2Delay]->value), &(Glob->parameters[kLfo2Fade]->value), &(Glob->iLfoWave[1]), &(Glob->parameters[kLfo2Mono]->value), &(Glob->lfoValue[1])); lfo[2] = new cLFO(3, &(Glob->zLfoRate[2]), &(Glob->parameters[kLfo3PhaseShift]->value), &(Glob->parameters[kLfo3Delay]->value), &(Glob->parameters[kLfo3Fade]->value), &(Glob->iLfoWave[2]), &(Glob->parameters[kLfo3Mono]->value), &(Glob->lfoValue[2])); lfo[3] = new cLFO(4, &(Glob->zLfoRate[3]), &(Glob->parameters[kLfo4PhaseShift]->value), &(Glob->parameters[kLfo4Delay]->value), &(Glob->parameters[kLfo4Fade]->value), &(Glob->iLfoWave[3]), &(Glob->parameters[kLfo4Mono]->value), &(Glob->lfoValue[3])); for (VstInt32 i=0;i<4;i++) { if (lfo[i]) lfo[i]->resetGlobal(); } filter[0] = new cGlobFilter(); filter[1] = new cGlobFilter(); programs = new MirSynthProgram[kNumPrograms]; char *str; str = new char[kVstMaxProgNameLen]; for (VstInt32 i = 0; i < 16; i++) { sprintf(str, "Preset %.2d", i); vst_strncpy (programs[i].name, str, kVstMaxProgNameLen); channelPrograms[i] = i; } if (programs) { defaultPresets(); defaultPresets2(); defaultPresets3(); /* defaultPresets4(); defaultPresets5(); defaultPresets6(); defaultPresets7(); defaultPresets8(); defaultPresets9(); defaultPresets10();*/ } if (audioMaster) { setNumInputs (0); setNumOutputs (kNumOutputs); canProcessReplacing (); isSynth (); setUniqueID ('tst2'); } for (int i=0;i<MAX_POLYPHONY;i++) voices[i] = new cVoice(); editor = new cMirEditor(this); initProcess (); suspend (); }