lot of fixes

git-svn-id: https://lmms.svn.sf.net/svnroot/lmms/trunk/lmms@124 0778d3d1-df1d-0410-868b-ea421aaaa00d
This commit is contained in:
Tobias Doerffel
2006-04-10 08:22:55 +00:00
parent 1d6e678914
commit b1887d62b8
118 changed files with 377 additions and 324 deletions

View File

@@ -27,11 +27,11 @@
#ifdef QT4
#include <QPainter>
#include <QBitmap>
#include <QtGui/QPainter>
#include <QtGui/QBitmap>
#include <Qt/QtXml>
#include <QFileInfo>
#include <QDropEvent>
#include <QtCore/QFileInfo>
#include <QtGui/QDropEvent>
#else
@@ -507,8 +507,8 @@ void audioFileProcessor::paintEvent( QPaintEvent * )
p.setPen( QColor( 0xFF, 0xAA, 0x00 ) );
const QRect graph_rect( 4, 174, 241, 70 );
const Uint32 frames = tMax( m_sampleBuffer.frames(),
static_cast<Uint32>( 1 ) );
const f_cnt_t frames = tMax( m_sampleBuffer.frames(),
static_cast<f_cnt_t>( 1 ) );
const Uint16 start_frame_x = m_sampleBuffer.startFrame() *
graph_rect.width() / frames;
const Uint16 end_frame_x = m_sampleBuffer.endFrame() *

View File

@@ -31,7 +31,7 @@
#ifdef QT4
#include <QPixmap>
#include <QtGui/QPixmap>
#else

View File

@@ -27,17 +27,13 @@
#ifdef QT4
#include <QPainter>
#include <QButtonGroup>
#include <QBitmap>
#include <QtGui/QPainter>
#include <Qt/QtXml>
#include <QFileInfo>
#include <QDropEvent>
#include <QtGui/QDropEvent>
#else
#include <qpainter.h>
#include <qbuttongroup.h>
#include <qbitmap.h>
#include <qdom.h>
#include <qfileinfo.h>
@@ -595,8 +591,6 @@ void bitInvader::saveSettings( QDomDocument & _doc, QDomElement & _this )
void bitInvader::loadSettings( const QDomElement & _this )
{
// Load sample length
sample_length = _this.attribute( "sampleLength" ).toInt() ;
@@ -606,13 +600,14 @@ void bitInvader::loadSettings( const QDomElement & _this )
// Load sample shape
delete[] sample_shape;
sample_shape = new float[sample_length];
QString sampleString = _this.attribute( "sampleShape");
int size = 0;
char * dst = 0;
base64::decode( sampleString, &dst, &size );
memcpy( sample_shape, dst, size );
base64::decode( _this.attribute( "sampleShape"), &dst, &size );
memcpy( sample_shape, dst, tMin<int>( size, sample_length *
sizeof( float ) ) );
m_graph->setSamplePointer( sample_shape, sample_length );
delete[] dst;
m_graph->setSamplePointer( sample_shape, sample_length );
// Load LED normalize
m_interpolationToggle->setChecked( _this.attribute(

View File

@@ -28,24 +28,14 @@
#define _BIT_INVADER_H
#ifdef QT4
#include <QPixmap>
#else
#include <qpixmap.h>
#include <qwidget.h>
#endif
#include "instrument.h"
#include "spc_bg_hndl_widget.h"
#include "graph.h"
#include "led_checkbox.h"
#include "oscillator.h"
class QPixmap;
class knob;
class notePlayHandle;
class pixmapButton;

View File

@@ -27,9 +27,9 @@
#ifdef QT4
#include <QPaintEvent>
#include <QFontMetrics>
#include <QPainter>
#include <QtGui/QPaintEvent>
#include <QtGui/QFontMetrics>
#include <QtGui/QPainter>
#else

View File

@@ -30,9 +30,9 @@
#ifdef QT4
#include <QWidget>
#include <QPixmap>
#include <QCursor>
#include <QtGui/QWidget>
#include <QtGui/QPixmap>
#include <QtGui/QCursor>
#else

View File

@@ -49,10 +49,10 @@
#ifdef QT4
#include <Qt/QtXml>
#include <QApplication>
#include <QProgressDialog>
#include <QDir>
#include <QBuffer>
#include <QtGui/QApplication>
#include <QtGui/QProgressDialog>
#include <QtCore/QDir>
#include <QtCore/QBuffer>
#else
@@ -506,12 +506,14 @@ 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 );
#ifndef QT3
buf.open( QBuffer::ReadOnly );
#else
buf.open( IO_ReadOnly );
#endif
op = html_init();
@@ -521,7 +523,9 @@ bool flpImport::tryImport( trackContainer * _tc )
word_print( word, out );
word_free( word );
op_free( op );
#ifdef QT3
ba.resetRawData( text, text_len );
#endif
_tc->eng()->getProjectNotes()->setText( out );
outstring = "";
@@ -856,7 +860,7 @@ QString( "echo \"%1\" > /tmp/flp_rtf_comment.rtf ; unrtf -n --html /tmp/flp_rtf_
for( playListItems::const_iterator it = m_plItems.begin();
it != m_plItems.end(); ++it )
{
unsigned int pat_num = ( ( *it ) >> 16 ) - 1;
csize pat_num = ( ( *it ) >> 16 ) - 1;
while( _tc->eng()->getBBEditor()->numOfBBs() <= pat_num )
{
track::create( track::BB_TRACK,

View File

@@ -35,9 +35,9 @@
#ifdef QT4
#include <QString>
#include <QPair>
#include <QVector>
#include <QtCore/QString>
#include <QtCore/QPair>
#include <QtCore/QVector>
#else

View File

@@ -156,7 +156,11 @@ static int my_getchar (QBuffer* f)
error_handler("Cannot allocate read buffer");
}
}
#ifndef QT3
read_buf_end = f->read(read_buf, buffer_size);
#else
read_buf_end = f->readBlock(read_buf, buffer_size);
#endif
read_buf_index = 0;
if (!read_buf_end)
return EOF;

View File

@@ -32,8 +32,8 @@
#ifdef QT4
#include <Qt/QtXml>
#include <QApplication>
#include <QProgressDialog>
#include <QtGui/QApplication>
#include <QtGui/QProgressDialog>
#else

View File

@@ -35,9 +35,9 @@
#ifdef QT4
#include <QString>
#include <QPair>
#include <QVector>
#include <QtCore/QString>
#include <QtCore/QPair>
#include <QtCore/QVector>
#else

View File

@@ -27,20 +27,14 @@
#ifdef QT4
#include <QPainter>
#include <QButtonGroup>
#include <QBitmap>
#include <QtGui/QPainter>
#include <Qt/QtXml>
#include <QFileInfo>
#include <QDropEvent>
#include <QtGui/QDropEvent>
#else
#include <qpainter.h>
#include <qbuttongroup.h>
#include <qbitmap.h>
#include <qdom.h>
#include <qfileinfo.h>
#include <qdom.h>
#include <qmap.h>
#include <qcanvas.h>

View File

@@ -27,23 +27,13 @@
#define _ORGANIC_H
#ifdef QT4
#include <QPixmap>
#else
#include <qpixmap.h>
#include <qwidget.h>
#endif
#include "instrument.h"
#include "spc_bg_hndl_widget.h"
#include "led_checkbox.h"
#include "oscillator.h"
class QPixmap;
class knob;
class notePlayHandle;
class pixmapButton;

View File

@@ -28,12 +28,10 @@
#ifdef QT4
#include <Qt/QtXml>
#include <QMap>
#else
#include <qdom.h>
#include <qmap.h>
#endif

View File

@@ -28,8 +28,8 @@
#ifdef QT4
#include <Qt/QtXml>
#include <QBitmap>
#include <QPainter>
#include <QtGui/QBitmap>
#include <QtGui/QPainter>
#else

View File

@@ -27,10 +27,11 @@
#ifdef QT4
#include <QApplication>
#include <QX11EmbedWidget>
#include <QX11Info>
#include <QTime>
#include <QtCore/QLocale>
#include <QtCore/QTime>
#include <QtGui/QApplication>
#include <QtGui/QX11EmbedWidget>
#include <QtGui/QX11Info>
#else

View File

@@ -30,8 +30,8 @@
#ifdef QT4
#include <QString>
#include <QMutex>
#include <QtCore/QString>
#include <QtCore/QMutex>
#else
@@ -80,7 +80,7 @@ public:
void FASTCALL process( const sampleFrame * _in_buf,
sampleFrame * _out_buf );
void FASTCALL enqueueMidiEvent( const midiEvent & _event,
const Uint32 _frames_ahead );
const f_cnt_t _frames_ahead );
void FASTCALL setTempo( const bpm_t _bpm );
const QMap<QString, QString> & parameterDump( void );

View File

@@ -512,7 +512,7 @@ void VSTPlugin::enqueueMidiEvent( const midiEvent & _event,
void VSTPlugin::setBlockSize( const Uint16 _bsize )
void VSTPlugin::setBlockSize( const fpab_t _bsize )
{
if( _bsize == m_blockSize )
{

View File

@@ -28,12 +28,12 @@
#ifdef QT4
#include <Qt/QtXml>
#include <QMessageBox>
#include <QFileDialog>
#include <QFileInfo>
#include <QDir>
#include <QPushButton>
#include <QCursor>
#include <QtGui/QMessageBox>
#include <QtGui/QFileDialog>
#include <QtCore/QFileInfo>
#include <QtCore/QDir>
#include <QtGui/QPushButton>
#include <QtGui/QCursor>
#else

View File

@@ -31,7 +31,7 @@
#ifdef QT4
#include <QMutex>
#include <QtCore/QMutex>
#else

View File

@@ -27,9 +27,9 @@
#ifdef QT4
#include <QPaintEvent>
#include <QFontMetrics>
#include <QPainter>
#include <QtGui/QPaintEvent>
#include <QtGui/QFontMetrics>
#include <QtGui/QPainter>
#else

View File

@@ -30,9 +30,9 @@
#ifdef QT4
#include <QWidget>
#include <QPixmap>
#include <QCursor>
#include <QtGui/QWidget>
#include <QtGui/QPixmap>
#include <QtGui/QCursor>
#else

View File

@@ -26,11 +26,12 @@
#ifdef QT4
#include <QPoint>
#include <QtCore/QPoint>
#include <Qt/QtXml>
#include <QMap>
#include <QLabel>
#include <QMenu>
#include <QtCore/QMap>
#include <QtGui/QLabel>
#include <QtGui/QMenu>
#include <QtGui/QWhatsThis>
#else
@@ -53,7 +54,7 @@
impulseEditor::impulseEditor( QWidget * _parent, int _x, int _y,
engine * _engine, Uint32 _len ) :
QWidget( _parent, "impulseEditor" ),
QWidget( _parent/*, "impulseEditor"*/ ),
engineObject( _engine ),
m_sampleLength( _len ),
m_normalizeFactor( 1.0f ),
@@ -61,7 +62,13 @@ impulseEditor::impulseEditor( QWidget * _parent, int _x, int _y,
{
setFixedSize( 153, 124 );
m_base = QPixmap::grabWidget( _parent, _x, _y );
#ifndef QT3
QPalette pal = palette();
pal.setBrush( backgroundRole(), QBrush( m_base ) );
setPalette( pal );
#else
setPaletteBackgroundPixmap( m_base );
#endif
m_graph = new graph( this, eng() );
m_graph->setForeground( PLUGIN_NAME::getIconPixmap( "wavegraph4" ) );

View File

@@ -28,9 +28,9 @@
#ifdef QT4
#include <QWidget>
#include <QPixmap>
#include <QCursor>
#include <QtGui/QWidget>
#include <QtGui/QPixmap>
#include <QtGui/QCursor>
#else

View File

@@ -22,10 +22,13 @@
*
*/
#include "qt3support.h"
#ifdef QT4
#include <QLabel>
#include <QMenu>
#include <QtGui/QLabel>
#include <QtGui/QMenu>
#include <QtGui/QWhatsThis>
#else
@@ -62,7 +65,7 @@ nineButtonSelector::nineButtonSelector( QPixmap _button0_on,
Uint32 _x, Uint32 _y,
QWidget * _parent,
engine * _engine ):
QWidget( _parent, "nineButtonSelector" ),
QWidget( _parent/*, "nineButtonSelector"*/ ),
engineObject( _engine ),
m_selected( _default )
{

View File

@@ -26,8 +26,17 @@
#include "qt3support.h"
#ifndef QT3
#include <QtCore/QVector>
#else
#include <qvaluevector.h>
#endif
#include "config.h"
#include "types.h"
#include "vibrating_string.h"

View File

@@ -27,9 +27,10 @@
#ifdef QT4
#include <Qt/QtXml>
#include <QMap>
#include <QLabel>
#include <QMenu>
#include <QtCore/QMap>
#include <QtGui/QLabel>
#include <QtGui/QMenu>
#include <QtGui/QWhatsThis>
#else

View File

@@ -107,8 +107,8 @@ private:
delayLine * FASTCALL initDelayLine( int _len, int _pick );
static void FASTCALL freeDelayLine( delayLine * _dl );
void FASTCALL resample( float *_src,
sample_rate_t _src_frames,
sample_rate_t _dst_frames );
f_cnt_t _src_frames,
f_cnt_t _dst_frames );
/* setDelayLine initializes the string with an impulse at the pick
* position unless the impulse is longer than the string, in which