Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

pulling changes #1

Merged
merged 6 commits into from
Jan 16, 2014
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions include/AutomatableModel.h
Original file line number Diff line number Diff line change
Expand Up @@ -180,6 +180,8 @@ class EXPORT AutomatableModel : public Model, public JournallingObject
static void unlinkModels( AutomatableModel * _m1,
AutomatableModel * _m2 );

void unlinkAllModels();

virtual void saveSettings( QDomDocument & _doc,
QDomElement & _this,
const QString & _name = QString( "value" ) );
Expand Down Expand Up @@ -208,6 +210,11 @@ class EXPORT AutomatableModel : public Model, public JournallingObject
return "0";
}

bool hasLinkedModels() const
{
return m_hasLinkedModels;
}


public slots:
virtual void reset();
Expand Down
45 changes: 22 additions & 23 deletions include/AutomatableModelView.h
Original file line number Diff line number Diff line change
Expand Up @@ -34,43 +34,43 @@ class QMenu;
class EXPORT AutomatableModelView : public ModelView
{
public:
AutomatableModelView( Model * _model, QWidget * _this );
AutomatableModelView( Model* model, QWidget* _this );
virtual ~AutomatableModelView();

// some basic functions for convenience
AutomatableModel * modelUntyped()
AutomatableModel* modelUntyped()
{
return( castModel<AutomatableModel>() );
return castModel<AutomatableModel>();
}

const AutomatableModel * modelUntyped() const
const AutomatableModel* modelUntyped() const
{
return( castModel<AutomatableModel>() );
return castModel<AutomatableModel>();
}

virtual void setModel( Model * _model, bool _old_model_valid = true );
virtual void setModel( Model* model, bool isOldModelValid = true );

template<typename T>
inline T value() const
{
return( modelUntyped() ? modelUntyped()->value<T>() : 0 );
return modelUntyped() ? modelUntyped()->value<T>() : 0;
}

inline void setDescription( const QString & _desc )
inline void setDescription( const QString& desc )
{
m_description = _desc;
m_description = desc;
}

inline void setUnit( const QString & _unit )
inline void setUnit( const QString& unit )
{
m_unit = _unit;
m_unit = unit;
}

void addDefaultActions( QMenu * _menu );
void addDefaultActions( QMenu* menu );


protected:
virtual void mousePressEvent( QMouseEvent * _ev );
virtual void mousePressEvent( QMouseEvent* event );

QString m_description;
QString m_unit;
Expand All @@ -84,19 +84,18 @@ class AutomatableModelViewSlots : public QObject
{
Q_OBJECT
public:
AutomatableModelViewSlots(
AutomatableModelView * _amv,
QObject * _parent );
AutomatableModelViewSlots( AutomatableModelView* amv, QObject* parent );

public slots:
void execConnectionDialog();
void removeConnection();
void editSongGlobalAutomation();
void unlinkAllModels();
void removeSongGlobalAutomation();


protected:
AutomatableModelView * amv;
AutomatableModelView* m_amv;

} ;

Expand All @@ -107,19 +106,19 @@ public slots:
class EXPORT type##ModelView : public AutomatableModelView \
{ \
public: \
type##ModelView( Model * _model, QWidget * _this ) : \
AutomatableModelView( _model, _this ) \
type##ModelView( Model* model, QWidget* _this ) : \
AutomatableModelView( model, _this ) \
{ \
} \
\
type##Model * model() \
type##Model* model() \
{ \
return( castModel<type##Model>() ); \
return castModel<type##Model>(); \
} \
\
const type##Model * model() const \
const type##Model* model() const \
{ \
return( castModel<type##Model>() ); \
return castModel<type##Model>(); \
} \
}

Expand Down
2 changes: 2 additions & 0 deletions include/setup_dialog.h
Original file line number Diff line number Diff line change
Expand Up @@ -111,6 +111,7 @@ private slots:
void toggleSyncVSTPlugins( bool _enabled );
void toggleAnimateAFP( bool _enabled );
void toggleNoteLabels( bool en );
void toggleDisplayWaveform( bool en );


private:
Expand Down Expand Up @@ -162,6 +163,7 @@ private slots:
bool m_syncVSTPlugins;
bool m_animateAFP;
bool m_printNoteLabels;
bool m_displayWaveform;

typedef QMap<QString, AudioDevice::setupWidget *> AswMap;
typedef QMap<QString, MidiClient::setupWidget *> MswMap;
Expand Down
4 changes: 3 additions & 1 deletion plugins/zynaddsubfx/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -125,6 +125,8 @@ IF(LMMS_BUILD_WIN64)
ELSEIF(LMMS_BUILD_WIN32)
SET(FLTK_EXTRA_FLAGS "-DCMAKE_TOOLCHAIN_FILE=${CMAKE_SOURCE_DIR}/cmake/modules/Win32Toolchain.cmake")
ENDIF(LMMS_BUILD_WIN64)
ADD_CUSTOM_TARGET(libfltk COMMAND mkdir -p ${CMAKE_CURRENT_BINARY_DIR}/fltk && cd ${CMAKE_CURRENT_BINARY_DIR}/fltk && ${CMAKE_COMMAND} ${CMAKE_CURRENT_SOURCE_DIR}/fltk ${FLTK_EXTRA_FLAGS} -DCMAKE_MODULE_PATH=${CMAKE_SOURCE_DIR}/cmake/modules/ -DFLTK_USE_SYSTEM_ZLIB:BOOL=ON -DFLTK_USE_SYSTEM_JPEG:BOOL=ON -DFLTK_USE_SYSTEM_PNG:BOOL=ON -DOPTION_BUILD_EXAMPLES:BOOL=OFF -DCMAKE_BUILD_TYPE=release -DFREETYPE_PATH=${FREETYPE_INCLUDE_DIR_ft2build} && ${CMAKE_BUILD_TOOL})

FIND_PACKAGE(Freetype REQUIRED)
ADD_CUSTOM_TARGET(libfltk COMMAND mkdir -p ${CMAKE_CURRENT_BINARY_DIR}/fltk && cd ${CMAKE_CURRENT_BINARY_DIR}/fltk && ${CMAKE_COMMAND} ${CMAKE_CURRENT_SOURCE_DIR}/fltk ${FLTK_EXTRA_FLAGS} -DCMAKE_MODULE_PATH=${CMAKE_SOURCE_DIR}/cmake/modules/ -DFLTK_USE_SYSTEM_ZLIB:BOOL=ON -DFLTK_USE_SYSTEM_JPEG:BOOL=ON -DFLTK_USE_SYSTEM_PNG:BOOL=ON -DOPTION_BUILD_EXAMPLES:BOOL=OFF -DCMAKE_BUILD_TYPE=release -DFREETYPE_PATH=${FREETYPE_INCLUDE_DIR_freetype2} && ${CMAKE_BUILD_TOOL})

ADD_DEPENDENCIES(RemoteZynAddSubFx libfltk)
13 changes: 13 additions & 0 deletions src/core/AutomatableModel.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -418,6 +418,19 @@ void AutomatableModel::unlinkModels( AutomatableModel * _model1,



void AutomatableModel::unlinkAllModels()
{
foreach( AutomatableModel* model, m_linkedModels )
{
unlinkModels( this, model );
}

m_hasLinkedModels = false;
}




void AutomatableModel::setControllerConnection( ControllerConnection * _c )
{
m_controllerConnection = _c;
Expand Down
Loading