DrumSynth relicense, MDI fixes, QPushButton inheritance, LiveTool fixes
git-svn-id: https://lmms.svn.sf.net/svnroot/lmms/trunk/lmms@604 0778d3d1-df1d-0410-868b-ea421aaaa00d
This commit is contained in:
@@ -23,9 +23,11 @@
|
||||
*/
|
||||
|
||||
|
||||
#include <QtGui/QKeyEvent>
|
||||
|
||||
#include "live_tool.h"
|
||||
|
||||
#include <QtGui/QKeyEvent>
|
||||
#include <QtGui/QLayout>
|
||||
|
||||
#include "bb_editor.h"
|
||||
#include "engine.h"
|
||||
#include "song_editor.h"
|
||||
@@ -63,8 +65,8 @@ plugin::descriptor live_tool_plugin_descriptor =
|
||||
|
||||
|
||||
|
||||
liveTool::liveTool( mainWindow * _window ) :
|
||||
tool( _window, &live_tool_plugin_descriptor )
|
||||
liveTool::liveTool( void ) :
|
||||
tool( &live_tool_plugin_descriptor )
|
||||
{
|
||||
const QPixmap background = PLUGIN_NAME::getIconPixmap( "artwork" );
|
||||
|
||||
@@ -83,6 +85,12 @@ liveTool::liveTool( mainWindow * _window ) :
|
||||
"Beat+Baseline Editor." ) );
|
||||
|
||||
hide();
|
||||
if( parentWidget() )
|
||||
{
|
||||
parentWidget()->hide();
|
||||
parentWidget()->layout()->setSizeConstraint(
|
||||
QLayout::SetFixedSize );
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -133,6 +141,16 @@ void liveTool::keyPressEvent( QKeyEvent * _ke )
|
||||
|
||||
|
||||
|
||||
void liveTool::mousePressEvent( QMouseEvent * _me )
|
||||
{
|
||||
// MDI window gets focus otherwise
|
||||
setFocus();
|
||||
_me->accept();
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
#ifdef Q_WS_X11
|
||||
bool liveTool::x11Event( XEvent * _xe )
|
||||
{
|
||||
@@ -155,7 +173,7 @@ bool liveTool::x11Event( XEvent * _xe )
|
||||
|
||||
void liveTool::toggleInstrument( int _n )
|
||||
{
|
||||
if( _n > 0 && _n < engine::getBBEditor()->tracks().count() )
|
||||
if( _n < engine::getBBEditor()->tracks().count() )
|
||||
{
|
||||
track * t = engine::getBBEditor()->tracks().at( _n );
|
||||
t->setMuted( !t->muted() );
|
||||
@@ -171,7 +189,7 @@ extern "C"
|
||||
// neccessary for getting instance out of shared lib
|
||||
plugin * lmms_plugin_main( void * _data )
|
||||
{
|
||||
return( new liveTool( static_cast<mainWindow *>( _data ) ) );
|
||||
return( new liveTool() );
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
/*
|
||||
* live_tool.h - declaration of class liveTool, for live performance
|
||||
*
|
||||
* Copyright (c) 2006 Javier Serrano Polo <jasp00/at/users.sourceforge.net>
|
||||
* Copyright (c) 2006-2007 Javier Serrano Polo <jasp00/at/users.sourceforge.net>
|
||||
*
|
||||
* This file is part of Linux MultiMedia Studio - http://lmms.sourceforge.net
|
||||
*
|
||||
@@ -35,7 +35,7 @@
|
||||
class liveTool : public tool
|
||||
{
|
||||
public:
|
||||
liveTool( mainWindow * _window );
|
||||
liveTool( void );
|
||||
virtual ~liveTool();
|
||||
|
||||
virtual QString nodeName( void ) const;
|
||||
@@ -43,6 +43,7 @@ public:
|
||||
|
||||
protected:
|
||||
virtual void keyPressEvent( QKeyEvent * _ke );
|
||||
virtual void mousePressEvent( QMouseEvent * _me );
|
||||
#ifdef Q_WS_X11
|
||||
virtual bool x11Event( XEvent * _xe );
|
||||
#endif
|
||||
|
||||
@@ -28,7 +28,7 @@
|
||||
#include <QtCore/QLocale>
|
||||
#include <QtCore/QTime>
|
||||
#include <QtCore/QDir>
|
||||
#include <QtGui/QWorkspace>
|
||||
#include <QtGui/QMdiArea>
|
||||
#include <QtGui/QX11EmbedContainer>
|
||||
#include <QtGui/QX11Info>
|
||||
|
||||
|
||||
@@ -27,7 +27,7 @@
|
||||
#define _VST_EFFECT_H
|
||||
|
||||
#include <QtCore/QMutex>
|
||||
#include <QtGui/QWorkspace>
|
||||
#include <QtGui/QMdiArea>
|
||||
|
||||
#include "effect.h"
|
||||
#include "engine.h"
|
||||
|
||||
Reference in New Issue
Block a user