made LMMS working with Qt4 again
git-svn-id: https://lmms.svn.sf.net/svnroot/lmms/trunk/lmms@33 0778d3d1-df1d-0410-868b-ea421aaaa00d
This commit is contained in:
@@ -30,7 +30,6 @@
|
||||
|
||||
#ifdef QT4
|
||||
|
||||
#include <QPaintDevice>
|
||||
#include <QApplication>
|
||||
#include <QFont>
|
||||
#include <QDesktopWidget>
|
||||
@@ -53,7 +52,7 @@ inline QFont pointSize( QFont _f )
|
||||
static const int DPI = 96;
|
||||
#ifdef QT4
|
||||
_f.setPointSizeF( SIZE * DPI /
|
||||
QPaintDevice( QApplication::desktop() ).logicalDpiY() );
|
||||
QApplication::desktop()->logicalDpiY() );
|
||||
#else
|
||||
_f.setPointSizeFloat( SIZE * DPI /
|
||||
QPaintDeviceMetrics( qApp->desktop() ).logicalDpiY() );
|
||||
|
||||
@@ -36,6 +36,8 @@
|
||||
#define ALSA_SUPPORT
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
||||
#include <alsa/asoundlib.h>
|
||||
|
||||
#include "qt3support.h"
|
||||
@@ -147,7 +149,7 @@ private slots:
|
||||
|
||||
private:
|
||||
virtual void run( void );
|
||||
|
||||
#ifdef ALSA_SUPPORT
|
||||
|
||||
snd_seq_t * m_seqHandle;
|
||||
struct ports
|
||||
@@ -161,7 +163,7 @@ private:
|
||||
int m_queueID;
|
||||
|
||||
volatile bool m_quit;
|
||||
|
||||
#endif
|
||||
|
||||
QTimer m_portListUpdateTimer;
|
||||
QStringList m_readablePorts;
|
||||
@@ -176,4 +178,3 @@ signals:
|
||||
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
||||
@@ -48,6 +48,7 @@
|
||||
|
||||
class QMenu;
|
||||
class QPixmap;
|
||||
class QAction;
|
||||
|
||||
class channelTrack;
|
||||
class tabWidget;
|
||||
@@ -80,6 +81,9 @@ protected slots:
|
||||
void midiPortModeToggled( bool );
|
||||
void readablePortsChanged( void );
|
||||
void writeablePortsChanged( void );
|
||||
void activatedReadablePort( QAction * _item );
|
||||
void activatedWriteablePort( QAction * _item );
|
||||
// Qt3-version
|
||||
void activatedReadablePort( int _id );
|
||||
void activatedWriteablePort( int _id );
|
||||
|
||||
|
||||
@@ -53,9 +53,10 @@
|
||||
#include "mixer.h"
|
||||
|
||||
|
||||
class QAction;
|
||||
class QPixmap;
|
||||
class QProgressBar;
|
||||
class QPushButton;
|
||||
class QPixmap;
|
||||
|
||||
class channelTrack;
|
||||
class patternFreezeThread;
|
||||
@@ -167,6 +168,8 @@ protected slots:
|
||||
void unfreeze( void );
|
||||
void abortFreeze( void );
|
||||
|
||||
void addSteps( QAction * _item );
|
||||
void removeSteps( QAction * _item );
|
||||
void addSteps( int _n );
|
||||
void removeSteps( int _n );
|
||||
|
||||
|
||||
@@ -71,6 +71,14 @@ inline QString baseName( const QString & _file )
|
||||
#define QAbstractButton QButton
|
||||
#define QScrollArea QScrollView
|
||||
|
||||
#define Q3ListView QListView
|
||||
#define Q3ListViewItem QListViewItem
|
||||
#define Q3ScrollView QScrollView
|
||||
|
||||
#define QMatrix QWMatrix
|
||||
#define QIcon QIconSet
|
||||
|
||||
|
||||
// QWidget
|
||||
#define setWindowTitle setCaption
|
||||
#define setWindowIcon setIcon
|
||||
@@ -108,6 +116,7 @@ inline QString baseName( const QString & _file )
|
||||
|
||||
// QAbstractButton/QButton
|
||||
#define setCheckable setToggleButton
|
||||
#define setShortcut setAccel
|
||||
|
||||
|
||||
// QInputEvent/QKeyEvent
|
||||
@@ -150,6 +159,10 @@ inline QString baseName( const QString & _file )
|
||||
#define rootPath rootDirPath
|
||||
|
||||
|
||||
// QFileInfo
|
||||
#define absoluteFilePath absFilePath
|
||||
|
||||
|
||||
// QToolButton
|
||||
#define setMenu setPopup
|
||||
|
||||
@@ -158,16 +171,17 @@ inline QString baseName( const QString & _file )
|
||||
#define transformed xForm
|
||||
|
||||
|
||||
#define Q3ListView QListView
|
||||
#define Q3ListViewItem QListViewItem
|
||||
#define Q3ScrollView QScrollView
|
||||
// QGridLayout
|
||||
#define setColumnStretch setColStretch
|
||||
#define columnCount numCols
|
||||
#define setColumnMinimumWidth setColSpacing
|
||||
|
||||
#define QMatrix QWMatrix
|
||||
#define QIcon QIconSet
|
||||
|
||||
// Qt-namespace
|
||||
#define ShiftModifier ShiftButton
|
||||
#define ControlModifier ControlButton
|
||||
|
||||
|
||||
typedef unsigned int csize;
|
||||
|
||||
// some compat-stuff for older qt-versions...
|
||||
|
||||
@@ -22,6 +22,10 @@
|
||||
#ifndef QXEMBED_H
|
||||
#define QXEMBED_H
|
||||
|
||||
#include "qt3support.h"
|
||||
|
||||
#ifndef QT4
|
||||
|
||||
#include <qwidget.h>
|
||||
/*#include <kdelibs_export.h>*/
|
||||
|
||||
@@ -232,3 +236,4 @@ private:
|
||||
|
||||
#endif
|
||||
#endif
|
||||
#endif
|
||||
|
||||
@@ -38,16 +38,13 @@
|
||||
#include <qwidget.h>
|
||||
#include <qmap.h>
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
#include "spc_bg_hndl_widget.h"
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
|
||||
class tabWidget : public QWidget
|
||||
#ifndef QT4
|
||||
, public specialBgHandlingWidget
|
||||
#endif
|
||||
class tabWidget : public QWidget, public specialBgHandlingWidget
|
||||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
|
||||
@@ -28,7 +28,7 @@
|
||||
|
||||
#ifdef QT4
|
||||
|
||||
#include <QPixmap.h>
|
||||
#include <QPixmap>
|
||||
|
||||
#else
|
||||
|
||||
@@ -39,23 +39,26 @@
|
||||
#include "knob.h"
|
||||
|
||||
|
||||
enum tempoSyncMode
|
||||
{
|
||||
NO_SYNC,
|
||||
DOUBLE_WHOLE_NOTE,
|
||||
WHOLE_NOTE,
|
||||
HALF_NOTE,
|
||||
QUARTER_NOTE,
|
||||
EIGHTH_NOTE,
|
||||
SIXTEENTH_NOTE,
|
||||
THIRTYSECOND_NOTE
|
||||
} ;
|
||||
class QAction;
|
||||
|
||||
|
||||
|
||||
class tempoSyncKnob : public knob
|
||||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
enum tempoSyncMode
|
||||
{
|
||||
NO_SYNC,
|
||||
DOUBLE_WHOLE_NOTE,
|
||||
WHOLE_NOTE,
|
||||
HALF_NOTE,
|
||||
QUARTER_NOTE,
|
||||
EIGHTH_NOTE,
|
||||
SIXTEENTH_NOTE,
|
||||
THIRTYSECOND_NOTE
|
||||
} ;
|
||||
|
||||
|
||||
tempoSyncKnob( int _knob_num, QWidget * _parent, const QString & _name,
|
||||
float _scale = 1.0f );
|
||||
virtual ~tempoSyncKnob();
|
||||
@@ -82,6 +85,7 @@ signals:
|
||||
|
||||
public slots:
|
||||
void setTempoSync( int _note_type );
|
||||
void setTempoSync( QAction * _item );
|
||||
|
||||
|
||||
protected:
|
||||
|
||||
@@ -66,7 +66,12 @@ public:
|
||||
{
|
||||
m_colorHighlighted = _color;
|
||||
}
|
||||
|
||||
#ifndef QT4
|
||||
inline void setIcon( const QPixmap & _icon )
|
||||
{
|
||||
setIconSet( _icon );
|
||||
}
|
||||
#endif
|
||||
|
||||
protected:
|
||||
virtual void enterEvent( QEvent * _ev );
|
||||
@@ -83,3 +88,4 @@ private:
|
||||
} ;
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
Reference in New Issue
Block a user