diff --git a/ChangeLog b/ChangeLog index 04382e263..fca1fbb9f 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,35 @@ +2008-07-12 Tobias Doerffel + + * Makefile.am: + * include/effect_label.h: + * src/gui/widgets/effect_label.cpp: + removed obsolete files + + * include/automation_track.h: + * include/bb_track.h: + * include/effect_rack_view.h: + * include/instrument_track.h: + * include/name_label.h: + * include/sample_track.h: + * include/track.h: + * src/core/track.cpp: + * src/gui/widgets/group_box.cpp: + * src/gui/widgets/name_label.cpp: + * src/tracks/automation_track.cpp: + * src/tracks/bb_track.cpp: + * src/tracks/instrument_track.cpp: + * src/tracks/sample_track.cpp: + * data/themes/default/style.css: + * data/themes/default/add_automation.png: + * data/themes/default/add_sample_track.png: + * data/themes/default/automation.png: + * data/themes/default/automation_track.png: + * data/themes/default/colorize.png: + * data/themes/default/instrument_track.png: + * data/themes/default/sample_track.png: + * data/themes/default/surround_area.png: + unified track-view appearence and behaviour + 2008-07-11 Tobias Doerffel * plugins/sf2_player/Makefile.am: diff --git a/Makefile.am b/Makefile.am index 3d82a91c2..f0bf7d2b4 100644 --- a/Makefile.am +++ b/Makefile.am @@ -103,7 +103,6 @@ lmms_MOC = \ ./controller_view.moc \ ./cpuload_widget.moc \ ./effect_control_dialog.moc \ - ./effect_label.moc \ ./effect_select_dialog.moc \ ./envelope_and_lfo_parameters.moc \ ./envelope_and_lfo_view.moc \ @@ -299,7 +298,6 @@ lmms_SOURCES = \ $(srcdir)/src/gui/widgets/controller_rack_view.cpp \ $(srcdir)/src/gui/widgets/controller_view.cpp \ $(srcdir)/src/gui/widgets/cpuload_widget.cpp \ - $(srcdir)/src/gui/widgets/effect_label.cpp \ $(srcdir)/src/gui/widgets/effect_rack_view.cpp \ $(srcdir)/src/gui/widgets/effect_view.cpp \ $(srcdir)/src/gui/widgets/fade_button.cpp \ @@ -479,7 +477,6 @@ lmms_SOURCES = \ $(srcdir)/include/effect_chain.h \ $(srcdir)/include/effect_controls.h \ $(srcdir)/include/effect_control_dialog.h \ - $(srcdir)/include/effect_label.h \ $(srcdir)/include/effect_rack_view.h \ $(srcdir)/include/effect_select_dialog.h \ $(srcdir)/include/effect_view.h \ diff --git a/include/effect_label.h b/include/effect_label.h deleted file mode 100644 index e33c39eb8..000000000 --- a/include/effect_label.h +++ /dev/null @@ -1,78 +0,0 @@ -/* - * effect_label.h - a label which is renamable by double-clicking it and - * offers access to an effect rack - * - * Copyright (c) 2006-2007 Danny McRae - * Copyright (c) 2008 Tobias Doerffel - * - * 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 _EFFECT_LABEL_H -#define _EFFECT_LABEL_H - -#include - - -class QLabel; -class QPushButton; - -class effectRackView; -class sampleTrack; - - -class effectLabel: public QWidget -{ - Q_OBJECT -public: - effectLabel( QWidget * _parent, sampleTrack * _track ); - virtual ~effectLabel(); - - QString text( void ) const; - void setText( const QString & _text ); - - -public slots: - void showEffects( void ); - void rename( void ); - - -signals: - void clicked( void ); - void nameChanged( void ); - void nameChanged( const QString & _new_name ); - void pixmapChanged( void ); - - -protected: - virtual void mousePressEvent( QMouseEvent * _me ); - virtual void mouseDoubleClickEvent( QMouseEvent * _me ); - - -private: - sampleTrack * m_track; - - QLabel * m_label; - QPushButton * m_effectBtn; - QWidget * m_effWindow; - effectRackView * m_effectRack; - -} ; - -#endif diff --git a/src/gui/widgets/effect_label.cpp b/src/gui/widgets/effect_label.cpp deleted file mode 100644 index b0e9b3ad2..000000000 --- a/src/gui/widgets/effect_label.cpp +++ /dev/null @@ -1,185 +0,0 @@ -#ifndef SINGLE_SOURCE_COMPILE - -/* - * effect_label.cpp - a label which is renamable by double-clicking it and - * offers access to an effect rack - * - * Copyright (c) 2006-2007 Danny McRae - * Copyright (c) 2008 Tobias Doerffel - * - * 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 "effect_label.h" - -#include -#include -#include -#include -#include -#include - -#include "effect_rack_view.h" -#include "embed.h" -#include "engine.h" -#include "gui_templates.h" -#include "main_window.h" -#include "rename_dialog.h" -#include "sample_track.h" - - - - -effectLabel::effectLabel( QWidget * _parent, sampleTrack * _track ) : - QWidget( _parent ), - m_track( _track ) -{ - setCursor( QCursor( embed::getIconPixmap( "hand" ), 0, 0 ) ); - - m_effectBtn = new QPushButton( embed::getIconPixmap( "setup_audio" ), - "", this ); - m_effectBtn->setGeometry( 6, 1, 28, 28 ); - connect( m_effectBtn, SIGNAL( clicked() ), - this, SLOT( showEffects() ) ); - - m_label = new QLabel( this ); - m_label->setText( m_track->name() ); - m_label->setGeometry( 38, 1, 200, 28 ); - - m_effectRack = new effectRackView( - m_track->getAudioPort()->getEffects(), - engine::getMainWindow()->workspace() ); - - if( engine::getMainWindow()->workspace() ) - { - engine::getMainWindow()->workspace()->addSubWindow( - m_effectRack ); - m_effWindow = m_effectRack->parentWidget(); - m_effWindow->setAttribute( Qt::WA_DeleteOnClose, FALSE ); - m_effWindow->layout()->setSizeConstraint( - QLayout::SetFixedSize ); - } - else - { - m_effWindow = m_effectRack; - } - - m_effWindow->setWindowTitle( m_track->name() ); - m_effectRack->setFixedSize( 240, 242 ); - m_effWindow->hide(); -} - - - - -effectLabel::~effectLabel() -{ - m_effWindow->deleteLater(); -} - - - - -QString effectLabel::text( void ) const -{ - return( m_label->text() ); -} - - - - -void effectLabel::setText( const QString & _text ) -{ - m_label->setText( _text ); - m_effWindow->setWindowTitle( _text ); -} - - - - -void effectLabel::showEffects( void ) -{ - if( m_effWindow->isHidden() ) - { - m_effectRack->show(); - if( m_effWindow != m_effectRack ) - { - m_effWindow->show(); - } - m_effWindow->raise(); - } - else - { - m_effWindow->hide(); - } -} - - - - - -void effectLabel::rename( void ) -{ - QString txt = text(); - renameDialog rename_dlg( txt ); - rename_dlg.exec(); - if( txt != text() ) - { - m_track->setName( txt ); - setText( txt ); - emit nameChanged( txt ); - emit nameChanged(); - } -} - - - - -void effectLabel::mousePressEvent( QMouseEvent * _me ) -{ - if( _me->button() == Qt::RightButton ) - { - if( _me->x() > 29 ) - { - rename(); - } - } - else - { - emit clicked(); - } -} - - - - -void effectLabel::mouseDoubleClickEvent( QMouseEvent * _me ) -{ - if( _me->x() > 29 ) - { - rename(); - } -} - - - -#include "effect_label.moc" - -#endif