mirror of
https://github.com/LMMS/lmms.git
synced 2026-03-13 03:27:06 -04:00
simplified fade button timer usage
git-svn-id: https://lmms.svn.sf.net/svnroot/lmms/trunk/lmms@463 0778d3d1-df1d-0410-868b-ea421aaaa00d
This commit is contained in:
@@ -1,3 +1,11 @@
|
||||
2007-02-27 Javier Serrano Polo <jasp00/at/terra/dot/es>
|
||||
|
||||
* src/widgets/fade_button.cpp:
|
||||
simplified timer usage, fixes frozen leds and hopefully the segfaults
|
||||
|
||||
* src/core/config_mgr.cpp:
|
||||
create widgets once
|
||||
|
||||
2007-02-25 Javier Serrano Polo <jasp00/at/terra/dot/es>
|
||||
|
||||
* plugins/singerbot/singerbot.cpp:
|
||||
|
||||
@@ -2,8 +2,8 @@
|
||||
# Process this file with autoconf to produce a configure script.
|
||||
|
||||
AC_PREREQ(2.50)
|
||||
AC_INIT(lmms, 0.2.1-svn20070225, lmms-devel/at/lists/dot/sf/dot/net)
|
||||
AM_INIT_AUTOMAKE(lmms, 0.2.1-svn20070225)
|
||||
AC_INIT(lmms, 0.2.1-svn20070227, lmms-devel/at/lists/dot/sf/dot/net)
|
||||
AM_INIT_AUTOMAKE(lmms, 0.2.1-svn20070227)
|
||||
|
||||
AM_CONFIG_HEADER(config.h)
|
||||
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
/*
|
||||
* config_mgr.cpp - implementation of class configManager
|
||||
*
|
||||
* Copyright (c) 2005-2006 Tobias Doerffel <tobydox/at/users.sourceforge.net>
|
||||
* Copyright (c) 2005-2007 Tobias Doerffel <tobydox/at/users.sourceforge.net>
|
||||
*
|
||||
* This file is part of Linux MultiMedia Studio - http://lmms.sourceforge.net
|
||||
*
|
||||
@@ -181,7 +181,8 @@ configManager::configManager( void ) :
|
||||
#endif
|
||||
m_vstDir( QDir::home().absolutePath() ),
|
||||
m_flDir( QDir::home().absolutePath() ),
|
||||
m_currentPage( 0 )
|
||||
m_currentPage( 0 ),
|
||||
m_mainLayout( NULL )
|
||||
{
|
||||
}
|
||||
|
||||
@@ -771,7 +772,10 @@ void configManager::setValue( const QString & _class,
|
||||
|
||||
bool configManager::loadConfigFile( void )
|
||||
{
|
||||
createWidgets();
|
||||
if( !m_mainLayout )
|
||||
{
|
||||
createWidgets();
|
||||
}
|
||||
|
||||
// read the XML file and create DOM tree
|
||||
QFile cfg_file( m_lmmsRcFile );
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
/*
|
||||
* fade_button.cpp - implementation of fade-button
|
||||
*
|
||||
* Copyright (c) 2005-2006 Tobias Doerffel <tobydox/at/users.sourceforge.net>
|
||||
* Copyright (c) 2005-2007 Tobias Doerffel <tobydox/at/users.sourceforge.net>
|
||||
*
|
||||
* This file is part of Linux MultiMedia Studio - http://lmms.sourceforge.net
|
||||
*
|
||||
@@ -52,6 +52,7 @@ fadeButton::fadeButton( const QColor & _normal_color,
|
||||
#ifndef QT4
|
||||
setBackgroundMode( NoBackground );
|
||||
#endif
|
||||
QTimer::singleShot( 20, this, SLOT( nextState( void ) ) );
|
||||
}
|
||||
|
||||
|
||||
@@ -66,15 +67,7 @@ fadeButton::~fadeButton()
|
||||
|
||||
void fadeButton::activate( void )
|
||||
{
|
||||
if( m_state > 0.0f )
|
||||
{
|
||||
m_state = 1.00f;
|
||||
}
|
||||
else
|
||||
{
|
||||
m_state = 1.1f;
|
||||
nextState();
|
||||
}
|
||||
m_state = 1.00f;
|
||||
update();
|
||||
}
|
||||
|
||||
@@ -125,12 +118,6 @@ void fadeButton::paintEvent( QPaintEvent * _pe )
|
||||
// and blit all the drawn stuff on the screen...
|
||||
bitBlt( this, rect().topLeft(), &draw_pm );
|
||||
#endif
|
||||
if( m_state > 0.0f )
|
||||
{
|
||||
// we might be called out of another thread than the GUI-/
|
||||
// event-loop-thread, so let the timer update ourself
|
||||
QTimer::singleShot( 20, this, SLOT( update( void ) ) );
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -141,8 +128,9 @@ void fadeButton::nextState( void )
|
||||
if( m_state > 0.0f )
|
||||
{
|
||||
m_state -= 0.1f;
|
||||
QTimer::singleShot( 20, this, SLOT( nextState( void ) ) );
|
||||
update();
|
||||
}
|
||||
QTimer::singleShot( 20, this, SLOT( nextState( void ) ) );
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user