コード例 #1
0
ファイル: pulsestream.cpp プロジェクト: KDE/phonon
void PulseStream::setMute(bool mute)
{
    if (mMute != mute) {
        mMute = mute;
        emit muteChanged(mMute);
    }
}
コード例 #2
0
/**
  * Toggles the sound according to the parameter.
  * Has no effect if output is not active.
  */
void GuitarTunerUI::toggleSound(bool noSound)
{
    if (!m_outputActive) {
        return;
    }
    m_muted = noSound;
    emit muteChanged(m_muted);
}
コード例 #3
0
void AudioDevice::setMuteNoCommit(bool state)
{
    if (m_mute == state)
        return;

    m_mute = state;
    emit muteChanged(m_mute);
}
コード例 #4
0
ファイル: kkslidervolume.cpp プロジェクト: kxtry/kxfw-example
void KKSliderVolume::on_mute_clicked()
{
	int index = m_mute->frameIndex();
	index = index == 1 ? 0 : 1;
	m_mute->setFrameIndex(index);
	setFrameIndex(index);
	m_sliderFrame->setEnabled(!index);
	emit muteChanged(index == 1);
}
コード例 #5
0
ファイル: userdata.cpp プロジェクト: Barlend/Cutegram
void UserData::removeMute(int id)
{
    QSqlQuery query(p->db);
    query.prepare("DELETE FROM mutes WHERE id=:id");
    query.bindValue(":id", id);
    query.exec();
    CHECK_QUERY_ERROR(query);

    p->mutes.remove(id);
    emit muteChanged(id);
}
コード例 #6
0
ファイル: userdata.cpp プロジェクト: Barlend/Cutegram
void UserData::addMute(int id)
{
    QSqlQuery mute_query(p->db);
    mute_query.prepare("INSERT OR REPLACE INTO mutes (id,mute) VALUES (:id,:mute)");
    mute_query.bindValue(":id",id);
    mute_query.bindValue(":mute",1);
    mute_query.exec();
    CHECK_QUERY_ERROR(mute_query);

    p->mutes.insert(id,true);
    emit muteChanged(id);
}
コード例 #7
0
ファイル: QmlVlcAudio.cpp プロジェクト: RSATom/QmlVlc
void QmlVlcAudio::audio_event( vlc::audio_event_e e )
{
    switch( e ) {
        case vlc::audio_event_e::mute_changed:
            Q_EMIT muteChanged();
            break;
        case vlc::audio_event_e::volume_changed:
            Q_EMIT volumeChanged();
            break;
        default:
            assert( false );
    }
}
コード例 #8
0
bool LapsusAlsaMixer::mixerIsMuted()
{
	for (int i = 0; i < ID_LAST; ++i)
	{
		if (sids[i] && sids[i]->hasMute)
		{
			bool ret = sids[i]->getMute();

			if (ret != _curMute)
			{
			 	_curMute = ret;
			 	muteChanged(ret);
			}

			return ret;
		}
	}

	return false;
}
コード例 #9
0
InstrumentTrackView::InstrumentTrackView( InstrumentTrack * _it, TrackContainerView* tcv ) :
	TrackView( _it, tcv ),
	m_window( NULL ),
	m_lastPos( -1, -1 )
{
	setAcceptDrops( true );
	setFixedHeight( 32 );

	m_tlb = new TrackLabelButton( this, getTrackSettingsWidget() );
	m_tlb->setCheckable( true );
	m_tlb->setIcon( embed::getIconPixmap( "instrument_track" ) );
	m_tlb->move( 3, 1 );
	m_tlb->show();

	connect( m_tlb, SIGNAL( toggled( bool ) ),
			this, SLOT( toggleInstrumentWindow( bool ) ) );

	connect( _it, SIGNAL( nameChanged() ),
			m_tlb, SLOT( update() ) );

	// creation of widgets for track-settings-widget
	int widgetWidth;
	if( ConfigManager::inst()->value( "ui",
					  "compacttrackbuttons" ).toInt() )
	{
		widgetWidth = DEFAULT_SETTINGS_WIDGET_WIDTH_COMPACT;
	}
	else
	{
		widgetWidth = DEFAULT_SETTINGS_WIDGET_WIDTH;
	}

	m_volumeKnob = new Knob( knobSmall_17, getTrackSettingsWidget(),
							tr( "Volume" ) );
	m_volumeKnob->setVolumeKnob( true );
	m_volumeKnob->setModel( &_it->m_volumeModel );
	m_volumeKnob->setHintText( tr( "Volume:" ), "%" );
	m_volumeKnob->move( widgetWidth-2*24, 2 );
	m_volumeKnob->setLabel( tr( "VOL" ) );
	m_volumeKnob->show();
	m_volumeKnob->setWhatsThis( tr( volume_help ) );

	m_panningKnob = new Knob( knobSmall_17, getTrackSettingsWidget(),
							tr( "Panning" ) );
	m_panningKnob->setModel( &_it->m_panningModel );
    m_panningKnob->setHintText( tr( "Panning:" ), "%" );
	m_panningKnob->move( widgetWidth-24, 2 );
	m_panningKnob->setLabel( tr( "PAN" ) );
	m_panningKnob->show();

	m_midiMenu = new QMenu( tr( "MIDI" ), this );

	// sequenced MIDI?
	if( !Engine::mixer()->midiClient()->isRaw() )
	{
		_it->m_midiPort.m_readablePortsMenu = new MidiPortMenu(
							MidiPort::Input );
		_it->m_midiPort.m_writablePortsMenu = new MidiPortMenu(
							MidiPort::Output );
		_it->m_midiPort.m_readablePortsMenu->setModel(
							&_it->m_midiPort );
		_it->m_midiPort.m_writablePortsMenu->setModel(
							&_it->m_midiPort );
		m_midiInputAction = m_midiMenu->addMenu(
					_it->m_midiPort.m_readablePortsMenu );
		m_midiOutputAction = m_midiMenu->addMenu(
					_it->m_midiPort.m_writablePortsMenu );
	}
	else
	{
		m_midiInputAction = m_midiMenu->addAction( "" );
		m_midiOutputAction = m_midiMenu->addAction( "" );
		m_midiInputAction->setCheckable( true );
		m_midiOutputAction->setCheckable( true );
		connect( m_midiInputAction, SIGNAL( changed() ), this,
						SLOT( midiInSelected() ) );
		connect( m_midiOutputAction, SIGNAL( changed() ), this,
					SLOT( midiOutSelected() ) );
		connect( &_it->m_midiPort, SIGNAL( modeChanged() ),
				this, SLOT( midiConfigChanged() ) );
	}

	m_midiInputAction->setText( tr( "Input" ) );
	m_midiOutputAction->setText( tr( "Output" ) );

	m_activityIndicator = new FadeButton( QApplication::palette().color( QPalette::Active,
							QPalette::Background),
						QApplication::palette().color( QPalette::Active,
							QPalette::BrightText ),
						getTrackSettingsWidget() );
	m_activityIndicator->setGeometry(
					 widgetWidth-2*24-11, 2, 8, 28 );
	m_activityIndicator->show();
	connect( m_activityIndicator, SIGNAL( pressed() ),
				this, SLOT( activityIndicatorPressed() ) );
	connect( m_activityIndicator, SIGNAL( released() ),
				this, SLOT( activityIndicatorReleased() ) );
	connect( _it, SIGNAL( newNote() ),
			 m_activityIndicator, SLOT( activate() ) );
	connect( &_it->m_mutedModel, SIGNAL( dataChanged() ), this, SLOT( muteChanged() ) );

	setModel( _it );
}
コード例 #10
0
ファイル: sounds.cpp プロジェクト: alinelena/cameraplus
void Sounds::setMuted(bool mute) {
  if (mute != m_muted) {
    m_muted = mute;
    emit muteChanged();
  }
}