Ejemplo n.º 1
0
void Filters::on_remove_inclusion_clicked()
{
    bool removedEntry=false;
    int index=0;
    while(index<ui->inclusion->count())
    {
        if(ui->inclusion->item(index)->isSelected())
        {
            delete ui->inclusion->item(index);
            include.removeAt(index);
            removedEntry=true;
        }
        else
            index++;
    }
    if(removedEntry)
    {
        reShowAll();
        updateFilters();
    }
}
Ejemplo n.º 2
0
void UPacketView::addPacket(PacketType type, const char *packet,int packetSize )
{
    //假如静默模式,则不忽略要添加的封包。
    if(silentMode_)
    {
        return;
    }
    //假如是新类型的封包,则在封包列表添加封包。
    //在封包监视器中添加封包。
    int packetID = GetAt<unsigned short>(packet,0);

    PacketInfo packetInfo;
    packetInfo.id = packetID;
    packetInfo.type = type;
    packetInfo.visible = true;
    //UTRACE("临时")<<"1";

    if(!packetInfos_.contains(packetInfo))
    {
        packetListModel_->addPacketInfo(packetInfo);
        //新增加的封包是否显示?
        currentDisplayScheme_.visibilities[packetInfo] = true;
        updateFilters();
    }

    //UTRACE("临时")<<"2";
    //添加封包。
    PacketData packetData;
    packetData.id = packetID;
    packetData.type = type;
    packetData.time = QTime::currentTime();
    packetData.content = QByteArray(packet,packetSize);

    packetMonitorModel_->addPacketData(packetData);
    packetCountLabel_->setText(tr("Packet Count:%1").arg(packetMonitorModel_->rowCount()));
    //UTRACE("临时")<<"3";
}
Ejemplo n.º 3
0
//==============================================================================
void DRowAudioFilter::prepareToPlay (double sampleRate, int samplesPerBlock)
{
    currentSampleRate = sampleRate;
    oneOverCurrentSampleRate = 1.0f/currentSampleRate;

    // set up wave buffer and fill with triangle data
    iLookupTableSize = 8192;
    iLookupTableSizeMask =  iLookupTableSize-1;

    pfLookupTable = new float[iLookupTableSize];
    float fPhaseStep = (2 * double_Pi) / iLookupTableSize;
    for(int i = 0; i < iLookupTableSize; i++) {
        if(i < iLookupTableSize * 0.5)
            pfLookupTable[i] = -1.0f + (2.0/double_Pi)*i*fPhaseStep;
        else
            pfLookupTable[i] = 3.0f - (2.0/double_Pi)*i*fPhaseStep;
    }
    iLookupTablePos = 0;
    iSamplesProcessed = 0;


    // set up circular buffers
    iBufferSize = (int)sampleRate;
    pfCircularBufferL = new float[iBufferSize];
    for (int i = 0; i < iBufferSize; i++)
        pfCircularBufferL[i] = 0;

    if (getNumInputChannels() == 2) {
        pfCircularBufferR = new float[iBufferSize];
        for (int i = 0; i < iBufferSize; i++)
            pfCircularBufferR[i] = 0;
    }
    iBufferWritePos = 0;

    updateFilters();
}
Ejemplo n.º 4
0
	//--------------------------------------------------------------------------	
	void BaseFileDialog::frameStarted(const FrameEvent& _evt)
	{
		if(!ResourceGroupManager::getSingleton().resourceGroupExists(mResourceGroup)
			|| !getNumFilters() || !getMainWidget())
			return;

		if(mNeedUpdateCaption)
		{
			if(updateCaption())
				mNeedUpdateCaption = false;
		}
		if(mNeedUpdateOkText)
		{
			if(updateOkText())
				mNeedUpdateOkText = false;
		}
		if(mNeedUpdateCancelText)
		{
			if(updateCancelText())
				mNeedUpdateCancelText = false;
		}
		if(mNeedUpdateFilters)
		{
			if(updateFilters())
				mNeedUpdateFilters = false;
		}
		if(mNeedUpdateCurrentFilter)
		{
			if(updateCurrentFilter())
				mNeedUpdateCurrentFilter = false;
		}
		if(mNeedUpdateAlphabeticList)
		{
			if(updateAlphabeticList())
				mNeedUpdateAlphabeticList = false;
		}
		if(mNeedUpdateFolders)
		{
			if(updateFolders())
				mNeedUpdateFolders = false;
		}
		if(mNeedUpdateCurrentFolder)
		{
			if(updateCurrentFolder())
				mNeedUpdateCurrentFolder = false;
		}
		if(mNeedUpdateCurrentPath)
		{
			if(updateCurrentPath())
				mNeedUpdateCurrentPath = false;
		}
		if(mNeedUpdateFilesInFolder)
		{
			if(updateFilesInFolder())
				mNeedUpdateFilesInFolder = false;
		}
		if(mNeedUpdateBasenameInAlphabeticList)
		{
			if(updateBasenameInAlphabeticList())
				mNeedUpdateBasenameInAlphabeticList = false;
		}
		if(mNeedUpdateBasenameInFilesInFolder)
		{
			if(updateBasenameInFilesInFolder())
				mNeedUpdateBasenameInFilesInFolder = false;
		}
		if(mNeedUpdateBasenameInEdit)
		{
			if(updateBasenameInEdit())
				mNeedUpdateBasenameInEdit = false;
		}
		if(mNeedUpdateFoldersAndFilesCoord)
		{
			if(updateFoldersAndFilesCoord())
				mNeedUpdateFoldersAndFilesCoord = false;
		}
		if(mNeedUpdateAlphabeticListCoord)
		{
			if(updateAlphabeticListCoord())
				mNeedUpdateAlphabeticListCoord = false;
		}
		unregisterFrameListener();
	}
Ejemplo n.º 5
0
DualFilterControls::DualFilterControls( DualFilterEffect* effect ) :
	EffectControls( effect ),
	m_effect( effect ),

	m_enabled1Model( true, this, tr( "Filter 1 enabled" ) ),
	m_filter1Model( this, tr( "Filter 1 type" ) ),
	m_cut1Model( 7000.0f, 1.0f, 20000.0f, 1.0f, this, tr( "Cutoff 1 frequency" ) ),
	m_res1Model( 0.5, BasicFilters<0>::minQ(), 10.0, 0.01, this, tr( "Q/Resonance 1" ) ),
	m_gain1Model( 100.0f, 0.0f, 200.0f, 0.1f, this, tr( "Gain 1" ) ),

	m_mixModel( 0.0f, -1.0f, 1.0f, 0.01f, this, tr( "Mix" ) ),

	m_enabled2Model( true, this, tr( "Filter 2 enabled" ) ),
	m_filter2Model( this, tr( "Filter 2 type" ) ),
	m_cut2Model( 7000.0f, 1.0f, 20000.0f, 1.0f, this, tr( "Cutoff 2 frequency" ) ),
	m_res2Model( 0.5, BasicFilters<0>::minQ(), 10.0, 0.01, this, tr( "Q/Resonance 2" ) ),
	m_gain2Model( 100.0f, 0.0f, 200.0f, 0.1f, this, tr( "Gain 2" ) )
{
	m_filter1Model.addItem( tr( "LowPass" ), new PixmapLoader( "filter_lp" ) );
	m_filter1Model.addItem( tr( "HiPass" ), new PixmapLoader( "filter_hp" ) );
	m_filter1Model.addItem( tr( "BandPass csg" ), new PixmapLoader( "filter_bp" ) );
	m_filter1Model.addItem( tr( "BandPass czpg" ), new PixmapLoader( "filter_bp" ) );
	m_filter1Model.addItem( tr( "Notch" ), new PixmapLoader( "filter_notch" ) );
	m_filter1Model.addItem( tr( "Allpass" ), new PixmapLoader( "filter_ap" ) );
	m_filter1Model.addItem( tr( "Moog" ), new PixmapLoader( "filter_lp" ) );
	m_filter1Model.addItem( tr( "2x LowPass" ), new PixmapLoader( "filter_2lp" ) );
	m_filter1Model.addItem( tr( "RC LowPass 12dB" ), new PixmapLoader( "filter_lp" ) );
	m_filter1Model.addItem( tr( "RC BandPass 12dB" ), new PixmapLoader( "filter_bp" ) );
	m_filter1Model.addItem( tr( "RC HighPass 12dB" ), new PixmapLoader( "filter_hp" ) );
	m_filter1Model.addItem( tr( "RC LowPass 24dB" ), new PixmapLoader( "filter_lp" ) );
	m_filter1Model.addItem( tr( "RC BandPass 24dB" ), new PixmapLoader( "filter_bp" ) );
	m_filter1Model.addItem( tr( "RC HighPass 24dB" ), new PixmapLoader( "filter_hp" ) );
	m_filter1Model.addItem( tr( "Vocal Formant Filter" ), new PixmapLoader( "filter_hp" ) );
	m_filter1Model.addItem( tr( "2x Moog" ), new PixmapLoader( "filter_2lp" ) );
	m_filter1Model.addItem( tr( "SV LowPass" ), new PixmapLoader( "filter_lp" ) );
	m_filter1Model.addItem( tr( "SV BandPass" ), new PixmapLoader( "filter_bp" ) );
	m_filter1Model.addItem( tr( "SV HighPass" ), new PixmapLoader( "filter_hp" ) );
	m_filter1Model.addItem( tr( "SV Notch" ), new PixmapLoader( "filter_notch" ) );
	m_filter1Model.addItem( tr( "Fast Formant" ), new PixmapLoader( "filter_hp" ) );
	m_filter1Model.addItem( tr( "Tripole" ), new PixmapLoader( "filter_lp" ) );

	m_filter2Model.addItem( tr( "LowPass" ), new PixmapLoader( "filter_lp" ) );
	m_filter2Model.addItem( tr( "HiPass" ), new PixmapLoader( "filter_hp" ) );
	m_filter2Model.addItem( tr( "BandPass csg" ), new PixmapLoader( "filter_bp" ) );
	m_filter2Model.addItem( tr( "BandPass czpg" ), new PixmapLoader( "filter_bp" ) );
	m_filter2Model.addItem( tr( "Notch" ), new PixmapLoader( "filter_notch" ) );
	m_filter2Model.addItem( tr( "Allpass" ), new PixmapLoader( "filter_ap" ) );
	m_filter2Model.addItem( tr( "Moog" ), new PixmapLoader( "filter_lp" ) );
	m_filter2Model.addItem( tr( "2x LowPass" ), new PixmapLoader( "filter_2lp" ) );
	m_filter2Model.addItem( tr( "RC LowPass 12dB" ), new PixmapLoader( "filter_lp" ) );
	m_filter2Model.addItem( tr( "RC BandPass 12dB" ), new PixmapLoader( "filter_bp" ) );
	m_filter2Model.addItem( tr( "RC HighPass 12dB" ), new PixmapLoader( "filter_hp" ) );
	m_filter2Model.addItem( tr( "RC LowPass 24dB" ), new PixmapLoader( "filter_lp" ) );
	m_filter2Model.addItem( tr( "RC BandPass 24dB" ), new PixmapLoader( "filter_bp" ) );
	m_filter2Model.addItem( tr( "RC HighPass 24dB" ), new PixmapLoader( "filter_hp" ) );
	m_filter2Model.addItem( tr( "Vocal Formant Filter" ), new PixmapLoader( "filter_hp" ) );
	m_filter2Model.addItem( tr( "2x Moog" ), new PixmapLoader( "filter_2lp" ) );
	m_filter2Model.addItem( tr( "SV LowPass" ), new PixmapLoader( "filter_lp" ) );
	m_filter2Model.addItem( tr( "SV BandPass" ), new PixmapLoader( "filter_bp" ) );
	m_filter2Model.addItem( tr( "SV HighPass" ), new PixmapLoader( "filter_hp" ) );
	m_filter2Model.addItem( tr( "SV Notch" ), new PixmapLoader( "filter_notch" ) );
	m_filter2Model.addItem( tr( "Fast Formant" ), new PixmapLoader( "filter_hp" ) );
	m_filter2Model.addItem( tr( "Tripole" ), new PixmapLoader( "filter_lp" ) );

	connect( Engine::mixer(), SIGNAL( sampleRateChanged() ), this, SLOT( updateFilters() ) );
}
void KexiStartupFileHandler::setAdditionalFilters(const QSet<QString> &mimeTypes)
{
    //delayed
    d->additionalMimeTypes = mimeTypes;
    updateFilters();
}
void KexiStartupFileHandler::setMode(Mode mode)
{
    //delayed
    d->mode = mode;
    updateFilters();
}
Ejemplo n.º 8
0
void KexiFileWidget::showEvent(QShowEvent * event)
{
    d->filtersUpdated = false;
    updateFilters();
    KFileWidget::showEvent(event);
}
    connect(ui->seqGroupBox, SIGNAL(clicked(bool)), this, SLOT(updateSEQ()));
    connect(ui->seqVolDial, SIGNAL(valueChanged(int)), this, SLOT(updateSEQ()));
    connect(ui->seqPlayPushButton, SIGNAL(clicked()), this, SLOT(updateSEQ()));
    connect(ui->seqSpeedupDial, SIGNAL(valueChanged(int)), this, SLOT(updateSEQ()));
    connect(ui->seqRecPushButton, SIGNAL(clicked()), this, SLOT(resetREC()));

    connect(ui->reverbGroupBox, SIGNAL(clicked(bool)), this, SLOT(toggleSFX(bool)));
    connect(ui->reverbc1SpinBox, SIGNAL(valueChanged(double)), this, SLOT(updateReverb()));
    connect(ui->reverbc2SpinBox, SIGNAL(valueChanged(double)), this, SLOT(updateReverb()));
    connect(ui->reverbc3SpinBox, SIGNAL(valueChanged(double)), this, SLOT(updateReverb()));
    connect(ui->reverbc4SpinBox, SIGNAL(valueChanged(double)), this, SLOT(updateReverb()));
    connect(ui->reverbd1SspinBox, SIGNAL(valueChanged(int)), this, SLOT(updateReverb()));
    connect(ui->reverbd2SpinBox, SIGNAL(valueChanged(int)), this, SLOT(updateReverb()));
    connect(ui->reverbd3SpinBox, SIGNAL(valueChanged(int)), this, SLOT(updateReverb()));
    connect(ui->actionDAC, SIGNAL(triggered()), this, SLOT(openDACDialog()));
    connect(ui->filterUpdateButton, SIGNAL(clicked()), this, SLOT(updateFilters()));
    connect(ui->filterResetButton, SIGNAL(clicked()), this, SLOT(resetFilters()));
    connect(filterTypeBG, SIGNAL(buttonClicked(int)), this, SLOT(updateFilterType(int)));
    connect(serial, SIGNAL(readyRead()), this, SLOT(readSerial()));
}
void MainWindow::toggleControl(int id)
{
    if(0 == id)
    {
        ui->envSetpointSpinBox->setEnabled(false);
        ui->envMaxSpinBox->setEnabled(false);
        ui->setpointLabel->setEnabled(false);
        ui->maxLabel->setEnabled(false);
    }
    else
    {
void FilteredSprite::setFilters(Vector<Filter*>& $pFilters)
{
	_pFilters = $pFilters;
	//CCLOG("FilteredSprite setFilters:%d", _pFilters->count());
	updateFilters();
}
Ejemplo n.º 11
0
void CodeCompletionModel::setFilter(const QString &filter){
    m_filter = filter;
    beginResetModel();
    updateFilters();
    endResetModel();
}