set OpaquePaintEvent attribute for all widgets where suitable - makes whole GUI less sluggish :)

git-svn-id: https://lmms.svn.sf.net/svnroot/lmms/trunk/lmms@1835 0778d3d1-df1d-0410-868b-ea421aaaa00d
This commit is contained in:
Tobias Doerffel
2008-11-10 23:50:05 +00:00
parent dcead78151
commit e609b6fcc7
21 changed files with 129 additions and 83 deletions

View File

@@ -1,3 +1,28 @@
2008-11-10 Tobias Doerffel <tobydox/at/users/dot/sourceforge/dot/net>
* src/core/track.cpp:
* src/core/timeline.cpp:
* src/core/piano.cpp:
* src/core/automation_pattern.cpp:
* src/gui/piano_roll.cpp:
* src/gui/fx_mixer_view.cpp:
* src/gui/widgets/track_label_button.cpp:
* src/gui/widgets/visualization_widget.cpp:
* src/gui/widgets/combobox.cpp:
* src/gui/widgets/tab_widget.cpp:
* src/gui/widgets/kmultitabbar.cpp:
* src/gui/widgets/envelope_and_lfo_view.cpp:
* src/gui/widgets/cpuload_widget.cpp:
* src/gui/widgets/fade_button.cpp:
* src/gui/widgets/lcd_spinbox.cpp:
* src/gui/widgets/group_box.cpp:
* src/gui/widgets/fader.cpp:
* src/gui/widgets/effect_rack_view.cpp:
* src/gui/widgets/effect_view.cpp:
* src/gui/automation_editor.cpp:
set OpaquePaintEvent attribute for all widgets where suitable - makes
whole GUI less sluggish :)
2008-11-10 Andrew Kelley <superjoe30/at/gmail/dot/com>
* src/gui/piano_roll.h:

View File

@@ -533,6 +533,7 @@ automationPatternView::automationPatternView( automationPattern * _pattern,
connect( m_pat, SIGNAL( dataChanged() ),
this, SLOT( update() ) );
setAttribute( Qt::WA_OpaquePaintEvent, true );
setFixedHeight( parentWidget()->height() - 2 );
setAutoResizeEnabled( false );

View File

@@ -208,6 +208,7 @@ pianoView::pianoView( QWidget * _parent ) :
"black_key_pressed" ) );
}
setAttribute( Qt::WA_OpaquePaintEvent, true );
setFocusPolicy( Qt::StrongFocus );
m_pianoScroll = new QScrollBar( Qt::Horizontal, this );

View File

@@ -85,6 +85,7 @@ timeLine::timeLine( const int _xoff, const int _yoff, const float _ppt,
"loop_point" ) );
}
setAttribute( Qt::WA_OpaquePaintEvent, true );
move( 0, _yoff );
setFixedHeight( s_timeLinePixmap->height() );

View File

@@ -112,16 +112,16 @@ trackContentObject::trackContentObject( track * _track ) :
m_name( QString::null ),
m_startPosition(),
m_length(),
m_mutedModel( FALSE, this, tr( "Muted" ) )
m_mutedModel( false, this, tr( "Muted" ) )
{
if( getTrack() )
{
getTrack()->addTCO( this );
}
setJournalling( FALSE );
setJournalling( false );
movePosition( 0 );
changeLength( 0 );
setJournalling( TRUE );
setJournalling( true );
}
@@ -197,7 +197,7 @@ void trackContentObject::changeLength( const midiTime & _length )
*/
void trackContentObject::undoStep( journalEntry & _je )
{
saveJournallingState( FALSE );
saveJournallingState( false );
switch( _je.actionID() )
{
case Move:
@@ -295,7 +295,7 @@ trackContentObjectView::trackContentObjectView( trackContentObject * _tco,
m_tco( _tco ),
m_trackView( _tv ),
m_action( NoAction ),
m_autoResize( FALSE ),
m_autoResize( false ),
m_initialMouseX( 0 ),
m_hint( NULL )
{
@@ -305,15 +305,16 @@ trackContentObjectView::trackContentObjectView( trackContentObject * _tco,
s_textFloat->setPixmap( embed::getIconPixmap( "clock" ) );
}
setAttribute( Qt::WA_DeleteOnClose );
setAttribute( Qt::WA_OpaquePaintEvent, true );
setAttribute( Qt::WA_DeleteOnClose, true );
setFocusPolicy( Qt::StrongFocus );
setCursor( QCursor( embed::getIconPixmap( "hand" ), 0, 0 ) );
move( 0, 1 );
show();
setFixedHeight( _tv->getTrackContentWidget()->height() - 2 );
setAcceptDrops( TRUE );
setMouseTracking( TRUE );
setAcceptDrops( true );
setMouseTracking( true );
connect( m_tco, SIGNAL( lengthChanged() ),
this, SLOT( updateLength() ) );
@@ -486,7 +487,7 @@ void trackContentObjectView::dropEvent( QDropEvent * _de )
{
// value contains our XML-data so simply create a
// multimediaProject which does the rest for us...
multimediaProject mmp( value, FALSE );
multimediaProject mmp( value, false );
// at least save position before getting to moved to somewhere
// the user doesn't expect...
midiTime pos = m_tco->startPosition();
@@ -536,17 +537,17 @@ void trackContentObjectView::leaveEvent( QEvent * _e )
*/
void trackContentObjectView::mousePressEvent( QMouseEvent * _me )
{
if( m_trackView->getTrackContainerView()->allowRubberband() == TRUE &&
if( m_trackView->getTrackContainerView()->allowRubberband() == true &&
_me->button() == Qt::LeftButton )
{
// if rubberband is active, we can be selected
if( !m_trackView->getTrackContainerView()->rubberBandActive() )
{
if( engine::getMainWindow()->isCtrlPressed() == TRUE )
if( engine::getMainWindow()->isCtrlPressed() == true )
{
setSelected( !isSelected() );
}
else if( isSelected() == TRUE )
else if( isSelected() == true )
{
m_action = MoveSelection;
m_initialMouseX = _me->x();
@@ -558,13 +559,13 @@ void trackContentObjectView::mousePressEvent( QMouseEvent * _me )
}
return;
}
else if( engine::getMainWindow()->isShiftPressed() == TRUE )
else if( engine::getMainWindow()->isShiftPressed() == true )
{
// add/remove object to/from selection
selectableObject::mousePressEvent( _me );
}
else if( _me->button() == Qt::LeftButton &&
engine::getMainWindow()->isCtrlPressed() == TRUE )
engine::getMainWindow()->isCtrlPressed() == true )
{
// start drag-action
multimediaProject mmp( multimediaProject::DragNDropData );
@@ -578,11 +579,11 @@ void trackContentObjectView::mousePressEvent( QMouseEvent * _me )
mmp.toString(), thumbnail, this );
}
else if( _me->button() == Qt::LeftButton &&
/* engine::getMainWindow()->isShiftPressed() == FALSE &&*/
fixedTCOs() == FALSE )
/* engine::getMainWindow()->isShiftPressed() == false &&*/
fixedTCOs() == false )
{
// move or resize
m_tco->setJournalling( FALSE );
m_tco->setJournalling( false );
m_initialMouseX = _me->x();
@@ -599,7 +600,7 @@ void trackContentObjectView::mousePressEvent( QMouseEvent * _me )
"a copy." ),
embed::getIconPixmap( "hint" ), 0 );
}
else if( m_autoResize == FALSE )
else if( m_autoResize == false )
{
m_action = Resize;
m_oldTime = m_tco->length();
@@ -623,7 +624,7 @@ void trackContentObjectView::mousePressEvent( QMouseEvent * _me )
{
m_tco->toggleMute();
}
else if( fixedTCOs() == FALSE )
else if( fixedTCOs() == false )
{
remove();
}
@@ -648,7 +649,7 @@ void trackContentObjectView::mousePressEvent( QMouseEvent * _me )
*/
void trackContentObjectView::mouseMoveEvent( QMouseEvent * _me )
{
if( engine::getMainWindow()->isCtrlPressed() == TRUE )
if( engine::getMainWindow()->isCtrlPressed() == true )
{
delete m_hint;
m_hint = NULL;
@@ -663,7 +664,7 @@ void trackContentObjectView::mouseMoveEvent( QMouseEvent * _me )
static_cast<int>( x * midiTime::ticksPerTact() /
ppt ) );
if( engine::getMainWindow()->isCtrlPressed() ==
FALSE && _me->button() == Qt::NoButton )
false && _me->button() == Qt::NoButton )
{
t = t.toNearestTact();
}
@@ -716,7 +717,7 @@ void trackContentObjectView::mouseMoveEvent( QMouseEvent * _me )
static_cast<int>( _me->x() *
midiTime::ticksPerTact() / ppt ) );
if( engine::getMainWindow()->isCtrlPressed() ==
FALSE && _me->button() == Qt::NoButton )
false && _me->button() == Qt::NoButton )
{
t = t.toNearestTact();
}
@@ -771,7 +772,7 @@ void trackContentObjectView::mouseReleaseEvent( QMouseEvent * _me )
{
if( m_action == Move || m_action == Resize )
{
m_tco->setJournalling( TRUE );
m_tco->setJournalling( true );
m_tco->addJournalEntry( journalEntry( m_action, m_oldTime -
( ( m_action == Move ) ?
m_tco->startPosition() : m_tco->length() ) ) );
@@ -797,7 +798,7 @@ void trackContentObjectView::mouseReleaseEvent( QMouseEvent * _me )
void trackContentObjectView::contextMenuEvent( QContextMenuEvent * _cme )
{
QMenu contextMenu( this );
if( fixedTCOs() == FALSE )
if( fixedTCOs() == false )
{
contextMenu.addAction( embed::getIconPixmap( "cancel" ),
tr( "Delete (middle mousebutton)" ),
@@ -863,14 +864,14 @@ trackContentWidget::trackContentWidget( trackView * _parent ) :
QWidget( _parent ),
m_trackView( _parent )
{
setAcceptDrops( TRUE );
setAcceptDrops( true );
connect( _parent->getTrackContainerView(),
SIGNAL( positionChanged( const midiTime & ) ),
this, SLOT( changePosition( const midiTime & ) ) );
setAutoFillBackground( false );
setAttribute( Qt::WA_OpaquePaintEvent );
setAttribute( Qt::WA_OpaquePaintEvent, true );
}
@@ -903,7 +904,7 @@ void trackContentWidget::addTCOView( trackContentObjectView * _tcov )
m_tcoViews.push_back( _tcov );
tco->saveJournallingState( FALSE );
tco->saveJournallingState( false );
changePosition();
tco->restoreJournallingState();
@@ -1070,7 +1071,7 @@ void trackContentWidget::dropEvent( QDropEvent * _de )
QString type = stringPairDrag::decodeKey( _de );
QString value = stringPairDrag::decodeValue( _de );
if( type == ( "tco_" + QString::number( getTrack()->type() ) ) &&
m_trackView->getTrackContainerView()->fixedTCOs() == FALSE )
m_trackView->getTrackContainerView()->fixedTCOs() == false )
{
const midiTime pos = getPosition( _de->pos().x()
).toNearestTact();
@@ -1078,7 +1079,7 @@ void trackContentWidget::dropEvent( QDropEvent * _de )
// value contains our XML-data so simply create a
// multimediaProject which does the rest for us...
multimediaProject mmp( value, FALSE );
multimediaProject mmp( value, false );
// at least save position before getting moved to somewhere
// the user doesn't expect...
tco->restoreState( mmp.content().firstChild().toElement() );
@@ -1101,11 +1102,11 @@ void trackContentWidget::dropEvent( QDropEvent * _de )
*/
void trackContentWidget::mousePressEvent( QMouseEvent * _me )
{
if( m_trackView->getTrackContainerView()->allowRubberband() == TRUE )
if( m_trackView->getTrackContainerView()->allowRubberband() == true )
{
QWidget::mousePressEvent( _me );
}
else if( engine::getMainWindow()->isShiftPressed() == TRUE )
else if( engine::getMainWindow()->isShiftPressed() == true )
{
QWidget::mousePressEvent( _me );
}
@@ -1116,7 +1117,7 @@ void trackContentWidget::mousePressEvent( QMouseEvent * _me )
midiTime::ticksPerTact();
trackContentObject * tco = getTrack()->createTCO( pos );
tco->saveJournallingState( FALSE );
tco->saveJournallingState( false );
tco->movePosition( pos );
tco->restoreJournallingState();
@@ -1225,7 +1226,7 @@ void trackContentWidget::resizeEvent( QResizeEvent * _re )
*/
void trackContentWidget::undoStep( journalEntry & _je )
{
saveJournallingState( FALSE );
saveJournallingState( false );
switch( _je.actionID() )
{
case AddTrackContentObject:
@@ -1249,7 +1250,7 @@ void trackContentWidget::undoStep( journalEntry & _je )
trackContentObject * tco = getTrack()->createTCO(
midiTime( 0 ) );
multimediaProject mmp(
_je.data().toMap()["state"].toString(), FALSE );
_je.data().toMap()["state"].toString(), false );
tco->restoreState(
mmp.content().firstChild().toElement() );
break;
@@ -1374,7 +1375,7 @@ trackOperationsWidget::trackOperationsWidget( trackView * _parent ) :
m_muteBtn = new pixmapButton( this, tr( "Mute" ) );
m_muteBtn->setActiveGraphic( embed::getIconPixmap( "led_off" ) );
m_muteBtn->setInactiveGraphic( embed::getIconPixmap( "led_green" ) );
m_muteBtn->setCheckable( TRUE );
m_muteBtn->setCheckable( true );
m_muteBtn->move( 46, 8 );
m_muteBtn->show();
toolTip::add( m_muteBtn, tr( "Mute this track" ) );
@@ -1382,7 +1383,7 @@ trackOperationsWidget::trackOperationsWidget( trackView * _parent ) :
m_soloBtn = new pixmapButton( this, tr( "Solo" ) );
m_soloBtn->setActiveGraphic( embed::getIconPixmap( "led_red" ) );
m_soloBtn->setInactiveGraphic( embed::getIconPixmap( "led_off" ) );
m_soloBtn->setCheckable( TRUE );
m_soloBtn->setCheckable( true );
m_soloBtn->move( 62, 8 );
toolTip::add( m_soloBtn, tr( "Solo" ) );
@@ -1391,6 +1392,7 @@ trackOperationsWidget::trackOperationsWidget( trackView * _parent ) :
SLOT( deleteTrackView( trackView * ) ),
Qt::QueuedConnection );
setAttribute( Qt::WA_OpaquePaintEvent, true );
}
@@ -1419,7 +1421,7 @@ trackOperationsWidget::~trackOperationsWidget()
void trackOperationsWidget::mousePressEvent( QMouseEvent * _me )
{
if( _me->button() == Qt::LeftButton &&
engine::getMainWindow()->isCtrlPressed() == TRUE &&
engine::getMainWindow()->isCtrlPressed() == true &&
m_trackView->getTrack()->type() != track::BBTrack )
{
multimediaProject mmp( multimediaProject::DragNDropData );
@@ -1457,7 +1459,7 @@ void trackOperationsWidget::paintEvent( QPaintEvent * _pe )
QPainter p( this );
p.fillRect( rect(), QColor( 56, 60, 72 ) );
if( m_trackView->isMovingTrack() == FALSE )
if( m_trackView->isMovingTrack() == false )
{
p.drawPixmap( 2, 2, *s_grip );
m_trackOps->show();
@@ -1545,11 +1547,11 @@ track::track( TrackTypes _type, trackContainer * _tc ) :
m_trackContainer( _tc ), /*!< The track container object */
m_type( _type ), /*!< The track type */
m_name(), /*!< The track's name */
m_mutedModel( FALSE, this, tr( "Muted" ) ),
m_mutedModel( false, this, tr( "Muted" ) ),
/*!< For controlling track muting */
m_soloModel( FALSE, this, tr( "Solo" ) ),
m_soloModel( false, this, tr( "Solo" ) ),
/*!< For controlling track soloing */
m_simpleSerializingMode( FALSE ),
m_simpleSerializingMode( false ),
m_trackContentObjects() /*!< The track content objects (segments) */
{
m_trackContainer->addTrack( this );
@@ -1601,7 +1603,7 @@ track * track::create( TrackTypes _tt, trackContainer * _tc )
// case VIDEO_TRACK:
case AutomationTrack: t = new automationTrack( _tc ); break;
case HiddenAutomationTrack:
t = new automationTrack( _tc, TRUE ); break;
t = new automationTrack( _tc, true ); break;
default: break;
}
@@ -1680,7 +1682,7 @@ void track::saveSettings( QDomDocument & _doc, QDomElement & _this )
if( m_simpleSerializingMode )
{
m_simpleSerializingMode = FALSE;
m_simpleSerializingMode = false;
return;
}
@@ -1732,7 +1734,7 @@ void track::loadSettings( const QDomElement & _this )
}
node = node.nextSibling();
}
m_simpleSerializingMode = FALSE;
m_simpleSerializingMode = false;
return;
}
@@ -1757,7 +1759,7 @@ void track::loadSettings( const QDomElement & _this )
trackContentObject * tco = createTCO(
midiTime( 0 ) );
tco->restoreState( node.toElement() );
saveJournallingState( FALSE );
saveJournallingState( false );
restoreJournallingState();
}
}
@@ -1903,18 +1905,18 @@ void track::getTCOsInRange( tcoVector & _tco_v, const midiTime & _start,
// ok, TCO is posated within given range
// now let's search according position for TCO in list
// -> list is ordered by TCO's position afterwards
bool inserted = FALSE;
bool inserted = false;
for( tcoVector::iterator it = _tco_v.begin();
it != _tco_v.end(); ++it )
{
if( ( *it )->startPosition() >= s )
{
_tco_v.insert( it, tco );
inserted = TRUE;
inserted = true;
break;
}
}
if( inserted == FALSE )
if( inserted == false )
{
// no TCOs found posated behind current TCO...
_tco_v.push_back( tco );
@@ -2031,7 +2033,7 @@ void track::toggleSolo( void )
{
const trackContainer::trackList & tl = m_trackContainer->tracks();
bool solo_before = FALSE;
bool solo_before = false;
for( trackContainer::trackList::const_iterator it = tl.begin();
it != tl.end(); ++it )
{
@@ -2039,7 +2041,7 @@ void track::toggleSolo( void )
{
if( ( *it )->m_soloModel.value() )
{
solo_before = TRUE;
solo_before = true;
break;
}
}
@@ -2056,10 +2058,10 @@ void track::toggleSolo( void )
{
( *it )->m_mutedBeforeSolo = ( *it )->isMuted();
}
( *it )->setMuted( *it == this ? FALSE : TRUE );
( *it )->setMuted( *it == this ? false : true );
if( *it != this )
{
( *it )->m_soloModel.setValue( FALSE );
( *it )->m_soloModel.setValue( false );
}
}
else if( !solo_before )
@@ -2097,13 +2099,13 @@ trackView::trackView( track * _track, trackContainerView * _tcv ) :
m_trackContentWidget( this ), /*!< Our trackContentWidget */
m_action( NoAction ) /*!< The action we're currently performing */
{
setAutoFillBackground( TRUE );
setAutoFillBackground( true );
QPalette pal;
pal.setColor( backgroundRole(), QColor( 32, 36, 40 ) );
setPalette( pal );
m_trackSettingsWidget.setAutoFillBackground( TRUE );
m_trackSettingsWidget.setAutoFillBackground( true );
pal.setColor( m_trackSettingsWidget.backgroundRole(),
QColor( 56, 60, 72 ) );
m_trackSettingsWidget.setPalette( pal );
@@ -2117,8 +2119,9 @@ trackView::trackView( track * _track, trackContainerView * _tcv ) :
resizeEvent( NULL );
setAcceptDrops( TRUE );
setAttribute( Qt::WA_DeleteOnClose );
setAcceptDrops( true );
setAttribute( Qt::WA_DeleteOnClose, true );
setAttribute( Qt::WA_OpaquePaintEvent, true );
connect( m_track, SIGNAL( destroyedTrack() ), this, SLOT( close() ) );
@@ -2221,7 +2224,7 @@ void trackView::modelChanged( void )
*/
void trackView::undoStep( journalEntry & _je )
{
saveJournallingState( FALSE );
saveJournallingState( false );
switch( _je.actionID() )
{
case MoveTrack:
@@ -2289,7 +2292,7 @@ void trackView::dropEvent( QDropEvent * _de )
{
// value contains our XML-data so simply create a
// multimediaProject which does the rest for us...
multimediaProject mmp( value, FALSE );
multimediaProject mmp( value, false );
engine::getMixer()->lock();
m_track->restoreState( mmp.content().firstChild().toElement() );
engine::getMixer()->unlock();
@@ -2315,13 +2318,13 @@ void trackView::dropEvent( QDropEvent * _de )
*/
void trackView::mousePressEvent( QMouseEvent * _me )
{
if( m_trackContainerView->allowRubberband() == TRUE )
if( m_trackContainerView->allowRubberband() == true )
{
QWidget::mousePressEvent( _me );
}
else if( _me->button() == Qt::LeftButton )
{
if( engine::getMainWindow()->isShiftPressed() == TRUE )
if( engine::getMainWindow()->isShiftPressed() == true )
{
m_action = ResizeTrack;
QCursor::setPos( mapToGlobal( QPoint( _me->x(),
@@ -2369,7 +2372,7 @@ void trackView::mousePressEvent( QMouseEvent * _me )
*/
void trackView::mouseMoveEvent( QMouseEvent * _me )
{
if( m_trackContainerView->allowRubberband() == TRUE )
if( m_trackContainerView->allowRubberband() == true )
{
QWidget::mouseMoveEvent( _me );
}

View File

@@ -118,6 +118,8 @@ automationEditor::automationEditor( void ) :
"edit_move" ) );
}
setAttribute( Qt::WA_OpaquePaintEvent, true );
// add time-line
m_timeLine = new timeLine( VALUES_WIDTH, 32, m_ppt,
engine::getSong()->getPlayPos(

View File

@@ -55,7 +55,7 @@ public:
m_name( _name )
{
setFixedSize( 32, 232 );
setAttribute( Qt::WA_OpaquePaintEvent, TRUE );
setAttribute( Qt::WA_OpaquePaintEvent, true );
setCursor( QCursor( embed::getIconPixmap( "hand" ), 0, 0 ) );
}
@@ -117,7 +117,7 @@ fxMixerView::fxMixerView() :
QPalette pal = palette();
pal.setColor( QPalette::Background, QColor( 72, 76, 88 ) );
setPalette( pal );
setAutoFillBackground( TRUE );
setAutoFillBackground( true );
setSizePolicy( QSizePolicy::Preferred, QSizePolicy::Minimum );
setWindowTitle( tr( "FX-Mixer" ) );
@@ -184,7 +184,7 @@ fxMixerView::fxMixerView() :
embed::getIconPixmap( "led_off" ) );
cv->m_muteBtn->setInactiveGraphic(
embed::getIconPixmap( "led_green" ) );
cv->m_muteBtn->setCheckable( TRUE );
cv->m_muteBtn->setCheckable( true );
cv->m_muteBtn->move( 9, cv->m_fader->y()-16);
toolTip::add( cv->m_muteBtn, tr( "Mute this FX channel" ) );
@@ -197,12 +197,12 @@ fxMixerView::fxMixerView() :
l->addSpacing( 10 );
QButtonGroup * g = new QButtonGroup( this );
m_bankButtons = g;
g->setExclusive( TRUE );
g->setExclusive( true );
for( int j = 0; j < 4; ++j )
{
QToolButton * btn = new QToolButton;
btn->setText( QString( 'A'+j ) );
btn->setCheckable( TRUE );
btn->setCheckable( true );
btn->setSizePolicy( QSizePolicy::Preferred,
QSizePolicy::Expanding );
l->addWidget( btn );
@@ -239,7 +239,7 @@ fxMixerView::fxMixerView() :
subWin->setWindowFlags( flags );
subWin->layout()->setSizeConstraint(QLayout::SetFixedSize);
parentWidget()->setAttribute( Qt::WA_DeleteOnClose, FALSE );
parentWidget()->setAttribute( Qt::WA_DeleteOnClose, false );
parentWidget()->move( 5, 310 );
// we want to receive dataChanged-signals in order to update

View File

@@ -191,6 +191,7 @@ pianoRoll::pianoRoll( void ) :
"automation" ) );
}
setAttribute( Qt::WA_OpaquePaintEvent, true );
// add time-line
m_timeLine = new timeLine( WHITE_KEY_WIDTH, 32, m_ppt,

View File

@@ -80,6 +80,7 @@ comboBox::comboBox( QWidget * _parent, const QString & _name ) :
connect( &m_menu, SIGNAL( triggered( QAction * ) ),
this, SLOT( setItem( QAction * ) ) );
setAttribute( Qt::WA_OpaquePaintEvent, true );
setAccessibleName( _name );
doConnections();
}

View File

@@ -43,6 +43,7 @@ cpuloadWidget::cpuloadWidget( QWidget * _parent ) :
m_changed( TRUE ),
m_updateTimer()
{
setAttribute( Qt::WA_OpaquePaintEvent, true );
setFixedSize( m_background.width(), m_background.height() );
m_temp = QPixmap( width(), height() );

View File

@@ -42,6 +42,7 @@ effectRackView::effectRackView( effectChain * _model, QWidget * _parent ) :
QWidget( _parent ),
modelView( NULL, this )
{
setAttribute( Qt::WA_OpaquePaintEvent, true );
setFixedSize( 250, 250 );
m_effectsGroupBox = new groupBox( tr( "EFFECTS CHAIN" ), this );

View File

@@ -51,11 +51,11 @@
effectView::effectView( effect * _model, QWidget * _parent ) :
pluginView( _model, _parent ),
m_bg( embed::getIconPixmap( "effect_plugin" ) ),
m_show( TRUE )
m_show( true )
{
setFixedSize( 210, 60 );
setAttribute( Qt::WA_OpaquePaintEvent, TRUE );
setAttribute( Qt::WA_OpaquePaintEvent, true );
m_bypass = new ledCheckBox( "", this );
m_bypass->move( 3, 3 );
@@ -165,12 +165,12 @@ void effectView::editControls( void )
{
m_subWindow->show();
m_subWindow->raise();
m_show = FALSE;
m_show = false;
}
else
{
m_subWindow->hide();
m_show = TRUE;
m_show = true;
}
}
@@ -212,7 +212,7 @@ void effectView::displayHelp( void )
void effectView::closeEffects( void )
{
m_subWindow->hide();
m_show = TRUE;
m_show = true;
}
@@ -248,7 +248,7 @@ void effectView::paintEvent( QPaintEvent * )
p.drawPixmap( 0, 0, m_bg );
QFont f = pointSizeF( font(), 7.5f );
f.setBold( TRUE );
f.setBold( true );
p.setFont( f );
p.setPen( QColor( 64, 64, 64 ) );

View File

@@ -103,6 +103,8 @@ envelopeAndLFOView::envelopeAndLFOView( QWidget * _parent ) :
s_lfoGraph = new QPixmap( embed::getIconPixmap( "lfo_graph" ) );
}
setAttribute( Qt::WA_OpaquePaintEvent, true );
m_predelayKnob = new knob( knobBright_26, this );
m_predelayKnob->setLabel( tr( "DEL" ) );
m_predelayKnob->move( PREDELAY_KNOB_X, ENV_KNOBS_Y );

View File

@@ -42,6 +42,7 @@ fadeButton::fadeButton( const QColor & _normal_color,
m_normalColor( _normal_color ),
m_activatedColor( _activated_color )
{
setAttribute( Qt::WA_OpaquePaintEvent, true );
setCursor( QCursor( embed::getIconPixmap( "hand" ), 0, 0 ) );
}

View File

@@ -69,7 +69,7 @@ fader::fader( floatModel * _model, QWidget * _parent ) :
m_leds( embed::getIconPixmap( "fader_leds" ) ),
m_knob( embed::getIconPixmap( "fader_knob" ) )
{
setAttribute( Qt::WA_NoBackground );
setAttribute( Qt::WA_OpaquePaintEvent, true );
setMinimumSize( 23, 116 );
setMaximumSize( 23, 116);
resize( 23, 116 );

View File

@@ -47,6 +47,7 @@ groupBox::groupBox( const QString & _caption, QWidget * _parent ) :
boolModelView( NULL, this ),
m_caption( _caption )
{
setAttribute( Qt::WA_OpaquePaintEvent, true );
updatePixmap();
m_led = new pixmapButton( this, _caption );

View File

@@ -436,6 +436,7 @@ KMultiTabBarTab::KMultiTabBarTab(const QPixmap& pic, const QString& text,
setIcon(pic);
m_expandedSize=24;
setCheckable(true);
setAttribute( Qt::WA_OpaquePaintEvent, true );
}
KMultiTabBarTab::~KMultiTabBarTab() {

View File

@@ -47,12 +47,13 @@
lcdSpinBox::lcdSpinBox( int _num_digits, QWidget * _parent,
const QString & _name ) :
QWidget( _parent ),
intModelView( new intModel( 0, 0, 0, NULL, _name, TRUE ), this ),
intModelView( new intModel( 0, 0, 0, NULL, _name, true ), this ),
m_label(),
m_numDigits( _num_digits ),
m_origMousePos()
{
setEnabled( TRUE );
setAttribute( Qt::WA_OpaquePaintEvent, true );
setEnabled( true );
setAccessibleName( _name );
@@ -72,12 +73,12 @@ lcdSpinBox::lcdSpinBox( int _num_digits, QWidget * _parent,
lcdSpinBox::lcdSpinBox( int _num_digits, const QString & _lcd_style,
QWidget * _parent, const QString & _name ) :
QWidget( _parent ),
intModelView( new intModel( 0, 0, 0, NULL, _name, TRUE ), this ),
intModelView( new intModel( 0, 0, 0, NULL, _name, true ), this ),
m_label(),
m_numDigits( _num_digits ),
m_origMousePos()
{
setEnabled( TRUE );
setEnabled( true );
setAccessibleName( _name );
@@ -284,7 +285,7 @@ void lcdSpinBox::contextMenuEvent( QContextMenuEvent * _me )
void lcdSpinBox::mousePressEvent( QMouseEvent * _me )
{
if( _me->button() == Qt::LeftButton &&
engine::getMainWindow()->isCtrlPressed() == FALSE &&
engine::getMainWindow()->isCtrlPressed() == false &&
_me->y() < m_cellHeight + 2 )
{
m_origMousePos = _me->globalPos();

View File

@@ -43,13 +43,15 @@ tabWidget::tabWidget( const QString & _caption, QWidget * _parent ) :
{
setFont( pointSize<7>( font() ) );
setAutoFillBackground( TRUE );
setAutoFillBackground( true );
QColor bg_color = QApplication::palette().color( QPalette::Active,
QPalette::Background ).
darker( 132 );
QPalette pal = palette();
pal.setColor( QPalette::Background, bg_color );
setPalette( pal );
setAttribute( Qt::WA_OpaquePaintEvent, true );
}
@@ -66,9 +68,9 @@ void tabWidget::addTab( QWidget * _w, const QString & _name, int _idx )
{
setFont( pointSize<7>( font() ) );
widgetDesc d = { _w, _name, fontMetrics().width( _name ) + 10 } ;
if( _idx < 0/* || m_widgets.contains( _idx ) == TRUE*/ )
if( _idx < 0/* || m_widgets.contains( _idx ) == true*/ )
{
while( m_widgets.contains( ++_idx ) == TRUE )
while( m_widgets.contains( ++_idx ) == true )
{
}
}

View File

@@ -43,6 +43,7 @@ trackLabelButton::trackLabelButton( trackView * _tv, QWidget * _parent ) :
m_trackView( _tv ),
m_iconName()
{
setAttribute( Qt::WA_OpaquePaintEvent, true );
setAcceptDrops( true );
setCursor( QCursor( embed::getIconPixmap( "hand" ), 0, 0 ) );
setToolButtonStyle( Qt::ToolButtonTextBesideIcon );

View File

@@ -45,7 +45,7 @@ visualizationWidget::visualizationWidget( const QPixmap & _bg, QWidget * _p,
m_active( FALSE )
{
setFixedSize( s_background.width(), s_background.height() );
setAttribute( Qt::WA_OpaquePaintEvent, true );
const fpp_t frames = engine::getMixer()->framesPerPeriod();
m_buffer = new sampleFrame[frames];