more Qt4 changes
git-svn-id: https://lmms.svn.sf.net/svnroot/lmms/trunk/lmms@548 0778d3d1-df1d-0410-868b-ea421aaaa00d
This commit is contained in:
@@ -102,11 +102,8 @@ public:
|
||||
public:
|
||||
setupWidget( const QString & _caption, QWidget * _parent ) :
|
||||
tabWidget( tabWidget::tr( "Settings for %1" ).arg(
|
||||
tabWidget::tr( _caption
|
||||
#ifndef QT3
|
||||
.toAscii()
|
||||
#endif
|
||||
) ).toUpper(), _parent )
|
||||
tabWidget::tr( _caption.toAscii() ) ).
|
||||
toUpper(), _parent )
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
@@ -26,6 +26,7 @@
|
||||
#ifndef _AUTOMATABLE_OBJECT_TEMPLATES_H
|
||||
#define _AUTOMATABLE_OBJECT_TEMPLATES_H
|
||||
|
||||
#include <QtXml/QDomElement>
|
||||
|
||||
#include "automatable_object.h"
|
||||
#include "automation_editor.h"
|
||||
@@ -33,15 +34,6 @@
|
||||
#include "engine.h"
|
||||
#include "templates.h"
|
||||
|
||||
#ifndef QT3
|
||||
|
||||
#include <QtXml/QDomElement>
|
||||
|
||||
#else
|
||||
|
||||
#include <qdom.h>
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
template<typename T, typename EDIT_STEP_TYPE>
|
||||
@@ -329,13 +321,8 @@ template<typename T, typename EDIT_STEP_TYPE>
|
||||
void automatableObject<T, EDIT_STEP_TYPE>::redoStep( journalEntry & _je )
|
||||
{
|
||||
bool journalling = testAndSetJournalling( FALSE );
|
||||
/*#ifndef QT3
|
||||
setValue( static_cast<T>( value() +
|
||||
_je.data().value<EDIT_STEP_TYPE>() ) );
|
||||
#else*/
|
||||
setValue( static_cast<T>( value() + static_cast<EDIT_STEP_TYPE>(
|
||||
_je.data().toDouble() ) ) );
|
||||
//#endif
|
||||
setJournalling( journalling );
|
||||
}
|
||||
|
||||
@@ -346,12 +333,7 @@ template<typename T, typename EDIT_STEP_TYPE>
|
||||
void automatableObject<T, EDIT_STEP_TYPE>::undoStep( journalEntry & _je )
|
||||
{
|
||||
journalEntry je( _je.actionID(),
|
||||
/*#ifndef QT3
|
||||
-_je.data().value<EDIT_STEP_TYPE>()
|
||||
#else*/
|
||||
static_cast<EDIT_STEP_TYPE>( -_je.data().toDouble() )
|
||||
//#endif
|
||||
);
|
||||
static_cast<EDIT_STEP_TYPE>( -_je.data().toDouble() ) );
|
||||
redoStep( je );
|
||||
}
|
||||
|
||||
|
||||
@@ -58,17 +58,6 @@ public:
|
||||
return( m_show_status );
|
||||
}
|
||||
|
||||
#ifdef QT3
|
||||
inline int minimum( void ) const
|
||||
{
|
||||
return( minValue() );
|
||||
}
|
||||
inline int maximum( void ) const
|
||||
{
|
||||
return( maxValue() );
|
||||
}
|
||||
#endif
|
||||
|
||||
|
||||
signals:
|
||||
void logicValueChanged( int _value );
|
||||
|
||||
@@ -27,13 +27,7 @@
|
||||
#define _CUSTOM_EVENTS_H
|
||||
|
||||
|
||||
#ifdef QT3
|
||||
|
||||
#include <qevent.h>
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
#include <QtCore/QEvent>
|
||||
|
||||
|
||||
namespace customEvents
|
||||
|
||||
@@ -31,17 +31,8 @@
|
||||
#include <config.h>
|
||||
#endif
|
||||
|
||||
#ifndef QT3
|
||||
|
||||
#include <Qt/QtXml>
|
||||
|
||||
#else
|
||||
|
||||
#include <qdom.h>
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
#include "plugin.h"
|
||||
#include "mixer.h"
|
||||
|
||||
@@ -136,7 +127,7 @@ public:
|
||||
return( m_gate );
|
||||
}
|
||||
|
||||
void FASTCALL setGate( float _level );
|
||||
void setGate( float _level );
|
||||
|
||||
inline Uint32 getBufferCount( void )
|
||||
{
|
||||
@@ -170,7 +161,7 @@ public:
|
||||
|
||||
virtual effectControlDialog * createControlDialog( track * _track ) = 0;
|
||||
|
||||
static effect * FASTCALL instantiate( const QString & _plugin_name,
|
||||
static effect * instantiate( const QString & _plugin_name,
|
||||
descriptor::subPluginFeatures::key * _key );
|
||||
|
||||
|
||||
|
||||
@@ -26,16 +26,8 @@
|
||||
#ifndef _EFFECT_CONTROL_DIALOG_H
|
||||
#define _EFFECT_CONTROL_DIALOG_H
|
||||
|
||||
#ifndef QT3
|
||||
|
||||
#include <QtGui/QWidget>
|
||||
|
||||
#else
|
||||
|
||||
#include <qwidget.h>
|
||||
|
||||
#endif
|
||||
|
||||
#include "journalling_object.h"
|
||||
|
||||
|
||||
|
||||
@@ -30,16 +30,8 @@
|
||||
#include <config.h>
|
||||
#endif
|
||||
|
||||
#ifndef QT3
|
||||
|
||||
#include <QtCore/QMap>
|
||||
|
||||
#else
|
||||
|
||||
#include <qmap.h>
|
||||
|
||||
#endif
|
||||
|
||||
class automationEditor;
|
||||
class bbEditor;
|
||||
class projectJournal;
|
||||
|
||||
@@ -25,17 +25,8 @@
|
||||
#ifndef _FIFO_BUFFER_H
|
||||
#define _FIFO_BUFFER_H
|
||||
|
||||
|
||||
#ifndef QT3
|
||||
|
||||
#include <QtCore/QSemaphore>
|
||||
|
||||
#else
|
||||
|
||||
#include <qsemaphore.h>
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
template<typename T>
|
||||
class fifoBuffer
|
||||
@@ -49,53 +40,29 @@ public:
|
||||
m_size( _size )
|
||||
{
|
||||
m_buffer = new T[_size];
|
||||
#ifndef QT3
|
||||
m_reader_sem.acquire( _size );
|
||||
#else
|
||||
m_reader_sem += _size;
|
||||
#endif
|
||||
}
|
||||
|
||||
~fifoBuffer()
|
||||
{
|
||||
delete[] m_buffer;
|
||||
#ifndef QT3
|
||||
m_reader_sem.release( m_size );
|
||||
#else
|
||||
m_reader_sem -= m_size;
|
||||
#endif
|
||||
}
|
||||
|
||||
void write( T _element )
|
||||
{
|
||||
#ifndef QT3
|
||||
m_writer_sem.acquire();
|
||||
#else
|
||||
m_writer_sem++;
|
||||
#endif
|
||||
m_buffer[m_writer_index++] = _element;
|
||||
m_writer_index %= m_size;
|
||||
#ifndef QT3
|
||||
m_reader_sem.release();
|
||||
#else
|
||||
m_reader_sem--;
|
||||
#endif
|
||||
}
|
||||
|
||||
T read( void )
|
||||
{
|
||||
#ifndef QT3
|
||||
m_reader_sem.acquire();
|
||||
#else
|
||||
m_reader_sem++;
|
||||
#endif
|
||||
T element = m_buffer[m_reader_index++];
|
||||
m_reader_index %= m_size;
|
||||
#ifndef QT3
|
||||
m_writer_sem.release();
|
||||
#else
|
||||
m_writer_sem--;
|
||||
#endif
|
||||
return( element );
|
||||
}
|
||||
|
||||
|
||||
@@ -25,17 +25,8 @@
|
||||
#ifndef _METER_DIALOG_H
|
||||
#define _METER_DIALOG_H
|
||||
|
||||
#ifndef QT3
|
||||
|
||||
#include <QtGui/QWidget>
|
||||
|
||||
#else
|
||||
|
||||
#include <qwidget.h>
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
#include "lcd_spinbox.h"
|
||||
|
||||
|
||||
|
||||
@@ -26,19 +26,8 @@
|
||||
#ifndef _PROJECT_VERSION_H
|
||||
#define _PROJECT_VERSION_H
|
||||
|
||||
|
||||
#ifndef QT3
|
||||
|
||||
#include <QtCore/QString>
|
||||
|
||||
#else
|
||||
|
||||
#include <qstring.h>
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
|
||||
|
||||
class projectVersion : public QString
|
||||
{
|
||||
|
||||
@@ -25,23 +25,11 @@
|
||||
#ifndef _RACK_PLUGIN_H
|
||||
#define _RACK_PLUGIN_H
|
||||
|
||||
#ifndef QT3
|
||||
|
||||
#include <QtGui/QWidget>
|
||||
#include <QtGui/QGroupBox>
|
||||
#include <QtGui/QPushButton>
|
||||
#include <QtGui/QLabel>
|
||||
|
||||
#else
|
||||
|
||||
#include <qwidget.h>
|
||||
#include <qgroupbox.h>
|
||||
#include <qpushbutton.h>
|
||||
#include <qlabel.h>
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
#include "journalling_object.h"
|
||||
|
||||
|
||||
|
||||
@@ -35,16 +35,8 @@ class selectableObject : public QWidget
|
||||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
selectableObject( QWidget * _parent
|
||||
#ifdef QT3
|
||||
, WFlags _f
|
||||
#endif
|
||||
) :
|
||||
QWidget( _parent
|
||||
#ifdef QT3
|
||||
, NULL, _f
|
||||
#endif
|
||||
),
|
||||
selectableObject( QWidget * _parent ) :
|
||||
QWidget( _parent ),
|
||||
m_selected( FALSE )
|
||||
{
|
||||
}
|
||||
|
||||
@@ -37,11 +37,7 @@ public:
|
||||
QPushButton( _text, _parent ),
|
||||
m_id( _id )
|
||||
{
|
||||
#ifndef QT3
|
||||
setCheckable( TRUE );
|
||||
#else
|
||||
setToggleButton( TRUE );
|
||||
#endif
|
||||
connect( this, SIGNAL( clicked() ), this,
|
||||
SLOT( slotClicked() ) );
|
||||
}
|
||||
@@ -50,17 +46,6 @@ public:
|
||||
{
|
||||
}
|
||||
|
||||
#ifdef QT3
|
||||
inline void setChecked( bool _on )
|
||||
{
|
||||
setOn( _on );
|
||||
}
|
||||
|
||||
inline bool isChecked( void ) const
|
||||
{
|
||||
return( isOn() );
|
||||
}
|
||||
#endif
|
||||
|
||||
signals:
|
||||
void clicked( int );
|
||||
|
||||
@@ -26,16 +26,8 @@
|
||||
#ifndef _TEMPO_SYNC_KNOB_H
|
||||
#define _TEMPO_SYNC_KNOB_H
|
||||
|
||||
#ifndef QT3
|
||||
|
||||
#include <QtGui/QPixmap>
|
||||
|
||||
#else
|
||||
|
||||
#include <qpixmap.h>
|
||||
|
||||
#endif
|
||||
|
||||
#include "knob.h"
|
||||
|
||||
|
||||
|
||||
@@ -26,18 +26,8 @@
|
||||
#ifndef _TOOL_H
|
||||
#define _TOOL_H
|
||||
|
||||
|
||||
#ifndef QT3
|
||||
|
||||
#include <QtGui/QWidget>
|
||||
|
||||
#else
|
||||
|
||||
#include <qwidget.h>
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
#include "plugin.h"
|
||||
|
||||
|
||||
|
||||
@@ -59,23 +59,6 @@ public:
|
||||
m_colorHighlighted = _color;
|
||||
}
|
||||
|
||||
#ifdef QT3
|
||||
inline void setIcon( const QPixmap & _icon )
|
||||
{
|
||||
setIconSet( _icon );
|
||||
}
|
||||
|
||||
inline void setChecked( bool _on )
|
||||
{
|
||||
setOn( _on );
|
||||
}
|
||||
|
||||
inline bool isChecked( void ) const
|
||||
{
|
||||
return( isOn() );
|
||||
}
|
||||
#endif
|
||||
|
||||
|
||||
protected:
|
||||
virtual void enterEvent( QEvent * _ev );
|
||||
|
||||
@@ -26,31 +26,19 @@
|
||||
#ifndef _UPDATE_EVENT_H
|
||||
#define _UPDATE_EVENT_H
|
||||
|
||||
|
||||
#include "custom_events.h"
|
||||
|
||||
|
||||
|
||||
|
||||
#ifndef QT3
|
||||
class updateEvent : public QEvent
|
||||
#else
|
||||
class updateEvent : public QCustomEvent
|
||||
#endif
|
||||
{
|
||||
public:
|
||||
updateEvent( void ) :
|
||||
#ifndef QT3
|
||||
QEvent( (QEvent::Type)customEvents::GUI_UPDATE )
|
||||
#else
|
||||
QCustomEvent( customEvents::GUI_UPDATE )
|
||||
#endif
|
||||
{
|
||||
}
|
||||
|
||||
} ;
|
||||
|
||||
|
||||
|
||||
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user