Fix qstring arg
This commit is contained in:
Binary file not shown.
|
Before Width: | Height: | Size: 1022 B After Width: | Height: | Size: 817 B |
Binary file not shown.
|
Before Width: | Height: | Size: 1.6 KiB After Width: | Height: | Size: 1.4 KiB |
@@ -61,13 +61,14 @@ public:
|
||||
static const int FxLineHeight;
|
||||
|
||||
private:
|
||||
static void drawFxLine( QPainter* p, const FxLine *fxLine, const QString& name, bool isActive, bool sendToThis );
|
||||
static void drawFxLine( QPainter* p, const FxLine *fxLine, const QString& name, bool isActive, bool sendToThis, bool receiveFromThis );
|
||||
|
||||
FxMixerView * m_mv;
|
||||
LcdWidget* m_lcd;
|
||||
int m_channelIndex;
|
||||
QBrush m_backgroundActive;
|
||||
static QPixmap * s_sendBgArrow;
|
||||
static QPixmap * s_receiveBgArrow;
|
||||
|
||||
private slots:
|
||||
void renameChannel();
|
||||
|
||||
@@ -41,7 +41,7 @@ FxRoute::FxRoute( FxChannel * from, FxChannel * to, float amount ) :
|
||||
//qDebug( "created: %d to %d", m_from->m_channelIndex, m_to->m_channelIndex );
|
||||
// create send amount model
|
||||
m_amount = new FloatModel( amount, 0, 1, 0.001, NULL,
|
||||
tr( "Amount to send from channel %1 to channel %2" ).arg( m_from->m_channelIndex, m_to->m_channelIndex ) );
|
||||
tr( "Amount to send from channel %1 to channel %2" ).arg( m_from->m_channelIndex ).arg( m_to->m_channelIndex ) );
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -41,6 +41,7 @@
|
||||
|
||||
const int FxLine::FxLineHeight = 287;
|
||||
QPixmap * FxLine::s_sendBgArrow = NULL;
|
||||
QPixmap * FxLine::s_receiveBgArrow = NULL;
|
||||
|
||||
FxLine::FxLine( QWidget * _parent, FxMixerView * _mv, int _channelIndex) :
|
||||
QWidget( _parent ),
|
||||
@@ -51,6 +52,10 @@ FxLine::FxLine( QWidget * _parent, FxMixerView * _mv, int _channelIndex) :
|
||||
{
|
||||
s_sendBgArrow = new QPixmap( embed::getIconPixmap( "send_bg_arrow", 29, 56 ) );
|
||||
}
|
||||
if( ! s_receiveBgArrow )
|
||||
{
|
||||
s_receiveBgArrow = new QPixmap( embed::getIconPixmap( "receive_bg_arrow", 29, 56 ) );
|
||||
}
|
||||
|
||||
setFixedSize( 33, FxLineHeight );
|
||||
setAttribute( Qt::WA_OpaquePaintEvent, true );
|
||||
@@ -103,7 +108,7 @@ void FxLine::setChannelIndex(int index) {
|
||||
}
|
||||
|
||||
|
||||
void FxLine::drawFxLine( QPainter* p, const FxLine *fxLine, const QString& name, bool isActive, bool sendToThis )
|
||||
void FxLine::drawFxLine( QPainter* p, const FxLine *fxLine, const QString& name, bool isActive, bool sendToThis, bool receiveFromThis )
|
||||
{
|
||||
int width = fxLine->rect().width();
|
||||
int height = fxLine->rect().height();
|
||||
@@ -126,7 +131,11 @@ void FxLine::drawFxLine( QPainter* p, const FxLine *fxLine, const QString& name,
|
||||
// draw the mixer send background
|
||||
if( sendToThis )
|
||||
{
|
||||
p->drawPixmap( 2, 0, 29, 56, *FxLine::s_sendBgArrow );
|
||||
p->drawPixmap( 2, 0, 29, 56, *s_sendBgArrow );
|
||||
}
|
||||
else if( receiveFromThis )
|
||||
{
|
||||
p->drawPixmap( 2, 0, 29, 56, *s_receiveBgArrow );
|
||||
}
|
||||
|
||||
// draw the channel name
|
||||
@@ -148,11 +157,13 @@ void FxLine::paintEvent( QPaintEvent * )
|
||||
FxMixer * mix = engine::fxMixer();
|
||||
bool sendToThis = mix->channelSendModel(
|
||||
m_mv->currentFxLine()->m_channelIndex, m_channelIndex ) != NULL;
|
||||
bool receiveFromThis = mix->channelSendModel(
|
||||
m_channelIndex, m_mv->currentFxLine()->m_channelIndex ) != NULL;
|
||||
QPainter painter;
|
||||
painter.begin( this );
|
||||
drawFxLine( &painter, this,
|
||||
mix->effectChannel( m_channelIndex )->m_name,
|
||||
m_mv->currentFxLine() == this, sendToThis );
|
||||
m_mv->currentFxLine() == this, sendToThis, receiveFromThis );
|
||||
painter.end();
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user