some improvements on MIDI-tab-widget

git-svn-id: https://lmms.svn.sf.net/svnroot/lmms/trunk/lmms@30 0778d3d1-df1d-0410-868b-ea421aaaa00d
This commit is contained in:
Tobias Doerffel
2005-12-09 08:36:24 +00:00
parent 457c39ccdf
commit f67bf64acb
6 changed files with 52 additions and 10 deletions

View File

@@ -1,3 +1,14 @@
2005-12-08 Tobias Doerffel <tobydox/at/users.sourceforge.net>
* src/core/midi_tab_widget.cpp:
- always un-check items in port-menus when disabling receceiving or
sending MIDI-events
- small GUI improvements
* resources/midi_in.png:
* resources/midi_out.png:
added icons for MIDI-input- and MIDI-output-port-selection
2005-12-07 Tobias Doerffel <tobydox/at/users.sourceforge.net>
* include/midi_alsa_seq.h:

3
TODO
View File

@@ -1,6 +1,7 @@
to be done as soon as possible:
- save connections in midi-tab-widget and debug it (when disabling input/output, automatically unsubscribe all ports!)
- do not allow to connect output-port of channel to own input-port!
- save connections in midi-tab-widget
- add note-len- and note-alignment-selectbox to piano-roll
- make it possible in bb-editor to add single beats to beat-patterns
- fix audio/midi-settings stuff/translation

View File

@@ -2,8 +2,8 @@
# Process this file with autoconf to produce a configure script.
AC_PREREQ(2.50)
AC_INIT(lmms, 0.1.1-cvs20051207, tobydox/at/users.sourceforge.net)
AM_INIT_AUTOMAKE(lmms, 0.1.1-cvs20051207)
AC_INIT(lmms, 0.1.1-cvs20051208, tobydox/at/users.sourceforge.net)
AM_INIT_AUTOMAKE(lmms, 0.1.1-cvs20051208)
AM_CONFIG_HEADER(config.h)

BIN
resources/midi_in.png Normal file

Binary file not shown.

BIN
resources/midi_out.png Normal file

Binary file not shown.

View File

@@ -52,6 +52,7 @@
#include "tooltip.h"
#include "song_editor.h"
#include "midi_client.h"
#include "embed.h"
@@ -60,7 +61,9 @@ midiTabWidget::midiTabWidget( channelTrack * _channel_track,
QWidget( _channel_track->tabWidgetParent() ),
settings(),
m_channelTrack( _channel_track ),
m_midiPort( _port )
m_midiPort( _port ),
m_readablePorts( NULL ),
m_writeablePorts( NULL )
{
m_setupTabWidget = new tabWidget( tr( "MIDI-SETUP FOR THIS CHANNEL" ),
this );
@@ -72,7 +75,7 @@ midiTabWidget::midiTabWidget( channelTrack * _channel_track,
m_inputChannelSpinBox->addTextForValue( 0, "---" );
m_inputChannelSpinBox->setValue( m_midiPort->inputChannel() + 1 );
m_inputChannelSpinBox->setLabel( tr( "CHANNEL" ) );
m_inputChannelSpinBox->move( 190, 30 );
m_inputChannelSpinBox->move( 28, 52 );
connect( m_inputChannelSpinBox, SIGNAL( valueChanged( int ) ),
this, SLOT( inputChannelChanged( int ) ) );
@@ -81,7 +84,7 @@ midiTabWidget::midiTabWidget( channelTrack * _channel_track,
m_outputChannelSpinBox->addTextForValue( 0, "---" );
m_outputChannelSpinBox->setValue( m_midiPort->outputChannel() + 1 );
m_outputChannelSpinBox->setLabel( tr( "CHANNEL" ) );
m_outputChannelSpinBox->move( 190, 90 );
m_outputChannelSpinBox->move( 28, 112 );
connect( m_outputChannelSpinBox, SIGNAL( valueChanged( int ) ),
this, SLOT( outputChannelChanged( int ) ) );
@@ -137,14 +140,18 @@ midiTabWidget::midiTabWidget( channelTrack * _channel_track,
writeablePortsChanged();
QToolButton * rp_btn = new QToolButton( m_setupTabWidget );
rp_btn->setText( tr( "RECEIVE FROM" ) );
rp_btn->setGeometry( 24, 52, 140, 24 );
rp_btn->setTextLabel( tr( "MIDI-devices to receive "
"MIDI-events from" ) );
rp_btn->setIconSet( embed::getIconPixmap( "midi_in" ) );
rp_btn->setGeometry( 186, 34, 40, 40 );
rp_btn->setPopup( m_readablePorts );
rp_btn->setPopupDelay( 1 );
QToolButton * wp_btn = new QToolButton( m_setupTabWidget );
wp_btn->setText( tr( "SEND TO" ) );
wp_btn->setGeometry( 24, 112, 140, 24 );
wp_btn->setTextLabel( tr( "MIDI-devices to send MIDI-events "
"to" ) );
wp_btn->setPixmap( embed::getIconPixmap( "midi_out" ) );
wp_btn->setGeometry( 186, 94, 40, 40 );
wp_btn->setPopup( m_writeablePorts );
wp_btn->setPopupDelay( 1 );
@@ -228,6 +235,29 @@ void midiTabWidget::midiPortModeToggled( bool )
m_midiPort->setMode( modeTable[m_receiveCheckBox->isChecked()]
[m_sendCheckBox->isChecked()] );
// check whether we have to dis-check items in connection-menu
if( m_readablePorts != NULL && m_receiveCheckBox->isChecked() == FALSE )
{
for( csize i = 0; i < m_readablePorts->count(); ++i )
{
int id = m_readablePorts->idAt( i );
if( m_readablePorts->isItemChecked( id ) )
{
activatedReadablePort( id );
}
}
}
if( m_writeablePorts != NULL && m_sendCheckBox->isChecked() == FALSE )
{
for( csize i = 0; i < m_writeablePorts->count(); ++i )
{
int id = m_writeablePorts->idAt( i );
if( m_writeablePorts->isItemChecked( id ) )
{
activatedWriteablePort( id );
}
}
}
songEditor::inst()->setModified();
}