* moved name_label.* to track_label_button.*

* bigger icons for trackLabelButtons



git-svn-id: https://lmms.svn.sf.net/svnroot/lmms/trunk/lmms@1320 0778d3d1-df1d-0410-868b-ea421aaaa00d
This commit is contained in:
Tobias Doerffel
2008-07-18 10:03:19 +00:00
parent ec9bd29181
commit 4f44b94230
8 changed files with 27 additions and 28 deletions

View File

@@ -132,7 +132,7 @@ lmms_MOC = \
./midi_port_menu.moc \
./mixer.moc \
./mv_base.moc \
./name_label.moc \
./track_label_button.moc \
./nstate_button.moc \
./pattern.moc \
./peak_controller.moc \
@@ -315,7 +315,7 @@ lmms_SOURCES = \
$(srcdir)/src/gui/widgets/led_checkbox.cpp \
$(srcdir)/src/gui/widgets/meter_dialog.cpp \
$(srcdir)/src/gui/widgets/midi_port_menu.cpp \
$(srcdir)/src/gui/widgets/name_label.cpp \
$(srcdir)/src/gui/widgets/track_label_button.cpp \
$(srcdir)/src/gui/widgets/nstate_button.cpp \
$(srcdir)/src/gui/widgets/pixmap_button.cpp \
$(srcdir)/src/gui/widgets/project_notes.cpp \
@@ -413,7 +413,7 @@ lmms_SOURCES = \
$(srcdir)/include/caption_menu.h \
$(srcdir)/include/sample_track.h \
$(srcdir)/include/sample_buffer.h \
$(srcdir)/include/name_label.h \
$(srcdir)/include/track_label_button.h \
$(srcdir)/include/play_handle.h \
$(srcdir)/include/mmp.h \
$(srcdir)/include/midi.h \

View File

@@ -1,5 +1,5 @@
/*
* name_label.h - class trackLabelButton
* track_label_button.h - class trackLabelButton
*
* Copyright (c) 2004-2008 Tobias Doerffel <tobydox/at/users.sourceforge.net>
*
@@ -23,8 +23,8 @@
*/
#ifndef _NAME_LABEL_H
#define _NAME_LABEL_H
#ifndef _TRACK_LABEL_BUTTON_H
#define _TRACK_LABEL_BUTTON_H
#include <QtGui/QToolButton>

View File

@@ -1,8 +1,8 @@
#ifndef SINGLE_SOURCE_COMPILE
/*
* name_label.cpp - implementation of class trackLabelButton, a label which
* is renamable by double-clicking it
* track_label_button.cpp - implementation of class trackLabelButton, a label
* which is renamable by double-clicking it
*
* Copyright (c) 2004-2008 Tobias Doerffel <tobydox/at/users.sourceforge.net>
*
@@ -33,7 +33,7 @@
#include <QtGui/QToolButton>
#include "name_label.h"
#include "track_label_button.h"
#include "embed.h"
#include "rename_dialog.h"
#include "bb_track_container.h"
@@ -54,6 +54,7 @@ trackLabelButton::trackLabelButton( trackView * _tv, QWidget * _parent ) :
setCursor( QCursor( embed::getIconPixmap( "hand" ), 0, 0 ) );
setToolButtonStyle( Qt::ToolButtonTextBesideIcon );
setFixedSize( 160, 29 );
setIconSize( QSize( 32, 32 ) );
updateName();
connect( m_trackView->getTrack(), SIGNAL( dataChanged() ),
@@ -233,7 +234,7 @@ void trackLabelButton::dropEvent( QDropEvent * _de )
#include "name_label.moc"
#include "track_label_button.moc"
#endif

View File

@@ -30,10 +30,10 @@
#include "automation_track.h"
#include "automation_pattern.h"
#include "embed.h"
#include "name_label.h"
#include "string_pair_drag.h"
#include "project_journal.h"
#include "string_pair_drag.h"
#include "track_container_view.h"
#include "track_label_button.h"
automationTrack::automationTrack( trackContainer * _tc, bool _hidden ) :

View File

@@ -38,11 +38,11 @@
#include "engine.h"
#include "gui_templates.h"
#include "mixer.h"
#include "name_label.h"
#include "rename_dialog.h"
#include "song.h"
#include "song_editor.h"
#include "templates.h"
#include "track_label_button.h"

View File

@@ -67,7 +67,6 @@
#include "main_window.h"
#include "midi_client.h"
#include "midi_port_menu.h"
#include "name_label.h"
#include "mmp.h"
#include "note_play_handle.h"
#include "pattern.h"
@@ -78,6 +77,7 @@
#include "surround_area.h"
#include "tab_widget.h"
#include "tooltip.h"
#include "track_label_button.h"

View File

@@ -1049,7 +1049,7 @@ void patternView::wheelEvent( QWheelEvent * _we )
return;
}
note * n = m_pat->m_notes[step];
Uint8 vol = n->getVolume();
int vol = n->getVolume();
if( n->length() == 0 && _we->delta() > 0 )
{
@@ -1164,7 +1164,7 @@ void patternView::paintEvent( QPaintEvent * )
{
central_key = central_key / total_notes;
int central_y = height() / 2;
const int central_y = height() / 2;
int y_base = central_y + TCO_BORDER_WIDTH -1;
if( m_pat->getTrack()->isMuted() ||
@@ -1185,17 +1185,17 @@ void patternView::paintEvent( QPaintEvent * )
m_pat->m_notes.begin();
it != m_pat->m_notes.end(); ++it )
{
Sint8 y_pos = central_key -
const int y_pos = central_key -
( *it )->key();
if( ( *it )->length() > 0 &&
y_pos > -central_y &&
y_pos < central_y )
{
int x1 = 2 * x_base +
const int x1 = 2 * x_base +
static_cast<int>( ( *it )->pos() * ppt /
midiTime::ticksPerTact() );
int x2 =
const int x2 =
static_cast<int>( ( ( *it )->pos() + ( *it )->length() ) * ppt / midiTime::ticksPerTact() );
p.drawLine( x1, y_base + y_pos,
x2, y_base + y_pos );
@@ -1234,13 +1234,13 @@ void patternView::paintEvent( QPaintEvent * )
for( noteVector::iterator it = m_pat->m_notes.begin();
it != m_pat->m_notes.end(); ++it )
{
int no = ( *it )->pos() / DefaultBeatsPerTact;
int x = TCO_BORDER_WIDTH + static_cast<int>( no *
const int no = ( *it )->pos() / DefaultBeatsPerTact;
const int x = TCO_BORDER_WIDTH + static_cast<int>( no *
w / steps );
int y = height() - s_stepBtnOff->height() - 1;
Uint8 vol = ( *it )->getVolume();
const int y = height() - s_stepBtnOff->height() - 1;
const int vol = ( *it )->getVolume();
if( ( *it )->length() < 0 )
{
p.drawPixmap( x, y, stepoff );

View File

@@ -33,20 +33,18 @@
#include <QtGui/QPainter>
#include <QtGui/QPushButton>
#include "name_label.h"
#include "sample_track.h"
#include "song.h"
#include "embed.h"
#include "engine.h"
#include "templates.h"
#include "tooltip.h"
#include "audio_port.h"
#include "automation_pattern.h"
#include "sample_play_handle.h"
#include "string_pair_drag.h"
#include "knob.h"
#include "main_window.h"
#include "effect_rack_view.h"
#include "track_label_button.h"