removed specialBgHandlingWidget, style sheet, some cleaning up
git-svn-id: https://lmms.svn.sf.net/svnroot/lmms/trunk/lmms@579 0778d3d1-df1d-0410-868b-ea421aaaa00d
This commit is contained in:
@@ -28,14 +28,13 @@
|
||||
#ifndef _ENVELOPE_AND_LFO_WIDGET_H
|
||||
#define _ENVELOPE_AND_LFO_WIDGET_H
|
||||
|
||||
#include <QtGui/QWidget>
|
||||
#include <QtCore/QVector>
|
||||
#include <QtGui/QWidget>
|
||||
|
||||
|
||||
#include "journalling_object.h"
|
||||
#include "types.h"
|
||||
#include "spc_bg_hndl_widget.h"
|
||||
#include "sample_buffer.h"
|
||||
#include "types.h"
|
||||
|
||||
|
||||
class QPaintEvent;
|
||||
@@ -53,8 +52,7 @@ class track;
|
||||
class flpImport;
|
||||
|
||||
|
||||
class envelopeAndLFOWidget : public QWidget, public journallingObject,
|
||||
public specialBgHandlingWidget
|
||||
class envelopeAndLFOWidget : public QWidget, public journallingObject
|
||||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
|
||||
@@ -41,7 +41,6 @@ public:
|
||||
|
||||
void setActiveGraphic( const QPixmap & _pm );
|
||||
void setInactiveGraphic( const QPixmap & _pm, bool _update = TRUE );
|
||||
void setBgGraphic( const QPixmap & _pm );
|
||||
|
||||
|
||||
signals:
|
||||
@@ -58,7 +57,6 @@ protected:
|
||||
private:
|
||||
QPixmap m_activePixmap;
|
||||
QPixmap m_inactivePixmap;
|
||||
QPixmap m_bgPixmap;
|
||||
|
||||
} ;
|
||||
|
||||
|
||||
@@ -1,110 +0,0 @@
|
||||
/*
|
||||
* spc_bg_hndl_widget.h - class specialBgHandlingWidget
|
||||
*
|
||||
* Copyright (c) 2005-2007 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 _SPC_BG_HNDL_WIDGET_H
|
||||
#define _SPC_BG_HNDL_WIDGET_H
|
||||
|
||||
#include <QtGui/QWidget>
|
||||
#include <QtGui/QPainter>
|
||||
#include <QtGui/QPixmap>
|
||||
|
||||
|
||||
|
||||
class specialBgHandlingWidget
|
||||
{
|
||||
public:
|
||||
specialBgHandlingWidget( const QPixmap & _pm ) :
|
||||
m_backgroundPixmap( _pm ),
|
||||
m_backgroundColor( QColor( 0, 0, 0 ) )
|
||||
{
|
||||
}
|
||||
|
||||
specialBgHandlingWidget( const QColor & _c ) :
|
||||
m_backgroundPixmap(),
|
||||
m_backgroundColor( _c )
|
||||
{
|
||||
}
|
||||
|
||||
~specialBgHandlingWidget()
|
||||
{
|
||||
}
|
||||
|
||||
const QPixmap & backgroundPixmap( void ) const
|
||||
{
|
||||
return( m_backgroundPixmap );
|
||||
}
|
||||
const QColor & backgroundColor( void ) const
|
||||
{
|
||||
return( m_backgroundColor );
|
||||
}
|
||||
|
||||
static QPixmap getBackground( const QWidget * _w )
|
||||
{
|
||||
QPixmap pm( _w->size() );
|
||||
const QWidget * pw = _w->parentWidget();
|
||||
if( dynamic_cast<const specialBgHandlingWidget *>( pw ) )
|
||||
{
|
||||
const specialBgHandlingWidget * s = dynamic_cast<
|
||||
const specialBgHandlingWidget *>( pw );
|
||||
if( s->backgroundPixmap().isNull() == FALSE )
|
||||
{
|
||||
QPainter p( &pm );
|
||||
p.drawPixmap( 0, 0, s->backgroundPixmap(),
|
||||
_w->x(), _w->y(), _w->width(),
|
||||
_w->height() );
|
||||
}
|
||||
else
|
||||
{
|
||||
pm.fill( s->backgroundColor() );
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
QPainter p( &pm );
|
||||
const QBrush & br = pw->palette().brush(
|
||||
pw->backgroundRole() );
|
||||
if( br.style() == Qt::TexturePattern )
|
||||
{
|
||||
p.drawPixmap( 0, 0, br.texture(),
|
||||
_w->x(), _w->y(),
|
||||
_w->width(), _w->height() );
|
||||
}
|
||||
else
|
||||
{
|
||||
pm.fill( br.color() );
|
||||
}
|
||||
}
|
||||
return( pm );
|
||||
}
|
||||
|
||||
|
||||
|
||||
private:
|
||||
QPixmap m_backgroundPixmap;
|
||||
QColor m_backgroundColor;
|
||||
|
||||
} ;
|
||||
|
||||
#endif
|
||||
@@ -29,10 +29,8 @@
|
||||
#include <QtGui/QWidget>
|
||||
#include <QtCore/QMap>
|
||||
|
||||
#include "spc_bg_hndl_widget.h"
|
||||
|
||||
|
||||
class tabWidget : public QWidget, public specialBgHandlingWidget
|
||||
class tabWidget : public QWidget
|
||||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
|
||||
@@ -266,8 +266,6 @@ private:
|
||||
static QPixmap * s_muteOffEnabled;
|
||||
static QPixmap * s_muteOnDisabled;
|
||||
static QPixmap * s_muteOnEnabled;
|
||||
static QPixmap * s_trackOpsDisabled;
|
||||
static QPixmap * s_trackOpsEnabled;
|
||||
|
||||
trackWidget * m_trackWidget;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user