apparently we can't make templated typedefs...

git-svn-id: https://lmms.svn.sf.net/svnroot/lmms/trunk/lmms@884 0778d3d1-df1d-0410-868b-ea421aaaa00d
This commit is contained in:
Paul Giblock
2008-04-04 07:38:03 +00:00
parent 3541af29df
commit 1fbff410f8
4 changed files with 13 additions and 10 deletions

View File

@@ -21,8 +21,8 @@
* src/core/mixer.cpp:
trigger controller's frame counter
* data/themes/llama/background_artwork.png:
* data/themes/llama:
* data/themes/llama/background_artwork.png:
* data/themes/Makefile.am:
start a theme with my preferences

View File

@@ -151,7 +151,6 @@ public:
this, SIGNAL( dataChanged() ) );
}
inline virtual T initValue( void ) const
{
return( m_initValue );
@@ -300,12 +299,12 @@ public slots:
template<typename T, typename EDIT_STEP_TYPE = T>
template<typename T, typename EDIT_STEP_TYPE, class WIDGET_BASE>
class automatableModelView : public modelView
{
public:
typedef automatableModel<T, EDIT_STEP_TYPE> autoModel;
typedef automatableModelView<T, EDIT_STEP_TYPE> autoModelView;
typedef automatableModelView<WIDGET_BASE, T, EDIT_STEP_TYPE> autoModelView;
automatableModelView( ::model * _model ) :
modelView( _model )
@@ -342,14 +341,15 @@ public:
#define generateModelPrimitive(type,type2) \
typedef automatableModel<type,type2> type##Model; \
typedef automatableModelView<type,type2> type##ModelView; \
typedef automatableModelView<type,type2,WIDGET_BASE> type##ModelView<WIDGET_BASE>; \
// some model-primitives
generateModelPrimitive(float,float);
generateModelPrimitive(int,int);
class boolModel : public automatableModel<bool, signed char>
template<class WIDGET_TYPE>
class boolModel : public automatableModel<bool, signed char, WIDGET_TYPE>
{
public:
boolModel( const bool _val = FALSE,
@@ -362,7 +362,7 @@ public:
} ;
typedef automatableModelView<bool, signed char> boolModelView;
typedef automatableModelView<bool, signed char, WIDGET_TYPE> boolModelView<WIDGET_TYPE>;
#endif

View File

@@ -47,7 +47,7 @@ enum knobTypes
class knob : public QWidget, public floatModelView
class knob : public QWidget, public floatModelView<QWidget>
{
Q_OBJECT
public:

View File

@@ -70,11 +70,14 @@ void modelView::doConnections( void )
{
if( m_model != NULL )
{
// Why queued connections? this causes a terrible stair effect when
// the GUI can't keep up. If anything should suffer, it should be
// GUI response.
QWidget * w = dynamic_cast<QWidget *>( this );
QObject::connect( m_model, SIGNAL( dataChanged() ),
w, SLOT( update() ), Qt::QueuedConnection );
w, SLOT( update() ) /*, Qt::QueuedConnection */ );
QObject::connect( m_model, SIGNAL( propertiesChanged() ),
w, SLOT( update() ), Qt::QueuedConnection );
w, SLOT( update() ) /*, Qt::QueuedConnection */ );
}
}