I added the timer widget, and a patch to modify song_editor.cpp so the widget
is added.
diff --git a/home/knightlain/lmms/src/gui/song_editor.cpp b/song_editor.cpp
index bfcfaca..6ad6ca4 100644
--- a/home/knightlain/lmms/src/gui/song_editor.cpp
+++ b/song_editor.cpp
@@ -32,22 +32,28 @@
#include <QtGui/QMdiSubWindow>
#include <QtGui/QPainter>
#include <QtGui/QScrollBar>
-#include <QtGui/QToolBar>
-#include <QtGui/QSpacerItem>
#include <math.h>
-#include "AudioOutputContext.h"
#include "song_editor.h"
+#include "automatable_slider.h"
#include "combobox.h"
+#include "config_mgr.h"
+#include "cpuload_widget.h"
#include "embed.h"
+#include "lcd_spinbox.h"
#include "MainWindow.h"
+#include "MeterDialog.h"
#include "mmp.h"
+#include "text_float.h"
#include "timeline.h"
#include "tool_button.h"
#include "tooltip.h"
-#include "AudioBackend.h"
+#include "visualization_widget.h"
+#include "timer_widget.h"
+#include "AudioDevice.h"
#include "piano_roll.h"
+#include "config_mgr.h"
@@ -73,7 +79,8 @@ void positionLine::paintEvent( QPaintEvent * _pe )
songEditor::songEditor( song * _song, songEditor * & _engine_ptr ) :
trackContainerView( _song ),
m_s( _song ),
- m_scrollBack( false )
+ m_scrollBack( false ),
+ m_smoothScroll( configManager::inst()->value( "ui", "smoothscroll" ).toInt() )
{
_engine_ptr = this;
@@ -84,8 +91,11 @@ songEditor::songEditor( song * _song, songEditor * & _engine_ptr ) :
setFocus();
// create time-line
- m_timeLine = new timeLine( TRACK_OP_WIDTH +
- DEFAULT_SETTINGS_WIDGET_WIDTH, 32,
+ int widgetTotal = configManager::inst()->value( "ui",
+ "compacttrackbuttons" ).toInt()==1 ?
+ DEFAULT_SETTINGS_WIDGET_WIDTH_COMPACT + TRACK_OP_WIDTH_COMPACT :
+ DEFAULT_SETTINGS_WIDGET_WIDTH + TRACK_OP_WIDTH;
+ m_timeLine = new timeLine( widgetTotal, 32,
pixelsPerTact(),
m_s->m_playPos[song::Mode_PlaySong],
m_currentPosition, this );
@@ -102,11 +112,143 @@ songEditor::songEditor( song * _song, songEditor * & _engine_ptr ) :
connect( m_s, SIGNAL( projectLoaded() ),
this, SLOT( adjustUiAfterProjectLoad() ) );
+
+ // add some essential widgets to global tool-bar
+ QWidget * tb = engine::mainWindow()->toolBar();
+
+ engine::mainWindow()->addSpacingToToolBar( 10 );
+
+ m_tempoSpinBox = new lcdSpinBox( 3, tb, tr( "Tempo" ) );
+ m_tempoSpinBox->setModel( &m_s->m_tempoModel );
+ m_tempoSpinBox->setLabel( tr( "TEMPO/BPM" ) );
+ toolTip::add( m_tempoSpinBox, tr( "tempo of song" ) );
+
+ m_tempoSpinBox->setWhatsThis(
+ tr( "The tempo of a song is specified in beats per minute "
+ "(BPM). If you want to change the tempo of your "
+ "song, change this value. Every measure has four beats, "
+ "so the tempo in BPM specifies, how many measures / 4 "
+ "should be played within a minute (or how many measures "
+ "should be played within four minutes)." ) );
+
+ engine::mainWindow()->addWidgetToToolBar( m_tempoSpinBox, 0 );
+
+#if 0
+ toolButton * hq_btn = new toolButton( embed::getIconPixmap( "hq_mode" ),
+ tr( "High quality mode" ),
+ NULL, NULL, tb );
+ hq_btn->setCheckable( TRUE );
+ connect( hq_btn, SIGNAL( toggled( bool ) ),
+ this, SLOT( setHighQuality( bool ) ) );
+ hq_btn->setFixedWidth( 42 );
+ engine::mainWindow()->addWidgetToToolBar( hq_btn, 1, col );
+#endif
+
+ engine::mainWindow()->addSpacingToToolBar( 10 );
+
+
+ m_timeSigDisplay = new MeterDialog( this, TRUE );
+ m_timeSigDisplay->setModel( &m_s->m_timeSigModel );
+ engine::mainWindow()->addWidgetToToolBar( m_timeSigDisplay );
+
+ engine::mainWindow()->addSpacingToToolBar( 10 );
+
+
+ QLabel * master_vol_lbl = new QLabel( tb );
+ master_vol_lbl->setPixmap( embed::getIconPixmap( "master_volume" ) );
+
+ m_masterVolumeSlider = new automatableSlider( tb,
+ tr( "Master volume" ) );
+ m_masterVolumeSlider->setModel( &m_s->m_masterVolumeModel );
+ m_masterVolumeSlider->setOrientation( Qt::Vertical );
+ m_masterVolumeSlider->setPageStep( 1 );
+ m_masterVolumeSlider->setTickPosition( QSlider::TicksLeft );
+ m_masterVolumeSlider->setFixedSize( 26, 60 );
+ m_masterVolumeSlider->setTickInterval( 50 );
+ toolTip::add( m_masterVolumeSlider, tr( "master volume" ) );
+
+ connect( m_masterVolumeSlider, SIGNAL( logicValueChanged( int ) ), this,
+ SLOT( masterVolumeChanged( int ) ) );
+ connect( m_masterVolumeSlider, SIGNAL( sliderPressed() ), this,
+ SLOT( masterVolumePressed() ) );
+ connect( m_masterVolumeSlider, SIGNAL( logicSliderMoved( int ) ), this,
+ SLOT( masterVolumeMoved( int ) ) );
+ connect( m_masterVolumeSlider, SIGNAL( sliderReleased() ), this,
+ SLOT( masterVolumeReleased() ) );
+
+ m_mvsStatus = new textFloat;
+ m_mvsStatus->setTitle( tr( "Master volume" ) );
+ m_mvsStatus->setPixmap( embed::getIconPixmap( "master_volume" ) );
+
+ engine::mainWindow()->addWidgetToToolBar( master_vol_lbl );
+ engine::mainWindow()->addWidgetToToolBar( m_masterVolumeSlider );
+
+
+ engine::mainWindow()->addSpacingToToolBar( 10 );
+
+
+ QLabel * master_pitch_lbl = new QLabel( tb );
+ master_pitch_lbl->setPixmap( embed::getIconPixmap( "master_pitch" ) );
+ master_pitch_lbl->setFixedHeight( 64 );
+
+ m_masterPitchSlider = new automatableSlider( tb, tr( "Master pitch" ) );
+ m_masterPitchSlider->setModel( &m_s->m_masterPitchModel );
+ m_masterPitchSlider->setOrientation( Qt::Vertical );
+ m_masterPitchSlider->setPageStep( 1 );
+ m_masterPitchSlider->setTickPosition( QSlider::TicksLeft );
+ m_masterPitchSlider->setFixedSize( 26, 60 );
+ m_masterPitchSlider->setTickInterval( 12 );
+ toolTip::add( m_masterPitchSlider, tr( "master pitch" ) );
+ connect( m_masterPitchSlider, SIGNAL( logicValueChanged( int ) ), this,
+ SLOT( masterPitchChanged( int ) ) );
+ connect( m_masterPitchSlider, SIGNAL( sliderPressed() ), this,
+ SLOT( masterPitchPressed() ) );
+ connect( m_masterPitchSlider, SIGNAL( logicSliderMoved( int ) ), this,
+ SLOT( masterPitchMoved( int ) ) );
+ connect( m_masterPitchSlider, SIGNAL( sliderReleased() ), this,
+ SLOT( masterPitchReleased() ) );
+
+ m_mpsStatus = new textFloat;
+ m_mpsStatus->setTitle( tr( "Master pitch" ) );
+ m_mpsStatus->setPixmap( embed::getIconPixmap( "master_pitch" ) );
+
+ engine::mainWindow()->addWidgetToToolBar( master_pitch_lbl );
+ engine::mainWindow()->addWidgetToToolBar( m_masterPitchSlider );
+
+ engine::mainWindow()->addSpacingToToolBar( 10 );
+
+ // create widget for visualization- and cpu-load-widget
+ QWidget * vc_w = new QWidget( tb );
+
+ QVBoxLayout * vcw_layout = new QVBoxLayout( vc_w );
+ vcw_layout->setMargin( 0 );
+ vcw_layout->setSpacing( 0 );
+
+ //vcw_layout->addStretch();
+ vcw_layout->addWidget( new visualizationWidget(
+ embed::getIconPixmap( "output_graph" ), vc_w ) );
+
+ vcw_layout->addWidget( new cpuloadWidget( vc_w ) );
+ //vcw_layout->addStretch();
+
+ engine::mainWindow()->addWidgetToToolBar( vc_w);
+ engine::mainWindow()->addSpacingToToolBar( -10 );
+ QWidget * timer_w = new QWidget( tb );
+ QHBoxLayout * timer_layout = new QHBoxLayout ( timer_w );
+ timer_layout->setMargin( 0 );
+ timer_layout->setSpacing( 5 );
+ timer_layout->addWidget( new timerWidget(embed::getIconPixmap( "output_graph" ), timer_w ) );
+ engine::mainWindow()->addWidgetToToolBar( timer_w);
+
+
// create own toolbar
m_toolBar = new QWidget( this );
- m_toolBar->setObjectName( "toolbar" );
m_toolBar->setFixedHeight( 32 );
m_toolBar->setAutoFillBackground( true );
+ QPalette pal;
+ pal.setBrush( m_toolBar->backgroundRole(),
+ embed::getIconPixmap( "toolbar_bg" ) );
+ m_toolBar->setPalette( pal );
static_cast<QVBoxLayout *>( layout() )->insertWidget( 0, m_toolBar );
static_cast<QVBoxLayout *>( layout() )->insertWidget( 1, m_timeLine );
@@ -134,7 +276,7 @@ songEditor::songEditor( song * _song, songEditor * & _engine_ptr ) :
m_recordButton->setDisabled( true );
// disable record buttons if capturing is not supported
- if( !engine::mixer()->audioOutputContext()->audioBackend()->supportsCapture() )
+ if( !engine::getMixer()->audioDev()->supportsCapture() )
{
m_recordButton->setDisabled( true );
m_recordAccompanyButton->setDisabled( true );
@@ -270,6 +412,17 @@ songEditor::~songEditor()
+
+void songEditor::setHighQuality( bool _hq )
+{
+ engine::getMixer()->changeQuality( mixer::qualitySettings(
+ _hq ? mixer::qualitySettings::Mode_HighQuality :
+ mixer::qualitySettings::Mode_Draft ) );
+}
+
+
+
+
void songEditor::scrolled( int _new_pos )
{
update();
@@ -281,8 +434,6 @@ void songEditor::scrolled( int _new_pos )
void songEditor::play()
{
- engine::mainWindow()->setPlaybackMode( PPM_Song );
-
m_s->play();
engine::getPianoRoll()->stopRecording();
if( m_s->playMode() == song::Mode_PlaySong )
@@ -300,8 +451,6 @@ void songEditor::play()
void songEditor::record()
{
- engine::mainWindow()->setPlaybackMode( PPM_Song );
-
m_s->record();
}
@@ -310,8 +459,6 @@ void songEditor::record()
void songEditor::recordAccompany()
{
- engine::mainWindow()->setPlaybackMode( PPM_Song );
-
m_s->playAndRecord();
}
@@ -330,12 +477,14 @@ void songEditor::stop()
void songEditor::keyPressEvent( QKeyEvent * _ke )
{
- if( _ke->modifiers() & Qt::ShiftModifier &&
+ if( /*_ke->modifiers() & Qt::ShiftModifier*/
+ engine::mainWindow()->isShiftPressed() == TRUE &&
_ke->key() == Qt::Key_Insert )
{
m_s->insertBar();
}
- else if( _ke->modifiers() & Qt::ShiftModifier &&
+ else if(/* _ke->modifiers() & Qt::ShiftModifier &&*/
+ engine::mainWindow()->isShiftPressed() == TRUE &&
_ke->key() == Qt::Key_Delete )
{
m_s->removeBar();
@@ -382,7 +531,7 @@ void songEditor::keyPressEvent( QKeyEvent * _ke )
void songEditor::wheelEvent( QWheelEvent * _we )
{
- if( _we->modifiers() & Qt::ControlModifier )
+ if( engine::mainWindow()->isCtrlPressed() == TRUE )
{
if( _we->delta() > 0 )
{
@@ -406,7 +555,7 @@ void songEditor::wheelEvent( QWheelEvent * _we )
// and make sure, all TCO's are resized and relocated
realignTracks();
}
- else if( _we->modifiers() & Qt::ShiftModifier )
+ else if( engine::mainWindow()->isShiftPressed() == TRUE )
{
m_leftRightScroll->setValue( m_leftRightScroll->value() -
_we->delta() / 30 );
@@ -422,49 +571,154 @@ void songEditor::wheelEvent( QWheelEvent * _we )
-void songEditor::updateScrollBar( int _len )
+void songEditor::masterVolumeChanged( int _new_val )
{
- m_leftRightScroll->setMaximum( _len );
+ masterVolumeMoved( _new_val );
+ if( m_mvsStatus->isVisible() == FALSE && m_s->m_loadingProject == FALSE
+ && m_masterVolumeSlider->showStatus() )
+ {
+ m_mvsStatus->moveGlobal( m_masterVolumeSlider,
+ QPoint( m_masterVolumeSlider->width() + 2, -2 ) );
+ m_mvsStatus->setVisibilityTimeOut( 1000 );
+ }
+ engine::getMixer()->setMasterGain( _new_val / 100.0f );
+}
+
+
+
+
+void songEditor::masterVolumePressed( void )
+{
+ m_mvsStatus->moveGlobal( m_masterVolumeSlider,
+ QPoint( m_masterVolumeSlider->width() + 2, -2 ) );
+ m_mvsStatus->show();
+ masterVolumeMoved( m_s->m_masterVolumeModel.value() );
+}
+
+
+
+
+void songEditor::masterVolumeMoved( int _new_val )
+{
+ m_mvsStatus->setText( tr( "Value: %1%" ).arg( _new_val ) );
+}
+
+
+
+
+void songEditor::masterVolumeReleased( void )
+{
+ m_mvsStatus->hide();
}
-static inline void animateScroll( QScrollBar *scrollBar, int newVal )
+void songEditor::masterPitchChanged( int _new_val )
{
- // do smooth scroll animation using QTimeLine
- QTimeLine *t = scrollBar->findChild<QTimeLine *>();
- if( t == NULL )
+ masterPitchMoved( _new_val );
+ if( m_mpsStatus->isVisible() == FALSE && m_s->m_loadingProject == FALSE
+ && m_masterPitchSlider->showStatus() )
{
- t = new QTimeLine( 600, scrollBar );
- t->setFrameRange( scrollBar->value(), newVal );
- t->connect( t, SIGNAL( finished() ), SLOT( deleteLater() ) );
+ m_mpsStatus->moveGlobal( m_masterPitchSlider,
+ QPoint( m_masterPitchSlider->width() + 2, -2 ) );
+ m_mpsStatus->setVisibilityTimeOut( 1000 );
+ }
+}
+
+
+
+
+void songEditor::masterPitchPressed( void )
+{
+ m_mpsStatus->moveGlobal( m_masterPitchSlider,
+ QPoint( m_masterPitchSlider->width() + 2, -2 ) );
+ m_mpsStatus->show();
+ masterPitchMoved( m_s->m_masterPitchModel.value() );
+}
+
+
+
+
+void songEditor::masterPitchMoved( int _new_val )
+{
+ m_mpsStatus->setText( tr( "Value: %1 semitones").arg( _new_val ) );
+
+}
+
+
+
+
+void songEditor::masterPitchReleased( void )
+{
+ m_mpsStatus->hide();
+}
+
+
- scrollBar->connect( t, SIGNAL( frameChanged( int ) ), SLOT( setValue( int ) ) );
- t->start();
+void songEditor::updateScrollBar( int _len )
+{
+ m_leftRightScroll->setMaximum( _len );
+}
+
+
+
+
+static inline void animateScroll( QScrollBar *scrollBar, int newVal, bool smoothScroll )
+{
+ if( smoothScroll == false )
+ {
+ scrollBar->setValue( newVal );
}
else
{
- // smooth scrolling is still active, therefore just update the end frame
- t->setEndFrame( newVal );
+ // do smooth scroll animation using QTimeLine
+ QTimeLine *t = scrollBar->findChild<QTimeLine *>();
+ if( t == NULL )
+ {
+ t = new QTimeLine( 600, scrollBar );
+ t->setFrameRange( scrollBar->value(), newVal );
+ t->connect( t, SIGNAL( finished() ), SLOT( deleteLater() ) );
+
+ scrollBar->connect( t, SIGNAL( frameChanged( int ) ), SLOT( setValue( int ) ) );
+
+ t->start();
+ }
+ else
+ {
+ // smooth scrolling is still active, therefore just update the end frame
+ t->setEndFrame( newVal );
+ }
}
}
void songEditor::updatePosition( const midiTime & _t )
{
- if( ( m_s->isPlaying() && m_s->m_playMode == song::Mode_PlaySong
+ int widgetWidth, trackOpWidth;
+ if( configManager::inst()->value( "ui", "compacttrackbuttons" ).toInt() )
+ {
+ widgetWidth = DEFAULT_SETTINGS_WIDGET_WIDTH_COMPACT;
+ trackOpWidth = TRACK_OP_WIDTH_COMPACT;
+ }
+ else
+ {
+ widgetWidth = DEFAULT_SETTINGS_WIDGET_WIDTH;
+ trackOpWidth = TRACK_OP_WIDTH;
+ }
+
+ if( ( m_s->isPlaying() && m_s->m_playMode == song::Mode_PlaySong
&& m_timeLine->autoScroll() == timeLine::AutoScrollEnabled) ||
m_scrollBack == true )
{
- const int w = width() - DEFAULT_SETTINGS_WIDGET_WIDTH
- - TRACK_OP_WIDTH
+ const int w = width() - widgetWidth
+ - trackOpWidth
- 32; // rough estimation for width of right scrollbar
if( _t > m_currentPosition + w * midiTime::ticksPerTact() /
pixelsPerTact() )
{
- animateScroll( m_leftRightScroll, _t.getTact() );
+ animateScroll( m_leftRightScroll, _t.getTact(), m_smoothScroll );
}
else if( _t < m_currentPosition )
{
@@ -472,14 +726,14 @@ void songEditor::updatePosition( const midiTime & _t )
(int)( _t - w * midiTime::ticksPerTact() /
pixelsPerTact() ),
0 );
- animateScroll( m_leftRightScroll, t.getTact() );
+ animateScroll( m_leftRightScroll, t.getTact(), m_smoothScroll );
}
m_scrollBack = false;
}
const int x = m_s->m_playPos[song::Mode_PlaySong].m_timeLine->
markerX( _t ) + 8;
- if( x >= TRACK_OP_WIDTH + DEFAULT_SETTINGS_WIDGET_WIDTH-1 )
+ if( x >= trackOpWidth + widgetWidth -1 )
{
m_positionLine->show();
m_positionLine->move( x, 50 );
/*
* visualization_widget.cpp - widget for visualization of sound-data
*
* Copyright (c) 2005-2009 Tobias Doerffel <tobydox/at/users.sourceforge.net>
*
* This file is part of Linux MultiMedia Studio - http://lmms.sourceforge.net
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public
* License as published by the Free Software Foundation; either
* version 2 of the License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* General Public License for more details.
*
* You should have received a copy of the GNU General Public
* License along with this program (see COPYING); if not, write to the
* Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
* Boston, MA 02110-1301 USA.
*
*/
#include <QtGui/QMouseEvent>
#include <QtGui/QPainter>
#include "timer_widget.h"
#include "gui_templates.h"
#include "MainWindow.h"
#include "embed.h"
#include "engine.h"
#include "tooltip.h"
#include "song.h"
timerWidget::timerWidget( const QPixmap & _bg, QWidget * _p ) :
QWidget( _p ),
s_background( _bg ),
mode( 0 )
{
setFixedSize( s_background.width(), s_background.height() );
setAttribute( Qt::WA_OpaquePaintEvent, true );
const fpp_t frames = engine::getMixer()->framesPerPeriod();
m_buffer = new sampleFrame[frames];
engine::getMixer()->clearAudioBuffer( m_buffer, frames );
toolTip::add( this, tr( "click to enable/disable visualization of "
"time" ) );
}
timerWidget::~timerWidget()
{
delete[] m_buffer;
}
void timerWidget::updateAudioBuffer()
{
if( !engine::getSong()->isExporting() )
{
engine::getMixer()->lock();
const surroundSampleFrame * c = engine::getMixer()->
currentReadBuffer();
const fpp_t fpp = engine::getMixer()->framesPerPeriod();
memcpy( m_buffer, c, sizeof( surroundSampleFrame ) * fpp );
engine::getMixer()->unlock();
}
}
void timerWidget::setActive( bool _active )
{
if( mode != 2 )
{
connect( engine::mainWindow(),
SIGNAL( periodicUpdate() ),
this, SLOT( update() ) );
connect( engine::getMixer(),
SIGNAL( nextAudioBuffer() ),
this, SLOT( updateAudioBuffer() ) );
}
else
{
disconnect( engine::mainWindow(),
SIGNAL( periodicUpdate() ),
this, SLOT( update() ) );
disconnect( engine::getMixer(),
SIGNAL( nextAudioBuffer() ),
this, SLOT( updateAudioBuffer() ) );
// we have to update (remove last waves),
// because timer doesn't do that anymore
update();
}
}
void timerWidget::paintEvent( QPaintEvent * )
{
QPainter p( this );
p.drawPixmap( 0, 0, s_background );
//if( m_active && !engine::getSong()->isExporting() )
if( (mode == 1) && !engine::getSong()->isExporting() )
{
p.setPen( QColor( 64, 224, 255 ) );
p.setRenderHint( QPainter::Antialiasing );
// now draw all that stuff
seconds = seconds.setNum(engine::getSong()->getSeconds());
minutes = minutes.setNum(engine::getSong()->getMinutes());
milliseconds = milliseconds.setNum(engine::getSong()->getMilliseconds());
p.setFont( pointSize<16>( p.font() ) );
if(engine::getSong()->getSeconds() < 10)
total = minutes + ":0" + seconds + ":" + milliseconds;
else
total = minutes + ":" + seconds + ":" + milliseconds;
p.drawText( 10, 20,total);
}
else if(mode == 2)
{
p.setPen( QColor( 64, 224, 255 ) );
p.setRenderHint( QPainter::Antialiasing );
tacts = seconds.setNum(engine::getSong()->getTacts());
ticks = minutes.setNum(engine::getSong()->getTicks());
milliseconds = milliseconds.setNum(engine::getSong()->getMilliseconds());
p.setFont( pointSize<16>( p.font() ) );
total = tacts + ":" + ticks + ":" + milliseconds;
p.drawText( 10, 20,total);
}
else
{
p.setPen( QColor( 192, 192, 192 ) );
p.setFont( pointSize<7>( p.font() ) );
p.drawText( 6, height()-5, tr( "Click to enable" ) );
}
}
void timerWidget::mousePressEvent( QMouseEvent * _me )
{
if( _me->button() == Qt::LeftButton )
{
if(mode == 0)
setActive( true );
else if(mode == 2)
setActive( false);
mode++;
mode = mode%3;
}
}
#include "moc_timer_widget.cxx"
/*
* visualization_widget.h - widget for visualization of sound-data
*
* Copyright (c) 2005-2008 Tobias Doerffel <tobydox/at/users.sourceforge.net>
*
* This file is part of Linux MultiMedia Studio - http://lmms.sourceforge.net
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of"the GNU General Public
* License as published by the Free Software Foundation; either
* version 2 of the License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* General Public License for more details.
*
* You should have received a copy of the GNU General Public
* License along with this program (see COPYING); if not, write to the
* Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
* Boston, MA 02110-1301 USA.
*
*/
#ifndef _TIMER_WIDGET
#define _TIMER_WIDGET
#include <QtGui/QWidget>
#include <QtGui/QPixmap>
#include "mixer.h"
class timerWidget : public QWidget
{
Q_OBJECT
public:
timerWidget( const QPixmap & _bg, QWidget * _parent);
virtual ~timerWidget();
void setActive( bool _active );
protected:
virtual void paintEvent( QPaintEvent * _pe );
virtual void mousePressEvent( QMouseEvent * _me );
protected slots:
void updateAudioBuffer();
private:
QPixmap s_background;
QPointF * m_points;
QString seconds;
QString minutes;
QString milliseconds;
QString tacts;
QString ticks;
QString total;
sampleFrame * m_buffer;
int mode;
} ;
#endif
------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and
threat landscape has changed and how IT managers can respond. Discussions
will include endpoint security, mobile security and the latest in malware
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
LMMS-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/lmms-devel