added fast and leightweight timer-framework - widgets requiring periodic updates can simply connect their update-slots to songEditor::periodicUpdate()

git-svn-id: https://lmms.svn.sf.net/svnroot/lmms/trunk/lmms@929 0778d3d1-df1d-0410-868b-ea421aaaa00d
This commit is contained in:
Tobias Doerffel
2008-04-21 08:38:35 +00:00
parent 9ccc0e3a59
commit da2472b9ad
2 changed files with 30 additions and 10 deletions

View File

@@ -27,6 +27,8 @@
#ifndef _SONG_EDITOR_H
#define _SONG_EDITOR_H
#include <QtCore/QBasicTimer>
#include "track_container_view.h"
#include "lcd_spinbox.h"
#include "automatable_slider.h"
@@ -46,10 +48,14 @@ class songEditor : public trackContainerView
{
Q_OBJECT
public:
songEditor( song * _song );
songEditor( song * _song, songEditor * & _engine_ptr );
virtual ~songEditor();
signals:
void periodicUpdate( void );
private slots:
void scrolled( int _new_pos );
void updateTimeLinePosition( void );
@@ -70,8 +76,9 @@ private slots:
private:
virtual void keyPressEvent( QKeyEvent * _ke );
virtual void wheelEvent( QWheelEvent * _we );
virtual void paintEvent( QPaintEvent * _pe );
virtual void timerEvent( QTimerEvent * _ev );
virtual void wheelEvent( QWheelEvent * _we );
virtual bool allowRubberband( void ) const;
@@ -80,6 +87,9 @@ private:
song * m_s;
QBasicTimer m_updateTimer;
QScrollBar * m_leftRightScroll;
QWidget * m_toolBar;