bugfixes and some small new features

git-svn-id: https://lmms.svn.sf.net/svnroot/lmms/trunk/lmms@89 0778d3d1-df1d-0410-868b-ea421aaaa00d
This commit is contained in:
Tobias Doerffel
2006-02-23 11:14:15 +00:00
parent c77af5f46f
commit 1ef530bde2
115 changed files with 1059 additions and 263 deletions

View File

@@ -1,3 +1,5 @@
#ifndef SINGLE_SOURCE_COMPILE
/*
* audio_alsa.cpp - device-class which implements ALSA-PCM-output
*
@@ -488,3 +490,5 @@ void audioALSA::setupWidget::saveSettings( void )
#endif
#endif

View File

@@ -1,3 +1,5 @@
#ifndef SINGLE_SOURCE_COMPILE
/*
* audio_device.cpp - base-class for audio-devices used by LMMS-mixer
*
@@ -333,3 +335,5 @@ void FASTCALL audioDevice::clearS16Buffer( int_sample_t * _outbuf,
memset( _outbuf, 0, _frames * channels() * BYTES_PER_INT_SAMPLE );
}
#endif

View File

@@ -1,3 +1,5 @@
#ifndef SINGLE_SOURCE_COMPILE
/*
* audio_file_device.cpp - base-class for audio-device-classes which write
* their output into a file
@@ -105,3 +107,5 @@ void audioFileDevice::seekToBegin( void )
m_outputFile.seek( 0 );
}
#endif

View File

@@ -1,3 +1,5 @@
#ifndef SINGLE_SOURCE_COMPILE
/*
* audio_file_ogg.cpp - audio-device which encodes wave-stream and writes it
* into an OGG-file. This is used for song-export.
@@ -257,3 +259,5 @@ void audioFileOgg::finishEncoding( void )
#endif
#endif

View File

@@ -1,3 +1,5 @@
#ifndef SINGLE_SOURCE_COMPILE
/*
* audio_file_wave.cpp - audio-device which encodes wave-stream and writes it
* into a WAVE-file. This is used for song-export.
@@ -120,3 +122,5 @@ void audioFileWave::finishEncoding( void )
writeData( &m_waveFileHeader, sizeof( m_waveFileHeader ) );
}
#endif

View File

@@ -1,3 +1,5 @@
#ifndef SINGLE_SOURCE_COMPILE
/*
* audio_jack.cpp - support for JACK-transport
*
@@ -476,4 +478,6 @@ void audioJACK::setupWidget::saveSettings( void )
}
#endif
#endif

View File

@@ -1,3 +1,5 @@
#ifndef SINGLE_SOURCE_COMPILE
/*
* audio_oss.cpp - device-class that implements OSS-PCM-output
*
@@ -383,3 +385,5 @@ void audioOSS::setupWidget::saveSettings( void )
#endif
#endif

View File

@@ -1,3 +1,5 @@
#ifndef SINGLE_SOURCE_COMPILE
/*
* audio_port.cpp - base-class for objects providing sound at a port
*
@@ -102,3 +104,5 @@ void audioPort::setName( const QString & _name )
eng()->getMixer()->audioDev()->renamePort( this );
}
#endif

View File

@@ -1,3 +1,5 @@
#ifndef SINGLE_SOURCE_COMPILE
/*
* audio_sample_recorder.cpp - device-class that implements recording
* surround-audio-buffers into RAM, maybe later
@@ -113,3 +115,5 @@ void audioSampleRecorder::writeBuffer( const surroundSampleFrame * _ab,
}
#endif

View File

@@ -1,3 +1,5 @@
#ifndef SINGLE_SOURCE_COMPILE
/*
* audio_sdl.cpp - device-class that performs PCM-output via SDL
*
@@ -184,4 +186,6 @@ void audioSDL::setupWidget::saveSettings( void )
}
#endif
#endif

View File

@@ -1,3 +1,5 @@
#ifndef SINGLE_SOURCE_COMPILE
/*
* about_dialog.cpp - implementation of about-dialog
*
@@ -149,3 +151,5 @@ void aboutDialog::resizeEvent( QResizeEvent * _re )
#include "about_dialog.moc"
#endif

View File

@@ -1,3 +1,5 @@
#ifndef SINGLE_SOURCE_COMPILE
/*
* arp_and_chords_tab_widget.cpp - widget for use in arp/chord-tab of
* channel-window
@@ -224,8 +226,8 @@ arpAndChordsTabWidget::arpAndChordsTabWidget( channelTrack * _channel_track ) :
m_chordRangeKnob = new knob( knobBright_26, m_chordsGroupBox,
tr( "Chord range" ), eng() );
m_chordRangeKnob->setLabel( tr( "RANGE" ) );
m_chordRangeKnob->setRange( 1.0, 9.0, 1.0 );
m_chordRangeKnob->setValue( 1.0, TRUE );
m_chordRangeKnob->setRange( 1.0f, 9.0f, 1.0f );
m_chordRangeKnob->setInitValue( 1.0f );
m_chordRangeKnob->move( 164, 24 );
m_chordRangeKnob->setHintText( tr( "Chord range:" ) + " ", " " +
tr( "octave(s)" ) );
@@ -276,8 +278,8 @@ arpAndChordsTabWidget::arpAndChordsTabWidget( channelTrack * _channel_track ) :
m_arpRangeKnob = new knob( knobBright_26, m_arpGroupBox,
tr( "Arpeggio range" ), eng() );
m_arpRangeKnob->setLabel( tr( "RANGE" ) );
m_arpRangeKnob->setRange( 1.0, 9.0, 1.0 );
m_arpRangeKnob->setValue( 1.0, TRUE );
m_arpRangeKnob->setRange( 1.0f, 9.0f, 1.0f );
m_arpRangeKnob->setInitValue( 1.0f );
m_arpRangeKnob->move( 164, 24 );
m_arpRangeKnob->setHintText( tr( "Arpeggio range:" ) + " ", " " +
tr( "octave(s)" ) );
@@ -293,8 +295,8 @@ arpAndChordsTabWidget::arpAndChordsTabWidget( channelTrack * _channel_track ) :
m_arpTimeKnob = new tempoSyncKnob( knobBright_26, m_arpGroupBox,
tr( "Arpeggio time" ), eng() );
m_arpTimeKnob->setLabel( tr( "TIME" ) );
m_arpTimeKnob->setRange( 10.0, 1000.0, 1.0 );
m_arpTimeKnob->setValue( 100.0, TRUE );
m_arpTimeKnob->setRange( 10.0f, 1000.0f, 1.0f );
m_arpTimeKnob->setInitValue( 100.0f );
m_arpTimeKnob->move( 164, 70 );
m_arpTimeKnob->setHintText( tr( "Arpeggio time:" ) + " ", " " +
tr( "ms" ) );
@@ -310,8 +312,8 @@ arpAndChordsTabWidget::arpAndChordsTabWidget( channelTrack * _channel_track ) :
m_arpGateKnob = new knob( knobBright_26, m_arpGroupBox,
tr( "Arpeggio gate" ), eng() );
m_arpGateKnob->setLabel( tr( "GATE" ) );
m_arpGateKnob->setRange( 1.0, 200.0, 1.0 );
m_arpGateKnob->setValue( 100.0, TRUE );
m_arpGateKnob->setRange( 1.0f, 200.0f, 1.0f );
m_arpGateKnob->setInitValue( 100.0f );
m_arpGateKnob->move( 204, 70 );
m_arpGateKnob->setHintText( tr( "Arpeggio gate:" ) + " ", tr( "%" ) );
#ifdef QT4
@@ -595,7 +597,7 @@ void arpAndChordsTabWidget::processNote( notePlayHandle * _n )
// range-checking
if( sub_note_key >= NOTES_PER_OCTAVE * OCTAVES ||
sub_note_key < 0 )
sub_note_key < 0 || eng()->getMixer()->criticalXRuns() )
{
continue;
}
@@ -766,3 +768,5 @@ void arpAndChordsTabWidget::arpRandomToggled( bool _on )
#include "arp_and_chords_tab_widget.moc"
#endif

View File

@@ -1,3 +1,5 @@
#ifndef SINGLE_SOURCE_COMPILE
/*
* bb_editor.cpp - basic main-window for editing of beats and basslines
*
@@ -82,7 +84,7 @@ bbEditor::bbEditor( engine * _engine ) :
setWindowIcon( embed::getIconPixmap( "bb_track" ) );
setWindowTitle( tr( "Beat+Bassline Editor" ) );
setWindowTitle( tr( "Beat+Baseline Editor" ) );
setMinimumWidth( TRACK_OP_WIDTH + DEFAULT_SETTINGS_WIDGET_WIDTH +
BBE_PPT + 2 * TCO_BORDER_WIDTH +
DEFAULT_SCROLLBAR_SIZE );
@@ -477,3 +479,5 @@ void bbEditor::swapBB( csize _bb1, csize _bb2 )
#include "bb_editor.moc"
#endif

View File

@@ -1,3 +1,5 @@
#ifndef SINGLE_SOURCE_COMPILE
/*
* config_mgr.cpp - implementation of class configManager
*
@@ -932,3 +934,5 @@ void configManager::processFilesRecursively( const QString & _src_dir,
#include "config_mgr.moc"
#endif

View File

@@ -1,3 +1,5 @@
#ifndef SINGLE_SOURCE_COMPILE
/*
* engine.cpp - implementation of LMMS' engine-system
*
@@ -61,9 +63,9 @@ engine::~engine()
{
m_mixer->stopProcessing();
delete m_projectNotes;
delete m_pianoRoll;
delete m_songEditor;
delete m_bbEditor;
delete m_pianoRoll;
presetPreviewPlayHandle::cleanUp( this );
@@ -92,3 +94,5 @@ engineObject::~engineObject()
{
}
#endif

View File

@@ -1,3 +1,5 @@
#ifndef SINGLE_SOURCE_COMPILE
/*
* envelope_and_lfo_widget.cpp - widget which is m_used by envelope/lfo/filter-
* tab of channel-window
@@ -145,7 +147,7 @@ envelopeAndLFOWidget::envelopeAndLFOWidget( float _value_for_zero_amount,
eng() );
m_predelayKnob->setLabel( tr( "DEL" ) );
m_predelayKnob->setRange( 0.0, 1.0, 0.001 );
m_predelayKnob->setValue( 0.0, TRUE );
m_predelayKnob->setInitValue( 0.0 );
m_predelayKnob->move( PREDELAY_KNOB_X, ENV_KNOBS_Y );
m_predelayKnob->setHintText( tr( "Predelay:" ) + " ", "" );
#ifdef QT4
@@ -163,7 +165,7 @@ envelopeAndLFOWidget::envelopeAndLFOWidget( float _value_for_zero_amount,
eng() );
m_attackKnob->setLabel( tr( "ATT" ) );
m_attackKnob->setRange( 0.0, 1.0, 0.001 );
m_attackKnob->setValue( 0.0, TRUE );
m_attackKnob->setInitValue( 0.0 );
m_attackKnob->move( ATTACK_KNOB_X, ENV_KNOBS_Y );
m_attackKnob->setHintText( tr( "Attack:" )+" ", "" );
#ifdef QT4
@@ -182,7 +184,7 @@ envelopeAndLFOWidget::envelopeAndLFOWidget( float _value_for_zero_amount,
m_holdKnob = new knob( knobBright_26, this, tr( "Hold-time" ), eng() );
m_holdKnob->setLabel( tr( "HOLD" ) );
m_holdKnob->setRange( 0.0, 1.0, 0.001 );
m_holdKnob->setValue( 0.5, TRUE );
m_holdKnob->setInitValue( 0.5 );
m_holdKnob->move( HOLD_KNOB_X, ENV_KNOBS_Y );
m_holdKnob->setHintText( tr( "Hold:" ) + " ", "" );
#ifdef QT4
@@ -201,7 +203,7 @@ envelopeAndLFOWidget::envelopeAndLFOWidget( float _value_for_zero_amount,
eng() );
m_decayKnob->setLabel( tr( "DEC" ) );
m_decayKnob->setRange( 0.0, 1.0, 0.001 );
m_decayKnob->setValue( 0.5, TRUE );
m_decayKnob->setInitValue( 0.5 );
m_decayKnob->move( DECAY_KNOB_X, ENV_KNOBS_Y );
m_decayKnob->setHintText( tr( "Decay:" ) + " ", "" );
#ifdef QT4
@@ -221,7 +223,7 @@ envelopeAndLFOWidget::envelopeAndLFOWidget( float _value_for_zero_amount,
eng() );
m_sustainKnob->setLabel( tr( "SUST" ) );
m_sustainKnob->setRange( 0.0, 1.0, 0.001 );
m_sustainKnob->setValue( 0.5, TRUE );
m_sustainKnob->setInitValue( 0.5 );
m_sustainKnob->move( SUSTAIN_KNOB_X, ENV_KNOBS_Y );
m_sustainKnob->setHintText( tr( "Sustain:" ) + " ", "" );
#ifdef QT4
@@ -240,7 +242,7 @@ envelopeAndLFOWidget::envelopeAndLFOWidget( float _value_for_zero_amount,
eng() );
m_releaseKnob->setLabel( tr( "REL" ) );
m_releaseKnob->setRange( 0.0, 1.0, 0.001 );
m_releaseKnob->setValue( 0.1, TRUE );
m_releaseKnob->setInitValue( 0.1 );
m_releaseKnob->move( RELEASE_KNOB_X, ENV_KNOBS_Y );
m_releaseKnob->setHintText( tr( "Release:" ) + " ", "" );
#ifdef QT4
@@ -260,7 +262,7 @@ envelopeAndLFOWidget::envelopeAndLFOWidget( float _value_for_zero_amount,
tr( "Modulation amount" ), eng() );
m_amountKnob->setLabel( tr( "AMT" ) );
m_amountKnob->setRange( -1.0, 1.0, 0.005 );
m_amountKnob->setValue( 0.0, TRUE );
m_amountKnob->setInitValue( 0.0 );
m_amountKnob->move( AMOUNT_KNOB_X, ENV_GRAPH_Y );
m_amountKnob->setHintText( tr( "Modulation amount:" ) + " ", "" );
#ifdef QT4
@@ -281,7 +283,7 @@ envelopeAndLFOWidget::envelopeAndLFOWidget( float _value_for_zero_amount,
tr( "LFO-predelay-time" ), eng() );
m_lfoPredelayKnob->setLabel( tr( "DEL" ) );
m_lfoPredelayKnob->setRange( 0.0, 1.0, 0.001 );
m_lfoPredelayKnob->setValue( 0.0, TRUE );
m_lfoPredelayKnob->setInitValue( 0.0 );
m_lfoPredelayKnob->move( LFO_PREDELAY_KNOB_X, LFO_KNOB_Y );
m_lfoPredelayKnob->setHintText( tr( "LFO-predelay:" ) + " ", "" );
#ifdef QT4
@@ -299,7 +301,7 @@ envelopeAndLFOWidget::envelopeAndLFOWidget( float _value_for_zero_amount,
tr( "LFO-attack-time" ), eng() );
m_lfoAttackKnob->setLabel( tr( "ATT" ) );
m_lfoAttackKnob->setRange( 0.0, 1.0, 0.001 );
m_lfoAttackKnob->setValue( 0.0, TRUE );
m_lfoAttackKnob->setInitValue( 0.0 );
m_lfoAttackKnob->move( LFO_ATTACK_KNOB_X, LFO_KNOB_Y );
m_lfoAttackKnob->setHintText( tr( "LFO-attack:" ) + " ", "" );
#ifdef QT4
@@ -317,7 +319,7 @@ envelopeAndLFOWidget::envelopeAndLFOWidget( float _value_for_zero_amount,
tr( "LFO-speed" ), eng(), 20000.0 );
m_lfoSpeedKnob->setLabel( tr( "SPD" ) );
m_lfoSpeedKnob->setRange( 0.01, 1.0, 0.0001 );
m_lfoSpeedKnob->setValue( 0.1, TRUE );
m_lfoSpeedKnob->setInitValue( 0.1 );
m_lfoSpeedKnob->move( LFO_SPEED_KNOB_X, LFO_KNOB_Y );
m_lfoSpeedKnob->setHintText( tr( "LFO-speed:" ) + " ", "" );
#ifdef QT4
@@ -335,7 +337,7 @@ envelopeAndLFOWidget::envelopeAndLFOWidget( float _value_for_zero_amount,
tr( "LFO-modulation-amount" ), eng() );
m_lfoAmountKnob->setLabel( tr( "AMT" ) );
m_lfoAmountKnob->setRange( -1.0, 1.0, 0.005 );
m_lfoAmountKnob->setValue( 0.0, TRUE );
m_lfoAmountKnob->setInitValue( 0.0 );
m_lfoAmountKnob->move( LFO_AMOUNT_KNOB_X, LFO_KNOB_Y );
m_lfoAmountKnob->setHintText( tr( "Modulation amount:" ) + " ", "" );
#ifdef QT4
@@ -1217,3 +1219,5 @@ void envelopeAndLFOWidget::lfoUserWaveCh( bool _on )
#include "envelope_and_lfo_widget.moc"
#endif

View File

@@ -1,3 +1,5 @@
#ifndef SINGLE_SOURCE_COMPILE
/*
* envelope_tab_widget.cpp - widget for use in envelope/lfo/filter-tab of
* channel-window
@@ -178,7 +180,7 @@ envelopeTabWidget::envelopeTabWidget( channelTrack * _channel_track ) :
m_filterCutKnob->setLabel( tr( "CUTOFF" ) );
m_filterCutKnob->setRange( 0.0, 16000.0, 1.0 );
m_filterCutKnob->move( 140, 18 );
m_filterCutKnob->setValue( 16000.0, TRUE );
m_filterCutKnob->setInitValue( 16000.0 );
m_filterCutKnob->setHintText( tr( "cutoff-frequency:" ) + " ", " " +
tr( "Hz" ) );
#ifdef QT4
@@ -198,7 +200,7 @@ envelopeTabWidget::envelopeTabWidget( channelTrack * _channel_track ) :
m_filterResKnob->setLabel( tr( "Q/RESO" ) );
m_filterResKnob->setRange( 0.01, 10.0, 0.01 );
m_filterResKnob->move( 190, 18 );
m_filterResKnob->setValue( 0.5, TRUE );
m_filterResKnob->setInitValue( 0.5 );
m_filterResKnob->setHintText( tr( "Q/Resonance:" ) + " ", "" );
#ifdef QT4
m_filterResKnob->setWhatsThis(
@@ -617,3 +619,5 @@ return res;
}
*/
#endif

View File

@@ -1,3 +1,5 @@
#ifndef SINGLE_SOURCE_COMPILE
/*
* export_project_dialog.cpp - implementation of dialog for exporting project
*
@@ -469,3 +471,5 @@ void exportProjectDialog::finishProjectExport( void )
#include "export_project_dialog.moc"
#endif

View File

@@ -1,3 +1,5 @@
#ifndef SINGLE_SOURCE_COMPILE
/*
* file_browser.cpp - implementation of the project-, preset- and
* sample-file-browser
@@ -830,3 +832,5 @@ void fileItem::determineFileType( void )
#include "file_browser.moc"
#endif

View File

@@ -1,3 +1,5 @@
#ifndef SINGLE_SOURCE_COMPILE
/*
* instrument.cpp - base-class for all instrument-plugins (synths, samplers etc)
*
@@ -97,3 +99,5 @@ instrument * instrument::instantiate( const QString & _plugin_name,
return( new dummyInstrument( _channel_track ) );
}
#endif

View File

@@ -1,3 +1,5 @@
#ifndef SINGLE_SOURCE_COMPILE
/*
* main.cpp - just main.cpp which is starting up app...
*
@@ -256,3 +258,5 @@ int main( int argc, char * * argv )
return( app.exec() );
}
#endif

View File

@@ -1,3 +1,5 @@
#ifndef SINGLE_SOURCE_COMPILE
/*
* main_window.cpp - implementation of LMMS-main-window
*
@@ -315,7 +317,7 @@ void mainWindow::finalize( void )
// window-toolbar
toolButton * bb_editor_window = new toolButton(
embed::getIconPixmap( "bb_track" ),
tr( "Show/hide Beat+Bassline Editor" ) +
tr( "Show/hide Beat+Baseline Editor" ) +
" (F6)",
this, SLOT( toggleBBEditorWin() ),
m_toolBar );
@@ -326,10 +328,10 @@ void mainWindow::finalize( void )
QWhatsThis::add( bb_editor_window,
#endif
tr( "By pressing this button, you can show or hide the "
"Beat+Bassline Editor. The Beat+Bassline Editor is "
"Beat+Baseline Editor. The Beat+Baesline Editor is "
"needed for setting beats, opening, adding and "
"removing channels, cutting, copying and pasting "
"beat- and bassline-patterns and other things like "
"beat- and baseline-patterns and other things like "
"that." ) );
@@ -503,7 +505,8 @@ void mainWindow::finalize( void )
if( !configManager::inst()->value( "app", "configured" ).toInt() )
{
// no, so show it that user can setup everything
setupDialog( eng() ).exec();
setupDialog sd( eng() );
sd.exec();
configManager::inst()->setValue( "app", "configured", "1" );
}
// look whether mixer could use a audio-interface beside audioDummy
@@ -704,7 +707,8 @@ bool mainWindow::saveProjectAs( void )
void mainWindow::showSettingsDialog( void )
{
setupDialog( eng() ).exec();
setupDialog sd( eng() );
sd.exec();
}
@@ -862,3 +866,5 @@ void mainWindow::keyReleaseEvent( QKeyEvent * _ke )
#include "main_window.moc"
#endif

View File

@@ -1,3 +1,5 @@
#ifndef SINGLE_SOURCE_COMPILE
/*
* midi_tab_widget.cpp - tab-widget in channel-track-window for setting up
* MIDI-related stuff
@@ -613,3 +615,5 @@ void midiTabWidget::activatedWriteablePort( QAction * ) { }
#include "midi_tab_widget.moc"
#endif

View File

@@ -1,3 +1,5 @@
#ifndef SINGLE_SOURCE_COMPILE
/*
* mixer.cpp - audio-device-independent mixer for LMMS
*
@@ -137,7 +139,7 @@ void mixer::stopProcessing( void )
bool mixer::criticalXRuns( void ) const
{
return( ( m_cpuLoad >= 98 &&
return( ( m_cpuLoad >= 99 &&
eng()->getSongEditor()->realTimeTask() == TRUE ) );
}
@@ -239,7 +241,8 @@ const surroundSampleFrame * mixer::renderNextBuffer( void )
const float new_cpu_load = timer.elapsed() / 10000.0f * sampleRate() /
m_framesPerAudioBuffer;
m_cpuLoad = tLimit( (int) ( new_cpu_load + m_cpuLoad ) / 2, 0, 100 );
m_cpuLoad = tLimit( (int) ( new_cpu_load * 0.1f + m_cpuLoad * 0.9f ), 0,
100 );
return( m_curBuf );
}
@@ -578,3 +581,5 @@ void mixer::processBuffer( const surroundSampleFrame * _buf,
#include "mixer.moc"
#endif

View File

@@ -1,3 +1,5 @@
#ifndef SINGLE_SOURCE_COMPILE
/*
* name_label.cpp - implementation of class nameLabel, a label which
* is renamable by double-clicking it
@@ -268,6 +270,10 @@ void nameLabel::paintEvent( QPaintEvent * )
x += 4 + pm.width();
}
p.setPen( QColor( 16, 16, 16 ) );
p.drawText( x+1, height() / 2 + p.fontMetrics().height() / 2 - 3,
text() );
p.setPen( QColor( 0, 224, 0 ) );
bbTrack * bbt = bbTrack::findBBTrack(
eng()->getBBEditor()->currentBB(), eng() );
@@ -290,3 +296,5 @@ void nameLabel::paintEvent( QPaintEvent * )
#include "name_label.moc"
#endif

View File

@@ -1,3 +1,5 @@
#ifndef SINGLE_SOURCE_COMPILE
/*
* note.cpp - implementation of class note
*
@@ -35,6 +37,7 @@
#endif
#include <math.h>
#include "debug.h"
#include "note.h"
@@ -83,7 +86,7 @@ void note::setPos( const midiTime & _pos )
void note::setTone( tones _tone )
void note::setTone( const tones _tone )
{
if( _tone >= C && _tone <= H )
{
@@ -101,7 +104,7 @@ void note::setTone( tones _tone )
void note::setOctave( octaves _octave )
void note::setOctave( const octaves _octave )
{
if( _octave >= MIN_OCTAVE && _octave <= MAX_OCTAVE )
{
@@ -119,7 +122,7 @@ void note::setOctave( octaves _octave )
void note::setKey( int _key )
void note::setKey( const int _key )
{
setTone( static_cast<tones>( _key % NOTES_PER_OCTAVE ) );
setOctave( static_cast<octaves>( _key / NOTES_PER_OCTAVE ) );
@@ -128,7 +131,7 @@ void note::setKey( int _key )
void note::setVolume( volume _volume )
void note::setVolume( const volume _volume )
{
if( _volume <= MAX_VOLUME )
{
@@ -146,7 +149,7 @@ void note::setVolume( volume _volume )
void note::setPanning( panning _panning )
void note::setPanning( const panning _panning )
{
if( _panning >= PANNING_LEFT && _panning <= PANNING_RIGHT )
{
@@ -155,7 +158,7 @@ void note::setPanning( panning _panning )
#ifdef LMMS_DEBUG
else
{
printf ("Paning out of range (note::set_panning)\n");
printf( "Paning out of range (note::setPanning)\n" );
}
#endif
}
@@ -163,6 +166,39 @@ void note::setPanning( panning _panning )
inline midiTime note::quantized( const midiTime & _m, const int _q_grid )
{
float p = ( (float) _m / _q_grid );
if( p - floorf( p ) < 0.5f )
{
return( static_cast<int>( p ) * _q_grid );
}
return( static_cast<int>( p + 1 ) * _q_grid );
}
void note::quantizeLength( const int _q_grid )
{
setLength( quantized( length(), _q_grid ) );
if( length() == 0 )
{
setLength( _q_grid );
}
}
void note::quantizePos( const int _q_grid )
{
setPos( quantized( pos(), _q_grid ) );
}
void note::saveSettings( QDomDocument & _doc, QDomElement & _parent )
{
QDomElement note_de = _doc.createElement( "note" );
@@ -188,3 +224,8 @@ void note::loadSettings( const QDomElement & _this )
m_pos = _this.attribute( "pos" ).toInt();
}
#endif

View File

@@ -1,3 +1,5 @@
#ifndef SINGLE_SOURCE_COMPILE
/*
* note_play_handle.cpp - implementation of class notePlayHandle, part of
* play-engine
@@ -381,3 +383,5 @@ bool notePlayHandle::operator==( const notePlayHandle & _nph ) const
}
#endif

View File

@@ -1,3 +1,5 @@
#ifndef SINGLE_SOURCE_COMPILE
/*
* piano_roll.cpp - implementation of piano-roll which is used for actual
* writing of melodies
@@ -391,7 +393,6 @@ pianoRoll::pianoRoll( engine * _engine ) :
// setup zooming-stuff
m_zoomingComboBox = new comboBox( m_toolBar );
m_zoomingComboBox->setFixedSize( 80, 22 );
m_zoomingComboBox->move( 580, 4 );
for( int i = 0; i < 6; ++i )
{
m_zoomingComboBox->addItem( QString::number( 25 *
@@ -404,6 +405,38 @@ pianoRoll::pianoRoll( engine * _engine ) :
this, SLOT( zoomingChanged( const QString & ) ) );
// setup quantize-stuff
QLabel * quantize_lbl = new QLabel( m_toolBar );
quantize_lbl->setPixmap( embed::getIconPixmap( "quantize" ) );
m_quantizeComboBox = new comboBox( m_toolBar );
m_quantizeComboBox->setFixedSize( 60, 22 );
for( int i = 0; i < 7; ++i )
{
m_quantizeComboBox->addItem( "1/" + QString::number(
static_cast<int>( powf( 2.0f, i ) ) ) );
}
m_quantizeComboBox->setCurrentIndex( m_quantizeComboBox->findText(
"1/16" ) );
// setup note-len-stuff
QLabel * note_len_lbl = new QLabel( m_toolBar );
note_len_lbl->setPixmap( embed::getIconPixmap( "note" ) );
m_noteLenComboBox = new comboBox( m_toolBar );
m_noteLenComboBox->setFixedSize( 120, 22 );
m_noteLenComboBox->addItem( tr( "Last note" ),
embed::getIconPixmap( "edit_draw" ) );
const QString pixmaps[] = { "whole", "half", "quarter", "eighth",
"sixteenth", "thirtysecond" } ;
for( int i = 0; i < 6; ++i )
{
m_noteLenComboBox->addItem( "1/" + QString::number(
static_cast<int>( powf( 2.0f, i ) ) ),
embed::getIconPixmap( "note_" + pixmaps[i] ) );
}
m_noteLenComboBox->setCurrentIndex( 0 );
tb_layout->addSpacing( 5 );
tb_layout->addWidget( m_playButton );
@@ -422,8 +455,16 @@ pianoRoll::pianoRoll( engine * _engine ) :
m_timeLine->addToolButtons( m_toolBar );
tb_layout->addSpacing( 15 );
tb_layout->addWidget( zoom_lbl );
tb_layout->addSpacing( 5 );
tb_layout->addSpacing( 4 );
tb_layout->addWidget( m_zoomingComboBox );
tb_layout->addSpacing( 10 );
tb_layout->addWidget( quantize_lbl );
tb_layout->addSpacing( 4 );
tb_layout->addWidget( m_quantizeComboBox );
tb_layout->addSpacing( 10 );
tb_layout->addWidget( note_len_lbl );
tb_layout->addSpacing( 4 );
tb_layout->addWidget( m_noteLenComboBox );
tb_layout->addStretch();
// setup our actual window
@@ -1178,7 +1219,7 @@ void pianoRoll::mousePressEvent( QMouseEvent * _me )
// then set new note
midiTime note_pos( pos_tact_64th );
midiTime note_len( m_lenOfNewNotes );
midiTime note_len( newNoteLen() );
note new_note( note_len, note_pos,
(tones)( key_num %
@@ -1472,8 +1513,10 @@ void pianoRoll::mouseMoveEvent( QMouseEvent * _me )
{
tact_64th_diff = 1;
}
m_lenOfNewNotes = midiTime( tact_64th_diff );
m_currentNote->setLength( m_lenOfNewNotes );
m_currentNote->setLength( midiTime(
tact_64th_diff ) );
m_currentNote->quantizeLength( quantization() );
m_lenOfNewNotes = m_currentNote->length();
m_pattern->update();
}
@@ -2075,6 +2118,7 @@ void pianoRoll::recordNote( const note & _n )
note n( _n );
n.setPos( eng()->getSongEditor()->getPlayPos(
songEditor::PLAY_PATTERN ) - n.length() );
n.quantizeLength( quantization() );
#ifndef QT4
qApp->lock();
#endif
@@ -2430,5 +2474,30 @@ void pianoRoll::zoomingChanged( const QString & _zfac )
int pianoRoll::quantization( void ) const
{
return( 64 / m_quantizeComboBox->currentText().right(
m_quantizeComboBox->currentText().length() -
2 ).toInt() );
}
midiTime pianoRoll::newNoteLen( void ) const
{
if( m_noteLenComboBox->currentIndex() == 0 )
{
return( m_lenOfNewNotes );
}
return( 64 / m_noteLenComboBox->currentText().right(
m_noteLenComboBox->currentText().length() -
2 ).toInt() );
}
#include "piano_roll.moc"
#endif

View File

@@ -1,3 +1,5 @@
#ifndef SINGLE_SOURCE_COMPILE
/*
* piano_widget.cpp - implementation of piano-widget used in channel-window
* for testing channel
@@ -68,10 +70,10 @@ QPixmap * pianoWidget::s_blackKeyPressedPm = NULL;
const int PIANO_BASE = 11;
const int WHITE_KEY_WIDTH = 10;
const int BLACK_KEY_WIDTH = 8;
const int WHITE_KEY_HEIGHT = 57;
const int BLACK_KEY_HEIGHT = 38;
const int PW_WHITE_KEY_WIDTH = 10;
const int PW_BLACK_KEY_WIDTH = 8;
const int PW_WHITE_KEY_HEIGHT = 57;
const int PW_BLACK_KEY_HEIGHT = 38;
const int LABEL_TEXT_SIZE = 7;
@@ -127,7 +129,8 @@ pianoWidget::pianoWidget (channelTrack * _parent ) :
OCTAVE_3 * WHITE_KEYS_PER_OCTAVE,
Qt::Horizontal, this );
#endif
m_pianoScroll->setGeometry( 0, PIANO_BASE+WHITE_KEY_HEIGHT, 250, 16 );
m_pianoScroll->setGeometry( 0, PIANO_BASE + PW_WHITE_KEY_HEIGHT, 250,
16 );
// ...and connect it to this widget...
connect( m_pianoScroll, SIGNAL( valueChanged( int ) ), this,
SLOT( pianoScrolled( int ) ) );
@@ -152,7 +155,7 @@ pianoWidget::~pianoWidget()
int pianoWidget::getKeyFromMouse( const QPoint & _p )
{
int key_num = (int)( (float) _p.x() / (float) WHITE_KEY_WIDTH );
int key_num = (int)( (float) _p.x() / (float) PW_WHITE_KEY_WIDTH );
for( int i = 0; i <= key_num; ++i )
{
@@ -167,23 +170,25 @@ int pianoWidget::getKeyFromMouse( const QPoint & _p )
key_num += m_startOctave * NOTES_PER_OCTAVE + m_startTone;
// is it a black key?
if( _p.y() < PIANO_BASE + BLACK_KEY_HEIGHT )
if( _p.y() < PIANO_BASE + PW_BLACK_KEY_HEIGHT )
{
// then do extra checking whether the mouse-cursor is over
// a black key
if( key_num > 0 &&
KEY_ORDER[( key_num - 1 ) % NOTES_PER_OCTAVE] ==
BLACK_KEY &&
_p.x() % WHITE_KEY_WIDTH <= ( WHITE_KEY_WIDTH / 2 ) -
( BLACK_KEY_WIDTH / 2 ) )
_p.x() % PW_WHITE_KEY_WIDTH <=
( PW_WHITE_KEY_WIDTH / 2 ) -
( PW_BLACK_KEY_WIDTH / 2 ) )
{
--key_num;
}
if( key_num < NOTES_PER_OCTAVE * OCTAVES - 1 &&
KEY_ORDER[( key_num + 1 ) % NOTES_PER_OCTAVE] ==
BLACK_KEY &&
_p.x() % WHITE_KEY_WIDTH >=
( WHITE_KEY_WIDTH - BLACK_KEY_WIDTH / 2 ) )
_p.x() % PW_WHITE_KEY_WIDTH >=
( PW_WHITE_KEY_WIDTH -
PW_BLACK_KEY_WIDTH / 2 ) )
{
++key_num;
}
@@ -223,7 +228,7 @@ void pianoWidget::mousePressEvent( QMouseEvent * _me )
volume vol = (volume)( ( float ) y_diff /
( ( KEY_ORDER[key_num % NOTES_PER_OCTAVE] ==
WHITE_KEY ) ?
WHITE_KEY_HEIGHT : BLACK_KEY_HEIGHT ) *
PW_WHITE_KEY_HEIGHT : PW_BLACK_KEY_HEIGHT ) *
(float) DEFAULT_VOLUME);
if( y_diff < 0 )
{
@@ -232,7 +237,7 @@ void pianoWidget::mousePressEvent( QMouseEvent * _me )
else if( y_diff > ( ( KEY_ORDER[key_num %
NOTES_PER_OCTAVE] ==
WHITE_KEY ) ?
WHITE_KEY_HEIGHT : BLACK_KEY_HEIGHT ) )
PW_WHITE_KEY_HEIGHT : PW_BLACK_KEY_HEIGHT ) )
{
vol = DEFAULT_VOLUME;
}
@@ -284,7 +289,7 @@ void pianoWidget::mouseMoveEvent( QMouseEvent * _me )
int y_diff = _me->pos().y() - PIANO_BASE;
volume vol = (volume)( (float) y_diff /
( ( KEY_ORDER[key_num % NOTES_PER_OCTAVE] == WHITE_KEY ) ?
WHITE_KEY_HEIGHT : BLACK_KEY_HEIGHT ) *
PW_WHITE_KEY_HEIGHT : PW_BLACK_KEY_HEIGHT ) *
(float)DEFAULT_VOLUME );
// maybe the user moved the mouse-cursor above or under the
// piano-widget while holding left button so check that and
@@ -295,7 +300,7 @@ void pianoWidget::mouseMoveEvent( QMouseEvent * _me )
}
else if( y_diff >
( ( KEY_ORDER[key_num % NOTES_PER_OCTAVE] == WHITE_KEY ) ?
WHITE_KEY_HEIGHT : BLACK_KEY_HEIGHT ) )
PW_WHITE_KEY_HEIGHT : PW_BLACK_KEY_HEIGHT ) )
{
vol = DEFAULT_VOLUME;
}
@@ -454,7 +459,7 @@ int pianoWidget::getKeyX( int _key_num )
int k = m_startOctave*NOTES_PER_OCTAVE + m_startTone;
if( _key_num < k )
{
return( ( _key_num - k ) * WHITE_KEY_WIDTH / 2 );
return( ( _key_num - k ) * PW_WHITE_KEY_WIDTH / 2 );
}
int x = 0;
@@ -467,22 +472,22 @@ int pianoWidget::getKeyX( int _key_num )
++white_cnt;
if( white_cnt > 1 )
{
x += WHITE_KEY_WIDTH;
x += PW_WHITE_KEY_WIDTH;
}
else
{
x += WHITE_KEY_WIDTH/2;
x += PW_WHITE_KEY_WIDTH/2;
}
}
else
{
white_cnt = 0;
x += WHITE_KEY_WIDTH/2;
x += PW_WHITE_KEY_WIDTH/2;
}
++k;
}
x -= WHITE_KEY_WIDTH / 2;
x -= PW_WHITE_KEY_WIDTH / 2;
return( x );
@@ -497,7 +502,7 @@ void pianoWidget::paintEvent( QPaintEvent * )
QPainter p( this );
#else
// create pixmap for whole widget
QPixmap pm( rect().size() );//width(), PIANO_BASE+WHITE_KEY_HEIGHT);
QPixmap pm( rect().size() );//width(), PIANO_BASE+PW_WHITE_KEY_HEIGHT);
// and a painter for it
QPainter p( &pm, this );
#endif
@@ -522,14 +527,14 @@ void pianoWidget::paintEvent( QPaintEvent * )
m_channelTrack->baseOctave() * NOTES_PER_OCTAVE;
if( KEY_ORDER[base_key % NOTES_PER_OCTAVE] == WHITE_KEY )
{
p.fillRect( QRect( getKeyX( base_key ), 1, WHITE_KEY_WIDTH-1,
p.fillRect( QRect( getKeyX( base_key ), 1, PW_WHITE_KEY_WIDTH-1,
PIANO_BASE-2 ),
QColor( 0xFF, 0xBB, 0x00 ) );
}
else
{
p.fillRect( QRect( getKeyX( base_key ) + 1, 1,
BLACK_KEY_WIDTH - 1, PIANO_BASE - 2 ),
PW_BLACK_KEY_WIDTH - 1, PIANO_BASE - 2 ),
QColor( 0xFF, 0xBB, 0x00 ) );
}
@@ -555,13 +560,13 @@ void pianoWidget::paintEvent( QPaintEvent * )
p.drawPixmap( x, PIANO_BASE, *s_whiteKeyPm );
}
x += WHITE_KEY_WIDTH;
x += PW_WHITE_KEY_WIDTH;
if( (tones) (cur_key%NOTES_PER_OCTAVE) == C )
{
// label key of note C with "C" and number of current
// octave
p.drawText( x - WHITE_KEY_WIDTH, LABEL_TEXT_SIZE + 2,
p.drawText( x - PW_WHITE_KEY_WIDTH, LABEL_TEXT_SIZE + 2,
QString( "C" ) + QString::number(
cur_key / NOTES_PER_OCTAVE, 10 ) );
}
@@ -579,12 +584,12 @@ void pianoWidget::paintEvent( QPaintEvent * )
{
if( m_pressedKeys[s_key] == TRUE )
{
p.drawPixmap( 0 - WHITE_KEY_WIDTH / 2, PIANO_BASE,
p.drawPixmap( 0 - PW_WHITE_KEY_WIDTH / 2, PIANO_BASE,
*s_blackKeyPressedPm );
}
else
{
p.drawPixmap( 0 - WHITE_KEY_WIDTH / 2, PIANO_BASE,
p.drawPixmap( 0 - PW_WHITE_KEY_WIDTH / 2, PIANO_BASE,
*s_blackKeyPm );
}
}
@@ -598,16 +603,16 @@ void pianoWidget::paintEvent( QPaintEvent * )
// state of current key
if( m_pressedKeys[cur_key] == TRUE )
{
p.drawPixmap( x + WHITE_KEY_WIDTH / 2,
p.drawPixmap( x + PW_WHITE_KEY_WIDTH / 2,
PIANO_BASE,
*s_blackKeyPressedPm );
}
else
{
p.drawPixmap( x + WHITE_KEY_WIDTH / 2,
p.drawPixmap( x + PW_WHITE_KEY_WIDTH / 2,
PIANO_BASE, *s_blackKeyPm );
}
x += WHITE_KEY_WIDTH;
x += PW_WHITE_KEY_WIDTH;
white_cnt = 0;
}
else
@@ -617,7 +622,7 @@ void pianoWidget::paintEvent( QPaintEvent * )
++white_cnt;
if( white_cnt > 1 )
{
x += WHITE_KEY_WIDTH;
x += PW_WHITE_KEY_WIDTH;
}
}
++cur_key;
@@ -632,3 +637,5 @@ void pianoWidget::paintEvent( QPaintEvent * )
#include "piano_widget.moc"
#endif

View File

@@ -1,3 +1,5 @@
#ifndef SINGLE_SOURCE_COMPILE
/*
* plugin.cpp - implementation of plugin-class including plugin-loader
*
@@ -244,3 +246,5 @@ void plugin::getDescriptorsOfAvailPlugins( vvector<descriptor> & _plugin_descs )
#endif

View File

@@ -1,3 +1,5 @@
#ifndef SINGLE_SOURCE_COMPILE
/*
* plugin_browser.cpp - implementation of the plugin-browser
*
@@ -67,7 +69,7 @@ pluginBrowser::pluginBrowser( QWidget * _parent, engine * _engine ) :
QLabel * hint = new QLabel( tr( "You can drag an instrument-plugin "
"into either the Song-Editor, the "
"Beat+Bassline Editor or just into a "
"Beat+Baseline Editor or just into a "
"channel-window or on the "
"corresponding channel-button." ),
m_view );
@@ -268,3 +270,5 @@ void pluginDescWidget::mouseReleaseEvent( QMouseEvent * _me )
#include "plugin_browser.moc"
#endif

View File

@@ -1,3 +1,5 @@
#ifndef SINGLE_SOURCE_COMPILE
/*
* preset_preview_play_handle.cpp - implementation of class
* presetPreviewPlayHandle
@@ -227,3 +229,5 @@ constNotePlayHandleVector presetPreviewPlayHandle::nphsOfChannelTrack(
#endif

View File

@@ -1,3 +1,5 @@
#ifndef SINGLE_SOURCE_COMPILE
/*
* sample_play_handle.cpp - implementation of class samplePlayHandle
*
@@ -107,3 +109,5 @@ f_cnt_t samplePlayHandle::totalFrames( void ) const
return( m_sampleBuffer->endFrame() - m_sampleBuffer->startFrame() );
}
#endif

View File

@@ -1,3 +1,5 @@
#ifndef SINGLE_SOURCE_COMPILE
/*
* setup_dialog.cpp - dialog for setting up LMMS
*
@@ -869,3 +871,5 @@ void setupDialog::displayMIDIHelp( void )
#include "setup_dialog.moc"
#endif

View File

@@ -1,3 +1,5 @@
#ifndef SINGLE_SOURCE_COMPILE
/*
* song_editor.cpp - basic window for editing song
*
@@ -240,7 +242,7 @@ songEditor::songEditor( engine * _engine ) :
SLOT( masterPitchChanged( int ) ) );
connect( m_masterPitchSlider, SIGNAL( sliderPressed() ), this,
SLOT( masterPitchPressed() ) );
connect( m_masterPitchSlider, SIGNAL (sliderMoved( int) ), this,
connect( m_masterPitchSlider, SIGNAL( sliderMoved( int ) ), this,
SLOT( masterPitchMoved( int ) ) );
connect( m_masterPitchSlider, SIGNAL( sliderReleased() ), this,
SLOT( masterPitchReleased() ) );
@@ -1665,3 +1667,5 @@ void songEditor::loadSettings( const QDomElement & _this )
#include "song_editor.moc"
#endif

View File

@@ -1,3 +1,5 @@
#ifndef SINGLE_SOURCE_COMPILE
/*
* surround_area.cpp - a widget for setting position of a channel +
* calculation of volume for each speaker
@@ -241,3 +243,5 @@ void surroundArea::mouseReleaseEvent( QMouseEvent * )
#include "surround_area.moc"
#endif

View File

@@ -1,3 +1,5 @@
#ifndef SINGLE_SOURCE_COMPILE
/*
* timeline.cpp - class timeLine, representing a time-line with position marker
*
@@ -401,3 +403,5 @@ void timeLine::mouseReleaseEvent( QMouseEvent * _me )
#include "timeline.moc"
#endif

View File

@@ -1,3 +1,5 @@
#ifndef SINGLE_SOURCE_COMPILE
/*
* track.cpp - implementation of classes concerning tracks -> neccessary for
* all track-like objects (beat/bassline, sample-track...)
@@ -1284,7 +1286,9 @@ track * FASTCALL track::create( trackTypes _tt, trackContainer * _tc )
default: break;
}
#ifdef DEBUG_LMMS
assert( t != NULL );
#endif
// allow mixer to continue
_tc->eng()->getMixer()->play();
@@ -1494,3 +1498,5 @@ void FASTCALL track::swapPositionOfTCOs( csize _tco_num1, csize _tco_num2 )
#include "track.moc"
#endif

View File

@@ -1,3 +1,5 @@
#ifndef SINGLE_SOURCE_COMPILE
/*
* track_container.cpp - implementation of base-class for all track-containers
* like Song-Editor, BB-Editor...
@@ -583,3 +585,5 @@ void trackContainer::scrollArea::wheelEvent( QWheelEvent * _we )
#undef setValue
#undef maximum
#endif

View File

@@ -1,3 +1,5 @@
#ifndef SINGLE_SOURCE_COMPILE
/*
* base64.cpp - namespace base64 with methods for encoding/decoding binary data
* to/from base64
@@ -165,3 +167,5 @@ void decode( const QString & _b64, char * * _data, int * _size )
#endif
#endif

View File

@@ -1,3 +1,5 @@
#ifndef SINGLE_SOURCE_COMPILE
/*
* buffer_allocator.cpp - namespace bufferAllocator providing routines for own
* optimized memory-management for audio-buffers
@@ -224,3 +226,5 @@ void bufferAllocator::disableAutoCleanup( bool _disabled )
s_autoCleanupDisabled = _disabled;
}
#endif

View File

@@ -1,3 +1,5 @@
#ifndef SINGLE_SOURCE_COMPILE
/*
* clipboard.cpp - the clipboard for patterns, notes etc.
*
@@ -57,3 +59,5 @@ namespace clipboard
} ;
#endif

View File

@@ -1,3 +1,5 @@
#ifndef SINGLE_SOURCE_COMPILE
/*
* embed.cpp - misc stuff for using embedded resources (linked into binary)
*
@@ -134,3 +136,5 @@ void loadTranslation( const QString & _tname )
}
#endif

View File

@@ -1,3 +1,5 @@
#ifndef SINGLE_SOURCE_COMPILE
/*
* ladspa_manager.cpp - a class to manage loading and instantiation
* of ladspa plugins
@@ -917,3 +919,5 @@ void FASTCALL ladspaManager::cleanup( const ladspaKey & _plugin,
#endif
#endif

View File

@@ -1,3 +1,5 @@
#ifndef SINGLE_SOURCE_COMPILE
/*
* mmp.cpp - implementation of class multimediaProject
*
@@ -301,3 +303,5 @@ QString multimediaProject::typeName( projectTypes _project_type )
return( s_types[UNKNOWN].m_name );
}
#endif

View File

@@ -1,3 +1,5 @@
#ifndef SINGLE_SOURCE_COMPILE
/*
* oscillator.cpp - implementation of powerful oscillator-class
*
@@ -156,10 +158,11 @@ void x::updateSync( sampleFrame * _ab, const fpab_t _frames, \
class x : public oscillator \
{ \
public: \
x( const modulationAlgos modulation_algo, const float _freq, \
inline x( const modulationAlgos modulation_algo, \
const float _freq, \
const Sint16 _phase_offset, const float _volume_factor, \
const sample_rate_t _sample_rate, \
oscillator * _sub_osc ) FASTCALL : \
oscillator * _sub_osc ) : \
oscillator( modulation_algo, _freq, _phase_offset, \
_volume_factor, _sample_rate, _sub_osc ) \
{ \
@@ -269,3 +272,5 @@ void oscillator::recalcOscCoeff( const float additional_phase_offset )
--m_sample;
}
}
#endif

View File

@@ -1,3 +1,5 @@
#ifndef SINGLE_SOURCE_COMPILE
/*
* sample_buffer.cpp - container-class sampleBuffer
*
@@ -93,7 +95,6 @@
#define write writeBlock
#define read readBlock
#define seek at
#define pos at
#endif
@@ -1463,9 +1464,10 @@ void sampleBuffer::deleteResamplingData( void * * _ptr )
#undef write
#undef read
#undef seek
#undef pos
#include "sample_buffer.moc"
#endif

View File

@@ -1,3 +1,5 @@
#ifndef SINGLE_SOURCE_COMPILE
/*
* string_pair_drag.cpp - class stringPairDrag which provides general support
* for drag'n'drop of string-pairs and which is the base
@@ -127,3 +129,5 @@ QString stringPairDrag::decodeValue( QDropEvent * _de )
#endif
}
#endif

View File

@@ -0,0 +1,85 @@
#ifdef SINGLE_SOURCE_COMPILE
#undef SINGLE_SOURCE_COMPILE
#include "src/lib/string_pair_drag.cpp"
#include "src/lib/buffer_allocator.cpp"
#include "src/lib/embed.cpp"
#include "src/lib/base64.cpp"
#include "src/lib/mmp.cpp"
#include "src/lib/ladspa_manager.cpp"
#include "src/lib/oscillator.cpp"
#include "src/lib/clipboard.cpp"
#include "src/lib/sample_buffer.cpp"
#include "src/core/config_mgr.cpp"
#include "src/core/envelope_and_lfo_widget.cpp"
#include "src/core/song_editor.cpp"
#include "src/core/note.cpp"
#include "src/core/sample_play_handle.cpp"
#include "src/core/piano_roll.cpp"
#include "src/core/arp_and_chords_tab_widget.cpp"
#include "src/core/about_dialog.cpp"
#include "src/core/instrument.cpp"
#include "src/core/main.cpp"
#include "src/core/timeline.cpp"
#include "src/core/note_play_handle.cpp"
#include "src/core/plugin.cpp"
#include "src/core/export_project_dialog.cpp"
#include "src/core/main_window.cpp"
#include "src/core/engine.cpp"
#include "src/core/plugin_browser.cpp"
#include "src/core/setup_dialog.cpp"
#include "src/core/bb_editor.cpp"
#include "src/core/envelope_tab_widget.cpp"
#include "src/core/mixer.cpp"
#include "src/core/piano_widget.cpp"
#include "src/core/name_label.cpp"
#include "src/core/preset_preview_play_handle.cpp"
#include "src/core/track_container.cpp"
#include "src/core/track.cpp"
#include "src/core/file_browser.cpp"
#include "src/core/surround_area.cpp"
#include "src/core/midi_tab_widget.cpp"
#include "src/midi/midi_alsa_seq.cpp"
#include "src/midi/midi_oss.cpp"
#include "src/midi/midi_file.cpp"
#include "src/midi/midi_port.cpp"
#include "src/midi/midi_client.cpp"
#include "src/midi/midi_mapper.cpp"
#include "src/midi/midi_alsa_raw.cpp"
#include "src/audio/audio_oss.cpp"
#include "src/audio/audio_file_device.cpp"
#include "src/audio/audio_alsa.cpp"
#include "src/audio/audio_sdl.cpp"
#include "src/audio/audio_port.cpp"
#include "src/audio/audio_device.cpp"
#include "src/audio/audio_jack.cpp"
#include "src/audio/audio_file_ogg.cpp"
#include "src/audio/audio_sample_recorder.cpp"
#include "src/audio/audio_file_wave.cpp"
#include "src/lmms_single_source.cpp"
#include "src/tracks/pattern.cpp"
#include "src/tracks/bb_track.cpp"
#include "src/tracks/channel_track.cpp"
#include "src/tracks/sample_track.cpp"
#include "src/widgets/project_notes.cpp"
#include "src/widgets/led_checkbox.cpp"
#include "src/widgets/knob.cpp"
#include "src/widgets/pixmap_button.cpp"
#include "src/widgets/qxembed.cpp"
#include "src/widgets/group_box.cpp"
#include "src/widgets/tab_bar.cpp"
#include "src/widgets/kmultitabbar.cpp"
#include "src/widgets/tab_widget.cpp"
#include "src/widgets/combobox.cpp"
#include "src/widgets/rubberband.cpp"
#include "src/widgets/cpuload_widget.cpp"
#include "src/widgets/side_bar_widget.cpp"
#include "src/widgets/visualization_widget.cpp"
#include "src/widgets/text_float.cpp"
#include "src/widgets/tool_button.cpp"
#include "src/widgets/rename_dialog.cpp"
#include "src/widgets/fade_button.cpp"
#include "src/widgets/tempo_sync_knob.cpp"
#include "src/widgets/tooltip.cpp"
#include "src/widgets/nstate_button.cpp"
#include "src/widgets/lcd_spinbox.cpp"
#endif

View File

@@ -1,3 +1,5 @@
#ifndef SINGLE_SOURCE_COMPILE
/*
* midi_alsa_raw.cpp - midi-client for RawMIDI via ALSA
*
@@ -230,3 +232,5 @@ void midiALSARaw::setupWidget::saveSettings( void )
#endif
#endif

View File

@@ -1,3 +1,5 @@
#ifndef SINGLE_SOURCE_COMPILE
/*
* midi_alsa_seq.cpp - ALSA-sequencer-client
*
@@ -627,3 +629,5 @@ void midiALSASeq::setupWidget::saveSettings( void )
#endif
#endif

View File

@@ -1,3 +1,5 @@
#ifndef SINGLE_SOURCE_COMPILE
/*
* midi_client.cpp - base-class for MIDI-clients like ALSA-sequencer-client
*
@@ -375,3 +377,5 @@ Uint8 midiClientRaw::eventLength( const Uint8 _event )
}
#endif

View File

@@ -1,3 +1,5 @@
#ifndef SINGLE_SOURCE_COMPILE
/*
* midi_mapper.cpp - MIDI-mapper for any midiDevice
*
@@ -52,7 +54,7 @@ midiMapper::midiMapper( const QString & _map ) :
{
m_drumsetKeyMap[i].first = i;
}
for( Uint8 i = 0; i < MIDI_CHANNELS; ++i )
for( Uint8 i = 0; i < MIDI_CHANNEL_COUNT; ++i )
{
m_channelMap[i] = i;
}
@@ -233,7 +235,7 @@ void midiMapper::readChannelMap( QFile & _f )
Uint8 mch = line.section( '=', 1, 1 ).mid( 1 ).
section( ' ', 0, 0 ).
toInt();
if( ch < MIDI_CHANNELS && mch < MIDI_CHANNELS )
if( ch < MIDI_CHANNEL_COUNT && mch < MIDI_CHANNEL_COUNT )
{
m_channelMap[ch] = mch;
if( line.contains( QRegExp( "Keymap *\"Drumset\"" ) ) )
@@ -255,3 +257,5 @@ void midiMapper::readChannelMap( QFile & _f )
#undef indexOf
#endif

View File

@@ -1,3 +1,5 @@
#ifndef SINGLE_SOURCE_COMPILE
/*
* midi_oss.cpp - OSS-raw-midi-client
*
@@ -173,3 +175,5 @@ void midiOSS::setupWidget::saveSettings( void )
#endif
#endif

View File

@@ -1,3 +1,5 @@
#ifndef SINGLE_SOURCE_COMPILE
/*
* midi_port.cpp - abstraction of MIDI-ports which are part of LMMS's MIDI-
* sequencing system
@@ -92,3 +94,5 @@ void midiPort::processOutEvent( const midiEvent & _me, const midiTime & _time )
}
#endif

View File

@@ -1,3 +1,5 @@
#ifndef SINGLE_SOURCE_COMPILE
/*
* bb_track.cpp - implementation of class bbTrack and bbTCO
*
@@ -88,14 +90,14 @@ void bbTCO::constructContextMenu( QMenu * _cm )
{
#ifdef QT4
QAction * a = new QAction( embed::getIconPixmap( "bb_track" ),
tr( "Open in Beat+Bassline-Editor" ),
tr( "Open in Beat+Baseline-Editor" ),
_cm );
_cm->insertAction( _cm->actions()[0], a );
connect( a, SIGNAL( triggered( bool ) ), this,
SLOT( openInBBEditor( bool ) ) );
#else
_cm->insertItem( embed::getIconPixmap( "bb_track" ),
tr( "Open in Beat+Bassline-Editor" ),
tr( "Open in Beat+Baseline-Editor" ),
this, SLOT( openInBBEditor() ),
0, -1, 0 );
#endif
@@ -291,7 +293,7 @@ bbTrack::bbTrack( trackContainer * _tc ) :
csize bbNum = s_infoMap.size();
s_infoMap[this] = bbNum;
m_trackLabel = new nameLabel( tr( "Beat/Bassline %1" ).arg( bbNum ),
m_trackLabel = new nameLabel( tr( "Beat/Baseline %1" ).arg( bbNum ),
getTrackSettingsWidget(), eng() );
m_trackLabel->setPixmap( embed::getIconPixmap( "bb_track" ) );
m_trackLabel->setGeometry( 1, 1, DEFAULT_SETTINGS_WIDGET_WIDTH - 2,
@@ -517,3 +519,5 @@ void bbTrack::clickedTrackLabel( void )
#include "bb_track.moc"
#endif

View File

@@ -1,3 +1,5 @@
#ifndef SINGLE_SOURCE_COMPILE
/*
* pattern.cpp - implementation of class pattern which holds notes
*
@@ -229,6 +231,7 @@ midiTime pattern::length( void ) const
note * pattern::addNote( const note & _new_note )
{
note * new_note = new note( _new_note );
new_note->quantizePos( eng()->getPianoRoll()->quantization() );
if( m_notes.size() == 0 || m_notes.back()->pos() <= new_note->pos() )
{
@@ -1342,3 +1345,5 @@ void patternFreezeThread::run( void )
#include "pattern.moc"
#endif

View File

@@ -1,3 +1,5 @@
#ifndef SINGLE_SOURCE_COMPILE
/*
* sample_track.cpp - implementation of class sampleTrack, a track which
* provides arrangement of samples
@@ -474,3 +476,5 @@ void sampleTrack::loadTrackSpecificSettings( const QDomElement & _this )
#include "sample_track.moc"
#endif

View File

@@ -1,3 +1,5 @@
#ifndef SINGLE_SOURCE_COMPILE
/*
* combobox.cpp - implementation of LMMS-combobox
*
@@ -230,7 +232,6 @@ void comboBox::paintEvent( QPaintEvent * _pe )
if( m_items.size() > 0 )
{
p.setPen( QColor( 224, 224, 224 ) );
p.setFont( font() );
p.setClipRect( QRect( 5, 2, width() - CB_ARROW_BTN_WIDTH - 8,
height() - 2 ) );
@@ -241,6 +242,10 @@ void comboBox::paintEvent( QPaintEvent * _pe )
p.drawPixmap( tx, 3, item_pm );
tx += item_pm.width() + 2;
}
p.setPen( QColor( 64, 64, 64 ) );
p.drawText( tx+1, p.fontMetrics().height()+1,
m_items[currentIndex()].first );
p.setPen( QColor( 224, 224, 224 ) );
p.drawText( tx, p.fontMetrics().height(),
m_items[currentIndex()].first );
}
@@ -293,3 +298,5 @@ void comboBox::setItem( int _item )
#include "combobox.moc"
#endif

View File

@@ -1,3 +1,5 @@
#ifndef SINGLE_SOURCE_COMPILE
/*
* cpuload_widget.cpp - widget for displaying CPU-load (partly based on
* Hydrogen's CPU-load-widget)
@@ -117,3 +119,5 @@ void cpuloadWidget::updateCpuLoad()
#include "cpuload_widget.moc"
#endif

View File

@@ -1,3 +1,5 @@
#ifndef SINGLE_SOURCE_COMPILE
/*
* fade_button.cpp - implementation of fade-button
*
@@ -139,3 +141,5 @@ void fadeButton::nextState( void )
#include "fade_button.moc"
#endif

View File

@@ -1,3 +1,5 @@
#ifndef SINGLE_SOURCE_COMPILE
/*
* group_box.cpp - groupbox for LMMS
*
@@ -68,6 +70,7 @@ groupBox::groupBox( const QString & _caption, QWidget * _parent ) :
s_ledBg = new QPixmap( embed::getIconPixmap(
"groupbox_led_bg" ) );
}
updatePixmap();
m_led = new pixmapButton( this );
@@ -239,3 +242,5 @@ void groupBox::updatePixmap( void )
#include "group_box.moc"
#endif

View File

@@ -1,3 +1,5 @@
#ifndef SINGLE_SOURCE_COMPILE
#include "templates.h"
#include "tooltip.h"
@@ -1689,3 +1691,5 @@ buttonList * KMultiTabBar::buttons() {return &m_buttons;}
#endif

View File

@@ -1,8 +1,10 @@
#ifndef SINGLE_SOURCE_COMPILE
/*
* knob.cpp - powerful knob-widget
*
* This file is based on the knob-widget of the Qwt Widget Library from
* Josef Wilgen
* This file is partly based on the knob-widget of the Qwt Widget Library by
* Josef Wilgen.
*
* Copyright (c) 2004-2006 Tobias Doerffel <tobydox/at/users.sourceforge.net>
*
@@ -80,10 +82,6 @@
static double MinRelStep = 1.0e-10;
static double DefaultRelStep = 1.0e-2;
static double MinEps = 1.0e-10;
float knob::s_copiedValue = 0.0f;
textFloat * knob::s_textFloat = NULL;
@@ -98,6 +96,7 @@ knob::knob( int _knob_num, QWidget * _parent, const QString & _name,
#endif
),
engineObject( _engine ),
automatableObject<float>(),
m_mouseOffset( 0.0f ),
m_buttonPressed( FALSE ),
m_angle( 0.0f ),
@@ -105,12 +104,6 @@ knob::knob( int _knob_num, QWidget * _parent, const QString & _name,
m_hintTextBeforeValue( "" ),
m_hintTextAfterValue( "" ),
m_label( "" ),
m_minValue( 0.0f ),
m_maxValue( 100.0f ),
m_value( 0.0f ),
m_exactValue( 0.0f ),
m_exactPrevValue( 0.0f ),
m_prevValue( 0.0f ),
m_initValue( 0.0f )
{
if( s_textFloat == NULL )
@@ -274,11 +267,11 @@ float knob::getValue( const QPoint & _p )
const float arc = atan2( -dx, dy ) * 180.0 / M_PI;
float new_value = 0.5 * ( m_minValue + m_maxValue ) +
arc * ( m_maxValue - m_minValue ) /
float new_value = 0.5 * ( minValue() + maxValue() ) +
arc * ( maxValue() - minValue() ) /
m_totalAngle;
const float oneTurn = tAbs<float>( m_maxValue - m_minValue ) *
const float oneTurn = tAbs<float>( maxValue() - minValue() ) *
360.0 / m_totalAngle;
const float eqValue = value() + m_mouseOffset;
@@ -329,14 +322,14 @@ void knob::recalcAngle( void )
//
// calculate the angle corresponding to the value
//
if( m_maxValue == m_minValue )
if( maxValue() == minValue() )
{
m_angle = 0;
}
else
{
m_angle = ( value() - 0.5 * ( m_minValue + m_maxValue ) ) /
( m_maxValue - m_minValue ) * m_totalAngle;
m_angle = ( value() - 0.5 * ( minValue() + maxValue() ) ) /
( maxValue() - minValue() ) * m_totalAngle;
m_angle = static_cast<int>( m_angle ) % 360;
}
}
@@ -529,9 +522,13 @@ void knob::paintEvent( QPaintEvent * _me )
if( m_label != "" )
{
p.setFont( pointSize<6>( p.font() ) );
p.setPen( QColor( 64, 64, 64 ) );
p.drawText( width() / 2 -
p.fontMetrics().width( m_label ) / 2 + 1,
height() - 1, m_label );
p.setPen( QColor( 255, 255, 255 ) );
p.drawText( width() / 2 -
QFontMetrics( p.font() ).width( m_label ) / 2,
p.fontMetrics().width( m_label ) / 2,
height() - 2, m_label );
}
#ifndef QT4
@@ -570,22 +567,15 @@ void knob::wheelEvent( QWheelEvent * _we )
QPoint( m_knobPixmap->width() + 2, 0 ) );
s_textFloat->setVisibilityTimeOut( 1000 );
if( value() != m_prevValue )
{
emit sliderMoved( value() );
}
emit sliderMoved( value() );
}
//! Emits a valueChanged() signal if necessary
void knob::buttonReleased( void )
{
if( value() != m_prevValue )
{
emit valueChanged( value() );
}
emit valueChanged( value() );
}
@@ -600,26 +590,25 @@ void knob::setPosition( const QPoint & _p )
}
else
{
setValue( m_value - getValue( _p ) );
setValue( value() - getValue( _p ) );
}
}
void knob::setValue( float _val, bool _is_init_value )
void knob::setValue( const float _x )
{
if( _is_init_value )
const float prev_value = value();
automatableObject<float>::setValue( _x );
if( prev_value != value() )
{
m_initValue = _val;
valueChange();
}
setNewValue( _val, TRUE );
}
/*
void knob::fitValue( float _val )
{
setValue( _val );
@@ -632,49 +621,26 @@ void knob::incValue( int _steps )
{
setValue( m_value + float( _steps ) * m_step );
}
*/
void knob::setRange( float _vmin, float _vmax, float _vstep, int _page_size )
void knob::setRange( const float _min, const float _max, const float _step )
{
int rchg = ( ( m_maxValue != _vmax ) || ( m_minValue != _vmin ) );
bool rchg = ( ( maxValue() != _max ) || ( minValue() != _min ) );
automatableObject<float>::setRange( _min, _max, _step );
if( rchg )
{
m_minValue = _vmin;
m_maxValue = _vmax;
}
m_pageSize = tMax<float>( ( maxValue() - minValue() ) / 100.0f,
step() );
//
// look if the step width has an acceptable
// value or otherwise change it.
//
setStep( _vstep );
//
// limit page size
//
/* m_pageSize = tLimit( pageSize, 0, int( tAbs<float>( ( m_maxValue -
m_minValue ) / m_step ) ) ); */
m_pageSize = tMax<float>( ( m_maxValue - m_minValue ) / 100.0f,
m_step );
//
// If the value lies out of the range, it
// will be changed. Note that it will not be adjusted to
// the new step width.
setNewValue( m_value, FALSE );
// call notifier after the step width has been
// adjusted.
// call notifier after the step width has been adjusted.
if( rchg )
{
rangeChange();
}
}
/*
void knob::setNewValue( float _x, bool _align )
@@ -753,7 +719,7 @@ void knob::setStep( float _vstep )
m_step = newStep;
}
}
*/
@@ -851,3 +817,5 @@ void knob::displayHelp( void )
#ifndef QT4
#undef addSeparator
#endif
#endif

View File

@@ -1,7 +1,9 @@
#ifndef SINGLE_SOURCE_COMPILE
/*
* lcd_spinbox.cpp - class lcdSpinBox, an improved QLCDNumber
*
* Copyright (c) 2005 Tobias Doerffel <tobydox/at/users.sourceforge.net>
* Copyright (c) 2005-2006 Tobias Doerffel <tobydox/at/users.sourceforge.net>
*
* This file is part of Linux MultiMedia Studio - http://lmms.sourceforge.net
*
@@ -49,9 +51,7 @@
lcdSpinBox::lcdSpinBox( int _min, int _max, int _num_digits,
QWidget * _parent ) :
QWidget( _parent ),
m_minValue( _min ),
m_maxValue( _max ),
m_step( 1 ),
automatableObject<int>( 0, _min, _max ),
m_label( NULL ),
m_origMousePos()
{
@@ -77,22 +77,22 @@ lcdSpinBox::~lcdSpinBox()
void lcdSpinBox::setStep( int _step )
void lcdSpinBox::setStep( const int _step )
{
m_step = tMax( _step, 1 );
automatableObject<int>::setStep( tMax( _step, 1 ) );
}
void lcdSpinBox::setValue( int _value )
void lcdSpinBox::setValue( const int _value )
{
_value = ( ( tLimit( _value, m_minValue, m_maxValue ) - m_minValue ) /
m_step ) * m_step + m_minValue;
QString s = m_textForValue[_value];
automatableObject<int>::setValue( _value );
QString s = m_textForValue[value()];
if( s == "" )
{
s = QString::number( _value );
s = QString::number( value() );
while( (int) s.length() < m_number->numDigits() )
{
s = "0" + s;
@@ -169,7 +169,7 @@ void lcdSpinBox::mouseMoveEvent( QMouseEvent * _me )
int dy = _me->globalY() - m_origMousePos.y();
if( dy > 1 || dy < -1 )
{
setValue( value() - dy / 2 * m_step );
setValue( value() - dy / 2 * step() );
emit valueChanged( value() );
QCursor::setPos( m_origMousePos );
}
@@ -191,7 +191,7 @@ void lcdSpinBox::mouseReleaseEvent( QMouseEvent * _me )
void lcdSpinBox::wheelEvent( QWheelEvent * _we )
{
_we->accept();
setValue( value() + ( ( _we->delta() > 0 ) ? 1 : -1 ) * m_step );
setValue( value() + ( ( _we->delta() > 0 ) ? 1 : -1 ) * step() );
emit valueChanged( value() );
}
@@ -200,3 +200,5 @@ void lcdSpinBox::wheelEvent( QWheelEvent * _we )
#include "lcd_spinbox.moc"
#endif

View File

@@ -1,3 +1,5 @@
#ifndef SINGLE_SOURCE_COMPILE
/*
* led_checkbox.cpp - class ledCheckBox, an improved QCheckBox
*
@@ -55,7 +57,7 @@ static const QString names[ledCheckBox::TOTAL_COLORS] =
ledCheckBox::ledCheckBox( const QString & _text, QWidget * _parent,
ledColors _color ) :
QWidget( _parent ),
m_checked( FALSE ),
automatableObject<bool>( FALSE, TRUE, FALSE ),
m_text( _text )
{
if( _color >= TOTAL_COLORS || _color < YELLOW )
@@ -104,9 +106,9 @@ void ledCheckBox::mousePressEvent( QMouseEvent * _me )
void ledCheckBox::toggle( void )
{
m_checked = !m_checked;
setValue( !value() );
update();
emit( toggled( m_checked ) );
emit( toggled( value() ) );
}
@@ -120,7 +122,7 @@ void ledCheckBox::setChecked( bool _on )
}
else
{
emit( toggled( m_checked ) );
emit( toggled( value() ) );
}
}
@@ -148,6 +150,9 @@ void ledCheckBox::paintEvent( QPaintEvent * )
p.drawPixmap( 0, 0, *m_ledOffPixmap );
}
p.setPen( QColor( 64, 64, 64 ) );
p.drawText( m_ledOffPixmap->width() + 3, 9, text() );
p.setPen( QColor( 255, 255, 255 ) );
p.drawText( m_ledOffPixmap->width() + 2, 8, text() );
#ifndef QT4
@@ -159,3 +164,5 @@ void ledCheckBox::paintEvent( QPaintEvent * )
#include "led_checkbox.moc"
#endif

View File

@@ -1,3 +1,5 @@
#ifndef SINGLE_SOURCE_COMPILE
/*
* nstate_button.cpp - implementation of n-state-button
*
@@ -109,3 +111,5 @@ void nStateButton::mousePressEvent( QMouseEvent * _me )
#include "nstate_button.moc"
#endif

View File

@@ -1,3 +1,5 @@
#ifndef SINGLE_SOURCE_COMPILE
/*
* pixmap_button.cpp - implementation of pixmap-button (often used as "themed"
* checkboxes/radiobuttons etc)
@@ -171,3 +173,5 @@ void pixmapButton::setBgGraphic( const QPixmap & _pm )
#include "pixmap_button.moc"
#endif

View File

@@ -1,3 +1,5 @@
#ifndef SINGLE_SOURCE_COMPILE
/*
* project_notes.cpp - implementation of project-notes-editor
*
@@ -58,7 +60,6 @@
#define setFontFamily setFamily
#define setFontPointSize setPointSize
#define setTextColor setColor
#define textColor color
#define setHtml setText
#define toHtml text
@@ -597,8 +598,9 @@ void projectNotes::loadSettings( const QDomElement & _this )
#undef setFontItalic
#undef setFontFamily
#undef setFontPointSize
#undef textColor
#undef setTextColor
#undef setHtml
#undef toHtml
#endif

View File

@@ -1,3 +1,5 @@
#ifndef SINGLE_SOURCE_COMPILE
/****************************************************************************
Implementation of QXEmbed class
@@ -1362,3 +1364,5 @@ void QXEmbed::reparent( QWidget * parent, WFlags f, const QPoint & p, bool showI
#include "qxembed.moc"
#endif
#endif // Q_WS_X11
#endif

View File

@@ -1,3 +1,5 @@
#ifndef SINGLE_SOURCE_COMPILE
/*
* rename_dialog.cpp - implementation of dialog for renaming something
*
@@ -88,3 +90,5 @@ void renameDialog::textChanged( const QString & _new_string )
#include "rename_dialog.moc"
#endif

View File

@@ -1,3 +1,5 @@
#ifndef SINGLE_SOURCE_COMPILE
/*
* rubberband.cpp - rubberband - either own implementation for Qt3 or wrapper
* for Qt4
@@ -161,3 +163,5 @@ vvector<selectableObject *> rubberBand::selectableObjects( void ) const
#include "rubberband.moc"
#endif

View File

@@ -1,3 +1,5 @@
#ifndef SINGLE_SOURCE_COMPILE
/*
* side_bar_widget.cpp - implementation of base-widget for side-bar
*
@@ -123,3 +125,5 @@ void sideBarWidget::resizeEvent( QResizeEvent * )
#include "side_bar.moc"
#include "side_bar_widget.moc"
#endif

View File

@@ -1,3 +1,5 @@
#ifndef SINGLE_SOURCE_COMPILE
/*
* tab_bar.cpp - implementation of tab-bar
*
@@ -260,3 +262,5 @@ bool tabBar::allHidden( void )
#include "tab_bar.moc"
#include "tab_button.moc"
#endif

View File

@@ -1,3 +1,5 @@
#ifndef SINGLE_SOURCE_COMPILE
/*
* tabwidget.cpp - tabwidget for LMMS
*
@@ -244,3 +246,5 @@ void tabWidget::wheelEvent( QWheelEvent * _we )
#include "tab_widget.moc"
#endif

View File

@@ -1,3 +1,5 @@
#ifndef SINGLE_SOURCE_COMPILE
/*
* tempo_sync_knob.cpp - adds bpm to ms conversion for knob class
*
@@ -294,8 +296,7 @@ void tempoSyncKnob::calculateTempoSyncTime( bpm_t _bpm )
": invalid tempoSyncMode" );
break;
}
setValue( 60000.0 / ( _bpm * conversionFactor * m_scale ),
FALSE );
setValue( 60000.0 / ( _bpm * conversionFactor * m_scale ) );
}
else
{
@@ -391,3 +392,5 @@ void tempoSyncKnob::setSyncIcon( const QPixmap & _new_icon )
#include "tempo_sync_knob.moc"
#endif

View File

@@ -1,3 +1,5 @@
#ifndef SINGLE_SOURCE_COMPILE
/*
* text_float.cpp - class textFloat, a floating text-label
*
@@ -280,3 +282,5 @@ void textFloat::updateSize( void )
#undef setParent
#endif

View File

@@ -1,3 +1,5 @@
#ifndef SINGLE_SOURCE_COMPILE
/*
* tool_button.cpp - implementation of LMMS-tool-button for common (cool) look
*
@@ -102,3 +104,5 @@ void toolButton::toggledBool( bool _on )
#include "tool_button.moc"
#endif

View File

@@ -1,3 +1,5 @@
#ifndef SINGLE_SOURCE_COMPILE
/*
* tooltip.cpp - namespace toolTip, a tooltip-wrapper for LMMS
*
@@ -51,3 +53,5 @@ void toolTip::add( QWidget * _w, const QString & _txt )
}
}
#endif

View File

@@ -1,3 +1,5 @@
#ifndef SINGLE_SOURCE_COMPILE
/*
* visualization_widget.cpp - widget for visualization of sound-data
*
@@ -216,3 +218,5 @@ void visualizationWidget::mousePressEvent( QMouseEvent * _me )
#include "visualization_widget.moc"
#endif