dropped Qt3-support and improved Qt4-support
git-svn-id: https://lmms.svn.sf.net/svnroot/lmms/trunk/lmms@547 0778d3d1-df1d-0410-868b-ea421aaaa00d
This commit is contained in:
@@ -3,7 +3,7 @@ VST_DIRS=vst_base vst_effect vestige
|
||||
endif
|
||||
|
||||
if LADSPA_SUPPORT
|
||||
LADSPA_DIRS=ladspa_base ladspa_effect
|
||||
LADSPA_DIRS=ladspa_effect
|
||||
endif
|
||||
|
||||
if STK_SUPPORT
|
||||
|
||||
@@ -23,27 +23,12 @@
|
||||
*/
|
||||
|
||||
|
||||
#include "qt3support.h"
|
||||
|
||||
#ifdef QT4
|
||||
|
||||
#include <QtGui/QPainter>
|
||||
#include <QtGui/QBitmap>
|
||||
#include <Qt/QtXml>
|
||||
#include <QtCore/QFileInfo>
|
||||
#include <QtGui/QDropEvent>
|
||||
|
||||
#else
|
||||
|
||||
#include <qpainter.h>
|
||||
#include <qbitmap.h>
|
||||
#include <qdom.h>
|
||||
#include <qfileinfo.h>
|
||||
#include <qcursor.h>
|
||||
#include <qwhatsthis.h>
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
#include "audio_file_processor.h"
|
||||
#include "engine.h"
|
||||
@@ -118,11 +103,7 @@ audioFileProcessor::audioFileProcessor( instrumentTrack * _channel_track ) :
|
||||
SLOT( openAudioFile() ) );
|
||||
toolTip::add( m_openAudioFileButton, tr( "Open other sample" ) );
|
||||
|
||||
#ifdef QT4
|
||||
m_openAudioFileButton->setWhatsThis(
|
||||
#else
|
||||
QWhatsThis::add( m_openAudioFileButton,
|
||||
#endif
|
||||
tr( "Click here, if you want to open another audio-file. After "
|
||||
"clicking on this button, a file-open-dialog appears "
|
||||
"and you can select your file. Settings like Looping-"
|
||||
@@ -141,11 +122,7 @@ audioFileProcessor::audioFileProcessor( instrumentTrack * _channel_track ) :
|
||||
connect( m_reverseButton, SIGNAL( toggled( bool ) ), this,
|
||||
SLOT( reverseBtnToggled( bool ) ) );
|
||||
toolTip::add( m_reverseButton, tr( "Reverse sample" ) );
|
||||
#ifdef QT4
|
||||
m_reverseButton->setWhatsThis(
|
||||
#else
|
||||
QWhatsThis::add( m_reverseButton,
|
||||
#endif
|
||||
tr( "If you enable this button, the whole sample is reversed. "
|
||||
"This is useful for cool effects, e.g. a reversed "
|
||||
"crash." ) );
|
||||
@@ -160,11 +137,7 @@ audioFileProcessor::audioFileProcessor( instrumentTrack * _channel_track ) :
|
||||
m_loopButton->setBgGraphic( getBackground( m_loopButton ) );
|
||||
toolTip::add( m_loopButton,
|
||||
tr( "Loop sample at start- and end-point" ) );
|
||||
#ifdef QT4
|
||||
m_loopButton->setWhatsThis(
|
||||
#else
|
||||
QWhatsThis::add( m_loopButton,
|
||||
#endif
|
||||
tr( "Here you can set, whether Looping-Mode is enabled. If "
|
||||
"enabled, AudioFileProcessor loops between start- and "
|
||||
"end-point of a sample until the whole note is played. "
|
||||
@@ -179,11 +152,7 @@ audioFileProcessor::audioFileProcessor( instrumentTrack * _channel_track ) :
|
||||
m_ampKnob->setLabel( tr( "AMP" ) );
|
||||
connect( m_ampKnob, SIGNAL( valueChanged( float ) ), this,
|
||||
SLOT( ampKnobChanged( float ) ) );
|
||||
#ifdef QT4
|
||||
m_ampKnob->setWhatsThis(
|
||||
#else
|
||||
QWhatsThis::add( m_ampKnob,
|
||||
#endif
|
||||
tr( "With this knob you can set the amplify-ratio. When you "
|
||||
"set a value of 100% your sample isn't changed. "
|
||||
"Otherwise it will be amplified up or down (your "
|
||||
@@ -198,11 +167,7 @@ audioFileProcessor::audioFileProcessor( instrumentTrack * _channel_track ) :
|
||||
m_startKnob->setLabel( tr( "START" ) );
|
||||
connect( m_startKnob, SIGNAL( valueChanged( float ) ), this,
|
||||
SLOT( startKnobChanged( float ) ) );
|
||||
#ifdef QT4
|
||||
m_startKnob->setWhatsThis(
|
||||
#else
|
||||
QWhatsThis::add( m_startKnob,
|
||||
#endif
|
||||
tr( "With this knob you can set the point where "
|
||||
"AudioFileProcessor should begin playing your sample. "
|
||||
"If you enable Looping-Mode, this is the point to "
|
||||
@@ -218,11 +183,7 @@ audioFileProcessor::audioFileProcessor( instrumentTrack * _channel_track ) :
|
||||
m_endKnob->setLabel( tr( "END" ) );
|
||||
connect( m_endKnob, SIGNAL( valueChanged( float ) ), this,
|
||||
SLOT( endKnobChanged( float ) ) );
|
||||
#ifdef QT4
|
||||
m_endKnob->setWhatsThis(
|
||||
#else
|
||||
QWhatsThis::add( m_endKnob,
|
||||
#endif
|
||||
tr( "With this knob you can set the point where "
|
||||
"AudioFileProcessor should stop playing your sample. "
|
||||
"If you enable Looping-Mode, this is the point where "
|
||||
@@ -238,11 +199,7 @@ audioFileProcessor::audioFileProcessor( instrumentTrack * _channel_track ) :
|
||||
}
|
||||
connect( m_viewLinesPB, SIGNAL( toggled( bool ) ), this,
|
||||
SLOT( lineDrawBtnToggled( bool ) ) );
|
||||
#ifdef QT4
|
||||
m_viewLinesPB->setWhatsThis(
|
||||
#else
|
||||
QWhatsThis::add( m_viewLinesPB,
|
||||
#endif
|
||||
tr( "Activate this button, if your sample should be drawn "
|
||||
"with connected lines. This doesn't change the "
|
||||
"sound itself. It just gives you another view to your "
|
||||
@@ -257,11 +214,7 @@ audioFileProcessor::audioFileProcessor( instrumentTrack * _channel_track ) :
|
||||
}
|
||||
connect( m_viewDotsPB, SIGNAL( toggled( bool ) ), this,
|
||||
SLOT( dotDrawBtnToggled( bool ) ) );
|
||||
#ifdef QT4
|
||||
m_viewDotsPB->setWhatsThis(
|
||||
#else
|
||||
QWhatsThis::add( m_viewDotsPB,
|
||||
#endif
|
||||
tr( "Activate this button, if your sample should be drawn "
|
||||
"with dots. This doesn't change the sound itself. "
|
||||
"It just gives you another view to your sample." ) );
|
||||
@@ -271,9 +224,6 @@ audioFileProcessor::audioFileProcessor( instrumentTrack * _channel_track ) :
|
||||
view_group->addButton( m_viewLinesPB );
|
||||
view_group->addButton( m_viewDotsPB );
|
||||
|
||||
#ifndef QT4
|
||||
setBackgroundMode( Qt::NoBackground );
|
||||
#endif
|
||||
setAcceptDrops( TRUE );
|
||||
}
|
||||
|
||||
@@ -422,7 +372,6 @@ void audioFileProcessor::deleteNotePluginData( notePlayHandle * _n )
|
||||
|
||||
void audioFileProcessor::dragEnterEvent( QDragEnterEvent * _dee )
|
||||
{
|
||||
#ifdef QT4
|
||||
if( _dee->mimeData()->hasFormat( stringPairDrag::mimeType() ) )
|
||||
{
|
||||
QString txt = _dee->mimeData()->data(
|
||||
@@ -445,41 +394,6 @@ void audioFileProcessor::dragEnterEvent( QDragEnterEvent * _dee )
|
||||
{
|
||||
_dee->ignore();
|
||||
}
|
||||
#else
|
||||
QString txt = _dee->encodedData( stringPairDrag::mimeType() );
|
||||
if( txt != "" )
|
||||
{
|
||||
if( txt.section( ':', 0, 0 ) == QString( "tco_%1" ).arg(
|
||||
track::SAMPLE_TRACK ) )
|
||||
{
|
||||
_dee->accept();
|
||||
return;
|
||||
}
|
||||
if( txt.section( ':', 0, 0 ) == "samplefile"
|
||||
&& subPluginFeatures::supported_extensions().contains(
|
||||
fileItem::extension( txt.section( ':', 1 ) ) ) )
|
||||
{
|
||||
_dee->accept();
|
||||
return;
|
||||
}
|
||||
_dee->ignore();
|
||||
return;
|
||||
}
|
||||
|
||||
txt = QString( _dee->encodedData( "text/plain" ) );
|
||||
if( txt != "" )
|
||||
{
|
||||
QString file = QUriDrag::uriToLocalFile(
|
||||
txt.stripWhiteSpace() );
|
||||
if( file && subPluginFeatures::supported_extensions().contains(
|
||||
fileItem::extension( file ) ) )
|
||||
{
|
||||
_dee->accept();
|
||||
return;
|
||||
}
|
||||
}
|
||||
_dee->ignore();
|
||||
#endif
|
||||
}
|
||||
|
||||
|
||||
@@ -504,17 +418,6 @@ void audioFileProcessor::dropEvent( QDropEvent * _de )
|
||||
return;
|
||||
}
|
||||
|
||||
#ifndef QT4
|
||||
QString txt = _de->encodedData( "text/plain" );
|
||||
if( txt != "" )
|
||||
{
|
||||
setAudioFile( QUriDrag::uriToLocalFile(
|
||||
txt.stripWhiteSpace() ) );
|
||||
_de->accept();
|
||||
return;
|
||||
}
|
||||
#endif
|
||||
|
||||
_de->ignore();
|
||||
}
|
||||
|
||||
@@ -523,14 +426,7 @@ void audioFileProcessor::dropEvent( QDropEvent * _de )
|
||||
|
||||
void audioFileProcessor::paintEvent( QPaintEvent * )
|
||||
{
|
||||
#ifdef QT4
|
||||
QPainter p( this );
|
||||
#else
|
||||
QPixmap pm( rect().size() );
|
||||
pm.fill( this, rect().topLeft() );
|
||||
|
||||
QPainter p( &pm, this );
|
||||
#endif
|
||||
|
||||
p.drawPixmap( 0, 0, *s_artwork );
|
||||
|
||||
@@ -544,13 +440,8 @@ void audioFileProcessor::paintEvent( QPaintEvent * )
|
||||
|
||||
// simple algorithm for creating a text from the filename that
|
||||
// matches in the white rectangle
|
||||
#ifdef QT4
|
||||
while( idx > 0 &&
|
||||
fm.size( Qt::TextSingleLine, file_name + "..." ).width() < 210 )
|
||||
#else
|
||||
while( idx > 0 &&
|
||||
fm.size( Qt::SingleLine, file_name + "..." ).width() < 210 )
|
||||
#endif
|
||||
{
|
||||
file_name = m_sampleBuffer.audioFile()[--idx] + file_name;
|
||||
}
|
||||
@@ -582,9 +473,6 @@ void audioFileProcessor::paintEvent( QPaintEvent * )
|
||||
end_frame_x + graph_rect.x(),
|
||||
graph_rect.height() + graph_rect.y() );
|
||||
|
||||
#ifndef QT4
|
||||
bitBlt( this, rect().topLeft(), &pm );
|
||||
#endif
|
||||
}
|
||||
|
||||
|
||||
@@ -593,14 +481,8 @@ void audioFileProcessor::paintEvent( QPaintEvent * )
|
||||
void audioFileProcessor::sampleUpdated( void )
|
||||
{
|
||||
m_graph = QPixmap( 245, 75 );
|
||||
#ifdef QT4
|
||||
QPainter p( &m_graph );
|
||||
p.drawPixmap( 2, 172, m_graph );
|
||||
#else
|
||||
copyBlt( &m_graph, 0, 0, s_artwork, 2, 172, m_graph.width(),
|
||||
m_graph.height() );
|
||||
QPainter p( &m_graph );
|
||||
#endif
|
||||
p.setPen( QColor( 64, 255, 160 ) );
|
||||
m_sampleBuffer.visualize( p, QRect( 2, 2, m_graph.width() - 4,
|
||||
m_graph.height() - 4 ),
|
||||
|
||||
@@ -27,18 +27,8 @@
|
||||
#ifndef _AUDIO_FILE_PROCESSOR_H
|
||||
#define _AUDIO_FILE_PROCESSOR_H
|
||||
|
||||
#include "qt3support.h"
|
||||
|
||||
#ifdef QT4
|
||||
|
||||
#include <QtGui/QPixmap>
|
||||
|
||||
#else
|
||||
|
||||
#include <qpixmap.h>
|
||||
|
||||
#endif
|
||||
|
||||
#include "instrument.h"
|
||||
#include "sample_buffer.h"
|
||||
#include "spc_bg_hndl_widget.h"
|
||||
|
||||
@@ -23,27 +23,10 @@
|
||||
*/
|
||||
|
||||
|
||||
#include "qt3support.h"
|
||||
|
||||
#ifdef QT4
|
||||
|
||||
#include <QtGui/QPainter>
|
||||
#include <Qt/QtXml>
|
||||
#include <QtGui/QDropEvent>
|
||||
|
||||
#else
|
||||
|
||||
#include <qpainter.h>
|
||||
#include <qbitmap.h>
|
||||
#include <qdom.h>
|
||||
#include <qfileinfo.h>
|
||||
#include <qdom.h>
|
||||
#include <qmap.h>
|
||||
#include <qcanvas.h>
|
||||
#include <qlabel.h>
|
||||
|
||||
#endif
|
||||
|
||||
#include <iostream>
|
||||
#include <cstdlib>
|
||||
#include <ctime>
|
||||
@@ -333,16 +316,11 @@ bitInvader::bitInvader( instrumentTrack * _channel_track ) :
|
||||
this, SLOT ( smoothClicked( void ) ) );
|
||||
|
||||
|
||||
#ifdef QT4
|
||||
setAutoFillBackground( TRUE );
|
||||
QPalette pal;
|
||||
pal.setBrush( backgroundRole(), PLUGIN_NAME::getIconPixmap(
|
||||
"artwork" ) );
|
||||
setPalette( pal );
|
||||
#else
|
||||
setErasePixmap( PLUGIN_NAME::getIconPixmap( "artwork" ) );
|
||||
#endif
|
||||
|
||||
|
||||
sample_length = 128;
|
||||
sample_shape = new float[128];
|
||||
|
||||
@@ -23,23 +23,10 @@
|
||||
*/
|
||||
|
||||
|
||||
#include "qt3support.h"
|
||||
|
||||
#ifdef QT4
|
||||
|
||||
#include <QtGui/QPaintEvent>
|
||||
#include <QtGui/QFontMetrics>
|
||||
#include <QtGui/QPainter>
|
||||
|
||||
#else
|
||||
|
||||
#include <qfontmetrics.h>
|
||||
#include <qpainter.h>
|
||||
#include <qcursor.h>
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
#include "graph.h"
|
||||
#include "string_pair_drag.h"
|
||||
#include "sample_buffer.h"
|
||||
@@ -60,11 +47,6 @@ graph::graph( QWidget * _parent ) :
|
||||
setFixedSize( 132, 104 );
|
||||
|
||||
setAcceptDrops( TRUE );
|
||||
|
||||
#ifndef QT4
|
||||
setBackgroundMode( NoBackground );
|
||||
#endif
|
||||
|
||||
}
|
||||
|
||||
|
||||
@@ -145,11 +127,7 @@ void graph::mousePressEvent( QMouseEvent * _me )
|
||||
|
||||
// toggle mouse state
|
||||
m_mouseDown = true;
|
||||
#ifndef QT3
|
||||
setCursor( Qt::BlankCursor );
|
||||
#else
|
||||
setCursor( QCursor::BlankCursor );
|
||||
#endif
|
||||
m_lastCursorX = x;
|
||||
}
|
||||
|
||||
@@ -177,11 +155,7 @@ void graph::mouseReleaseEvent( QMouseEvent * _me )
|
||||
{
|
||||
// toggle mouse state
|
||||
m_mouseDown = false;
|
||||
#ifndef QT3
|
||||
setCursor( Qt::ArrowCursor );
|
||||
#else
|
||||
setCursor( QCursor::ArrowCursor );
|
||||
#endif
|
||||
update();
|
||||
}
|
||||
|
||||
@@ -190,14 +164,7 @@ void graph::mouseReleaseEvent( QMouseEvent * _me )
|
||||
void graph::paintEvent( QPaintEvent * )
|
||||
{
|
||||
|
||||
#ifdef QT4
|
||||
QPainter p( this );
|
||||
#else
|
||||
QPixmap draw_pm( rect().size() );
|
||||
// draw_pm.fill( this, rect().topLeft() );
|
||||
|
||||
QPainter p( &draw_pm, this );
|
||||
#endif
|
||||
|
||||
// if (m_background != NULL) {
|
||||
p.drawPixmap( 0, 0, m_background );
|
||||
@@ -226,12 +193,6 @@ void graph::paintEvent( QPaintEvent * )
|
||||
p.drawLine( 2, cursor.y(), 130, cursor.y() );
|
||||
p.drawLine( cursor.x(), 2, cursor.x(), 102 );
|
||||
}
|
||||
|
||||
#ifndef QT4
|
||||
// and blit all the drawn stuff on the screen...
|
||||
bitBlt( this, rect().topLeft(), &draw_pm );
|
||||
#endif
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -26,22 +26,10 @@
|
||||
#ifndef _GRAPH_H
|
||||
#define _GRAPH_H
|
||||
|
||||
#include "qt3support.h"
|
||||
|
||||
#ifdef QT4
|
||||
|
||||
#include <QtGui/QWidget>
|
||||
#include <QtGui/QPixmap>
|
||||
#include <QtGui/QCursor>
|
||||
|
||||
#else
|
||||
|
||||
#include <qwidget.h>
|
||||
#include <qpixmap.h>
|
||||
#include <qcursor.h>
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
class graph : public QWidget
|
||||
{
|
||||
|
||||
@@ -23,6 +23,12 @@
|
||||
*/
|
||||
|
||||
|
||||
#include <Qt/QtXml>
|
||||
#include <QtGui/QApplication>
|
||||
#include <QtGui/QProgressDialog>
|
||||
#include <QtCore/QDir>
|
||||
#include <QtCore/QBuffer>
|
||||
|
||||
#include "flp_import.h"
|
||||
#include "arp_and_chords_tab_widget.h"
|
||||
#include "basic_filters.h"
|
||||
@@ -47,23 +53,8 @@
|
||||
#include "tempo_sync_knob.h"
|
||||
#include "track_container.h"
|
||||
|
||||
|
||||
#ifdef QT4
|
||||
|
||||
#include <Qt/QtXml>
|
||||
#include <QtGui/QApplication>
|
||||
#include <QtGui/QProgressDialog>
|
||||
#include <QtCore/QDir>
|
||||
#include <QtCore/QBuffer>
|
||||
|
||||
#else
|
||||
|
||||
#include <qdom.h>
|
||||
#include <qapplication.h>
|
||||
#include <qprogressdialog.h>
|
||||
#include <qdir.h>
|
||||
#include <qbuffer.h>
|
||||
|
||||
#ifdef HAVE_CONFIG_H
|
||||
#include <config.h>
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_CTYPE_H
|
||||
@@ -185,14 +176,8 @@ bool flpImport::tryImport( trackContainer * _tc )
|
||||
return( FALSE );
|
||||
}
|
||||
|
||||
#ifdef QT4
|
||||
QProgressDialog pd( trackContainer::tr( "Importing FLP-file..." ),
|
||||
trackContainer::tr( "Cancel" ), 0, num_channels );
|
||||
#else
|
||||
QProgressDialog pd( trackContainer::tr( "Importing FLP-file..." ),
|
||||
trackContainer::tr( "Cancel" ), num_channels,
|
||||
0, 0, TRUE );
|
||||
#endif
|
||||
pd.setWindowTitle( trackContainer::tr( "Please wait..." ) );
|
||||
pd.show();
|
||||
|
||||
@@ -237,7 +222,7 @@ bool flpImport::tryImport( trackContainer * _tc )
|
||||
int current_pattern = 0;
|
||||
char * text = NULL;
|
||||
Uint32 text_len = 0;
|
||||
vlist<instrumentTrack *> i_tracks;
|
||||
QList<instrumentTrack *> i_tracks;
|
||||
int project_cur_pat = 0;
|
||||
|
||||
int step_pattern = 0;
|
||||
@@ -257,13 +242,8 @@ bool flpImport::tryImport( trackContainer * _tc )
|
||||
if( ++ev_cnt > 100 )
|
||||
{
|
||||
ev_cnt = 0;
|
||||
#ifdef QT4
|
||||
qApp->processEvents( QEventLoop::AllEvents, 100 );
|
||||
pd.setValue( i_tracks.size() );
|
||||
#else
|
||||
qApp->processEvents( 100 );
|
||||
pd.setProgress( i_tracks.size() );
|
||||
#endif
|
||||
|
||||
if( pd.wasCanceled() )
|
||||
{
|
||||
@@ -510,16 +490,9 @@ bool flpImport::tryImport( trackContainer * _tc )
|
||||
|
||||
case FLP_Text_CommentRTF:
|
||||
{
|
||||
#ifndef QT3
|
||||
QByteArray ba( text, text_len );
|
||||
QBuffer buf( &ba );
|
||||
buf.open( QBuffer::ReadOnly );
|
||||
#else
|
||||
QByteArray ba;
|
||||
ba.setRawData( text, text_len );
|
||||
QBuffer buf( ba );
|
||||
buf.open( IO_ReadOnly );
|
||||
#endif
|
||||
lineno = 0;
|
||||
attr_clear_all();
|
||||
op = html_init();
|
||||
@@ -529,9 +502,6 @@ bool flpImport::tryImport( trackContainer * _tc )
|
||||
word_print( word, out );
|
||||
word_free( word );
|
||||
op_free( op );
|
||||
#ifdef QT3
|
||||
ba.resetRawData( text, text_len );
|
||||
#endif
|
||||
|
||||
engine::getProjectNotes()->setText( out );
|
||||
outstring = "";
|
||||
@@ -814,8 +784,8 @@ bool flpImport::tryImport( trackContainer * _tc )
|
||||
it != m_steps.end(); ++it )
|
||||
{
|
||||
const int ch = ( *it ) >> 16;
|
||||
const csize pat = ( ( *it ) & 0xffff ) / 16;
|
||||
const csize pos = ( ( ( *it ) & 0xffff ) % 16 ) * 4;
|
||||
const int pat = ( ( *it ) & 0xffff ) / 16;
|
||||
const int pos = ( ( ( *it ) & 0xffff ) % 16 ) * 4;
|
||||
while( engine::getBBEditor()->numOfBBs() <= pat )
|
||||
{
|
||||
track::create( track::BB_TRACK,
|
||||
@@ -836,7 +806,7 @@ bool flpImport::tryImport( trackContainer * _tc )
|
||||
{
|
||||
const int where = ( *it ).first;
|
||||
const int ch = where % num_channels;
|
||||
const csize pat = where / num_channels;
|
||||
const int pat = where / num_channels;
|
||||
if( pat > 100 )
|
||||
{
|
||||
continue;
|
||||
@@ -845,11 +815,7 @@ bool flpImport::tryImport( trackContainer * _tc )
|
||||
{
|
||||
track::create( track::BB_TRACK,
|
||||
engine::getSongEditor() );
|
||||
#ifdef QT4
|
||||
qApp->processEvents( QEventLoop::AllEvents, 100 );
|
||||
#else
|
||||
qApp->processEvents( 100 );
|
||||
#endif
|
||||
}
|
||||
pattern * p = dynamic_cast<pattern *>(
|
||||
i_tracks[ch]->getTCO( pat ) );
|
||||
@@ -863,7 +829,7 @@ bool flpImport::tryImport( trackContainer * _tc )
|
||||
for( playListItems::const_iterator it = m_plItems.begin();
|
||||
it != m_plItems.end(); ++it )
|
||||
{
|
||||
csize pat_num = ( ( *it ) >> 16 ) - 1;
|
||||
int pat_num = ( ( *it ) >> 16 ) - 1;
|
||||
if( pat_num > 100 )
|
||||
{
|
||||
continue;
|
||||
@@ -872,11 +838,7 @@ bool flpImport::tryImport( trackContainer * _tc )
|
||||
{
|
||||
track::create( track::BB_TRACK,
|
||||
engine::getSongEditor() );
|
||||
#ifdef QT4
|
||||
qApp->processEvents( QEventLoop::AllEvents, 100 );
|
||||
#else
|
||||
qApp->processEvents( 100 );
|
||||
#endif
|
||||
}
|
||||
|
||||
bbTrack * bbt = bbTrack::findBBTrack( pat_num );
|
||||
@@ -884,7 +846,7 @@ bool flpImport::tryImport( trackContainer * _tc )
|
||||
tco->movePosition( midiTime( ( ( *it ) & 0xffff ) * 64 ) );
|
||||
}
|
||||
|
||||
if( (csize) project_cur_pat < engine::getBBEditor()->numOfBBs() )
|
||||
if( project_cur_pat < engine::getBBEditor()->numOfBBs() )
|
||||
{
|
||||
engine::getBBEditor()->setCurrentBB( project_cur_pat );
|
||||
}
|
||||
|
||||
@@ -26,28 +26,10 @@
|
||||
#ifndef _FLP_IMPORT_H
|
||||
#define _FLP_IMPORT_H
|
||||
|
||||
#ifdef HAVE_CONFIG_H
|
||||
#include <config.h>
|
||||
#endif
|
||||
|
||||
|
||||
#include "qt3support.h"
|
||||
|
||||
#ifdef QT4
|
||||
|
||||
#include <QtCore/QString>
|
||||
#include <QtCore/QPair>
|
||||
#include <QtCore/QVector>
|
||||
|
||||
#else
|
||||
|
||||
#include <qstring.h>
|
||||
#include <qpair.h>
|
||||
#include <qvaluevector.h>
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
#include "import_filter.h"
|
||||
#include "note.h"
|
||||
|
||||
@@ -239,13 +221,13 @@ private:
|
||||
}
|
||||
|
||||
|
||||
typedef vlist<QPair<int, note> > patternNoteVector;
|
||||
typedef QList<QPair<int, note> > patternNoteVector;
|
||||
patternNoteVector m_notes;
|
||||
|
||||
typedef vlist<int> stepVector;
|
||||
typedef QList<int> stepVector;
|
||||
stepVector m_steps;
|
||||
|
||||
typedef vlist<Uint32> playListItems;
|
||||
typedef QList<Uint32> playListItems;
|
||||
playListItems m_plItems;
|
||||
|
||||
} ;
|
||||
|
||||
@@ -23,21 +23,9 @@
|
||||
*/
|
||||
|
||||
|
||||
#include "qt3support.h"
|
||||
|
||||
#ifdef QT4
|
||||
|
||||
#include <QtGui/QLayout>
|
||||
#include <Qt/QtXml>
|
||||
|
||||
#else
|
||||
|
||||
#include <qdom.h>
|
||||
#include <qlayout.h>
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
#include "kicker.h"
|
||||
#include "engine.h"
|
||||
#include "instrument_track.h"
|
||||
@@ -115,15 +103,12 @@ kickerInstrument::kickerInstrument( instrumentTrack * _instrument_track ) :
|
||||
hl->addWidget( m_gainKnob );
|
||||
|
||||
vl->addLayout( hl );
|
||||
#ifdef QT4
|
||||
|
||||
setAutoFillBackground( TRUE );
|
||||
QPalette pal;
|
||||
pal.setBrush( backgroundRole(), PLUGIN_NAME::getIconPixmap(
|
||||
"artwork" ) );
|
||||
setPalette( pal );
|
||||
#else
|
||||
setErasePixmap( PLUGIN_NAME::getIconPixmap( "artwork" ) );
|
||||
#endif
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -26,9 +26,6 @@
|
||||
|
||||
#include "ladspa_2_lmms.h"
|
||||
|
||||
#ifdef QT3
|
||||
#define indexOf find
|
||||
#endif
|
||||
|
||||
ladspa2LMMS::ladspa2LMMS( void )
|
||||
{
|
||||
@@ -103,11 +100,7 @@ QString ladspa2LMMS::getShortName( const ladspa_key_t & _key )
|
||||
{
|
||||
name = name.left( name.indexOf( " " ) );
|
||||
}
|
||||
#ifndef QT3
|
||||
Qt::CaseSensitivity cs = Qt::CaseInsensitive;
|
||||
#else
|
||||
bool cs = FALSE;
|
||||
#endif
|
||||
if( name.indexOf( " with ", 0, cs ) > 0 )
|
||||
{
|
||||
name = name.left( name.indexOf( " with ", 0, cs ) );
|
||||
@@ -133,6 +126,3 @@ QString ladspa2LMMS::getShortName( const ladspa_key_t & _key )
|
||||
return( name );
|
||||
}
|
||||
|
||||
|
||||
#undef indexOf
|
||||
|
||||
|
||||
@@ -32,7 +32,6 @@
|
||||
|
||||
class ladspa2LMMS: public ladspaManager
|
||||
{
|
||||
|
||||
public:
|
||||
|
||||
inline l_sortable_plugin_t getInstruments( void )
|
||||
|
||||
@@ -23,19 +23,8 @@
|
||||
*/
|
||||
|
||||
|
||||
#include "qt3support.h"
|
||||
|
||||
#ifdef QT4
|
||||
|
||||
#include <QtGui/QWhatsThis>
|
||||
|
||||
#else
|
||||
|
||||
#include <qwhatsthis.h>
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
#include "ladspa_control.h"
|
||||
#include "automatable_object_templates.h"
|
||||
#include "ladspa_base.h"
|
||||
@@ -48,22 +37,14 @@ ladspaControl::ladspaControl( QWidget * _parent,
|
||||
port_desc_t * _port,
|
||||
track * _track,
|
||||
bool _link) :
|
||||
QWidget( _parent
|
||||
#ifdef QT3
|
||||
, "ladspaControl"
|
||||
#endif
|
||||
),
|
||||
QWidget( _parent ),
|
||||
m_port( _port ),
|
||||
m_track( _track ),
|
||||
m_link( NULL ),
|
||||
m_toggle( NULL ),
|
||||
m_knob( NULL )
|
||||
{
|
||||
m_layout = new QHBoxLayout( this
|
||||
#ifdef QT3
|
||||
, 0, 0, "ladspaControlLayout"
|
||||
#endif
|
||||
);
|
||||
m_layout = new QHBoxLayout( this );
|
||||
|
||||
if( _link )
|
||||
{
|
||||
@@ -109,11 +90,7 @@ ladspaControl::ladspaControl( QWidget * _parent,
|
||||
static_cast<int>( m_port->def ) );
|
||||
setFixedSize( m_knob->width(), m_knob->height() );
|
||||
m_knob->setHintText( tr( "Value:" ) + " ", "" );
|
||||
#ifdef QT4
|
||||
m_knob->setWhatsThis(
|
||||
#else
|
||||
QWhatsThis::add( m_knob,
|
||||
#endif
|
||||
tr( "Sorry, no help available." ) );
|
||||
if( _link )
|
||||
{
|
||||
@@ -136,11 +113,7 @@ ladspaControl::ladspaControl( QWidget * _parent,
|
||||
400.0f ) );
|
||||
m_knob->setInitValue( m_port->def );
|
||||
m_knob->setHintText( tr( "Value:" ) + " ", "" );
|
||||
#ifdef QT4
|
||||
m_knob->setWhatsThis(
|
||||
#else
|
||||
QWhatsThis::add( m_knob,
|
||||
#endif
|
||||
tr( "Sorry, no help available." ) );
|
||||
setFixedSize( m_knob->width(), m_knob->height() );
|
||||
if( _link )
|
||||
@@ -162,11 +135,7 @@ ladspaControl::ladspaControl( QWidget * _parent,
|
||||
m_port->min ) / 400.0f );
|
||||
m_knob->setInitValue( m_port->def );
|
||||
m_knob->setHintText( tr( "Value:" ) + " ", "" );
|
||||
#ifdef QT4
|
||||
m_knob->setWhatsThis(
|
||||
#else
|
||||
QWhatsThis::add( m_knob,
|
||||
#endif
|
||||
tr( "Sorry, no help available." ) );
|
||||
setFixedSize( m_knob->width(), m_knob->height() );
|
||||
if( _link )
|
||||
|
||||
@@ -25,21 +25,9 @@
|
||||
#ifndef _LADSPA_CONTROL_H
|
||||
#define _LADSPA_CONTROL_H
|
||||
|
||||
#include "qt3support.h"
|
||||
|
||||
#ifdef QT4
|
||||
|
||||
#include <QtGui/QWidget>
|
||||
#include <QtGui/QLayout>
|
||||
|
||||
#else
|
||||
|
||||
#include <qwidget.h>
|
||||
#include <qlayout.h>
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
#ifdef HAVE_CONFIG_H
|
||||
#include <config.h>
|
||||
#endif
|
||||
|
||||
@@ -24,25 +24,10 @@
|
||||
*/
|
||||
|
||||
|
||||
#include "qt3support.h"
|
||||
|
||||
#ifdef QT4
|
||||
|
||||
#include <QtCore/QDir>
|
||||
#include <QtCore/QFileInfo>
|
||||
#include <QtCore/QLibrary>
|
||||
|
||||
#else
|
||||
|
||||
#include <qdir.h>
|
||||
#include <qfileinfo.h>
|
||||
#include <qlibrary.h>
|
||||
|
||||
#define value data
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
#include <math.h>
|
||||
|
||||
#include "config_mgr.h"
|
||||
@@ -52,17 +37,10 @@
|
||||
|
||||
ladspaManager::ladspaManager( void )
|
||||
{
|
||||
#ifdef QT4
|
||||
QStringList ladspaDirectories = QString( getenv( "LADSPA_PATH" ) ).
|
||||
split( ':' );
|
||||
ladspaDirectories += configManager::inst()->ladspaDir().split( ':' );
|
||||
#else
|
||||
QStringList ladspaDirectories = QStringList::split( ':',
|
||||
QString( getenv( "LADSPA_PATH" ) ) );
|
||||
ladspaDirectories += QStringList::split( ':',
|
||||
configManager::inst()->ladspaDir() );
|
||||
#endif
|
||||
|
||||
|
||||
ladspaDirectories.push_back( "/usr/lib/lmms/ladspa" );
|
||||
/* // set default-directory if nothing is specified...
|
||||
if( ladspaDirectories.isEmpty() )
|
||||
@@ -74,26 +52,11 @@ ladspaManager::ladspaManager( void )
|
||||
it != ladspaDirectories.end(); ++it )
|
||||
{
|
||||
QDir directory( ( *it ) );
|
||||
#ifdef QT4
|
||||
QFileInfoList list = directory.entryInfoList();
|
||||
#else
|
||||
const QFileInfoList * lp = directory.entryInfoList();
|
||||
// if directory doesn't exist or isn't readable, we get NULL
|
||||
// which would crash LMMS...
|
||||
if( lp == NULL )
|
||||
{
|
||||
continue;
|
||||
}
|
||||
QFileInfoList list = *lp;
|
||||
#endif
|
||||
for( QFileInfoList::iterator file = list.begin();
|
||||
file != list.end(); ++file )
|
||||
{
|
||||
#ifdef QT4
|
||||
{
|
||||
const QFileInfo & f = *file;
|
||||
#else
|
||||
const QFileInfo & f = **file;
|
||||
#endif
|
||||
if( !f.isFile() || f.fileName().right(2) != "so" )
|
||||
{
|
||||
continue;
|
||||
@@ -108,9 +71,6 @@ ladspaManager::ladspaManager( void )
|
||||
"ladspa_descriptor" );
|
||||
if( descriptorFunction != NULL )
|
||||
{
|
||||
#ifndef QT4
|
||||
plugin_lib.setAutoUnload( FALSE );
|
||||
#endif
|
||||
addPlugins( descriptorFunction,
|
||||
f.fileName() );
|
||||
}
|
||||
@@ -135,11 +95,7 @@ ladspaManager::~ladspaManager()
|
||||
for( ladspaManagerMapType::iterator it = m_ladspaManagerMap.begin();
|
||||
it != m_ladspaManagerMap.end(); ++it )
|
||||
{
|
||||
#ifndef QT3
|
||||
delete it.value();
|
||||
#else
|
||||
delete it.data();
|
||||
#endif
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -39,35 +39,21 @@
|
||||
#endif
|
||||
|
||||
|
||||
#include "qt3support.h"
|
||||
|
||||
#ifdef QT4
|
||||
|
||||
#include <QtCore/QMap>
|
||||
#include <QtCore/QPair>
|
||||
#include <QtCore/QString>
|
||||
#include <QtCore/QStringList>
|
||||
|
||||
#else
|
||||
|
||||
#include <qstring.h>
|
||||
#include <qstringlist.h>
|
||||
#include <qmap.h>
|
||||
#include <qpair.h>
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
#include "types.h"
|
||||
//#include "qt3support.h"
|
||||
|
||||
|
||||
const float NOHINT = -99342.2243f;
|
||||
|
||||
typedef QPair<QString, QString> ladspa_key_t;
|
||||
typedef QPair<QString, ladspa_key_t> sortable_plugin_t;
|
||||
typedef vlist<sortable_plugin_t> l_sortable_plugin_t;
|
||||
typedef vlist<ladspa_key_t> l_ladspa_key_t;
|
||||
typedef QList<sortable_plugin_t> l_sortable_plugin_t;
|
||||
typedef QList<ladspa_key_t> l_ladspa_key_t;
|
||||
|
||||
/* ladspaManager provides a database of LADSPA plug-ins. Upon instantiation,
|
||||
it loads all of the plug-ins found in the LADSPA_PATH environmental variable
|
||||
|
||||
@@ -22,22 +22,10 @@
|
||||
*
|
||||
*/
|
||||
|
||||
#include "qt3support.h"
|
||||
|
||||
#ifdef QT4
|
||||
|
||||
#include <QtGui/QLayout>
|
||||
#include <QtGui/QTableWidget>
|
||||
|
||||
#else
|
||||
|
||||
#include <qlayout.h>
|
||||
#include <qtable.h>
|
||||
|
||||
#define QTableWidget QTable
|
||||
|
||||
#endif
|
||||
|
||||
#include "ladspa_port_dialog.h"
|
||||
|
||||
#include "embed.h"
|
||||
@@ -76,74 +64,41 @@ ladspaPortDialog::ladspaPortDialog( const ladspa_key_t & _key ) :
|
||||
{
|
||||
port_nums.append( QString::number( row ) );
|
||||
Uint8 col = 0;
|
||||
#ifdef QT3
|
||||
display->setText( row, col, m_ladspa->getPortName(
|
||||
m_key, row ) );
|
||||
#else
|
||||
display->item( row, col )->setText( m_ladspa->getPortName(
|
||||
m_key, row ) );
|
||||
#endif
|
||||
col++;
|
||||
|
||||
if( m_ladspa->isPortAudio( m_key, row ) )
|
||||
{
|
||||
#ifdef QT3
|
||||
display->setText( row, col, tr( "Audio" ) );
|
||||
#else
|
||||
display->item( row, col )->setText( tr( "Audio" ) );
|
||||
#endif
|
||||
}
|
||||
else
|
||||
{
|
||||
#ifdef QT3
|
||||
display->setText( row, col, tr( "Control" ) );
|
||||
#else
|
||||
display->item( row, col )->setText( tr( "Control" ) );
|
||||
#endif
|
||||
}
|
||||
col++;
|
||||
|
||||
if( m_ladspa->isPortInput( m_key, row ) )
|
||||
{
|
||||
#ifdef QT3
|
||||
display->setText( row, col, tr( "Input" ) );
|
||||
#else
|
||||
display->item( row, col )->setText( tr( "Input" ) );
|
||||
#endif
|
||||
}
|
||||
else
|
||||
{
|
||||
#ifdef QT3
|
||||
display->setText( row, col, tr( "Output" ) );
|
||||
#else
|
||||
display->item( row, col )->setText( tr( "Output" ) );
|
||||
#endif
|
||||
}
|
||||
col++;
|
||||
|
||||
if( m_ladspa->isPortToggled( m_key, row ) )
|
||||
{
|
||||
#ifdef QT3
|
||||
display->setText( row, col, tr( "Toggled" ) );
|
||||
#else
|
||||
display->item( row, col )->setText( tr( "Toggled" ) );
|
||||
#endif
|
||||
}
|
||||
else if( m_ladspa->isInteger( m_key, row ) )
|
||||
{
|
||||
#ifdef QT3
|
||||
display->setText( row, col, tr( "Integer" ) );
|
||||
#else
|
||||
display->item( row, col )->setText( tr( "Integer" ) );
|
||||
#endif
|
||||
}
|
||||
else
|
||||
{
|
||||
#ifdef QT3
|
||||
display->setText( row, col, tr( "Float" ) );
|
||||
#else
|
||||
display->item( row, col )->setText( tr( "Float" ) );
|
||||
#endif
|
||||
}
|
||||
col++;
|
||||
|
||||
@@ -210,45 +165,23 @@ ladspaPortDialog::ladspaPortDialog( const ladspa_key_t & _key ) :
|
||||
{
|
||||
range = "";
|
||||
}
|
||||
#ifdef QT3
|
||||
display->setText( row, col, range );
|
||||
#else
|
||||
display->item( row, col )->setText( range );
|
||||
#endif
|
||||
col++;
|
||||
|
||||
if( m_ladspa->isLogarithmic( m_key, row ) )
|
||||
{
|
||||
#ifdef QT3
|
||||
display->setText( row, col, tr( "Yes" ) );
|
||||
#else
|
||||
display->item( row, col )->setText( tr( "Yes" ) );
|
||||
#endif
|
||||
}
|
||||
col++;
|
||||
|
||||
if( m_ladspa->areHintsSampleRateDependent( m_key, row ) )
|
||||
{
|
||||
#ifdef QT3
|
||||
display->setText( row, col, tr( "Yes" ) );
|
||||
#else
|
||||
display->item( row, col )->setText( tr( "Yes" ) );
|
||||
#endif
|
||||
}
|
||||
col++;
|
||||
}
|
||||
|
||||
#ifdef QT3
|
||||
display->setColumnLabels( ports );
|
||||
display->setRowLabels( port_nums );
|
||||
display->setReadOnly( true );
|
||||
|
||||
for(Uint8 col = 0; col < ports.count(); col++ )
|
||||
{
|
||||
display->adjustColumn( col );
|
||||
}
|
||||
#endif
|
||||
|
||||
vlayout->addWidget( settings );
|
||||
|
||||
setFixedSize( display->width(), display->height() );
|
||||
|
||||
@@ -25,20 +25,8 @@
|
||||
#ifndef _LADSPA_PORT_DIALOG_H
|
||||
#define _LADSPA_PORT_DIALOG_H
|
||||
|
||||
#include "qt3support.h"
|
||||
|
||||
|
||||
#ifdef QT4
|
||||
|
||||
#include <QtGui/QDialog>
|
||||
|
||||
#else
|
||||
|
||||
#include <qdialog.h>
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
#include "ladspa_2_lmms.h"
|
||||
|
||||
|
||||
|
||||
@@ -24,18 +24,8 @@
|
||||
*/
|
||||
|
||||
|
||||
#include "qt3support.h"
|
||||
|
||||
#ifdef QT4
|
||||
|
||||
#include <QtGui/QMessageBox>
|
||||
|
||||
#else
|
||||
|
||||
#include <qmessagebox.h>
|
||||
|
||||
#endif
|
||||
|
||||
#include "ladspa_effect.h"
|
||||
|
||||
|
||||
@@ -49,13 +39,9 @@ ladspaControlDialog::ladspaControlDialog( QWidget * _parent,
|
||||
m_noLink( FALSE )
|
||||
{
|
||||
m_mainLay = new QVBoxLayout( this );
|
||||
#ifdef QT3
|
||||
m_effectLay = new QHBoxLayout( m_mainLay );
|
||||
#else
|
||||
m_effectLay = new QHBoxLayout();
|
||||
m_mainLay->addLayout( m_effectLay );
|
||||
#endif
|
||||
|
||||
|
||||
multi_proc_t controls = m_effect->getControls();
|
||||
m_controlCount = controls.count();
|
||||
|
||||
@@ -73,16 +59,10 @@ ladspaControlDialog::ladspaControlDialog( QWidget * _parent,
|
||||
QGroupBox * grouper;
|
||||
if( m_processors > 1 )
|
||||
{
|
||||
#ifdef QT3
|
||||
grouper = new QGroupBox( rows, Qt::Vertical,
|
||||
tr( "Channel " ) + QString::number( proc + 1 ),
|
||||
this );
|
||||
#else
|
||||
grouper = new QGroupBox( tr( "Channel " ) +
|
||||
QString::number( proc + 1 ),
|
||||
this );
|
||||
grouper->setAlignment( Qt::Vertical );
|
||||
#endif
|
||||
if( proc == 0 )
|
||||
{
|
||||
linked_control = TRUE;
|
||||
@@ -90,13 +70,8 @@ ladspaControlDialog::ladspaControlDialog( QWidget * _parent,
|
||||
}
|
||||
else
|
||||
{
|
||||
#ifdef QT3
|
||||
grouper = new QGroupBox( rows, Qt::Vertical,
|
||||
"", this );
|
||||
#else
|
||||
grouper = new QGroupBox( this );
|
||||
grouper->setAlignment( Qt::Vertical );
|
||||
#endif
|
||||
}
|
||||
|
||||
for( multi_proc_t::iterator it = controls.begin();
|
||||
@@ -155,12 +130,8 @@ ladspaControlDialog::ladspaControlDialog( QWidget * _parent,
|
||||
if( m_processors > 1 )
|
||||
{
|
||||
m_mainLay->addSpacing( 3 );
|
||||
#ifdef QT3
|
||||
QHBoxLayout * center = new QHBoxLayout( m_mainLay );
|
||||
#else
|
||||
QHBoxLayout * center = new QHBoxLayout();
|
||||
m_mainLay->addLayout( center );
|
||||
#endif
|
||||
m_stereoLink = new ledCheckBox( tr( "Link Channels" ), this,
|
||||
NULL, NULL );
|
||||
connect( m_stereoLink, SIGNAL( toggled( bool ) ),
|
||||
|
||||
@@ -26,26 +26,15 @@
|
||||
#ifndef _LADSPA_CONTROL_DIALOG_H
|
||||
#define _LADSPA_CONTROL_DIALOG_H
|
||||
|
||||
#include "qt3support.h"
|
||||
|
||||
#ifdef QT4
|
||||
|
||||
#include <QtGui/QGroupBox>
|
||||
#include <QtGui/QLayout>
|
||||
|
||||
#else
|
||||
|
||||
#include <qgroupbox.h>
|
||||
#include <qlayout.h>
|
||||
|
||||
#endif
|
||||
|
||||
#include "effect_control_dialog.h"
|
||||
#include "ladspa_control.h"
|
||||
#include "led_checkbox.h"
|
||||
|
||||
|
||||
typedef vvector<ladspaControl *> control_list_t;
|
||||
typedef QVector<ladspaControl *> control_list_t;
|
||||
|
||||
class ladspaEffect;
|
||||
|
||||
@@ -85,8 +74,8 @@ private:
|
||||
bool m_noLink;
|
||||
audioPort * m_port;
|
||||
ledCheckBox * m_stereoLink;
|
||||
vvector<QWidget *> m_blanks;
|
||||
vvector<control_list_t> m_controls;
|
||||
QVector<QWidget *> m_blanks;
|
||||
QVector<control_list_t> m_controls;
|
||||
|
||||
QVBoxLayout * m_mainLay;
|
||||
QHBoxLayout * m_effectLay;
|
||||
|
||||
@@ -23,20 +23,8 @@
|
||||
*/
|
||||
|
||||
|
||||
#include "qt3support.h"
|
||||
|
||||
#ifdef QT4
|
||||
|
||||
#include <QtGui/QMessageBox>
|
||||
|
||||
#else
|
||||
|
||||
#include "qmessagebox.h"
|
||||
#define indexOf find
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
#include "ladspa_effect.h"
|
||||
#include "mixer.h"
|
||||
#include "config_mgr.h"
|
||||
|
||||
@@ -25,12 +25,6 @@
|
||||
#ifndef _LADSPA_EFFECT_H
|
||||
#define _LADSPA_EFFECT_H
|
||||
|
||||
#ifdef HAVE_CONFIG_H
|
||||
#include <config.h>
|
||||
#endif
|
||||
|
||||
#include "qt3support.h"
|
||||
|
||||
#include "effect.h"
|
||||
#include "engine.h"
|
||||
#include "ladspa_2_lmms.h"
|
||||
@@ -41,7 +35,7 @@
|
||||
#include "main_window.h"
|
||||
|
||||
|
||||
typedef vvector<port_desc_t *> multi_proc_t;
|
||||
typedef QVector<port_desc_t *> multi_proc_t;
|
||||
|
||||
class ladspaEffect : public effect
|
||||
{
|
||||
@@ -92,9 +86,9 @@ private:
|
||||
fpp_t m_bufferSize;
|
||||
|
||||
const LADSPA_Descriptor * m_descriptor;
|
||||
vvector<LADSPA_Handle> m_handles;
|
||||
QVector<LADSPA_Handle> m_handles;
|
||||
|
||||
vvector<multi_proc_t> m_ports;
|
||||
QVector<multi_proc_t> m_ports;
|
||||
multi_proc_t m_controls;
|
||||
} ;
|
||||
|
||||
|
||||
@@ -26,23 +26,10 @@
|
||||
*/
|
||||
|
||||
|
||||
#include "qt3support.h"
|
||||
|
||||
#ifdef QT4
|
||||
|
||||
#include <QtCore/QString>
|
||||
#include <QtGui/QLabel>
|
||||
#include <QtGui/QBoxLayout>
|
||||
|
||||
#else
|
||||
|
||||
#include <qhbox.h>
|
||||
//#include <qlayout.h>
|
||||
#include <qlabel.h>
|
||||
#include <qstring.h>
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
#include "ladspa_subplugin_features.h"
|
||||
#include "ladspa_2_lmms.h"
|
||||
@@ -68,51 +55,34 @@ void ladspaSubPluginFeatures::fillDescriptionWidget( QWidget * _parent,
|
||||
QLabel * label = new QLabel( _parent );
|
||||
label->setText( QWidget::tr( "Name: " ) + lm->getName( lkey ) );
|
||||
|
||||
#ifndef QT3
|
||||
QWidget * maker = new QWidget( _parent );
|
||||
QHBoxLayout * l = new QHBoxLayout( maker );
|
||||
l->setMargin( 0 );
|
||||
l->setSpacing( 0 );
|
||||
#else
|
||||
QHBox * maker = new QHBox( _parent );
|
||||
#endif
|
||||
|
||||
QLabel * maker_label = new QLabel( maker );
|
||||
maker_label->setText( QWidget::tr( "Maker: " ) );
|
||||
maker_label->setAlignment( Qt::AlignTop );
|
||||
QLabel * maker_content = new QLabel( maker );
|
||||
maker_content->setText( lm->getMaker( lkey ) );
|
||||
#ifndef QT3
|
||||
maker_content->setWordWrap( TRUE );
|
||||
l->setStretchFactor( maker_content, 100 );
|
||||
#else
|
||||
maker_content->setAlignment( Qt::WordBreak );
|
||||
maker->setStretchFactor( maker_content, 100 );
|
||||
#endif
|
||||
|
||||
|
||||
#ifndef QT3
|
||||
QWidget * copyright = new QWidget( _parent );
|
||||
l = new QHBoxLayout( copyright );
|
||||
l->setMargin( 0 );
|
||||
l->setSpacing( 0 );
|
||||
#else
|
||||
QHBox * copyright = new QHBox( _parent );
|
||||
#endif
|
||||
|
||||
copyright->setMinimumWidth( _parent->minimumWidth() );
|
||||
QLabel * copyright_label = new QLabel( copyright );
|
||||
copyright_label->setText( QWidget::tr( "Copyright: " ) );
|
||||
copyright_label->setAlignment( Qt::AlignTop );
|
||||
|
||||
QLabel * copyright_content = new QLabel( copyright );
|
||||
copyright_content->setText( lm->getCopyright( lkey ) );
|
||||
#ifndef QT3
|
||||
copyright_content->setWordWrap( TRUE );
|
||||
l->setStretchFactor( copyright_content, 100 );
|
||||
#else
|
||||
copyright_content->setAlignment( Qt::WordBreak );
|
||||
copyright->setStretchFactor( copyright_content, 100 );
|
||||
#endif
|
||||
|
||||
QLabel * requiresRealTime = new QLabel( _parent );
|
||||
requiresRealTime->setText( QWidget::tr( "Requires Real Time: " ) +
|
||||
|
||||
@@ -28,19 +28,9 @@
|
||||
*
|
||||
*/
|
||||
|
||||
#include "qt3support.h"
|
||||
|
||||
#ifdef QT4
|
||||
|
||||
#include <Qt/QtXml>
|
||||
|
||||
#else
|
||||
|
||||
#include <qdom.h>
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
#include "lb302.h"
|
||||
#include "engine.h"
|
||||
#include "instrument_play_handle.h"
|
||||
@@ -437,15 +427,11 @@ lb302Synth::lb302Synth( instrumentTrack * _channel_track ) :
|
||||
connect( wave_knob, SIGNAL( valueChanged(float) ),
|
||||
this, SLOT ( waveChanged( float )));
|
||||
|
||||
#ifdef QT4
|
||||
setAutoFillBackground( TRUE );
|
||||
QPalette pal;
|
||||
pal.setBrush( backgroundRole(), PLUGIN_NAME::getIconPixmap(
|
||||
"artwork" ) );
|
||||
setPalette( pal );
|
||||
#else
|
||||
setErasePixmap( PLUGIN_NAME::getIconPixmap( "artwork" ) );
|
||||
#endif
|
||||
|
||||
|
||||
// SYNTH
|
||||
|
||||
@@ -23,19 +23,8 @@
|
||||
*/
|
||||
|
||||
|
||||
#include "qt3support.h"
|
||||
|
||||
#ifndef QT3
|
||||
|
||||
#include <QtGui/QKeyEvent>
|
||||
|
||||
#else
|
||||
|
||||
#include <qwhatsthis.h>
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
#include "live_tool.h"
|
||||
#include "bb_editor.h"
|
||||
#include "engine.h"
|
||||
@@ -78,22 +67,14 @@ liveTool::liveTool( mainWindow * _window ) :
|
||||
tool( _window, &live_tool_plugin_descriptor )
|
||||
{
|
||||
const QPixmap background = PLUGIN_NAME::getIconPixmap( "artwork" );
|
||||
#ifndef QT3
|
||||
|
||||
setAutoFillBackground( TRUE );
|
||||
QPalette pal;
|
||||
pal.setBrush( backgroundRole(), background );
|
||||
setPalette( pal );
|
||||
#else
|
||||
setPaletteBackgroundPixmap( background );
|
||||
#endif
|
||||
setFixedSize( background.size() );
|
||||
|
||||
#ifdef QT4
|
||||
setWhatsThis(
|
||||
#else
|
||||
QWhatsThis::add( this,
|
||||
#endif
|
||||
tr(
|
||||
setWhatsThis( tr(
|
||||
"This tool is intended to be used in live performances, though "
|
||||
"you can use it for music production as well.\n"
|
||||
"The following keys will work only if this window is active.\n"
|
||||
@@ -174,20 +155,11 @@ bool liveTool::x11Event( XEvent * _xe )
|
||||
|
||||
void liveTool::toggleInstrument( int _n )
|
||||
{
|
||||
#ifndef QT3
|
||||
if( _n > 0 && _n < engine::getBBEditor()->tracks().count() )
|
||||
{
|
||||
track * t = engine::getBBEditor()->tracks().at( _n );
|
||||
t->setMuted( !t->muted() );
|
||||
}
|
||||
#else
|
||||
bool track_exists;
|
||||
track * t = engine::getBBEditor()->tracks().at( _n, &track_exists );
|
||||
if( track_exists )
|
||||
{
|
||||
t->setMuted( !t->muted() );
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -23,6 +23,10 @@
|
||||
*/
|
||||
|
||||
|
||||
#include <Qt/QtXml>
|
||||
#include <QtGui/QApplication>
|
||||
#include <QtGui/QProgressDialog>
|
||||
|
||||
#include "midi_import.h"
|
||||
#include "track_container.h"
|
||||
#include "instrument_track.h"
|
||||
@@ -32,24 +36,6 @@
|
||||
#include "debug.h"
|
||||
|
||||
|
||||
|
||||
#ifdef QT4
|
||||
|
||||
#include <Qt/QtXml>
|
||||
#include <QtGui/QApplication>
|
||||
#include <QtGui/QProgressDialog>
|
||||
|
||||
#else
|
||||
|
||||
#include <qdom.h>
|
||||
#include <qapplication.h>
|
||||
#include <qprogressdialog.h>
|
||||
|
||||
#define pos at
|
||||
#define setValue setProgress
|
||||
|
||||
#endif
|
||||
|
||||
#define makeID(_c0, _c1, _c2, _c3) \
|
||||
( ( _c0 ) | ( ( _c1 ) << 8 ) | ( ( _c2 ) << 16 ) | ( ( _c3 ) << 24 ) )
|
||||
|
||||
@@ -176,14 +162,8 @@ invalid_format:
|
||||
printf( "time-division: %d\n", time_division );
|
||||
#endif
|
||||
|
||||
#ifdef QT4
|
||||
QProgressDialog pd( trackContainer::tr( "Importing MIDI-file..." ),
|
||||
trackContainer::tr( "Cancel" ), 0, num_tracks );
|
||||
#else
|
||||
QProgressDialog pd( trackContainer::tr( "Importing MIDI-file..." ),
|
||||
trackContainer::tr( "Cancel" ), num_tracks,
|
||||
0, 0, TRUE );
|
||||
#endif
|
||||
pd.setWindowTitle( trackContainer::tr( "Please wait..." ) );
|
||||
pd.show();
|
||||
|
||||
@@ -207,11 +187,7 @@ invalid_format:
|
||||
for( int i = 0; i < num_tracks; ++i )
|
||||
{
|
||||
pd.setValue( i );
|
||||
#ifdef QT4
|
||||
qApp->processEvents( QEventLoop::AllEvents, 100 );
|
||||
#else
|
||||
qApp->processEvents( 100 );
|
||||
#endif
|
||||
|
||||
if( pd.wasCanceled() )
|
||||
{
|
||||
|
||||
@@ -30,24 +30,10 @@
|
||||
#include <config.h>
|
||||
#endif
|
||||
|
||||
|
||||
#include "qt3support.h"
|
||||
|
||||
#ifdef QT4
|
||||
|
||||
#include <QtCore/QString>
|
||||
#include <QtCore/QPair>
|
||||
#include <QtCore/QVector>
|
||||
|
||||
#else
|
||||
|
||||
#include <qstring.h>
|
||||
#include <qpair.h>
|
||||
#include <qvaluevector.h>
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
#include "midi.h"
|
||||
#include "import_filter.h"
|
||||
|
||||
@@ -131,7 +117,7 @@ private:
|
||||
}
|
||||
|
||||
|
||||
typedef vvector<QPair<int, midiEvent> > eventVector;
|
||||
typedef QVector<QPair<int, midiEvent> > eventVector;
|
||||
eventVector m_events;
|
||||
int m_timingDivision;
|
||||
|
||||
|
||||
@@ -23,25 +23,10 @@
|
||||
*/
|
||||
|
||||
|
||||
#include "qt3support.h"
|
||||
|
||||
#ifdef QT4
|
||||
|
||||
#include <QtGui/QPainter>
|
||||
#include <Qt/QtXml>
|
||||
#include <QtGui/QDropEvent>
|
||||
|
||||
#else
|
||||
|
||||
#include <qpainter.h>
|
||||
#include <qdom.h>
|
||||
#include <qdom.h>
|
||||
#include <qmap.h>
|
||||
#include <qcanvas.h>
|
||||
#include <qlabel.h>
|
||||
|
||||
#endif
|
||||
|
||||
#include <iostream>
|
||||
#include <cstdlib>
|
||||
#include <ctime>
|
||||
@@ -214,15 +199,11 @@ organicInstrument::organicInstrument( instrumentTrack * _channel_track ) :
|
||||
|
||||
|
||||
|
||||
#ifdef QT4
|
||||
setAutoFillBackground( TRUE );
|
||||
QPalette pal;
|
||||
pal.setBrush( backgroundRole(), PLUGIN_NAME::getIconPixmap(
|
||||
"artwork" ) );
|
||||
setPalette( pal );
|
||||
#else
|
||||
setErasePixmap( PLUGIN_NAME::getIconPixmap( "artwork" ) );
|
||||
#endif
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -23,23 +23,10 @@
|
||||
*/
|
||||
|
||||
|
||||
#include "qt3support.h"
|
||||
|
||||
#ifdef QT4
|
||||
|
||||
#include <QtGui/QFileDialog>
|
||||
#include <QtGui/QDragEnterEvent>
|
||||
#include <QtXml/QDomElement>
|
||||
|
||||
#else
|
||||
|
||||
#include <qcursor.h>
|
||||
#include <qdom.h>
|
||||
#include <qfiledialog.h>
|
||||
#include <qwhatsthis.h>
|
||||
|
||||
#endif
|
||||
|
||||
#include "patman.h"
|
||||
#include "endian_handling.h"
|
||||
#include "engine.h"
|
||||
@@ -89,15 +76,12 @@ patmanSynth::patmanSynth( instrumentTrack * _track ) :
|
||||
instrument( _track, &patman_plugin_descriptor ),
|
||||
specialBgHandlingWidget( PLUGIN_NAME::getIconPixmap( "artwork" ) )
|
||||
{
|
||||
#ifndef QT3
|
||||
setAutoFillBackground( TRUE );
|
||||
QPalette pal;
|
||||
pal.setBrush( backgroundRole(),
|
||||
PLUGIN_NAME::getIconPixmap( "artwork" ) );
|
||||
setPalette( pal );
|
||||
#else
|
||||
setPaletteBackgroundPixmap( PLUGIN_NAME::getIconPixmap( "artwork" ) );
|
||||
#endif
|
||||
|
||||
m_openFileButton = new pixmapButton( this, NULL, NULL );
|
||||
m_openFileButton->setCursor( QCursor( Qt::PointingHandCursor ) );
|
||||
m_openFileButton->move( 200, 90 );
|
||||
@@ -111,11 +95,7 @@ patmanSynth::patmanSynth( instrumentTrack * _track ) :
|
||||
SLOT( openFile() ) );
|
||||
toolTip::add( m_openFileButton, tr( "Open other patch" ) );
|
||||
|
||||
#ifdef QT4
|
||||
m_openFileButton->setWhatsThis(
|
||||
#else
|
||||
QWhatsThis::add( m_openFileButton,
|
||||
#endif
|
||||
tr( "Click here to open another patch-file. Loop and Tune "
|
||||
"settings are not reset." ) );
|
||||
|
||||
@@ -128,11 +108,7 @@ patmanSynth::patmanSynth( instrumentTrack * _track ) :
|
||||
"loop_off" ) );
|
||||
m_loopButton->setBgGraphic( getBackground( m_loopButton ) );
|
||||
toolTip::add( m_loopButton, tr( "Loop mode" ) );
|
||||
#ifdef QT4
|
||||
m_loopButton->setWhatsThis(
|
||||
#else
|
||||
QWhatsThis::add( m_loopButton,
|
||||
#endif
|
||||
tr( "Here you can toggle the Loop mode. If enabled, PatMan "
|
||||
"will use the loop information available in the "
|
||||
"file." ) );
|
||||
@@ -147,11 +123,7 @@ patmanSynth::patmanSynth( instrumentTrack * _track ) :
|
||||
"tune_off" ) );
|
||||
m_tuneButton->setBgGraphic( getBackground( m_tuneButton ) );
|
||||
toolTip::add( m_tuneButton, tr( "Tune mode" ) );
|
||||
#ifdef QT4
|
||||
m_tuneButton->setWhatsThis(
|
||||
#else
|
||||
QWhatsThis::add( m_tuneButton,
|
||||
#endif
|
||||
tr( "Here you can toggle the Tune mode. If enabled, PatMan "
|
||||
"will tune the sample to match the note's "
|
||||
"frequency." ) );
|
||||
@@ -249,7 +221,6 @@ void patmanSynth::deleteNotePluginData( notePlayHandle * _n )
|
||||
|
||||
void patmanSynth::dragEnterEvent( QDragEnterEvent * _dee )
|
||||
{
|
||||
#ifdef QT4
|
||||
if( _dee->mimeData()->hasFormat( stringPairDrag::mimeType() ) )
|
||||
{
|
||||
QString txt = _dee->mimeData()->data(
|
||||
@@ -267,35 +238,6 @@ void patmanSynth::dragEnterEvent( QDragEnterEvent * _dee )
|
||||
{
|
||||
_dee->ignore();
|
||||
}
|
||||
#else
|
||||
QString txt = _dee->encodedData( stringPairDrag::mimeType() );
|
||||
if( txt != "" )
|
||||
{
|
||||
if( txt.section( ':', 0, 0 ) == "samplefile"
|
||||
&& subPluginFeatures::supported_extensions().contains(
|
||||
fileItem::extension( txt.section( ':', 1 ) ) ) )
|
||||
{
|
||||
_dee->accept();
|
||||
return;
|
||||
}
|
||||
_dee->ignore();
|
||||
return;
|
||||
}
|
||||
|
||||
txt = QString( _dee->encodedData( "text/plain" ) );
|
||||
if( txt != "" )
|
||||
{
|
||||
QString file = QUriDrag::uriToLocalFile(
|
||||
txt.stripWhiteSpace() );
|
||||
if( file && subPluginFeatures::supported_extensions().contains(
|
||||
fileItem::extension( file ) ) )
|
||||
{
|
||||
_dee->accept();
|
||||
return;
|
||||
}
|
||||
}
|
||||
_dee->ignore();
|
||||
#endif
|
||||
}
|
||||
|
||||
|
||||
@@ -312,16 +254,6 @@ void patmanSynth::dropEvent( QDropEvent * _de )
|
||||
return;
|
||||
}
|
||||
|
||||
#ifndef QT4
|
||||
QString txt = _de->encodedData( "text/plain" );
|
||||
if( txt != "" )
|
||||
{
|
||||
setFile( QUriDrag::uriToLocalFile( txt.stripWhiteSpace() ) );
|
||||
_de->accept();
|
||||
return;
|
||||
}
|
||||
#endif
|
||||
|
||||
_de->ignore();
|
||||
}
|
||||
|
||||
@@ -330,22 +262,11 @@ void patmanSynth::dropEvent( QDropEvent * _de )
|
||||
|
||||
void patmanSynth::paintEvent( QPaintEvent * )
|
||||
{
|
||||
#ifdef QT4
|
||||
QPainter p( this );
|
||||
#else
|
||||
QPixmap pm( rect().size() );
|
||||
pm.fill( this, rect().topLeft() );
|
||||
|
||||
QPainter p( &pm, this );
|
||||
#endif
|
||||
|
||||
p.setFont( pointSize<8>( font() ) );
|
||||
p.setPen( QColor( 0x66, 0xFF, 0x66 ) );
|
||||
p.drawText( 8, 140, m_display_filename );
|
||||
|
||||
#ifndef QT4
|
||||
bitBlt( this, rect().topLeft(), &pm );
|
||||
#endif
|
||||
}
|
||||
|
||||
|
||||
@@ -353,22 +274,12 @@ void patmanSynth::paintEvent( QPaintEvent * )
|
||||
|
||||
void patmanSynth::openFile( void )
|
||||
{
|
||||
#ifdef QT4
|
||||
QFileDialog ofd( NULL, tr( "Open patch file" ) );
|
||||
#else
|
||||
QFileDialog ofd( QString::null, QString::null, NULL, "", TRUE );
|
||||
ofd.setWindowTitle( tr( "Open patch file" ) );
|
||||
#endif
|
||||
ofd.setFileMode( QFileDialog::ExistingFiles );
|
||||
|
||||
// set filters
|
||||
#ifdef QT4
|
||||
QStringList types;
|
||||
types << tr( "Patch-Files (*.pat)" );
|
||||
ofd.setFilters( types );
|
||||
#else
|
||||
ofd.addFilter( tr( "Patch-Files (*.pat)" ) );
|
||||
#endif
|
||||
|
||||
if( m_patchFile == "" )
|
||||
{
|
||||
@@ -442,12 +353,7 @@ void patmanSynth::setFile( const QString & _patch_file, bool _rename )
|
||||
|
||||
// simple algorithm for creating a text from the filename that
|
||||
// matches in the white rectangle
|
||||
while( idx > 0 && fm.size(
|
||||
#ifdef QT4
|
||||
Qt::TextSingleLine,
|
||||
#else
|
||||
Qt::SingleLine,
|
||||
#endif
|
||||
while( idx > 0 && fm.size( Qt::TextSingleLine,
|
||||
m_display_filename + "..." ).width() < 225 )
|
||||
{
|
||||
m_display_filename = m_patchFile[--idx] + m_display_filename;
|
||||
@@ -468,11 +374,7 @@ patmanSynth::load_error patmanSynth::load_patch( const QString & _filename )
|
||||
{
|
||||
unload_current_patch();
|
||||
|
||||
FILE * fd = fopen( _filename
|
||||
#ifndef QT3
|
||||
.toAscii().constData()
|
||||
#endif
|
||||
, "rb" );
|
||||
FILE * fd = fopen( _filename.toAscii().constData() , "rb" );
|
||||
if( !fd )
|
||||
{
|
||||
perror( "fopen" );
|
||||
@@ -653,7 +555,7 @@ void patmanSynth::select_sample( notePlayHandle * _n )
|
||||
float min_dist = HUGE_VALF;
|
||||
sampleBuffer * sample = NULL;
|
||||
|
||||
for( vvector<sampleBuffer *>::iterator it = m_patch_samples.begin();
|
||||
for( QVector<sampleBuffer *>::iterator it = m_patch_samples.begin();
|
||||
it != m_patch_samples.end(); ++it )
|
||||
{
|
||||
float patch_freq = ( *it )->frequency();
|
||||
|
||||
@@ -102,7 +102,7 @@ private:
|
||||
} handle_data;
|
||||
|
||||
QString m_patchFile;
|
||||
vvector<sampleBuffer *> m_patch_samples;
|
||||
QVector<sampleBuffer *> m_patch_samples;
|
||||
|
||||
pixmapButton * m_openFileButton;
|
||||
pixmapButton * m_loopButton;
|
||||
|
||||
@@ -23,24 +23,11 @@
|
||||
*/
|
||||
|
||||
|
||||
#include "qt3support.h"
|
||||
|
||||
#ifdef QT4
|
||||
|
||||
#include <QtCore/QDir>
|
||||
#include <QtGui/QLayout>
|
||||
#include <QtGui/QTextEdit>
|
||||
#include <QtXml/QDomElement>
|
||||
|
||||
#else
|
||||
|
||||
#include <qdir.h>
|
||||
#include <qdom.h>
|
||||
#include <qlayout.h>
|
||||
#include <qtextedit.h>
|
||||
|
||||
#endif
|
||||
|
||||
#include "singerbot.h"
|
||||
#include "engine.h"
|
||||
#include "instrument_track.h"
|
||||
@@ -99,15 +86,11 @@ singerBot::singerBot( instrumentTrack * _track ) :
|
||||
s_thread->start();
|
||||
}
|
||||
|
||||
#ifndef QT3
|
||||
setAutoFillBackground( TRUE );
|
||||
QPalette pal;
|
||||
pal.setBrush( backgroundRole(),
|
||||
PLUGIN_NAME::getIconPixmap( "artwork" ) );
|
||||
setPalette( pal );
|
||||
#else
|
||||
setPaletteBackgroundPixmap( PLUGIN_NAME::getIconPixmap( "artwork" ) );
|
||||
#endif
|
||||
|
||||
QVBoxLayout * vbox = new QVBoxLayout( this );
|
||||
vbox->setMargin( 10 );
|
||||
@@ -115,14 +98,9 @@ singerBot::singerBot( instrumentTrack * _track ) :
|
||||
vbox->addSpacing( 45 );
|
||||
|
||||
m_lyrics = new QTextEdit( this );
|
||||
#ifdef QT4
|
||||
m_lyrics->setAutoFillBackground( TRUE );
|
||||
pal.setColor( m_lyrics->backgroundRole(), QColor( 64, 64, 64 ) );
|
||||
m_lyrics->setPalette( pal );
|
||||
#else
|
||||
m_lyrics->setTextFormat( PlainText );
|
||||
m_lyrics->setPaletteBackgroundColor( QColor( 64, 64, 64 ) );
|
||||
#endif
|
||||
m_lyrics->setText( "Hello, world!" );
|
||||
|
||||
connect( m_lyrics, SIGNAL( textChanged( void ) ),
|
||||
@@ -182,12 +160,8 @@ void singerBot::saveSettings( QDomDocument & _doc, QDomElement & _this )
|
||||
{
|
||||
QDomElement element = _doc.createElement( "lyrics" );
|
||||
_this.appendChild( element );
|
||||
#ifdef QT4
|
||||
QDomCDATASection ds = _doc.createCDATASection(
|
||||
m_lyrics->toPlainText() );
|
||||
#else
|
||||
QDomCDATASection ds = _doc.createCDATASection( m_lyrics->text() );
|
||||
#endif
|
||||
element.appendChild( ds );
|
||||
}
|
||||
|
||||
@@ -196,12 +170,8 @@ void singerBot::saveSettings( QDomDocument & _doc, QDomElement & _this )
|
||||
|
||||
void singerBot::loadSettings( const QDomElement & _this )
|
||||
{
|
||||
#ifdef QT4
|
||||
m_lyrics->setPlainText(
|
||||
_this.namedItem( "lyrics" ).toElement().text() );
|
||||
#else
|
||||
m_lyrics->setText( _this.namedItem( "lyrics" ).toElement().text() );
|
||||
#endif
|
||||
}
|
||||
|
||||
|
||||
@@ -225,13 +195,8 @@ void singerBot::lyricsChanged( void )
|
||||
|
||||
void singerBot::updateWords( void )
|
||||
{
|
||||
#ifndef QT3
|
||||
m_words = m_lyrics->toPlainText().simplified().toLower().
|
||||
split( ' ' );
|
||||
#else
|
||||
m_words = QStringList::split( ' ',
|
||||
m_lyrics->text().simplifyWhiteSpace().lower() );
|
||||
#endif
|
||||
m_words_dirty = FALSE;
|
||||
}
|
||||
|
||||
@@ -261,12 +226,7 @@ void singerBot::createWave( notePlayHandle * _n )
|
||||
/ 64.0f / engine::getSongEditor()->getTempo() :
|
||||
0;
|
||||
int word_index = _n->patternIndex() % m_words.size();
|
||||
hdata->text = m_words[word_index].
|
||||
#ifndef QT3
|
||||
toAscii().constData();
|
||||
#else
|
||||
ascii();
|
||||
#endif
|
||||
hdata->text = m_words[word_index].toAscii().constData();
|
||||
|
||||
s_thread->set_data( hdata );
|
||||
s_thread->unlock_synth();
|
||||
@@ -373,13 +333,8 @@ singerBot::synThread::synThread( void ) :
|
||||
m_handle_semaphore( 1 ),
|
||||
m_synth_semaphore( 1 )
|
||||
{
|
||||
#ifndef QT3
|
||||
m_handle_semaphore.acquire();
|
||||
m_synth_semaphore.acquire();
|
||||
#else
|
||||
m_handle_semaphore++;
|
||||
m_synth_semaphore++;
|
||||
#endif
|
||||
}
|
||||
|
||||
|
||||
@@ -387,13 +342,8 @@ singerBot::synThread::synThread( void ) :
|
||||
|
||||
singerBot::synThread::~synThread()
|
||||
{
|
||||
#ifndef QT3
|
||||
m_handle_semaphore.release();
|
||||
m_synth_semaphore.release();
|
||||
#else
|
||||
m_handle_semaphore--;
|
||||
m_synth_semaphore--;
|
||||
#endif
|
||||
}
|
||||
|
||||
|
||||
@@ -424,11 +374,7 @@ void singerBot::synThread::run( void )
|
||||
|
||||
for( ; ; )
|
||||
{
|
||||
#ifndef QT3
|
||||
m_synth_semaphore.acquire();
|
||||
#else
|
||||
m_synth_semaphore++;
|
||||
#endif
|
||||
text_to_wave();
|
||||
if( !m_data->wave )
|
||||
{
|
||||
@@ -439,11 +385,7 @@ void singerBot::synThread::run( void )
|
||||
printf( "Unsupported frequency?\n" );
|
||||
}
|
||||
}
|
||||
#ifndef QT3
|
||||
m_handle_semaphore.release();
|
||||
#else
|
||||
m_handle_semaphore--;
|
||||
#endif
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -26,16 +26,8 @@
|
||||
#ifndef _SINGERBOT_H
|
||||
#define _SINGERBOT_H
|
||||
|
||||
#ifndef QT3
|
||||
|
||||
#include <QtCore/QThread>
|
||||
|
||||
#else
|
||||
|
||||
#include <qthread.h>
|
||||
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_CONFIG_H
|
||||
#include <config.h>
|
||||
#endif
|
||||
@@ -104,19 +96,11 @@ private:
|
||||
|
||||
void unlock_synth( void )
|
||||
{
|
||||
#ifndef QT3
|
||||
m_synth_semaphore.release();
|
||||
#else
|
||||
m_synth_semaphore--;
|
||||
#endif
|
||||
}
|
||||
void lock_handle( void )
|
||||
{
|
||||
#ifndef QT3
|
||||
m_handle_semaphore.acquire();
|
||||
#else
|
||||
m_handle_semaphore++;
|
||||
#endif
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -23,20 +23,8 @@
|
||||
*/
|
||||
|
||||
|
||||
#include "qt3support.h"
|
||||
|
||||
#ifdef QT4
|
||||
|
||||
#include <Qt/QtXml>
|
||||
|
||||
#else
|
||||
|
||||
#include <qdom.h>
|
||||
#include <qmessagebox.h>
|
||||
#include <qdir.h>
|
||||
|
||||
#endif
|
||||
|
||||
#include "BandedWG.h"
|
||||
#include "ModalBar.h"
|
||||
#include "TubeBell.h"
|
||||
@@ -128,15 +116,11 @@ mallets::~mallets()
|
||||
|
||||
void mallets::setWidgetBackground( QWidget * _widget, const QString & _pic )
|
||||
{
|
||||
#ifdef QT4
|
||||
_widget->setAutoFillBackground( TRUE );
|
||||
QPalette pal;
|
||||
pal.setBrush( _widget->backgroundRole(),
|
||||
PLUGIN_NAME::getIconPixmap( _pic.toAscii().constData() ) );
|
||||
_widget->setPalette( pal );
|
||||
#else
|
||||
_widget->setErasePixmap( PLUGIN_NAME::getIconPixmap( _pic ) );
|
||||
#endif
|
||||
}
|
||||
|
||||
|
||||
@@ -541,10 +525,7 @@ malletsSynth::malletsSynth( const StkFloat _pitch,
|
||||
{
|
||||
Stk::setSampleRate( _sample_rate );
|
||||
Stk::setRawwavePath( configManager::inst()->stkDir()
|
||||
#ifndef QT3
|
||||
.toAscii().constData()
|
||||
#endif
|
||||
);
|
||||
.toAscii().constData() );
|
||||
|
||||
m_voice = new ModalBar();
|
||||
|
||||
@@ -591,10 +572,7 @@ malletsSynth::malletsSynth( const StkFloat _pitch,
|
||||
{
|
||||
Stk::setSampleRate( _sample_rate );
|
||||
Stk::setRawwavePath( configManager::inst()->stkDir()
|
||||
#ifndef QT3
|
||||
.toAscii().constData()
|
||||
#endif
|
||||
);
|
||||
.toAscii().constData() );
|
||||
|
||||
m_voice = new TubeBell();
|
||||
|
||||
@@ -639,10 +617,7 @@ malletsSynth::malletsSynth( const StkFloat _pitch,
|
||||
{
|
||||
Stk::setSampleRate( _sample_rate );
|
||||
Stk::setRawwavePath( configManager::inst()->stkDir()
|
||||
#ifndef QT3
|
||||
.toAscii().constData()
|
||||
#endif
|
||||
);
|
||||
.toAscii().constData() );
|
||||
|
||||
m_voice = new BandedWG();
|
||||
|
||||
|
||||
@@ -170,7 +170,7 @@ private:
|
||||
comboBox * m_presets;
|
||||
knob * m_spread;
|
||||
|
||||
vvector<sample_t> m_scalers;
|
||||
QVector<sample_t> m_scalers;
|
||||
sampleFrame * m_buffer;
|
||||
bool m_filesMissing;
|
||||
|
||||
|
||||
@@ -23,26 +23,10 @@
|
||||
*/
|
||||
|
||||
|
||||
#include "qt3support.h"
|
||||
|
||||
#ifdef QT4
|
||||
|
||||
#include <Qt/QtXml>
|
||||
#include <QtGui/QBitmap>
|
||||
#include <QtGui/QPainter>
|
||||
|
||||
#else
|
||||
|
||||
#include <qbitmap.h>
|
||||
#include <qpainter.h>
|
||||
#include <qdom.h>
|
||||
#include <qwhatsthis.h>
|
||||
|
||||
#define setChecked setOn
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
#include "triple_oscillator.h"
|
||||
#include "automatable_button.h"
|
||||
#include "debug.h"
|
||||
@@ -84,15 +68,11 @@ plugin::descriptor tripleoscillator_plugin_descriptor =
|
||||
tripleOscillator::tripleOscillator( instrumentTrack * _channel_track ) :
|
||||
instrument( _channel_track, &tripleoscillator_plugin_descriptor )
|
||||
{
|
||||
#ifdef QT4
|
||||
setAutoFillBackground( TRUE );
|
||||
QPalette pal;
|
||||
pal.setBrush( backgroundRole(),
|
||||
PLUGIN_NAME::getIconPixmap( "artwork" ) );
|
||||
setPalette( pal );
|
||||
#else
|
||||
setErasePixmap( PLUGIN_NAME::getIconPixmap( "artwork" ) );
|
||||
#endif
|
||||
|
||||
pixmapButton * pm_osc1_btn = new pixmapButton( this, NULL, NULL );
|
||||
pm_osc1_btn->move( 46, 50 );
|
||||
@@ -247,11 +227,7 @@ tripleOscillator::tripleOscillator( instrumentTrack * _channel_track ) :
|
||||
/ NUM_OF_OSCILLATORS );
|
||||
m_osc[i].m_volKnob->setHintText( tr( "Osc %1 volume:" ).arg(
|
||||
i+1 ) + " ", "%" );
|
||||
#ifdef QT4
|
||||
m_osc[i].m_volKnob->setWhatsThis(
|
||||
#else
|
||||
QWhatsThis::add( m_osc[i].m_volKnob,
|
||||
#endif
|
||||
tr( "With this knob you can set the volume of "
|
||||
"oscillator %1. When setting a value of 0 the "
|
||||
"oscillator is turned off. Otherwise you can "
|
||||
@@ -269,11 +245,7 @@ tripleOscillator::tripleOscillator( instrumentTrack * _channel_track ) :
|
||||
m_osc[i].m_panKnob->setHintText( tr("Osc %1 panning:").arg(
|
||||
i + 1 )
|
||||
+ " ", "" );
|
||||
#ifdef QT4
|
||||
m_osc[i].m_panKnob->setWhatsThis(
|
||||
#else
|
||||
QWhatsThis::add( m_osc[i].m_panKnob,
|
||||
#endif
|
||||
tr( "With this knob you can set the panning of the "
|
||||
"oscillator %1. A value of -100 means 100% "
|
||||
"left and a value of 100 moves oscillator-"
|
||||
@@ -290,11 +262,7 @@ tripleOscillator::tripleOscillator( instrumentTrack * _channel_track ) :
|
||||
m_osc[i].m_coarseKnob->setHintText(
|
||||
tr( "Osc %1 coarse detuning:" ).arg( i + 1 ) + " ",
|
||||
" " + tr( "semitones" ) );
|
||||
#ifdef QT4
|
||||
m_osc[i].m_coarseKnob->setWhatsThis(
|
||||
#else
|
||||
QWhatsThis::add( m_osc[i].m_coarseKnob,
|
||||
#endif
|
||||
tr( "With this knob you can set the coarse detuning of "
|
||||
"oscillator %1. You can detune the oscillator "
|
||||
"12 semitones (1 octave) up and down. This is "
|
||||
@@ -312,11 +280,7 @@ tripleOscillator::tripleOscillator( instrumentTrack * _channel_track ) :
|
||||
"left:" ).arg( i + 1 )
|
||||
+ " ", " " +
|
||||
tr( "cents" ) );
|
||||
#ifdef QT4
|
||||
m_osc[i].m_fineLKnob->setWhatsThis(
|
||||
#else
|
||||
QWhatsThis::add( m_osc[i].m_fineLKnob,
|
||||
#endif
|
||||
tr( "With this knob you can set the fine detuning of "
|
||||
"oscillator %1 for the left channel. The fine-"
|
||||
"detuning is ranged between -100 cents and "
|
||||
@@ -334,11 +298,7 @@ tripleOscillator::tripleOscillator( instrumentTrack * _channel_track ) :
|
||||
m_osc[i].m_fineRKnob->setHintText( tr( "Osc %1 fine detuning "
|
||||
"right:").arg( i + 1 ) +
|
||||
" ", " " + tr( "cents" ) );
|
||||
#ifdef QT4
|
||||
m_osc[i].m_fineRKnob->setWhatsThis(
|
||||
#else
|
||||
QWhatsThis::add( m_osc[i].m_fineRKnob,
|
||||
#endif
|
||||
tr( "With this knob you can set the fine detuning of "
|
||||
"oscillator %1 for the right channel. The "
|
||||
"fine-detuning is ranged between -100 cents "
|
||||
@@ -357,11 +317,7 @@ tripleOscillator::tripleOscillator( instrumentTrack * _channel_track ) :
|
||||
"offset:" ).
|
||||
arg( i + 1 ) +
|
||||
" ", " " + tr( "degrees" ) );
|
||||
#ifdef QT4
|
||||
m_osc[i].m_phaseOffsetKnob->setWhatsThis(
|
||||
#else
|
||||
QWhatsThis::add( m_osc[i].m_phaseOffsetKnob,
|
||||
#endif
|
||||
tr( "With this knob you can set the phase-offset of "
|
||||
"oscillator %1. That means you can move the "
|
||||
"point within an oscillation where the "
|
||||
@@ -386,11 +342,7 @@ tripleOscillator::tripleOscillator( instrumentTrack * _channel_track ) :
|
||||
arg( i + 1 ) +
|
||||
" ", " " +
|
||||
tr( "degrees" ) );
|
||||
#ifdef QT4
|
||||
m_osc[i].m_stereoPhaseDetuningKnob->setWhatsThis(
|
||||
#else
|
||||
QWhatsThis::add( m_osc[i].m_stereoPhaseDetuningKnob,
|
||||
#endif
|
||||
tr( "With this knob you can set the stereo phase-"
|
||||
"detuning of oscillator %1. The stereo phase-"
|
||||
"detuning specifies the size of the difference "
|
||||
|
||||
@@ -23,12 +23,6 @@
|
||||
*/
|
||||
|
||||
|
||||
#include "vestige.h"
|
||||
|
||||
#include "qt3support.h"
|
||||
|
||||
#ifdef QT4
|
||||
|
||||
#include <Qt/QtXml>
|
||||
#include <QtGui/QMessageBox>
|
||||
#include <QtGui/QFileDialog>
|
||||
@@ -37,21 +31,8 @@
|
||||
#include <QtGui/QPushButton>
|
||||
#include <QtGui/QCursor>
|
||||
|
||||
#else
|
||||
|
||||
#include <qdom.h>
|
||||
#include <qmessagebox.h>
|
||||
#include <qfiledialog.h>
|
||||
#include <qfileinfo.h>
|
||||
#include <qdir.h>
|
||||
#include <qpushbutton.h>
|
||||
#include <qcursor.h>
|
||||
#include <qwhatsthis.h>
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
#include "engine.h"
|
||||
#include "vestige.h"
|
||||
#include "gui_templates.h"
|
||||
#include "instrument_play_handle.h"
|
||||
#include "instrument_track.h"
|
||||
@@ -102,14 +83,6 @@ vestigeInstrument::vestigeInstrument( instrumentTrack * _instrument_track ) :
|
||||
"artwork" ) );
|
||||
}
|
||||
|
||||
#ifdef QT4
|
||||
/* QPalette pal;
|
||||
pal.setBrush( backgroundRole(), *s_artwork);
|
||||
setPalette( pal );*/
|
||||
#else
|
||||
setErasePixmap( *s_artwork );
|
||||
#endif
|
||||
|
||||
m_openPluginButton = new pixmapButton( this, NULL, NULL );
|
||||
m_openPluginButton->setCheckable( FALSE );
|
||||
m_openPluginButton->setCursor( Qt::PointingHandCursor );
|
||||
@@ -124,11 +97,7 @@ vestigeInstrument::vestigeInstrument( instrumentTrack * _instrument_track ) :
|
||||
SLOT( openPlugin() ) );
|
||||
toolTip::add( m_openPluginButton, tr( "Open other VST-plugin" ) );
|
||||
|
||||
#ifdef QT4
|
||||
m_openPluginButton->setWhatsThis(
|
||||
#else
|
||||
QWhatsThis::add( m_openPluginButton,
|
||||
#endif
|
||||
tr( "Click here, if you want to open another VST-plugin. After "
|
||||
"clicking on this button, a file-open-dialog appears "
|
||||
"and you can select your file." ) );
|
||||
@@ -139,11 +108,7 @@ vestigeInstrument::vestigeInstrument( instrumentTrack * _instrument_track ) :
|
||||
m_toggleGUIButton->setFont( pointSize<8>( m_toggleGUIButton->font() ) );
|
||||
connect( m_toggleGUIButton, SIGNAL( clicked() ), this,
|
||||
SLOT( toggleGUI() ) );
|
||||
#ifdef QT4
|
||||
m_toggleGUIButton->setWhatsThis(
|
||||
#else
|
||||
QWhatsThis::add( m_toggleGUIButton,
|
||||
#endif
|
||||
tr( "Click here to show or hide the graphical user interface "
|
||||
"(GUI) of your VST-plugin." ) );
|
||||
|
||||
@@ -276,13 +241,8 @@ void vestigeInstrument::setParameter( const QString & _param,
|
||||
}
|
||||
if( m_plugin->pluginWidget() != NULL )
|
||||
{
|
||||
#ifdef QT4
|
||||
m_plugin->pluginWidget()->setWindowIcon(
|
||||
getInstrumentTrack()->windowIcon() );
|
||||
#else
|
||||
m_plugin->pluginWidget()->setWindowIcon(
|
||||
*( getInstrumentTrack()->windowIcon() ) );
|
||||
#endif
|
||||
}
|
||||
m_pluginMutex.unlock();
|
||||
update();
|
||||
@@ -408,21 +368,12 @@ bool vestigeInstrument::handleMidiEvent( const midiEvent & _me,
|
||||
|
||||
void vestigeInstrument::openPlugin( void )
|
||||
{
|
||||
#ifdef QT4
|
||||
QFileDialog ofd( NULL, tr( "Open VST-plugin" ) );
|
||||
#else
|
||||
QFileDialog ofd( QString::null, QString::null, NULL, "", TRUE );
|
||||
ofd.setWindowTitle( tr( "Open VST-plugin" ) );
|
||||
#endif
|
||||
|
||||
QString dir;
|
||||
if( m_pluginDLL != "" )
|
||||
{
|
||||
#ifdef QT4
|
||||
dir = QFileInfo( m_pluginDLL ).absolutePath();
|
||||
#else
|
||||
dir = QFileInfo( m_pluginDLL ).dirPath( TRUE );
|
||||
#endif
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -433,17 +384,11 @@ void vestigeInstrument::openPlugin( void )
|
||||
ofd.setFileMode( QFileDialog::ExistingFiles );
|
||||
|
||||
// set filters
|
||||
#ifdef QT4
|
||||
QStringList types;
|
||||
types << tr( "DLL-files (*.dll)" )
|
||||
<< tr( "EXE-files (*.exe)" )
|
||||
;
|
||||
ofd.setFilters( types );
|
||||
#else
|
||||
ofd.addFilter( tr( "DLL-files (*.dll)" ) );
|
||||
ofd.addFilter( tr( "EXE-files (*.exe)" ) );
|
||||
ofd.setSelectedFilter( tr( "DLL-files (*.dll)" ) );
|
||||
#endif
|
||||
if( m_pluginDLL != "" )
|
||||
{
|
||||
// select previously opened file
|
||||
@@ -520,14 +465,7 @@ void vestigeInstrument::changeTempo( bpm_t _new_tempo )
|
||||
|
||||
void vestigeInstrument::paintEvent( QPaintEvent * )
|
||||
{
|
||||
#ifdef QT4
|
||||
QPainter p( this );
|
||||
#else
|
||||
QPixmap pm( rect().size() );
|
||||
pm.fill( this, rect().topLeft() );
|
||||
|
||||
QPainter p( &pm, this );
|
||||
#endif
|
||||
|
||||
p.drawPixmap( 0, 0, *s_artwork );
|
||||
|
||||
@@ -553,10 +491,6 @@ void vestigeInstrument::paintEvent( QPaintEvent * )
|
||||
m_plugin->vendorString() );
|
||||
}
|
||||
// m_pluginMutex.unlock();
|
||||
|
||||
#ifndef QT4
|
||||
bitBlt( this, rect().topLeft(), &pm );
|
||||
#endif
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -23,23 +23,10 @@
|
||||
*/
|
||||
|
||||
|
||||
#include "qt3support.h"
|
||||
|
||||
#ifdef QT4
|
||||
|
||||
#include <QtGui/QPaintEvent>
|
||||
#include <QtGui/QFontMetrics>
|
||||
#include <QtGui/QPainter>
|
||||
|
||||
#else
|
||||
|
||||
#include <qfontmetrics.h>
|
||||
#include <qpainter.h>
|
||||
#include <qcursor.h>
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
#include "graph.h"
|
||||
#include "string_pair_drag.h"
|
||||
#include "sample_buffer.h"
|
||||
@@ -58,11 +45,6 @@ graph::graph( QWidget * _parent ) :
|
||||
setFixedSize( 132, 104 );
|
||||
|
||||
setAcceptDrops( TRUE );
|
||||
|
||||
#ifndef QT4
|
||||
setBackgroundMode( NoBackground );
|
||||
#endif
|
||||
|
||||
}
|
||||
|
||||
|
||||
@@ -149,11 +131,7 @@ void graph::mousePressEvent( QMouseEvent * _me )
|
||||
|
||||
// toggle mouse state
|
||||
m_mouseDown = true;
|
||||
#ifndef QT3
|
||||
setCursor( Qt::BlankCursor );
|
||||
#else
|
||||
setCursor( QCursor::BlankCursor );
|
||||
#endif
|
||||
m_lastCursorX = x;
|
||||
}
|
||||
}
|
||||
@@ -184,11 +162,7 @@ void graph::mouseReleaseEvent( QMouseEvent * _me )
|
||||
{
|
||||
// toggle mouse state
|
||||
m_mouseDown = false;
|
||||
#ifndef QT3
|
||||
setCursor( Qt::ArrowCursor );
|
||||
#else
|
||||
setCursor( QCursor::ArrowCursor );
|
||||
#endif
|
||||
update();
|
||||
}
|
||||
}
|
||||
@@ -198,14 +172,7 @@ void graph::mouseReleaseEvent( QMouseEvent * _me )
|
||||
void graph::paintEvent( QPaintEvent * )
|
||||
{
|
||||
|
||||
#ifdef QT4
|
||||
QPainter p( this );
|
||||
#else
|
||||
QPixmap draw_pm( rect().size() );
|
||||
draw_pm.fill( this, rect().topLeft() );
|
||||
|
||||
QPainter p( &draw_pm, this );
|
||||
#endif
|
||||
|
||||
p.setPen( QColor( 0xFF, 0xAA, 0x00 ) );
|
||||
|
||||
@@ -230,15 +197,11 @@ void graph::paintEvent( QPaintEvent * )
|
||||
p.drawLine( cursor.x(), 2, cursor.x(), 102 );
|
||||
}
|
||||
p.drawPixmap( 0, 0, m_foreground );
|
||||
|
||||
#ifndef QT4
|
||||
// and blit all the drawn stuff on the screen...
|
||||
bitBlt( this, rect().topLeft(), &draw_pm );
|
||||
#endif
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
void graph::dropEvent( QDropEvent * _de )
|
||||
{
|
||||
QString type = stringPairDrag::decodeKey( _de );
|
||||
|
||||
@@ -26,22 +26,10 @@
|
||||
#ifndef _GRAPH_H
|
||||
#define _GRAPH_H
|
||||
|
||||
#include "qt3support.h"
|
||||
|
||||
#ifdef QT4
|
||||
|
||||
#include <QtGui/QWidget>
|
||||
#include <QtGui/QPixmap>
|
||||
#include <QtGui/QCursor>
|
||||
|
||||
#else
|
||||
|
||||
#include <qwidget.h>
|
||||
#include <qpixmap.h>
|
||||
#include <qcursor.h>
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
class graph : public QWidget
|
||||
{
|
||||
|
||||
@@ -22,9 +22,6 @@
|
||||
*
|
||||
*/
|
||||
|
||||
#include "qt3support.h"
|
||||
|
||||
#ifdef QT4
|
||||
|
||||
#include <QtCore/QPoint>
|
||||
#include <Qt/QtXml>
|
||||
@@ -33,18 +30,6 @@
|
||||
#include <QtGui/QMenu>
|
||||
#include <QtGui/QWhatsThis>
|
||||
|
||||
#else
|
||||
|
||||
#include <qpoint.h>
|
||||
#include <qdom.h>
|
||||
#include <qmap.h>
|
||||
#include <qwhatsthis.h>
|
||||
#include <qlabel.h>
|
||||
#include <qpopupmenu.h>
|
||||
#include <qcursor.h>
|
||||
|
||||
#endif
|
||||
|
||||
#include "impulse_editor.h"
|
||||
#include "embed.h"
|
||||
#include "engine.h"
|
||||
@@ -63,15 +48,11 @@ impulseEditor::impulseEditor( QWidget * _parent, int _x, int _y, track * _track,
|
||||
{
|
||||
setFixedSize( 153, 124 );
|
||||
m_base = QPixmap::grabWidget( _parent, _x, _y );
|
||||
#ifndef QT3
|
||||
setAutoFillBackground( TRUE );
|
||||
QPalette pal = palette();
|
||||
pal.setBrush( backgroundRole(), m_base );
|
||||
setPalette( pal );
|
||||
#else
|
||||
setPaletteBackgroundPixmap( m_base );
|
||||
#endif
|
||||
|
||||
|
||||
m_graph = new graph( this );
|
||||
m_graph->setForeground( PLUGIN_NAME::getIconPixmap( "wavegraph4" ) );
|
||||
m_graph->move( 0, 0 );
|
||||
@@ -458,9 +439,9 @@ void impulseEditor::setOn( bool _on )
|
||||
void impulseEditor::contextMenuEvent( QContextMenuEvent * )
|
||||
{
|
||||
QMenu contextMenu( this );
|
||||
#ifdef QT4
|
||||
contextMenu.setTitle( accessibleName() );
|
||||
#else
|
||||
#warning TODO: css-formatting
|
||||
#if 0
|
||||
QLabel * caption = new QLabel( "<font color=white><b>" +
|
||||
QString( "Impulse Editor" ) + "</b></font>", this );
|
||||
caption->setPaletteBackgroundColor( QColor( 0, 0, 192 ) );
|
||||
@@ -477,13 +458,8 @@ void impulseEditor::contextMenuEvent( QContextMenuEvent * )
|
||||
|
||||
void impulseEditor::displayHelp( void )
|
||||
{
|
||||
#ifdef QT4
|
||||
QWhatsThis::showText( mapToGlobal( rect().bottomRight() ),
|
||||
whatsThis() );
|
||||
#else
|
||||
QWhatsThis::display( QWhatsThis::textFor( this ), mapToGlobal(
|
||||
rect().bottomRight() ) );
|
||||
#endif
|
||||
whatsThis() );
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -24,28 +24,17 @@
|
||||
#ifndef _IMPULSE_EDITOR_H
|
||||
#define _IMPULSE_EDITOR_H
|
||||
|
||||
#include "qt3support.h"
|
||||
|
||||
#ifdef QT4
|
||||
|
||||
#include <QtGui/QWidget>
|
||||
#include <QtGui/QPixmap>
|
||||
#include <QtGui/QCursor>
|
||||
|
||||
#else
|
||||
|
||||
#include <qwidget.h>
|
||||
#include <qpixmap.h>
|
||||
#include <qcursor.h>
|
||||
|
||||
#endif
|
||||
|
||||
#include "config.h"
|
||||
#include "types.h"
|
||||
#include "graph.h"
|
||||
#include "pixmap_button.h"
|
||||
#include "led_checkbox.h"
|
||||
|
||||
|
||||
class impulseEditor: public QWidget
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
@@ -22,27 +22,15 @@
|
||||
*
|
||||
*/
|
||||
|
||||
#include "qt3support.h"
|
||||
|
||||
#ifdef QT4
|
||||
|
||||
#include <QtGui/QLabel>
|
||||
#include <QtGui/QMenu>
|
||||
#include <QtGui/QWhatsThis>
|
||||
|
||||
#else
|
||||
|
||||
#include <qwhatsthis.h>
|
||||
#include <qlabel.h>
|
||||
#include <qpopupmenu.h>
|
||||
#include <qcursor.h>
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
#include "nine_button_selector.h"
|
||||
#include "embed.h"
|
||||
|
||||
|
||||
nineButtonSelector::nineButtonSelector( QPixmap _button0_on,
|
||||
QPixmap _button0_off,
|
||||
QPixmap _button1_on,
|
||||
@@ -71,14 +59,11 @@ nineButtonSelector::nineButtonSelector( QPixmap _button0_on,
|
||||
setFixedSize( 50, 50 );
|
||||
m_base = QPixmap::grabWidget( _parent, _x, _y );
|
||||
move( _x, _y );
|
||||
#ifndef QT3
|
||||
|
||||
setAutoFillBackground( TRUE );
|
||||
QPalette pal = palette();
|
||||
pal.setBrush( backgroundRole(), m_base );
|
||||
setPalette( pal );
|
||||
#else
|
||||
setPaletteBackgroundPixmap( m_base );
|
||||
#endif
|
||||
|
||||
m_button = new pixmapButton( this, NULL, _track );
|
||||
m_button->move( 1, 1 );
|
||||
@@ -266,9 +251,9 @@ void FASTCALL nineButtonSelector::setSelected( Uint8 _new_button )
|
||||
void nineButtonSelector::contextMenuEvent( QContextMenuEvent * )
|
||||
{
|
||||
QMenu contextMenu( this );
|
||||
#ifdef QT4
|
||||
contextMenu.setTitle( accessibleName() );
|
||||
#else
|
||||
#warning TODO: CSS-formatting
|
||||
#if 0
|
||||
QLabel * caption = new QLabel( "<font color=white><b>" +
|
||||
QString( "Selector" ) + "</b></font>", this );
|
||||
caption->setPaletteBackgroundColor( QColor( 0, 0, 192 ) );
|
||||
@@ -285,13 +270,8 @@ void nineButtonSelector::contextMenuEvent( QContextMenuEvent * )
|
||||
|
||||
void nineButtonSelector::displayHelp( void )
|
||||
{
|
||||
#ifdef QT4
|
||||
QWhatsThis::showText( mapToGlobal( rect().bottomRight() ),
|
||||
whatsThis() );
|
||||
#else
|
||||
QWhatsThis::display( QWhatsThis::textFor( this ), mapToGlobal(
|
||||
rect().bottomRight() ) );
|
||||
#endif
|
||||
whatsThis() );
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -24,7 +24,6 @@
|
||||
#ifndef _NINE_BUTTON_SELECTOR_H
|
||||
#define _NINE_BUTTON_SELECTOR_H
|
||||
|
||||
#include "qt3support.h"
|
||||
#include "config.h"
|
||||
#include "types.h"
|
||||
#include "pixmap_button.h"
|
||||
@@ -79,7 +78,7 @@ signals:
|
||||
void nineButtonSelection( Uint8 );
|
||||
|
||||
private:
|
||||
vlist<pixmapButton *> m_buttons;
|
||||
QList<pixmapButton *> m_buttons;
|
||||
pixmapButton * m_button;
|
||||
pixmapButton * m_lastBtn;
|
||||
QPixmap m_base;
|
||||
|
||||
@@ -20,23 +20,12 @@
|
||||
* Boston, MA 02110-1301 USA.
|
||||
*
|
||||
*/
|
||||
#ifndef _TWO_STRINGS_H
|
||||
#define _TWO_STRINGS_H
|
||||
|
||||
|
||||
#include "qt3support.h"
|
||||
|
||||
#ifndef QT3
|
||||
#ifndef _STRING_CONTAINER_H
|
||||
#define _STRING_CONTAINER_H
|
||||
|
||||
#include <QtCore/QVector>
|
||||
|
||||
#else
|
||||
|
||||
#include <qvaluevector.h>
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
#include "config.h"
|
||||
#include "types.h"
|
||||
#include "vibrating_string.h"
|
||||
@@ -82,11 +71,11 @@ public:
|
||||
}
|
||||
|
||||
private:
|
||||
vvector<vibratingString *> m_strings;
|
||||
QVector<vibratingString *> m_strings;
|
||||
const float m_pitch;
|
||||
const sample_rate_t m_sampleRate;
|
||||
const Uint32 m_bufferLength;
|
||||
vvector<bool> m_exists;
|
||||
QVector<bool> m_exists;
|
||||
} ;
|
||||
|
||||
#endif
|
||||
|
||||
@@ -22,9 +22,6 @@
|
||||
*
|
||||
*/
|
||||
|
||||
#include "qt3support.h"
|
||||
|
||||
#ifdef QT4
|
||||
|
||||
#include <Qt/QtXml>
|
||||
#include <QtCore/QMap>
|
||||
@@ -32,18 +29,6 @@
|
||||
#include <QtGui/QMenu>
|
||||
#include <QtGui/QWhatsThis>
|
||||
|
||||
#else
|
||||
|
||||
#include <qdom.h>
|
||||
#include <qmap.h>
|
||||
#include <qwhatsthis.h>
|
||||
#include <qlabel.h>
|
||||
#include <qpopupmenu.h>
|
||||
#include <qcursor.h>
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
#include "vibed.h"
|
||||
#include "base64.h"
|
||||
#include "engine.h"
|
||||
@@ -80,32 +65,23 @@ plugin::descriptor vibedstrings_plugin_descriptor =
|
||||
}
|
||||
|
||||
|
||||
vibed::vibed( instrumentTrack * _channel_track ) :
|
||||
instrument( _channel_track, &vibedstrings_plugin_descriptor ),
|
||||
vibed::vibed( instrumentTrack * instrument_track ) :
|
||||
instrument( instrument_track, &vibedstrings_plugin_descriptor ),
|
||||
m_sampleLength( 128 )
|
||||
{
|
||||
#ifdef QT4
|
||||
setAutoFillBackground( TRUE );
|
||||
QPalette pal;
|
||||
pal.setBrush( backgroundRole(), PLUGIN_NAME::getIconPixmap(
|
||||
"artwork" ) );
|
||||
setPalette( pal );
|
||||
#else
|
||||
setErasePixmap( PLUGIN_NAME::getIconPixmap( "artwork" ) );
|
||||
#endif
|
||||
|
||||
for( Uint8 harm = 0; harm < 9; harm++ )
|
||||
{
|
||||
m_editor = new impulseEditor( this, 76, 21, _channel_track );
|
||||
m_editor = new impulseEditor( this, 76, 21, instrument_track );
|
||||
m_editor->setOn( FALSE );
|
||||
m_editor->hide();
|
||||
m_editors.append( m_editor );
|
||||
#ifdef QT4
|
||||
m_editor->setWhatsThis(
|
||||
#else
|
||||
QWhatsThis::add( m_editor,
|
||||
#endif
|
||||
tr(
|
||||
m_editor->setWhatsThis( tr(
|
||||
"The waveform editor provides control over the initial state or impulse "
|
||||
"that is used to start the string vibrating. The buttons to the right of "
|
||||
"the graph will initialize the waveform to the selected type. The '?' "
|
||||
@@ -119,24 +95,19 @@ vibed::vibed( instrumentTrack * _channel_track ) :
|
||||
"The 'N' button will normalize the waveform.") );
|
||||
|
||||
m_volumeKnob = new volumeKnob( knobBright_26, this,
|
||||
tr( "Volume" ), _channel_track );
|
||||
tr( "Volume" ), instrument_track );
|
||||
m_volumeKnob->setRange( MIN_VOLUME, MAX_VOLUME, 1.0f );
|
||||
m_volumeKnob->setInitValue( DEFAULT_VOLUME );
|
||||
m_volumeKnob->move( 103, 142 );
|
||||
m_volumeKnob->setHintText( tr( "Volume:" ) + " ", "" );
|
||||
m_volumeKnob->hide();
|
||||
m_volumeKnobs.append( m_volumeKnob );
|
||||
#ifdef QT4
|
||||
m_volumeKnob->setWhatsThis(
|
||||
#else
|
||||
QWhatsThis::add( m_volumeKnob,
|
||||
#endif
|
||||
tr(
|
||||
"The 'V' knob sets the volume of the selected string." ) );
|
||||
m_volumeKnob->setWhatsThis( tr( "The 'V' knob sets the volume "
|
||||
"of the selected string." ) );
|
||||
|
||||
m_stiffnessKnob = new knob( knobBright_26, this,
|
||||
tr( "String stiffness" ),
|
||||
_channel_track );
|
||||
tr( "String stiffness" ),
|
||||
instrument_track );
|
||||
m_stiffnessKnob->setRange( 0.0f, 0.05f, 0.001f );
|
||||
m_stiffnessKnob->setInitValue( 0.0f );
|
||||
m_stiffnessKnob->move( 129, 142 );
|
||||
@@ -144,12 +115,7 @@ vibed::vibed( instrumentTrack * _channel_track ) :
|
||||
" ", "" );
|
||||
m_stiffnessKnob->hide();
|
||||
m_stiffnessKnobs.append( m_stiffnessKnob );
|
||||
#ifdef QT4
|
||||
m_stiffnessKnob->setWhatsThis(
|
||||
#else
|
||||
QWhatsThis::add( m_stiffnessKnob,
|
||||
#endif
|
||||
tr(
|
||||
m_stiffnessKnob->setWhatsThis( tr(
|
||||
"The 'S' knob sets the stiffness of the selected string. The stiffness "
|
||||
"of the string affects how long the string will ring out. The lower "
|
||||
"the setting, the longer the string will ring." ) );
|
||||
@@ -157,25 +123,20 @@ vibed::vibed( instrumentTrack * _channel_track ) :
|
||||
|
||||
m_pickKnob = new knob( knobBright_26, this,
|
||||
tr( "Pick position" ),
|
||||
_channel_track );
|
||||
instrument_track );
|
||||
m_pickKnob->setRange( 0.0f, 0.5f, 0.005f );
|
||||
m_pickKnob->setInitValue( 0.0f );
|
||||
m_pickKnob->move( 153, 142 );
|
||||
m_pickKnob->setHintText( tr( "Pick position:" ) + " ", "" );
|
||||
m_pickKnob->hide();
|
||||
m_pickKnobs.append( m_pickKnob );
|
||||
#ifdef QT4
|
||||
m_pickKnob->setWhatsThis(
|
||||
#else
|
||||
QWhatsThis::add( m_pickKnob,
|
||||
#endif
|
||||
tr(
|
||||
m_pickKnob->setWhatsThis( tr(
|
||||
"The 'P' knob sets the position where the selected string will be 'picked'. "
|
||||
"The lower the setting the closer the pick is to the bridge." ) );
|
||||
|
||||
m_pickupKnob = new knob( knobBright_26, this,
|
||||
tr( "Pickup position" ),
|
||||
_channel_track );
|
||||
instrument_track );
|
||||
m_pickupKnob->setRange( 0.0f, 0.5f, 0.005f );
|
||||
m_pickupKnob->setInitValue( 0.05f );
|
||||
m_pickupKnob->move( 177, 142 );
|
||||
@@ -183,53 +144,38 @@ vibed::vibed( instrumentTrack * _channel_track ) :
|
||||
" ", "" );
|
||||
m_pickupKnob->hide();
|
||||
m_pickupKnobs.append( m_pickupKnob );
|
||||
#ifdef QT4
|
||||
m_pickupKnob->setWhatsThis(
|
||||
#else
|
||||
QWhatsThis::add( m_pickupKnob,
|
||||
#endif
|
||||
tr(
|
||||
m_pickupKnob->setWhatsThis( tr(
|
||||
"The 'PU' knob sets the position where the vibrations will be monitored "
|
||||
"for the selected string. The lower the setting, the closer the "
|
||||
"pickup is to the bridge." ) );
|
||||
|
||||
m_panKnob = new knob( knobBright_26, this, tr( "Pan" ),
|
||||
_channel_track );
|
||||
instrument_track );
|
||||
m_panKnob->setRange( -1.0f, 1.0f, 0.01f );
|
||||
m_panKnob->setInitValue( 0.0f );
|
||||
m_panKnob->move( 105, 187 );
|
||||
m_panKnob->setHintText( tr( "Pan:" ) + " ", "" );
|
||||
m_panKnob->hide();
|
||||
m_panKnobs.append( m_panKnob );
|
||||
#ifdef QT4
|
||||
m_panKnob->setWhatsThis(
|
||||
#else
|
||||
QWhatsThis::add( m_panKnob,
|
||||
#endif
|
||||
tr(
|
||||
m_panKnob->setWhatsThis( tr(
|
||||
"The Pan knob determines the location of the selected string in the stereo "
|
||||
"field." ) );
|
||||
|
||||
m_detuneKnob = new knob( knobBright_26, this, tr( "Detune" ),
|
||||
_channel_track );
|
||||
instrument_track );
|
||||
m_detuneKnob->setRange( -0.1f, 0.1f, 0.001f );
|
||||
m_detuneKnob->setInitValue( 0.0f );
|
||||
m_detuneKnob->move( 150, 187 );
|
||||
m_detuneKnob->setHintText( tr( "Detune:" ) + " ", "" );
|
||||
m_detuneKnob->hide();
|
||||
m_detuneKnobs.append( m_detuneKnob );
|
||||
#ifdef QT4
|
||||
m_detuneKnob->setWhatsThis(
|
||||
#else
|
||||
QWhatsThis::add( m_detuneKnob,
|
||||
#endif
|
||||
tr(
|
||||
m_detuneKnob->setWhatsThis( tr(
|
||||
"The Detune knob modifies the pitch of the selected string. Settings less "
|
||||
"than zero will cause the string to sound flat. Settings greater than zero "
|
||||
"will cause the string to sound sharp." ) );
|
||||
|
||||
m_randomKnob = new knob( knobBright_26, this, tr( "Fuzziness" ),
|
||||
_channel_track );
|
||||
instrument_track );
|
||||
m_randomKnob->setRange( 0.0f, 0.75f, 0.01f );
|
||||
m_randomKnob->setInitValue( 0.0f );
|
||||
m_randomKnob->move( 194, 187 );
|
||||
@@ -237,18 +183,13 @@ vibed::vibed( instrumentTrack * _channel_track ) :
|
||||
" ", "" );
|
||||
m_randomKnob->hide();
|
||||
m_randomKnobs.append( m_randomKnob );
|
||||
#ifdef QT4
|
||||
m_randomKnob->setWhatsThis(
|
||||
#else
|
||||
QWhatsThis::add( m_randomKnob,
|
||||
#endif
|
||||
tr(
|
||||
m_randomKnob->setWhatsThis( tr(
|
||||
"The Slap knob adds a bit of fuzz to the selected string which is most "
|
||||
"apparent during the attack, though it can also be used to make the string "
|
||||
"sound more 'metallic'.") );
|
||||
|
||||
m_lengthKnob = new knob( knobBright_26, this, tr( "Length" ),
|
||||
_channel_track );
|
||||
instrument_track );
|
||||
m_lengthKnob->setRange( 1, 16, 1 );
|
||||
m_lengthKnob->setInitValue( 1 );
|
||||
m_lengthKnob->move( 23, 193 );
|
||||
@@ -256,30 +197,20 @@ vibed::vibed( instrumentTrack * _channel_track ) :
|
||||
" ", "" );
|
||||
m_lengthKnob->hide();
|
||||
m_lengthKnobs.append( m_lengthKnob );
|
||||
#ifdef QT4
|
||||
m_lengthKnob->setWhatsThis(
|
||||
#else
|
||||
QWhatsThis::add( m_lengthKnob,
|
||||
#endif
|
||||
tr(
|
||||
m_lengthKnob->setWhatsThis( tr(
|
||||
"The Length knob sets the length of the selected string. Longer strings "
|
||||
"will both ring longer and sound brighter, however, they will also eat up "
|
||||
"more CPU cycles." ) );
|
||||
|
||||
m_impulse = new ledCheckBox( "", this, tr( "Impulse" ),
|
||||
_channel_track );
|
||||
instrument_track );
|
||||
m_impulse->move( 23, 94 );
|
||||
m_impulse->setChecked( FALSE );
|
||||
toolTip::add( m_impulse,
|
||||
tr( "Impulse or initial state" ) );
|
||||
m_impulse->hide();
|
||||
m_impulses.append( m_impulse );
|
||||
#ifdef QT4
|
||||
m_impulse->setWhatsThis(
|
||||
#else
|
||||
QWhatsThis::add( m_impulse,
|
||||
#endif
|
||||
tr(
|
||||
m_impulse->setWhatsThis( tr(
|
||||
"The 'Imp' selector determines whether the waveform in the graph is to be "
|
||||
"treated as an impulse imparted to the string by the pick or the initial "
|
||||
"state of the string." ) );
|
||||
@@ -309,12 +240,7 @@ vibed::vibed( instrumentTrack * _channel_track ) :
|
||||
NULL );
|
||||
m_harmonic->hide();
|
||||
m_harmonics.append( m_harmonic );
|
||||
#ifdef QT4
|
||||
m_harmonic->setWhatsThis(
|
||||
#else
|
||||
QWhatsThis::add( m_harmonic,
|
||||
#endif
|
||||
tr(
|
||||
m_harmonic->setWhatsThis( tr(
|
||||
"The Octave selector is used to choose which harmonic of the note the "
|
||||
"string will ring at. For example, '-2' means the string will ring two "
|
||||
"octaves below the fundamental, 'F' means the string will ring at the "
|
||||
@@ -347,12 +273,7 @@ vibed::vibed( instrumentTrack * _channel_track ) :
|
||||
NULL );
|
||||
connect( m_stringSelector, SIGNAL( nineButtonSelection( Uint8 ) ),
|
||||
this, SLOT( showString( Uint8 ) ) );
|
||||
#ifdef QT4
|
||||
m_stringSelector->setWhatsThis(
|
||||
#else
|
||||
QWhatsThis::add( m_stringSelector,
|
||||
#endif
|
||||
tr(
|
||||
m_stringSelector->setWhatsThis( tr(
|
||||
"The String selector is used to choose which string the controls are "
|
||||
"editting. A Vibed instrument can contain up to nine independently "
|
||||
"vibrating strings. The LED in the lower right corner of the "
|
||||
@@ -373,12 +294,7 @@ vibed::vibed( instrumentTrack * _channel_track ) :
|
||||
m_editor->setOn( TRUE );
|
||||
showString( 0 );
|
||||
|
||||
#ifdef QT4
|
||||
this->setWhatsThis(
|
||||
#else
|
||||
QWhatsThis::add( this,
|
||||
#endif
|
||||
tr(
|
||||
setWhatsThis( tr(
|
||||
"Vibed models up to nine independently vibrating strings. The 'String' "
|
||||
"selector allows you to choose which string is being edited. The 'Imp' " "selector chooses whether the graph represents an impulse or the initial "
|
||||
"state of the string. The 'Octave' selector chooses which harmonic the "
|
||||
@@ -673,9 +589,9 @@ void vibed::showString( Uint8 _string )
|
||||
void vibed::contextMenuEvent( QContextMenuEvent * )
|
||||
{
|
||||
QMenu contextMenu( this );
|
||||
#ifdef QT4
|
||||
contextMenu.setTitle( accessibleName() );
|
||||
#else
|
||||
#warning TODO: CSS-formatting
|
||||
#if 0
|
||||
QLabel * caption = new QLabel( "<font color=white><b>" +
|
||||
QString( "Vibed" ) + "</b></font>", this );
|
||||
caption->setPaletteBackgroundColor( QColor( 0, 0, 192 ) );
|
||||
@@ -692,13 +608,8 @@ void vibed::contextMenuEvent( QContextMenuEvent * )
|
||||
|
||||
void vibed::displayHelp( void )
|
||||
{
|
||||
#ifdef QT4
|
||||
QWhatsThis::showText( mapToGlobal( rect().bottomRight() ),
|
||||
whatsThis() );
|
||||
#else
|
||||
QWhatsThis::display( QWhatsThis::textFor( this ), mapToGlobal(
|
||||
rect().bottomRight() ) );
|
||||
#endif
|
||||
whatsThis() );
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -23,8 +23,6 @@
|
||||
#ifndef _VIBED_STRINGS_H
|
||||
#define _VIBED_STRINGS_H
|
||||
|
||||
#include "qt3support.h"
|
||||
|
||||
#include "instrument.h"
|
||||
#include "sample_buffer.h"
|
||||
#include "graph.h"
|
||||
@@ -64,17 +62,17 @@ public slots:
|
||||
void displayHelp( void );
|
||||
|
||||
private:
|
||||
vlist<knob*> m_pickKnobs;
|
||||
vlist<knob*> m_pickupKnobs;
|
||||
vlist<knob*> m_stiffnessKnobs;
|
||||
vlist<volumeKnob*> m_volumeKnobs;
|
||||
vlist<knob*> m_panKnobs;
|
||||
vlist<knob*> m_detuneKnobs;
|
||||
vlist<knob*> m_randomKnobs;
|
||||
vlist<knob*> m_lengthKnobs;
|
||||
vlist<impulseEditor*> m_editors;
|
||||
vlist<ledCheckBox*> m_impulses;
|
||||
vlist<nineButtonSelector*> m_harmonics;
|
||||
QList<knob*> m_pickKnobs;
|
||||
QList<knob*> m_pickupKnobs;
|
||||
QList<knob*> m_stiffnessKnobs;
|
||||
QList<volumeKnob*> m_volumeKnobs;
|
||||
QList<knob*> m_panKnobs;
|
||||
QList<knob*> m_detuneKnobs;
|
||||
QList<knob*> m_randomKnobs;
|
||||
QList<knob*> m_lengthKnobs;
|
||||
QList<impulseEditor*> m_editors;
|
||||
QList<ledCheckBox*> m_impulses;
|
||||
QList<nineButtonSelector*> m_harmonics;
|
||||
|
||||
knob * m_pickKnob;
|
||||
knob * m_pickupKnob;
|
||||
|
||||
@@ -23,29 +23,13 @@
|
||||
*/
|
||||
|
||||
|
||||
#include "qt3support.h"
|
||||
|
||||
#ifdef QT4
|
||||
|
||||
#include <QtCore/QLocale>
|
||||
#include <QtCore/QTime>
|
||||
#include <QtCore/QDir>
|
||||
#include <QtGui/QApplication>
|
||||
#include <QtGui/QX11EmbedContainer>
|
||||
#include <QtGui/QX11Info>
|
||||
|
||||
#else
|
||||
|
||||
#include <qapplication.h>
|
||||
#include <qlocale.h>
|
||||
#include <qdir.h>
|
||||
|
||||
#include "qxembed.h"
|
||||
|
||||
#define QX11EmbedContainer QXEmbed
|
||||
#define embedClient embed
|
||||
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_CONFIG_H
|
||||
#include <config.h>
|
||||
#endif
|
||||
@@ -122,18 +106,8 @@ remoteVSTPlugin::remoteVSTPlugin( const QString & _plugin ) :
|
||||
QString lvsl_server_exec = configManager::inst()->pluginDir() +
|
||||
QDir::separator() +
|
||||
"lvsl_server";
|
||||
execlp( lvsl_server_exec.
|
||||
#ifdef QT4
|
||||
toAscii().constData(),
|
||||
#else
|
||||
ascii(),
|
||||
#endif
|
||||
lvsl_server_exec.
|
||||
#ifdef QT4
|
||||
toAscii().constData(),
|
||||
#else
|
||||
ascii(),
|
||||
#endif
|
||||
execlp( lvsl_server_exec.toAscii().constData(),
|
||||
lvsl_server_exec.toAscii().constData(),
|
||||
"", NULL );
|
||||
return;
|
||||
}
|
||||
@@ -162,13 +136,7 @@ remoteVSTPlugin::remoteVSTPlugin( const QString & _plugin ) :
|
||||
}
|
||||
|
||||
writeValueS<Sint16>( VST_LOAD_PLUGIN );
|
||||
writeStringS( p.
|
||||
#ifdef QT4
|
||||
toAscii().constData()
|
||||
#else
|
||||
ascii()
|
||||
#endif
|
||||
);
|
||||
writeStringS( p.toAscii().constData() );
|
||||
unlock();
|
||||
|
||||
while( 1 )
|
||||
@@ -187,11 +155,7 @@ remoteVSTPlugin::remoteVSTPlugin( const QString & _plugin ) :
|
||||
{
|
||||
break;
|
||||
}
|
||||
#ifdef QT4
|
||||
QApplication::processEvents( QEventLoop::AllEvents, 50 );
|
||||
#else
|
||||
qApp->processEvents( 50 );
|
||||
#endif
|
||||
}
|
||||
}
|
||||
|
||||
@@ -256,9 +220,7 @@ void remoteVSTPlugin::showEditor( void )
|
||||
m_pluginWidget = new QWidget( engine::getMainWindow()->workspace() );
|
||||
m_pluginWidget->setFixedSize( m_pluginGeometry );
|
||||
m_pluginWidget->setWindowTitle( name() );
|
||||
#ifndef QT3
|
||||
engine::getMainWindow()->workspace()->addWindow( m_pluginWidget );
|
||||
#endif
|
||||
m_pluginWidget->show();
|
||||
|
||||
QX11EmbedContainer * xe = new QX11EmbedContainer( m_pluginWidget );
|
||||
@@ -431,11 +393,7 @@ void remoteVSTPlugin::saveSettings( QDomDocument & _doc, QDomElement & _this )
|
||||
for( QMap<QString, QString>::const_iterator it = dump.begin();
|
||||
it != dump.end(); ++it )
|
||||
{
|
||||
#ifdef QT4
|
||||
_this.setAttribute( it.key(), it.value() );
|
||||
#else
|
||||
_this.setAttribute( it.key(), it.data() );
|
||||
#endif
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -26,23 +26,10 @@
|
||||
#ifndef _LVSL_CLIENT_H
|
||||
#define _LVSL_CLIENT_H
|
||||
|
||||
#include "qt3support.h"
|
||||
|
||||
#ifdef QT4
|
||||
|
||||
#include <QtCore/QString>
|
||||
#include <QtCore/QMutex>
|
||||
#include <Qt/QtXml>
|
||||
|
||||
#else
|
||||
|
||||
#include <qstring.h>
|
||||
#include <qmutex.h>
|
||||
#include <qdom.h>
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
#include "mixer.h"
|
||||
#include "communication.h"
|
||||
#include "midi.h"
|
||||
|
||||
@@ -26,19 +26,8 @@
|
||||
#ifndef _VST_EFFECT_H
|
||||
#define _VST_EFFECT_H
|
||||
|
||||
#include "qt3support.h"
|
||||
|
||||
#ifdef QT4
|
||||
|
||||
#include <QtCore/QMutex>
|
||||
|
||||
#else
|
||||
|
||||
#include <qmutex.h>
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
#include "effect.h"
|
||||
#include "engine.h"
|
||||
#include "main_window.h"
|
||||
|
||||
Reference in New Issue
Block a user