Add background artwork for carla

This commit is contained in:
falkTX
2014-10-10 11:21:23 +01:00
parent 9f6c9d96ef
commit 9fabc0e8b6
4 changed files with 10 additions and 8 deletions

View File

@@ -3,7 +3,7 @@ if(LMMS_HAVE_CARLA)
INCLUDE_DIRECTORIES(${CARLA_INCLUDE_DIRS})
LINK_DIRECTORIES(${CARLA_LIBRARY_DIRS})
LINK_LIBRARIES(${CARLA_LIBRARIES})
BUILD_PLUGIN(carlabase carla.cpp carla.h MOCFILES carla.h)
BUILD_PLUGIN(carlabase carla.cpp carla.h MOCFILES carla.h EMBEDDED_RESOURCES "${CMAKE_CURRENT_SOURCE_DIR}/*.png")
SET_TARGET_PROPERTIES(carlabase
PROPERTIES SKIP_BUILD_RPATH TRUE
BUILD_WITH_INSTALL_RPATH TRUE

Binary file not shown.

After

Width:  |  Height:  |  Size: 45 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 45 KiB

View File

@@ -29,6 +29,7 @@
#include "engine.h"
#include "song.h"
#include "gui_templates.h"
#include "InstrumentPlayHandle.h"
#include "InstrumentTrack.h"
@@ -40,6 +41,8 @@
#include <cstring>
#include "embed.cpp"
// this doesn't seem to be defined anywhere
static const double ticksPerBeat = 48.0;
@@ -48,7 +51,6 @@ static const double ticksPerBeat = 48.0;
* - get plugin instance name (to use in external window title)
* - offline mode change callback
* - midi output
* - background artwork
*
* All other items are to be done in Carla itself.
*/
@@ -470,19 +472,19 @@ CarlaInstrumentView::CarlaInstrumentView(CarlaInstrument* const instrument, QWid
{
setAutoFillBackground(true);
//QPalette pal;
//pal.setBrush(backgroundRole(), PLUGIN_NAME::getIconPixmap("artwork"));
//setPalette(pal);
QPalette pal;
pal.setBrush(backgroundRole(), instrument->kIsPatchbay ? PLUGIN_NAME::getIconPixmap("artwork-patchbay") : PLUGIN_NAME::getIconPixmap("artwork-rack"));
setPalette(pal);
QVBoxLayout * l = new QVBoxLayout( this );
l->setContentsMargins( 20, 80, 10, 10 );
l->setContentsMargins( 20, 180, 10, 10 );
l->setSpacing( 10 );
m_toggleUIButton = new QPushButton( tr( "Show GUI" ), this );
m_toggleUIButton->setCheckable( true );
m_toggleUIButton->setChecked( false );
//m_toggleUIButton->setIcon( embed::getIconPixmap( "zoom" ) );
//m_toggleUIButton->setFont( pointSize<8>( m_toggleUIButton->font() ) );
m_toggleUIButton->setIcon( embed::getIconPixmap( "zoom" ) );
m_toggleUIButton->setFont( pointSize<8>( m_toggleUIButton->font() ) );
connect( m_toggleUIButton, SIGNAL( clicked(bool) ), this, SLOT( toggleUI( bool ) ) );
m_toggleUIButton->setWhatsThis(