From f67bf64acb5e1a4ec733e89746787784ff48736c Mon Sep 17 00:00:00 2001 From: Tobias Doerffel Date: Fri, 9 Dec 2005 08:36:24 +0000 Subject: [PATCH] some improvements on MIDI-tab-widget git-svn-id: https://lmms.svn.sf.net/svnroot/lmms/trunk/lmms@30 0778d3d1-df1d-0410-868b-ea421aaaa00d --- ChangeLog | 11 +++++++++ TODO | 3 ++- configure.in | 4 ++-- resources/midi_in.png | Bin 0 -> 1447 bytes resources/midi_out.png | Bin 0 -> 1503 bytes src/core/midi_tab_widget.cpp | 44 +++++++++++++++++++++++++++++------ 6 files changed, 52 insertions(+), 10 deletions(-) create mode 100644 resources/midi_in.png create mode 100644 resources/midi_out.png diff --git a/ChangeLog b/ChangeLog index 1170b9a7e..5021e1d74 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,14 @@ +2005-12-08 Tobias Doerffel + + * 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 * include/midi_alsa_seq.h: diff --git a/TODO b/TODO index 2f1fb8627..a6f1c3e75 100644 --- a/TODO +++ b/TODO @@ -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 diff --git a/configure.in b/configure.in index 3cab35ce2..228710dbd 100644 --- a/configure.in +++ b/configure.in @@ -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) diff --git a/resources/midi_in.png b/resources/midi_in.png new file mode 100644 index 0000000000000000000000000000000000000000..ed2e891e795563879befb3db586d14f6e9e54f05 GIT binary patch literal 1447 zcmV;Y1z7rtP)V?AVfeyfQZ6ZfS?7(9*=vvduDoiy1Kgd;GWrWh+!uR zf`gw_s_E`G_5Sbwe^sww!!~Tgeq9s8IM2_|-+%Jt$v@#@At)3I7-MKQ zn@A}!#!xPokx~*x5te0<%jM8o6UQ;dViAC5vk8D@S;(RE6$0P)DHICq-@l()twx%r zOixc!tyXC?8f@CMiGv3ZGB-EJ%*+hS%gbo3*|TR4#u!?y7TdRPXWO=I)a!N1zKA*Ccq62dUV^Sqw`@_iqr6mcBm z`#u*hUS!9P9dx^0PMtc%?CdO?H*eDeLa9$tyVvn>$)hV2*Z#@qk-@H7-QA| z>Lqdh{CUouJ4d}g-h2@bNErs?pK^#CPFg75oit^0sH&+BjDUXaU|FB3%(X_{VhO|A8s z=l>7TTxpsnTeL~@J;}7zv|26VI7TT&yWOVUZsU1gpPeL0SXo)Yw(T{iavaAvjzd15 z?9fv*e_WWmyOzNRotJpS#xYL7$$awrz9f%oz?JKFrkA)G9;b(dq<6Gf6>5 z*nlO#*4oH+WP+ugY|X#`+yV;^{)fliKlAt3rg-wUzi{x*If{9wFG;Uh*K4X*&%It& zC={^8!&@A4ulr9XlDn|7{x7pxfT0UF4~T031*U5F^rnw^^6Mu!@$LzZJ#dVNchCN$ zUe*J5HAo=@j^iM?wX>J8rVGt^=2T_>xyXc!`BsUW2MIqKu08e zCBNYld6x6?Wj<6Nqm@74aou-nndQA^JIH%RO6iI41Geki`;xVRudO9M5^wXqe3AFk z_oydzAh}UjS$m*F*B*%XR&!~&Qvl$5+2B+8zL>XOGB2t(=;+0auN!XbwhsN~N+>p4 zr>M!Md5hP%5Pxe(I$3G|W@Zn2XWFm|+pyoe{TCvr@5nF}O?3bO002ovPDHLkV1le& Bu|)s? literal 0 HcmV?d00001 diff --git a/resources/midi_out.png b/resources/midi_out.png new file mode 100644 index 0000000000000000000000000000000000000000..708f2169df41707dede7b01fb42c7ef2276b920b GIT binary patch literal 1503 zcmV<51t9u~P)I?UtwO=kDc!7S8>>$_Sjh` zUQ0Q#pH!;quIm2&_4~ehz?N;_^OSGCq3I>;FFkw4mKOb`U@*|X>6vuDqq zyymSvUCgZ9nNEzA1Q@k%K!T)6Ph%@C4ln$qcX*s)^=mSrJ? zz;PV1EF%mOv%0#9>$;l`nVqI7 zyS(7=|1^e3*rW z1-jiXhYlU0*XwcZ+BL?;#&8@5*L80z+&2))vJ9mZ09tEY*QMX@lVusc?~|q}Ns^G~ zImQ^Y*7&|p5CkMig75oyo=2Ld1VKO)MQE)Ff&kz5H%&;UX-c=-MF>F@MYyg@5Cr6T zj_>;SXjXGJdPYWg75pduKR)fyDdV!UXLV6N@q$b z@;onTB}oE6p65hSgi?xLuZPx}nVA`c5F9;vluMT`v9hwl#KZ(sQ&Y^(&$EC3{yWPd zt#wJr_kD~pc%DbM+a*bo8wk0sOS|2s+wC$tJB#Oe7-JAZltetwV|I3S(}YSvaU2sx z5uWGa`+m7GZu{DmFYmhhwsUAeXfS)% zb;w-K@iYxw^>_TD?f;$h-$S;r_;f*EGm@>yvzanjat1%s3UA)vg1* zF#QC(8oyk35h!XMV&jK3ayyZ&4&+5WSi|8%(} z9mhckQEq&yW*#we0t<@ z={OFyZI^;>b%GDtgF0WHMg$%#77nZ-A`Z|5wiN=)1i2nELg4=E--%YXyXpB~lC@f` zBoqVzLI?mVl?p-#(lo`k?NW?w+Zbbz!Q1eu!m${lVutcX4iTdWR|?dDy@e=Mlr_*s zCMBWC$w_8rX0A_WC`6WJeV}}H`xIaJ44?}t_K={ocoswC?1E%m2N_8~58>bMF7j%-M3S_R; z_y29bwfdU4@Yt>_4;J;r;eYjL^<(y z)kj?NKMq09e^NG@j&*OhmHctabWidgetParent() ), 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(); }