From 288756e30f43a97260495accc21c1f6a8999ef94 Mon Sep 17 00:00:00 2001 From: Achim Settelmeier Date: Mon, 1 Jun 2009 15:43:41 +0200 Subject: [PATCH] Help text for MidiControlListener setup dialog Added a "(?)" button and help text to the Midi Control Listener setup dialog. Signed-off-by: Tobias Doerffel --- include/setup_dialog.h | 1 + src/gui/setup_dialog.cpp | 28 +++++++++++++++++++++++++++- 2 files changed, 28 insertions(+), 1 deletion(-) diff --git a/include/setup_dialog.h b/include/setup_dialog.h index de418d2ea..05cfb2fda 100644 --- a/include/setup_dialog.h +++ b/include/setup_dialog.h @@ -121,6 +121,7 @@ private slots: void mclNewAction( void ); void mclDelAction( void ); + void displayMclHelp( void ); private: groupBox * setupMidiControlListener( QWidget * midi ); diff --git a/src/gui/setup_dialog.cpp b/src/gui/setup_dialog.cpp index 8b4a0af5e..598488236 100644 --- a/src/gui/setup_dialog.cpp +++ b/src/gui/setup_dialog.cpp @@ -766,7 +766,6 @@ groupBox * setupDialog::setupMidiControlListener( QWidget * midi ) mclDoc, mclPortConfig ); m_mclMidiPort.loadSettings( mclPortConfig ); - // use control key ledCheckBox * controlKeyCb = new ledCheckBox( tr( "Use control key" ), @@ -776,9 +775,18 @@ groupBox * setupDialog::setupMidiControlListener( QWidget * midi ) connect( controlKeyCb, SIGNAL( toggled( bool ) ), this, SLOT( toggleMCLControlKey( bool ) ) ); + // help button + QPushButton * mclHelpButton = new QPushButton( + embed::getIconPixmap( "help" ), "", gb ); + mclHelpButton->setGeometry( 320, 20, 28, 28 ); + connect( mclHelpButton, SIGNAL( clicked() ), this, + SLOT( displayMclHelp() ) ); + + // action table m_mclActionTable = new QTableWidget( gb ); mclUpdateActionTable(); + // add/delete buttons QWidget * buttons = new QWidget( gb ); QVBoxLayout * btn_layout = new QVBoxLayout( buttons ); btn_layout->setSpacing( 0 ); @@ -1406,6 +1414,24 @@ void setupDialog::mclAddControllerAction( int _controller, +void setupDialog::displayMclHelp( void ) +{ + QWhatsThis::showText( QCursor::pos(), + tr( "You can remote control LMMS via MIDI: " + "start or stop the song, toggle loop mode " + "or jump to a particular position. " + "A remote control action can be triggered " + "either by a keypress or a controller " + "change. With the 'use control key' option " + "turned on, you need to press and hold the " + "control key before issuing a keypress " + "action. " + ) ); +} + + + + #include "moc_setup_dialog.cxx"