moved peridic update-timer from songEditor to mainWindow
git-svn-id: https://lmms.svn.sf.net/svnroot/lmms/trunk/lmms@1567 0778d3d1-df1d-0410-868b-ea421aaaa00d
This commit is contained in:
@@ -27,11 +27,8 @@
|
||||
#ifndef _SONG_EDITOR_H
|
||||
#define _SONG_EDITOR_H
|
||||
|
||||
#include <QtCore/QBasicTimer>
|
||||
|
||||
#include "track_container_view.h"
|
||||
|
||||
|
||||
class QLabel;
|
||||
class QScrollBar;
|
||||
|
||||
@@ -53,10 +50,6 @@ public:
|
||||
virtual ~songEditor();
|
||||
|
||||
|
||||
signals:
|
||||
void periodicUpdate( void );
|
||||
|
||||
|
||||
public slots:
|
||||
void scrolled( int _new_pos );
|
||||
|
||||
@@ -86,18 +79,13 @@ private slots:
|
||||
private:
|
||||
virtual void keyPressEvent( QKeyEvent * _ke );
|
||||
virtual void paintEvent( QPaintEvent * _pe );
|
||||
virtual void timerEvent( QTimerEvent * _ev );
|
||||
virtual void wheelEvent( QWheelEvent * _we );
|
||||
|
||||
virtual bool allowRubberband( void ) const;
|
||||
|
||||
|
||||
|
||||
song * m_s;
|
||||
|
||||
QBasicTimer m_updateTimer;
|
||||
|
||||
|
||||
QScrollBar * m_leftRightScroll;
|
||||
|
||||
QWidget * m_toolBar;
|
||||
|
||||
@@ -1,5 +1,3 @@
|
||||
#ifndef SINGLE_SOURCE_COMPILE
|
||||
|
||||
/*
|
||||
* fx_mixer_view.cpp - effect-mixer-view for LMMS
|
||||
*
|
||||
@@ -42,10 +40,11 @@
|
||||
#include "main_window.h"
|
||||
#include "lcd_spinbox.h"
|
||||
#include "gui_templates.h"
|
||||
#include "song_editor.h"
|
||||
#include "tooltip.h"
|
||||
#include "pixmap_button.h"
|
||||
|
||||
|
||||
|
||||
class fxLine : public QWidget
|
||||
{
|
||||
public:
|
||||
@@ -108,9 +107,11 @@ private:
|
||||
|
||||
fxMixerView::fxMixerView() :
|
||||
QWidget(),
|
||||
modelView( NULL, this )
|
||||
modelView( NULL, this ),
|
||||
serializingObjectHook()
|
||||
{
|
||||
fxMixer * m = engine::getFxMixer();
|
||||
m->setHook( this );
|
||||
|
||||
QPalette pal = palette();
|
||||
pal.setColor( QPalette::Background, QColor( 72, 76, 88 ) );
|
||||
@@ -224,8 +225,8 @@ fxMixerView::fxMixerView() :
|
||||
setCurrentFxLine( m_fxChannelViews[0].m_fxLine );
|
||||
|
||||
// timer for updating faders
|
||||
connect( engine::getSongEditor(), SIGNAL( periodicUpdate() ),
|
||||
this, SLOT( updateFaders() ) );
|
||||
connect( engine::getMainWindow(), SIGNAL( periodicUpdate() ),
|
||||
this, SLOT( updateFaders() ) );
|
||||
|
||||
|
||||
// add ourself to workspace
|
||||
@@ -254,6 +255,22 @@ fxMixerView::~fxMixerView()
|
||||
|
||||
|
||||
|
||||
void fxMixerView::saveSettings( QDomDocument & _doc, QDomElement & _this )
|
||||
{
|
||||
mainWindow::saveWidgetState( this, _this );
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
void fxMixerView::loadSettings( const QDomElement & _this )
|
||||
{
|
||||
mainWindow::restoreWidgetState( this, _this );
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
void fxMixerView::setCurrentFxLine( fxLine * _line )
|
||||
{
|
||||
m_currentFxLine = _line;
|
||||
@@ -326,4 +343,3 @@ void fxMixerView::updateFaders( void )
|
||||
|
||||
#include "moc_fx_mixer_view.cxx"
|
||||
|
||||
#endif
|
||||
|
||||
@@ -358,8 +358,6 @@ songEditor::songEditor( song * _song, songEditor * & _engine_ptr ) :
|
||||
parentWidget()->resize( 600, 300 );
|
||||
parentWidget()->move( 5, 5 );
|
||||
parentWidget()->show();
|
||||
|
||||
m_updateTimer.start( 1000 / 20, this ); // 20 fps
|
||||
}
|
||||
|
||||
|
||||
@@ -495,14 +493,6 @@ void songEditor::paintEvent( QPaintEvent * _pe )
|
||||
|
||||
|
||||
|
||||
void songEditor::timerEvent( QTimerEvent * )
|
||||
{
|
||||
emit periodicUpdate();
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
void songEditor::wheelEvent( QWheelEvent * _we )
|
||||
{
|
||||
if( engine::getMainWindow()->isCtrlPressed() == TRUE )
|
||||
|
||||
@@ -25,18 +25,15 @@
|
||||
*/
|
||||
|
||||
|
||||
#include <QtCore/QTimer>
|
||||
#include <QtGui/QMouseEvent>
|
||||
#include <QtGui/QPainter>
|
||||
#include <QtGui/QPixmap>
|
||||
|
||||
#include "visualization_widget.h"
|
||||
#include "main_window.h"
|
||||
#include "embed.h"
|
||||
#include "engine.h"
|
||||
#include "templates.h"
|
||||
#include "tooltip.h"
|
||||
#include "song.h"
|
||||
#include "song_editor.h"
|
||||
|
||||
|
||||
|
||||
@@ -99,7 +96,7 @@ void visualizationWidget::setActive( bool _active )
|
||||
m_active = _active;
|
||||
if( m_active )
|
||||
{
|
||||
connect( engine::getSongEditor(),
|
||||
connect( engine::getMainWindow(),
|
||||
SIGNAL( periodicUpdate() ),
|
||||
this, SLOT( update() ) );
|
||||
connect( engine::getMixer(),
|
||||
@@ -108,7 +105,7 @@ void visualizationWidget::setActive( bool _active )
|
||||
}
|
||||
else
|
||||
{
|
||||
disconnect( engine::getSongEditor(),
|
||||
disconnect( engine::getMainWindow(),
|
||||
SIGNAL( periodicUpdate() ),
|
||||
this, SLOT( update() ) );
|
||||
disconnect( engine::getMixer(),
|
||||
|
||||
Reference in New Issue
Block a user