From 33b44ec9c7c61a51d04b42464f946bfa64c1d9c6 Mon Sep 17 00:00:00 2001 From: Alex Date: Fri, 15 Apr 2022 14:04:52 +0200 Subject: [PATCH] Disable tooltips through event filter (#6192) * Control tooltip visibility using an event filter ...removing the need for a ToolTip helper class * Remove whitespace --- include/MainWindow.h | 2 + include/MixerView.h | 1 - include/ToolTip.h | 42 ----------- .../AudioFileProcessor/AudioFileProcessor.cpp | 13 ++-- plugins/BitInvader/BitInvader.cpp | 19 +++-- plugins/Bitcrush/BitcrushControlDialog.cpp | 5 +- .../Compressor/CompressorControlDialog.cpp | 71 +++++++++---------- .../CrossoverEQ/CrossoverEQControlDialog.cpp | 9 ++- .../DualFilter/DualFilterControlDialog.cpp | 5 +- .../DynamicsProcessorControlDialog.cpp | 15 ++-- plugins/FreeBoy/FreeBoy.cpp | 59 ++++++++------- plugins/GigPlayer/GigPlayer.cpp | 5 +- plugins/Lb302/Lb302.cpp | 27 ++++--- plugins/Monstro/Monstro.cpp | 13 ++-- plugins/Monstro/Monstro.h | 2 +- .../MultitapEchoControlDialog.cpp | 3 +- plugins/Nes/Nes.cpp | 1 - plugins/Nes/Nes.h | 4 +- plugins/OpulenZ/OpulenZ.cpp | 5 +- plugins/Patman/Patman.cpp | 7 +- plugins/Sf2Player/Sf2Player.cpp | 9 ++- plugins/Sfxr/Sfxr.cpp | 7 +- plugins/Sid/SidInstrument.cpp | 47 ++++++------ plugins/TripleOscillator/TripleOscillator.cpp | 41 ++++++----- plugins/Vestige/Vestige.cpp | 13 ++-- plugins/Vibed/Vibed.cpp | 23 +++--- plugins/VstEffect/VstEffectControlDialog.cpp | 11 ++- plugins/Watsyn/Watsyn.cpp | 53 +++++++------- .../WaveShaper/WaveShaperControlDialog.cpp | 11 ++- plugins/Xpressive/Xpressive.cpp | 31 ++++---- src/gui/AutomationClipView.cpp | 5 +- src/gui/CMakeLists.txt | 1 - src/gui/InstrumentTrackWindow.cpp | 3 +- src/gui/LfoControllerDialog.cpp | 25 ++++--- src/gui/MainWindow.cpp | 29 +++++--- src/gui/MidiClipView.cpp | 3 +- src/gui/MixerView.cpp | 4 +- src/gui/PatternClipView.cpp | 3 +- src/gui/PeakControllerDialog.cpp | 3 +- src/gui/SampleClipView.cpp | 3 +- src/gui/TrackView.cpp | 3 +- src/gui/editors/AutomationEditor.cpp | 3 +- src/gui/editors/SongEditor.cpp | 7 +- src/gui/modals/SetupDialog.cpp | 3 +- src/gui/widgets/EffectView.cpp | 3 +- src/gui/widgets/EnvelopeAndLfoView.cpp | 5 +- src/gui/widgets/LadspaControlView.cpp | 3 +- src/gui/widgets/LeftRightNav.cpp | 9 ++- src/gui/widgets/MeterDialog.cpp | 5 +- src/gui/widgets/NStateButton.cpp | 3 +- src/gui/widgets/Oscilloscope.cpp | 3 +- src/gui/widgets/SideBar.cpp | 3 +- src/gui/widgets/TabBar.cpp | 3 +- src/gui/widgets/TimeDisplayWidget.cpp | 3 +- src/gui/widgets/ToolButton.cpp | 3 +- src/gui/widgets/ToolTip.cpp | 41 ----------- src/gui/widgets/TrackOperationsWidget.cpp | 9 ++- 57 files changed, 312 insertions(+), 430 deletions(-) delete mode 100644 include/ToolTip.h delete mode 100644 src/gui/widgets/ToolTip.cpp diff --git a/include/MainWindow.h b/include/MainWindow.h index dab2483e4..145023161 100644 --- a/include/MainWindow.h +++ b/include/MainWindow.h @@ -135,6 +135,8 @@ public: static void saveWidgetState( QWidget * _w, QDomElement & _de ); static void restoreWidgetState( QWidget * _w, const QDomElement & _de ); + bool eventFilter(QObject* watched, QEvent* event) override; + public slots: void resetWindowTitle(); diff --git a/include/MixerView.h b/include/MixerView.h index 266cc317e..6c586a607 100644 --- a/include/MixerView.h +++ b/include/MixerView.h @@ -34,7 +34,6 @@ #include "Engine.h" #include "Fader.h" #include "PixmapButton.h" -#include "ToolTip.h" #include "embed.h" #include "EffectRackView.h" diff --git a/include/ToolTip.h b/include/ToolTip.h deleted file mode 100644 index 7f769a05b..000000000 --- a/include/ToolTip.h +++ /dev/null @@ -1,42 +0,0 @@ -/* - * ToolTip.h - namespace toolTip, a tooltip-wrapper for LMMS - * - * Copyright (c) 2005-2008 Tobias Doerffel - * - * This file is part of LMMS - https://lmms.io - * - * 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 TOOLTIP_H -#define TOOLTIP_H - -#include - -#include "lmms_export.h" - -class QWidget; - - -struct ToolTip -{ - static void LMMS_EXPORT add( QWidget * _w, const QString & _txt ); -} ; - - -#endif diff --git a/plugins/AudioFileProcessor/AudioFileProcessor.cpp b/plugins/AudioFileProcessor/AudioFileProcessor.cpp index 0933fe89b..d3c13511b 100644 --- a/plugins/AudioFileProcessor/AudioFileProcessor.cpp +++ b/plugins/AudioFileProcessor/AudioFileProcessor.cpp @@ -42,7 +42,6 @@ #include "PixmapButton.h" #include "Song.h" #include "StringPairDrag.h" -#include "ToolTip.h" #include "Clipboard.h" #include "embed.h" @@ -467,7 +466,7 @@ AudioFileProcessorView::AudioFileProcessorView( Instrument * _instrument, "select_file" ) ); connect( m_openAudioFileButton, SIGNAL( clicked() ), this, SLOT( openAudioFile() ) ); - ToolTip::add( m_openAudioFileButton, tr( "Open sample" ) ); + m_openAudioFileButton->setToolTip(tr("Open sample")); m_reverseButton = new PixmapButton( this ); m_reverseButton->setCheckable( true ); @@ -476,7 +475,7 @@ AudioFileProcessorView::AudioFileProcessorView( Instrument * _instrument, "reverse_on" ) ); m_reverseButton->setInactiveGraphic( PLUGIN_NAME::getIconPixmap( "reverse_off" ) ); - ToolTip::add( m_reverseButton, tr( "Reverse sample" ) ); + m_reverseButton->setToolTip(tr("Reverse sample")); // loop button group @@ -487,7 +486,7 @@ AudioFileProcessorView::AudioFileProcessorView( Instrument * _instrument, "loop_off_on" ) ); m_loopOffButton->setInactiveGraphic( PLUGIN_NAME::getIconPixmap( "loop_off_off" ) ); - ToolTip::add( m_loopOffButton, tr( "Disable loop" ) ); + m_loopOffButton->setToolTip(tr("Disable loop")); PixmapButton * m_loopOnButton = new PixmapButton( this ); @@ -497,7 +496,7 @@ AudioFileProcessorView::AudioFileProcessorView( Instrument * _instrument, "loop_on_on" ) ); m_loopOnButton->setInactiveGraphic( PLUGIN_NAME::getIconPixmap( "loop_on_off" ) ); - ToolTip::add( m_loopOnButton, tr( "Enable loop" ) ); + m_loopOnButton->setToolTip(tr("Enable loop")); PixmapButton * m_loopPingPongButton = new PixmapButton( this ); m_loopPingPongButton->setCheckable( true ); @@ -506,7 +505,7 @@ AudioFileProcessorView::AudioFileProcessorView( Instrument * _instrument, "loop_pingpong_on" ) ); m_loopPingPongButton->setInactiveGraphic( PLUGIN_NAME::getIconPixmap( "loop_pingpong_off" ) ); - ToolTip::add( m_loopPingPongButton, tr( "Enable ping-pong loop" ) ); + m_loopPingPongButton->setToolTip(tr("Enable ping-pong loop")); m_loopGroup = new automatableButtonGroup( this ); m_loopGroup->addButton( m_loopOffButton ); @@ -520,7 +519,7 @@ AudioFileProcessorView::AudioFileProcessorView( Instrument * _instrument, "stutter_on" ) ); m_stutterButton->setInactiveGraphic( PLUGIN_NAME::getIconPixmap( "stutter_off" ) ); - ToolTip::add( m_stutterButton, + m_stutterButton->setToolTip( tr( "Continue sample playback across notes" ) ); m_ampKnob = new Knob( knobBright_26, this ); diff --git a/plugins/BitInvader/BitInvader.cpp b/plugins/BitInvader/BitInvader.cpp index 803c8e0e3..60c933949 100644 --- a/plugins/BitInvader/BitInvader.cpp +++ b/plugins/BitInvader/BitInvader.cpp @@ -35,7 +35,6 @@ #include "LedCheckBox.h" #include "NotePlayHandle.h" #include "PixmapButton.h" -#include "ToolTip.h" #include "Song.h" #include "interpolation.h" @@ -357,7 +356,7 @@ BitInvaderView::BitInvaderView( Instrument * _instrument, m_graph->setAutoFillBackground( true ); m_graph->setGraphColor( QColor( 255, 255, 255 ) ); - ToolTip::add( m_graph, tr ( "Draw your own waveform here " + m_graph->setToolTip(tr("Draw your own waveform here " "by dragging your mouse on this graph." )); @@ -374,7 +373,7 @@ BitInvaderView::BitInvaderView( Instrument * _instrument, "sin_wave_active" ) ); m_sinWaveBtn->setInactiveGraphic( embed::getIconPixmap( "sin_wave_inactive" ) ); - ToolTip::add( m_sinWaveBtn, + m_sinWaveBtn->setToolTip( tr( "Sine wave" ) ); m_triangleWaveBtn = new PixmapButton( this, tr( "Triangle wave" ) ); @@ -383,7 +382,7 @@ BitInvaderView::BitInvaderView( Instrument * _instrument, embed::getIconPixmap( "triangle_wave_active" ) ); m_triangleWaveBtn->setInactiveGraphic( embed::getIconPixmap( "triangle_wave_inactive" ) ); - ToolTip::add( m_triangleWaveBtn, + m_triangleWaveBtn->setToolTip( tr( "Triangle wave" ) ); m_sawWaveBtn = new PixmapButton( this, tr( "Saw wave" ) ); @@ -392,7 +391,7 @@ BitInvaderView::BitInvaderView( Instrument * _instrument, "saw_wave_active" ) ); m_sawWaveBtn->setInactiveGraphic( embed::getIconPixmap( "saw_wave_inactive" ) ); - ToolTip::add( m_sawWaveBtn, + m_sawWaveBtn->setToolTip( tr( "Saw wave" ) ); m_sqrWaveBtn = new PixmapButton( this, tr( "Square wave" ) ); @@ -401,7 +400,7 @@ BitInvaderView::BitInvaderView( Instrument * _instrument, "square_wave_active" ) ); m_sqrWaveBtn->setInactiveGraphic( embed::getIconPixmap( "square_wave_inactive" ) ); - ToolTip::add( m_sqrWaveBtn, + m_sqrWaveBtn->setToolTip( tr( "Square wave" ) ); m_whiteNoiseWaveBtn = new PixmapButton( this, @@ -411,7 +410,7 @@ BitInvaderView::BitInvaderView( Instrument * _instrument, embed::getIconPixmap( "white_noise_wave_active" ) ); m_whiteNoiseWaveBtn->setInactiveGraphic( embed::getIconPixmap( "white_noise_wave_inactive" ) ); - ToolTip::add( m_whiteNoiseWaveBtn, + m_whiteNoiseWaveBtn->setToolTip( tr( "White noise" ) ); m_usrWaveBtn = new PixmapButton( this, tr( "User-defined wave" ) ); @@ -420,7 +419,7 @@ BitInvaderView::BitInvaderView( Instrument * _instrument, "usr_wave_active" ) ); m_usrWaveBtn->setInactiveGraphic( embed::getIconPixmap( "usr_wave_inactive" ) ); - ToolTip::add( m_usrWaveBtn, + m_usrWaveBtn->setToolTip( tr( "User-defined wave" ) ); m_smoothBtn = new PixmapButton( this, tr( "Smooth waveform" ) ); @@ -429,7 +428,7 @@ BitInvaderView::BitInvaderView( Instrument * _instrument, "smooth_active" ) ); m_smoothBtn->setInactiveGraphic( PLUGIN_NAME::getIconPixmap( "smooth_inactive" ) ); - ToolTip::add( m_smoothBtn, + m_smoothBtn->setToolTip( tr( "Smooth waveform" ) ); @@ -539,7 +538,7 @@ void BitInvaderView::usrWaveClicked() QString fileName = m_graph->model()->setWaveToUser(); if (!fileName.isEmpty()) { - ToolTip::add(m_usrWaveBtn, fileName); + m_usrWaveBtn->setToolTip(fileName); m_graph->model()->clearInvisible(); Engine::getSong()->setModified(); } diff --git a/plugins/Bitcrush/BitcrushControlDialog.cpp b/plugins/Bitcrush/BitcrushControlDialog.cpp index 74594f007..43117f00b 100755 --- a/plugins/Bitcrush/BitcrushControlDialog.cpp +++ b/plugins/Bitcrush/BitcrushControlDialog.cpp @@ -29,7 +29,6 @@ #include "embed.h" #include "BitcrushControlDialog.h" #include "BitcrushControls.h" -#include "ToolTip.h" #include "LedCheckBox.h" #include "Knob.h" @@ -82,12 +81,12 @@ BitcrushControlDialog::BitcrushControlDialog( BitcrushControls * controls ) : LedCheckBox * rateEnabled = new LedCheckBox( "", this, tr( "Rate enabled" ), LedCheckBox::Green ); rateEnabled->move( 64, 14 ); rateEnabled->setModel( & controls->m_rateEnabled ); - ToolTip::add( rateEnabled, tr( "Enable sample-rate crushing" ) ); + rateEnabled->setToolTip(tr("Enable sample-rate crushing")); LedCheckBox * depthEnabled = new LedCheckBox( "", this, tr( "Depth enabled" ), LedCheckBox::Green ); depthEnabled->move( 101, 14 ); depthEnabled->setModel( & controls->m_depthEnabled ); - ToolTip::add( depthEnabled, tr( "Enable bit-depth crushing" ) ); + depthEnabled->setToolTip(tr("Enable bit-depth crushing")); // rate crushing knobs diff --git a/plugins/Compressor/CompressorControlDialog.cpp b/plugins/Compressor/CompressorControlDialog.cpp index 2511e3915..106aa7a1d 100755 --- a/plugins/Compressor/CompressorControlDialog.cpp +++ b/plugins/Compressor/CompressorControlDialog.cpp @@ -38,7 +38,6 @@ #include "Knob.h" #include "MainWindow.h" #include "PixmapButton.h" -#include "ToolTip.h" CompressorControlDialog::CompressorControlDialog(CompressorControls* controls) : EffectControlDialog(controls), @@ -95,114 +94,114 @@ CompressorControlDialog::CompressorControlDialog(CompressorControls* controls) : m_thresholdKnob = new Knob(knobStyled, this); makeLargeKnob(m_thresholdKnob, tr("Threshold:") , " dBFS"); m_thresholdKnob->setModel(&controls->m_thresholdModel); - ToolTip::add(m_thresholdKnob, tr("Volume at which the compression begins to take place")); + m_thresholdKnob->setToolTip(tr("Volume at which the compression begins to take place")); m_ratioKnob = new Knob(knobStyled, this); makeLargeKnob(m_ratioKnob, tr("Ratio:") , ":1"); m_ratioKnob->setModel(&controls->m_ratioModel); - ToolTip::add(m_ratioKnob, tr("How far the compressor must turn the volume down after crossing the threshold")); + m_ratioKnob->setToolTip(tr("How far the compressor must turn the volume down after crossing the threshold")); m_attackKnob = new Knob(knobStyled, this); makeLargeKnob(m_attackKnob, tr("Attack:") , " ms"); m_attackKnob->setModel(&controls->m_attackModel); - ToolTip::add(m_attackKnob, tr("Speed at which the compressor starts to compress the audio")); + m_attackKnob->setToolTip(tr("Speed at which the compressor starts to compress the audio")); m_releaseKnob = new Knob(knobStyled, this); makeLargeKnob(m_releaseKnob, tr("Release:") , " ms"); m_releaseKnob->setModel(&controls->m_releaseModel); - ToolTip::add(m_releaseKnob, tr("Speed at which the compressor ceases to compress the audio")); + m_releaseKnob->setToolTip(tr("Speed at which the compressor ceases to compress the audio")); m_kneeKnob = new Knob(knobStyled, this); makeSmallKnob(m_kneeKnob, tr("Knee:") , " dB"); m_kneeKnob->setModel(&controls->m_kneeModel); - ToolTip::add(m_kneeKnob, tr("Smooth out the gain reduction curve around the threshold")); + m_kneeKnob->setToolTip(tr("Smooth out the gain reduction curve around the threshold")); m_rangeKnob = new Knob(knobStyled, this); makeSmallKnob(m_rangeKnob, tr("Range:") , " dBFS"); m_rangeKnob->setModel(&controls->m_rangeModel); - ToolTip::add(m_rangeKnob, tr("Maximum gain reduction")); + m_rangeKnob->setToolTip(tr("Maximum gain reduction")); m_lookaheadLengthKnob = new Knob(knobStyled, this); makeSmallKnob(m_lookaheadLengthKnob, tr("Lookahead Length:") , " ms"); m_lookaheadLengthKnob->setModel(&controls->m_lookaheadLengthModel); - ToolTip::add(m_lookaheadLengthKnob, tr("How long the compressor has to react to the sidechain signal ahead of time")); + m_lookaheadLengthKnob->setToolTip(tr("How long the compressor has to react to the sidechain signal ahead of time")); m_holdKnob = new Knob(knobStyled, this); makeSmallKnob(m_holdKnob, tr("Hold:") , " ms"); m_holdKnob->setModel(&controls->m_holdModel); - ToolTip::add(m_holdKnob, tr("Delay between attack and release stages")); + m_holdKnob->setToolTip(tr("Delay between attack and release stages")); m_rmsKnob = new Knob(knobStyled, this); makeSmallKnob(m_rmsKnob, tr("RMS Size:") , ""); m_rmsKnob->setModel(&controls->m_rmsModel); - ToolTip::add(m_rmsKnob, tr("Size of the RMS buffer")); + m_rmsKnob->setToolTip(tr("Size of the RMS buffer")); m_inBalanceKnob = new Knob(knobStyled, this); makeSmallKnob(m_inBalanceKnob, tr("Input Balance:") , ""); m_inBalanceKnob->setModel(&controls->m_inBalanceModel); - ToolTip::add(m_inBalanceKnob, tr("Bias the input audio to the left/right or mid/side")); + m_inBalanceKnob->setToolTip(tr("Bias the input audio to the left/right or mid/side")); m_outBalanceKnob = new Knob(knobStyled, this); makeSmallKnob(m_outBalanceKnob, tr("Output Balance:") , ""); m_outBalanceKnob->setModel(&controls->m_outBalanceModel); - ToolTip::add(m_outBalanceKnob, tr("Bias the output audio to the left/right or mid/side")); + m_outBalanceKnob->setToolTip(tr("Bias the output audio to the left/right or mid/side")); m_stereoBalanceKnob = new Knob(knobStyled, this); makeSmallKnob(m_stereoBalanceKnob, tr("Stereo Balance:") , ""); m_stereoBalanceKnob->setModel(&controls->m_stereoBalanceModel); - ToolTip::add(m_stereoBalanceKnob, tr("Bias the sidechain signal to the left/right or mid/side")); + m_stereoBalanceKnob->setToolTip(tr("Bias the sidechain signal to the left/right or mid/side")); m_blendKnob = new Knob(knobStyled, this); makeSmallKnob(m_blendKnob, tr("Stereo Link Blend:") , ""); m_blendKnob->setModel(&controls->m_blendModel); - ToolTip::add(m_blendKnob, tr("Blend between unlinked/maximum/average/minimum stereo linking modes")); + m_blendKnob->setToolTip(tr("Blend between unlinked/maximum/average/minimum stereo linking modes")); m_tiltKnob = new Knob(knobStyled, this); makeSmallKnob(m_tiltKnob, tr("Tilt Gain:") , " dB"); m_tiltKnob->setModel(&controls->m_tiltModel); - ToolTip::add(m_tiltKnob, tr("Bias the sidechain signal to the low or high frequencies. -6 db is lowpass, 6 db is highpass.")); + m_tiltKnob->setToolTip(tr("Bias the sidechain signal to the low or high frequencies. -6 db is lowpass, 6 db is highpass.")); m_tiltFreqKnob = new Knob(knobStyled, this); makeSmallKnob(m_tiltFreqKnob, tr("Tilt Frequency:") , " Hz"); m_tiltFreqKnob->setModel(&controls->m_tiltFreqModel); - ToolTip::add(m_tiltFreqKnob, tr("Center frequency of sidechain tilt filter")); + m_tiltFreqKnob->setToolTip(tr("Center frequency of sidechain tilt filter")); m_mixKnob = new Knob(knobStyled, this); makeSmallKnob(m_mixKnob, tr("Mix:") , "%"); m_mixKnob->setModel(&controls->m_mixModel); - ToolTip::add(m_mixKnob, tr("Balance between wet and dry signals")); + m_mixKnob->setToolTip(tr("Balance between wet and dry signals")); m_autoAttackKnob = new Knob(knobStyled, this); makeSmallKnob(m_autoAttackKnob, tr("Auto Attack:") , "%"); m_autoAttackKnob->setModel(&controls->m_autoAttackModel); - ToolTip::add(m_autoAttackKnob, tr("Automatically control attack value depending on crest factor")); + m_autoAttackKnob->setToolTip(tr("Automatically control attack value depending on crest factor")); m_autoReleaseKnob = new Knob(knobStyled, this); makeSmallKnob(m_autoReleaseKnob, tr("Auto Release:") , "%"); m_autoReleaseKnob->setModel(&controls->m_autoReleaseModel); - ToolTip::add(m_autoReleaseKnob, tr("Automatically control release value depending on crest factor")); + m_autoReleaseKnob->setToolTip(tr("Automatically control release value depending on crest factor")); m_outFader = new EqFader(&controls->m_outGainModel,tr("Output gain"), this, &controls->m_outPeakL, &controls->m_outPeakR); m_outFader->setDisplayConversion(false); m_outFader->setHintText(tr("Gain"), "dBFS"); - ToolTip::add(m_outFader, tr("Output volume")); + m_outFader->setToolTip(tr("Output volume")); m_inFader = new EqFader(&controls->m_inGainModel,tr("Input gain"), this, &controls->m_inPeakL, &controls->m_inPeakR); m_inFader->setDisplayConversion(false); m_inFader->setHintText(tr("Gain"), "dBFS"); - ToolTip::add(m_inFader, tr("Input volume")); + m_inFader->setToolTip(tr("Input volume")); rmsButton = new PixmapButton(this, tr("Root Mean Square")); rmsButton->setActiveGraphic(PLUGIN_NAME::getIconPixmap("rms_sel")); rmsButton->setInactiveGraphic(PLUGIN_NAME::getIconPixmap("rms_unsel")); - ToolTip::add(rmsButton, tr("Use RMS of the input")); + rmsButton->setToolTip(tr("Use RMS of the input")); peakButton = new PixmapButton(this, tr("Peak")); peakButton->setActiveGraphic(PLUGIN_NAME::getIconPixmap("peak_sel")); peakButton->setInactiveGraphic(PLUGIN_NAME::getIconPixmap("peak_unsel")); - ToolTip::add(peakButton, tr("Use absolute value of the input")); + peakButton->setToolTip(tr("Use absolute value of the input")); rmsPeakGroup = new automatableButtonGroup(this); rmsPeakGroup->addButton(rmsButton); @@ -212,12 +211,12 @@ CompressorControlDialog::CompressorControlDialog(CompressorControls* controls) : leftRightButton = new PixmapButton(this, tr("Left/Right")); leftRightButton->setActiveGraphic(PLUGIN_NAME::getIconPixmap("leftright_sel")); leftRightButton->setInactiveGraphic(PLUGIN_NAME::getIconPixmap("leftright_unsel")); - ToolTip::add(leftRightButton, tr("Compress left and right audio")); + leftRightButton->setToolTip(tr("Compress left and right audio")); midSideButton = new PixmapButton(this, tr("Mid/Side")); midSideButton->setActiveGraphic(PLUGIN_NAME::getIconPixmap("midside_sel")); midSideButton->setInactiveGraphic(PLUGIN_NAME::getIconPixmap("midside_unsel")); - ToolTip::add(midSideButton, tr("Compress mid and side audio")); + midSideButton->setToolTip(tr("Compress mid and side audio")); leftRightMidSideGroup = new automatableButtonGroup(this); leftRightMidSideGroup->addButton(leftRightButton); @@ -227,12 +226,12 @@ CompressorControlDialog::CompressorControlDialog(CompressorControls* controls) : compressButton = new PixmapButton(this, tr("Compressor")); compressButton->setActiveGraphic(PLUGIN_NAME::getIconPixmap("compressor_sel")); compressButton->setInactiveGraphic(PLUGIN_NAME::getIconPixmap("compressor_unsel")); - ToolTip::add(compressButton, tr("Compress the audio")); + compressButton->setToolTip(tr("Compress the audio")); limitButton = new PixmapButton(this, tr("Limiter")); limitButton->setActiveGraphic(PLUGIN_NAME::getIconPixmap("limiter_sel")); limitButton->setInactiveGraphic(PLUGIN_NAME::getIconPixmap("limiter_unsel")); - ToolTip::add(limitButton, tr("Set Ratio to infinity (is not guaranteed to limit audio volume)")); + limitButton->setToolTip(tr("Set Ratio to infinity (is not guaranteed to limit audio volume)")); compressLimitGroup = new automatableButtonGroup(this); compressLimitGroup->addButton(compressButton); @@ -242,27 +241,27 @@ CompressorControlDialog::CompressorControlDialog(CompressorControls* controls) : unlinkedButton = new PixmapButton(this, tr("Unlinked")); unlinkedButton->setActiveGraphic(PLUGIN_NAME::getIconPixmap("unlinked_sel")); unlinkedButton->setInactiveGraphic(PLUGIN_NAME::getIconPixmap("unlinked_unsel")); - ToolTip::add(unlinkedButton, tr("Compress each channel separately")); + unlinkedButton->setToolTip(tr("Compress each channel separately")); maximumButton = new PixmapButton(this, tr("Maximum")); maximumButton->setActiveGraphic(PLUGIN_NAME::getIconPixmap("maximum_sel")); maximumButton->setInactiveGraphic(PLUGIN_NAME::getIconPixmap("maximum_unsel")); - ToolTip::add(maximumButton, tr("Compress based on the loudest channel")); + maximumButton->setToolTip(tr("Compress based on the loudest channel")); averageButton = new PixmapButton(this, tr("Average")); averageButton->setActiveGraphic(PLUGIN_NAME::getIconPixmap("average_sel")); averageButton->setInactiveGraphic(PLUGIN_NAME::getIconPixmap("average_unsel")); - ToolTip::add(averageButton, tr("Compress based on the averaged channel volume")); + averageButton->setToolTip(tr("Compress based on the averaged channel volume")); minimumButton = new PixmapButton(this, tr("Minimum")); minimumButton->setActiveGraphic(PLUGIN_NAME::getIconPixmap("minimum_sel")); minimumButton->setInactiveGraphic(PLUGIN_NAME::getIconPixmap("minimum_unsel")); - ToolTip::add(minimumButton, tr("Compress based on the quietest channel")); + minimumButton->setToolTip(tr("Compress based on the quietest channel")); blendButton = new PixmapButton(this, tr("Blend")); blendButton->setActiveGraphic(PLUGIN_NAME::getIconPixmap("blend_sel")); blendButton->setInactiveGraphic(PLUGIN_NAME::getIconPixmap("blend_unsel")); - ToolTip::add(blendButton, tr("Blend between stereo linking modes")); + blendButton->setToolTip(tr("Blend between stereo linking modes")); stereoLinkGroup = new automatableButtonGroup(this); stereoLinkGroup->addButton(unlinkedButton); @@ -275,28 +274,28 @@ CompressorControlDialog::CompressorControlDialog(CompressorControls* controls) : autoMakeupButton = new PixmapButton(this, tr("Auto Makeup Gain")); autoMakeupButton->setActiveGraphic(PLUGIN_NAME::getIconPixmap("autogain_sel")); autoMakeupButton->setInactiveGraphic(PLUGIN_NAME::getIconPixmap("autogain_unsel")); - ToolTip::add(autoMakeupButton, tr("Automatically change makeup gain depending on threshold, knee, and ratio settings")); + autoMakeupButton->setToolTip(tr("Automatically change makeup gain depending on threshold, knee, and ratio settings")); autoMakeupButton->setCheckable(true); autoMakeupButton->setModel(&controls->m_autoMakeupModel); auditionButton = new PixmapButton(this, tr("Soft Clip")); auditionButton->setActiveGraphic(PLUGIN_NAME::getIconPixmap("audition_sel")); auditionButton->setInactiveGraphic(PLUGIN_NAME::getIconPixmap("audition_unsel")); - ToolTip::add(auditionButton, tr("Play the delta signal")); + auditionButton->setToolTip(tr("Play the delta signal")); auditionButton->setCheckable(true); auditionButton->setModel(&controls->m_auditionModel); feedbackButton = new PixmapButton(this, tr("Soft Clip")); feedbackButton->setActiveGraphic(PLUGIN_NAME::getIconPixmap("feedback_sel")); feedbackButton->setInactiveGraphic(PLUGIN_NAME::getIconPixmap("feedback_unsel")); - ToolTip::add(feedbackButton, tr("Use the compressor's output as the sidechain input")); + feedbackButton->setToolTip(tr("Use the compressor's output as the sidechain input")); feedbackButton->setCheckable(true); feedbackButton->setModel(&controls->m_feedbackModel); lookaheadButton = new PixmapButton(this, tr("Lookahead Enabled")); lookaheadButton->setActiveGraphic(PLUGIN_NAME::getIconPixmap("lookahead_sel")); lookaheadButton->setInactiveGraphic(PLUGIN_NAME::getIconPixmap("lookahead_unsel")); - ToolTip::add(lookaheadButton, tr("Enable Lookahead, which introduces 20 milliseconds of latency")); + lookaheadButton->setToolTip(tr("Enable Lookahead, which introduces 20 milliseconds of latency")); lookaheadButton->setCheckable(true); lookaheadButton->setModel(&controls->m_lookaheadModel); diff --git a/plugins/CrossoverEQ/CrossoverEQControlDialog.cpp b/plugins/CrossoverEQ/CrossoverEQControlDialog.cpp index 070536e9f..7cf2d0c5b 100644 --- a/plugins/CrossoverEQ/CrossoverEQControlDialog.cpp +++ b/plugins/CrossoverEQ/CrossoverEQControlDialog.cpp @@ -28,7 +28,6 @@ #include "CrossoverEQControlDialog.h" #include "CrossoverEQControls.h" #include "embed.h" -#include "ToolTip.h" #include "LedCheckBox.h" #include "Knob.h" #include "Fader.h" @@ -94,20 +93,20 @@ CrossoverEQControlDialog::CrossoverEQControlDialog( CrossoverEQControls * contro LedCheckBox * mute1 = new LedCheckBox( "", this, tr( "Band 1 mute" ), LedCheckBox::Green ); mute1->move( 15, 154 ); mute1->setModel( & controls->m_mute1 ); - ToolTip::add( mute1, tr( "Mute band 1" ) ); + mute1->setToolTip(tr("Mute band 1")); LedCheckBox * mute2 = new LedCheckBox( "", this, tr( "Band 2 mute" ), LedCheckBox::Green ); mute2->move( 55, 154 ); mute2->setModel( & controls->m_mute2 ); - ToolTip::add( mute2, tr( "Mute band 2" ) ); + mute2->setToolTip(tr("Mute band 2")); LedCheckBox * mute3 = new LedCheckBox( "", this, tr( "Band 3 mute" ), LedCheckBox::Green ); mute3->move( 95, 154 ); mute3->setModel( & controls->m_mute3 ); - ToolTip::add( mute3, tr( "Mute band 3" ) ); + mute3->setToolTip(tr("Mute band 3")); LedCheckBox * mute4 = new LedCheckBox( "", this, tr( "Band 4 mute" ), LedCheckBox::Green ); mute4->move( 135, 154 ); mute4->setModel( & controls->m_mute4 ); - ToolTip::add( mute4, tr( "Mute band 4" ) ); + mute4->setToolTip(tr("Mute band 4")); } diff --git a/plugins/DualFilter/DualFilterControlDialog.cpp b/plugins/DualFilter/DualFilterControlDialog.cpp index 3fc4278e8..c6c56befd 100755 --- a/plugins/DualFilter/DualFilterControlDialog.cpp +++ b/plugins/DualFilter/DualFilterControlDialog.cpp @@ -29,7 +29,6 @@ #include "Knob.h" #include "LedCheckBox.h" #include "ComboBox.h" -#include "ToolTip.h" #include "gui_templates.h" #define makeknob( name, x, y, model, label, hint, unit ) \ @@ -68,10 +67,10 @@ DualFilterControlDialog::DualFilterControlDialog( DualFilterControls* controls ) enabled1Toggle -> move( 12, 11 ); enabled1Toggle -> setModel( &controls -> m_enabled1Model ); - ToolTip::add( enabled1Toggle, tr( "Enable/disable filter 1" ) ); + enabled1Toggle->setToolTip(tr("Enable/disable filter 1")); enabled2Toggle -> move( 210, 11 ); enabled2Toggle -> setModel( &controls -> m_enabled2Model ); - ToolTip::add( enabled2Toggle, tr( "Enable/disable filter 2" ) ); + enabled2Toggle->setToolTip(tr("Enable/disable filter 2")); ComboBox * m_filter1ComboBox = new ComboBox( this ); m_filter1ComboBox->setGeometry( 19, 70, 137, ComboBox::DEFAULT_HEIGHT ); diff --git a/plugins/DynamicsProcessor/DynamicsProcessorControlDialog.cpp b/plugins/DynamicsProcessor/DynamicsProcessorControlDialog.cpp index 89c84a7b2..e8ac87ab5 100644 --- a/plugins/DynamicsProcessor/DynamicsProcessorControlDialog.cpp +++ b/plugins/DynamicsProcessor/DynamicsProcessorControlDialog.cpp @@ -31,7 +31,6 @@ #include "Graph.h" #include "Knob.h" #include "PixmapButton.h" -#include "ToolTip.h" DynProcControlDialog::DynProcControlDialog( @@ -91,28 +90,28 @@ DynProcControlDialog::DynProcControlDialog( resetButton -> resize( 13, 48 ); resetButton -> setActiveGraphic( PLUGIN_NAME::getIconPixmap( "reset_active" ) ); resetButton -> setInactiveGraphic( PLUGIN_NAME::getIconPixmap( "reset_inactive" ) ); - ToolTip::add( resetButton, tr( "Reset wavegraph" ) ); + resetButton->setToolTip(tr("Reset wavegraph")); PixmapButton * smoothButton = new PixmapButton( this, tr("Smooth wavegraph") ); smoothButton -> move( 162, 239 ); smoothButton -> resize( 13, 48 ); smoothButton -> setActiveGraphic( PLUGIN_NAME::getIconPixmap( "smooth_active" ) ); smoothButton -> setInactiveGraphic( PLUGIN_NAME::getIconPixmap( "smooth_inactive" ) ); - ToolTip::add( smoothButton, tr( "Smooth wavegraph" ) ); + smoothButton->setToolTip(tr("Smooth wavegraph")); PixmapButton * addOneButton = new PixmapButton( this, tr("Increase wavegraph amplitude by 1 dB") ); addOneButton -> move( 131, 223 ); addOneButton -> resize( 13, 29 ); addOneButton -> setActiveGraphic( PLUGIN_NAME::getIconPixmap( "add1_active" ) ); addOneButton -> setInactiveGraphic( PLUGIN_NAME::getIconPixmap( "add1_inactive" ) ); - ToolTip::add( addOneButton, tr( "Increase wavegraph amplitude by 1 dB" ) ); + addOneButton->setToolTip(tr("Increase wavegraph amplitude by 1 dB")); PixmapButton * subOneButton = new PixmapButton( this, tr("Decrease wavegraph amplitude by 1 dB") ); subOneButton -> move( 131, 239 ); subOneButton -> resize( 13, 29 ); subOneButton -> setActiveGraphic( PLUGIN_NAME::getIconPixmap( "sub1_active" ) ); subOneButton -> setInactiveGraphic( PLUGIN_NAME::getIconPixmap( "sub1_inactive" ) ); - ToolTip::add( subOneButton, tr( "Decrease wavegraph amplitude by 1 dB" ) ); + subOneButton->setToolTip(tr("Decrease wavegraph amplitude by 1 dB")); //stereomode switches PixmapButton * smMaxButton = new PixmapButton( this, tr( "Stereo mode: maximum" ) ); @@ -120,21 +119,21 @@ DynProcControlDialog::DynProcControlDialog( smMaxButton -> resize( 78, 17 ); smMaxButton -> setActiveGraphic( PLUGIN_NAME::getIconPixmap( "max_active" ) ); smMaxButton -> setInactiveGraphic( PLUGIN_NAME::getIconPixmap( "max_inactive" ) ); - ToolTip::add( smMaxButton, tr( "Process based on the maximum of both stereo channels" ) ); + smMaxButton->setToolTip(tr("Process based on the maximum of both stereo channels")); PixmapButton * smAvgButton = new PixmapButton( this, tr( "Stereo mode: average" ) ); smAvgButton -> move( 131, 274 ); smAvgButton -> resize( 78, 16 ); smAvgButton -> setActiveGraphic( PLUGIN_NAME::getIconPixmap( "avg_active" ) ); smAvgButton -> setInactiveGraphic( PLUGIN_NAME::getIconPixmap( "avg_inactive" ) ); - ToolTip::add( smAvgButton, tr( "Process based on the average of both stereo channels" ) ); + smAvgButton->setToolTip(tr("Process based on the average of both stereo channels")); PixmapButton * smUnlButton = new PixmapButton( this, tr( "Stereo mode: unlinked" ) ); smUnlButton -> move( 131, 290 ); smUnlButton -> resize( 78, 17 ); smUnlButton -> setActiveGraphic( PLUGIN_NAME::getIconPixmap( "unl_active" ) ); smUnlButton -> setInactiveGraphic( PLUGIN_NAME::getIconPixmap( "unl_inactive" ) ); - ToolTip::add( smUnlButton, tr( "Process each stereo channel independently" ) ); + smUnlButton->setToolTip(tr("Process each stereo channel independently")); automatableButtonGroup * smGroup = new automatableButtonGroup( this ); smGroup -> addButton( smMaxButton ); diff --git a/plugins/FreeBoy/FreeBoy.cpp b/plugins/FreeBoy/FreeBoy.cpp index 976860f6c..55c7dd79b 100644 --- a/plugins/FreeBoy/FreeBoy.cpp +++ b/plugins/FreeBoy/FreeBoy.cpp @@ -34,7 +34,6 @@ #include "AudioEngine.h" #include "NotePlayHandle.h" #include "PixmapButton.h" -#include "ToolTip.h" #include "Engine.h" #include "Graph.h" @@ -466,31 +465,31 @@ FreeBoyInstrumentView::FreeBoyInstrumentView( Instrument * _instrument, m_ch1SweepTimeKnob = new FreeBoyKnob( this ); m_ch1SweepTimeKnob->setHintText( tr( "Sweep time:" ), "" ); m_ch1SweepTimeKnob->move( 5 + 4*32, 106 ); - ToolTip::add( m_ch1SweepTimeKnob, tr( "Sweep time" ) ); + m_ch1SweepTimeKnob->setToolTip(tr("Sweep time")); m_ch1SweepRtShiftKnob = new FreeBoyKnob( this ); m_ch1SweepRtShiftKnob->setHintText( tr( "Sweep rate shift amount:" ) , "" ); m_ch1SweepRtShiftKnob->move( 5 + 3*32, 106 ); - ToolTip::add( m_ch1SweepRtShiftKnob, tr( "Sweep rate shift amount" ) ); + m_ch1SweepRtShiftKnob->setToolTip(tr("Sweep rate shift amount")); m_ch1WavePatternDutyKnob = new FreeBoyKnob( this ); m_ch1WavePatternDutyKnob->setHintText( tr( "Wave pattern duty cycle:" ) , "" ); m_ch1WavePatternDutyKnob->move( 5 + 2*32, 106 ); - ToolTip::add( m_ch1WavePatternDutyKnob, tr( "Wave pattern duty cycle" ) ); + m_ch1WavePatternDutyKnob->setToolTip(tr("Wave pattern duty cycle")); m_ch1VolumeKnob = new FreeBoyKnob( this ); m_ch1VolumeKnob->setHintText( tr( "Square channel 1 volume:" ) , "" ); m_ch1VolumeKnob->move( 5, 106 ); - ToolTip::add( m_ch1VolumeKnob, tr( "Square channel 1 volume" ) ); + m_ch1VolumeKnob->setToolTip(tr("Square channel 1 volume")); m_ch1SweepStepLengthKnob = new FreeBoyKnob( this ); m_ch1SweepStepLengthKnob->setHintText( tr( "Length of each step in sweep:" ) , "" ); m_ch1SweepStepLengthKnob->move( 5 + 32, 106 ); - ToolTip::add( m_ch1SweepStepLengthKnob, tr( "Length of each step in sweep" ) ); + m_ch1SweepStepLengthKnob->setToolTip(tr("Length of each step in sweep")); @@ -498,61 +497,61 @@ FreeBoyInstrumentView::FreeBoyInstrumentView( Instrument * _instrument, m_ch2WavePatternDutyKnob->setHintText( tr( "Wave pattern duty cycle:" ) , "" ); m_ch2WavePatternDutyKnob->move( 5 + 2*32, 155 ); - ToolTip::add( m_ch2WavePatternDutyKnob, tr( "Wave pattern duty cycle" ) ); + m_ch2WavePatternDutyKnob->setToolTip(tr("Wave pattern duty cycle")); m_ch2VolumeKnob = new FreeBoyKnob( this ); m_ch2VolumeKnob->setHintText( tr( "Square channel 2 volume:" ) , "" ); m_ch2VolumeKnob->move( 5, 155 ); - ToolTip::add( m_ch2VolumeKnob, tr( "Square channel 2 volume" ) ); + m_ch2VolumeKnob->setToolTip(tr("Square channel 2 volume")); m_ch2SweepStepLengthKnob = new FreeBoyKnob( this ); m_ch2SweepStepLengthKnob->setHintText( tr( "Length of each step in sweep:" ) , "" ); m_ch2SweepStepLengthKnob->move( 5 + 32, 155 ); - ToolTip::add( m_ch2SweepStepLengthKnob, tr( "Length of each step in sweep" ) ); + m_ch2SweepStepLengthKnob->setToolTip(tr("Length of each step in sweep")); m_ch3VolumeKnob = new FreeBoyKnob( this ); m_ch3VolumeKnob->setHintText( tr( "Wave pattern channel volume:" ), "" ); m_ch3VolumeKnob->move( 5, 204 ); - ToolTip::add( m_ch3VolumeKnob, tr( "Wave pattern channel volume" ) ); + m_ch3VolumeKnob->setToolTip(tr("Wave pattern channel volume")); m_ch4VolumeKnob = new FreeBoyKnob( this ); m_ch4VolumeKnob->setHintText( tr( "Noise channel volume:" ), "" ); m_ch4VolumeKnob->move( 144, 155 ); - ToolTip::add( m_ch4VolumeKnob, tr( "Noise channel volume" ) ); + m_ch4VolumeKnob->setToolTip(tr("Noise channel volume")); m_ch4SweepStepLengthKnob = new FreeBoyKnob( this ); m_ch4SweepStepLengthKnob->setHintText( tr( "Length of each step in sweep:" ) , "" ); m_ch4SweepStepLengthKnob->move( 144 + 32, 155 ); - ToolTip::add( m_ch4SweepStepLengthKnob, tr( "Length of each step in sweep" ) ); + m_ch4SweepStepLengthKnob->setToolTip(tr("Length of each step in sweep")); m_so1VolumeKnob = new FreeBoyKnob( this ); m_so1VolumeKnob->setHintText( tr( "SO1 volume (Right):" ), "" ); m_so1VolumeKnob->move( 5, 58 ); - ToolTip::add( m_so1VolumeKnob, tr( "SO1 volume (Right)" ) ); + m_so1VolumeKnob->setToolTip(tr("SO1 volume (Right)")); m_so2VolumeKnob = new FreeBoyKnob( this ); m_so2VolumeKnob->setHintText( tr( "SO2 volume (Left):" ), "" ); m_so2VolumeKnob->move( 5 + 32, 58 ); - ToolTip::add( m_so2VolumeKnob, tr( "SO2 volume (Left)" ) ); + m_so2VolumeKnob->setToolTip(tr("SO2 volume (Left)")); m_trebleKnob = new FreeBoyKnob( this ); m_trebleKnob->setHintText( tr( "Treble:" ), "" ); m_trebleKnob->move( 5 + 2*32, 58 ); - ToolTip::add( m_trebleKnob, tr( "Treble" ) ); + m_trebleKnob->setToolTip(tr("Treble")); m_bassKnob = new FreeBoyKnob( this ); m_bassKnob->setHintText( tr( "Bass:" ), "" ); m_bassKnob->move( 5 + 3*32, 58 ); - ToolTip::add( m_bassKnob, tr( "Bass" ) ); + m_bassKnob->setToolTip(tr("Bass")); m_ch1SweepDirButton = new PixmapButton( this, nullptr ); m_ch1SweepDirButton->setCheckable( true ); @@ -561,7 +560,7 @@ FreeBoyInstrumentView::FreeBoyInstrumentView( Instrument * _instrument, PLUGIN_NAME::getIconPixmap( "btn_down" ) ); m_ch1SweepDirButton->setInactiveGraphic( PLUGIN_NAME::getIconPixmap( "btn_up" ) ); - ToolTip::add( m_ch1SweepDirButton, tr( "Sweep direction" ) ); + m_ch1SweepDirButton->setToolTip(tr("Sweep direction")); m_ch1VolSweepDirButton = new PixmapButton( this, nullptr ); m_ch1VolSweepDirButton->setCheckable( true ); @@ -570,7 +569,7 @@ FreeBoyInstrumentView::FreeBoyInstrumentView( Instrument * _instrument, PLUGIN_NAME::getIconPixmap( "btn_up" ) ); m_ch1VolSweepDirButton->setInactiveGraphic( PLUGIN_NAME::getIconPixmap( "btn_down" ) ); - ToolTip::add( m_ch1VolSweepDirButton, tr( "Volume sweep direction" ) ); + m_ch1VolSweepDirButton->setToolTip(tr("Volume sweep direction")); @@ -582,7 +581,7 @@ FreeBoyInstrumentView::FreeBoyInstrumentView( Instrument * _instrument, PLUGIN_NAME::getIconPixmap( "btn_up" ) ); m_ch2VolSweepDirButton->setInactiveGraphic( PLUGIN_NAME::getIconPixmap( "btn_down" ) ); - ToolTip::add( m_ch2VolSweepDirButton, tr( "Volume sweep direction" ) ); + m_ch2VolSweepDirButton->setToolTip(tr("Volume sweep direction")); //m_ch3OnButton = new PixmapButton( this, NULL ); //m_ch3OnButton->move( 176, 53 ); @@ -595,7 +594,7 @@ FreeBoyInstrumentView::FreeBoyInstrumentView( Instrument * _instrument, PLUGIN_NAME::getIconPixmap( "btn_up" ) ); m_ch4VolSweepDirButton->setInactiveGraphic( PLUGIN_NAME::getIconPixmap( "btn_down" ) ); - ToolTip::add( m_ch4VolSweepDirButton, tr( "Volume sweep direction" ) ); + m_ch4VolSweepDirButton->setToolTip(tr("Volume sweep direction")); m_ch4ShiftRegWidthButton = new PixmapButton( this, nullptr ); m_ch4ShiftRegWidthButton->setCheckable( true ); @@ -604,7 +603,7 @@ FreeBoyInstrumentView::FreeBoyInstrumentView( Instrument * _instrument, PLUGIN_NAME::getIconPixmap( "btn_7" ) ); m_ch4ShiftRegWidthButton->setInactiveGraphic( PLUGIN_NAME::getIconPixmap( "btn_15" ) ); - ToolTip::add( m_ch4ShiftRegWidthButton, tr( "Shift register width" ) ); + m_ch4ShiftRegWidthButton->setToolTip(tr("Shift register width")); @@ -614,21 +613,21 @@ FreeBoyInstrumentView::FreeBoyInstrumentView( Instrument * _instrument, m_ch1So1Button->move( 208, 51 ); m_ch1So1Button->setActiveGraphic( PLUGIN_NAME::getIconPixmap( "btn_on" ) ); m_ch1So1Button->setInactiveGraphic( PLUGIN_NAME::getIconPixmap("btn_off") ); - ToolTip::add( m_ch1So1Button, tr( "Channel 1 to SO1 (Right)" ) ); + m_ch1So1Button->setToolTip(tr("Channel 1 to SO1 (Right)")); m_ch2So1Button = new PixmapButton( this, nullptr ); m_ch2So1Button->setCheckable( true ); m_ch2So1Button->move( 208, 51 + 12 ); m_ch2So1Button->setActiveGraphic( PLUGIN_NAME::getIconPixmap( "btn_on" ) ); m_ch2So1Button->setInactiveGraphic( PLUGIN_NAME::getIconPixmap("btn_off") ); - ToolTip::add( m_ch2So1Button, tr( "Channel 2 to SO1 (Right)" ) ); + m_ch2So1Button->setToolTip(tr("Channel 2 to SO1 (Right)")); m_ch3So1Button = new PixmapButton( this, nullptr ); m_ch3So1Button->setCheckable( true ); m_ch3So1Button->move( 208, 51 + 2*12 ); m_ch3So1Button->setActiveGraphic( PLUGIN_NAME::getIconPixmap( "btn_on" ) ); m_ch3So1Button->setInactiveGraphic( PLUGIN_NAME::getIconPixmap("btn_off") ); - ToolTip::add( m_ch3So1Button, tr( "Channel 3 to SO1 (Right)" ) ); + m_ch3So1Button->setToolTip(tr("Channel 3 to SO1 (Right)")); m_ch4So1Button = new PixmapButton( this, nullptr ); m_ch4So1Button->setCheckable( true ); @@ -636,28 +635,28 @@ FreeBoyInstrumentView::FreeBoyInstrumentView( Instrument * _instrument, m_ch4So1Button->move( 208, 51 + 3*12 ); m_ch4So1Button->setActiveGraphic( PLUGIN_NAME::getIconPixmap( "btn_on" ) ); m_ch4So1Button->setInactiveGraphic( PLUGIN_NAME::getIconPixmap("btn_off") ); - ToolTip::add( m_ch4So1Button, tr( "Channel 4 to SO1 (Right)" ) ); + m_ch4So1Button->setToolTip(tr("Channel 4 to SO1 (Right)")); m_ch1So2Button = new PixmapButton( this, nullptr ); m_ch1So2Button->setCheckable( true ); m_ch1So2Button->move( 148, 51 ); m_ch1So2Button->setActiveGraphic( PLUGIN_NAME::getIconPixmap( "btn_on" ) ); m_ch1So2Button->setInactiveGraphic( PLUGIN_NAME::getIconPixmap("btn_off") ); - ToolTip::add( m_ch1So2Button, tr( "Channel 1 to SO2 (Left)" ) ); + m_ch1So2Button->setToolTip(tr("Channel 1 to SO2 (Left)")); m_ch2So2Button = new PixmapButton( this, nullptr ); m_ch2So2Button->setCheckable( true ); m_ch2So2Button->move( 148, 51 + 12 ); m_ch2So2Button->setActiveGraphic( PLUGIN_NAME::getIconPixmap( "btn_on" ) ); m_ch2So2Button->setInactiveGraphic( PLUGIN_NAME::getIconPixmap("btn_off") ); - ToolTip::add( m_ch2So2Button, tr( "Channel 2 to SO2 (Left)" ) ); + m_ch2So2Button->setToolTip(tr("Channel 2 to SO2 (Left)")); m_ch3So2Button = new PixmapButton( this, nullptr ); m_ch3So2Button->setCheckable( true ); m_ch3So2Button->move( 148, 51 + 2*12 ); m_ch3So2Button->setActiveGraphic( PLUGIN_NAME::getIconPixmap( "btn_on" ) ); m_ch3So2Button->setInactiveGraphic( PLUGIN_NAME::getIconPixmap("btn_off") ); - ToolTip::add( m_ch3So2Button, tr( "Channel 3 to SO2 (Left)" ) ); + m_ch3So2Button->setToolTip(tr("Channel 3 to SO2 (Left)")); m_ch4So2Button = new PixmapButton( this, nullptr ); m_ch4So2Button->setCheckable( true ); @@ -665,7 +664,7 @@ FreeBoyInstrumentView::FreeBoyInstrumentView( Instrument * _instrument, m_ch4So2Button->move( 148, 51 + 3*12 ); m_ch4So2Button->setActiveGraphic( PLUGIN_NAME::getIconPixmap( "btn_on" ) ); m_ch4So2Button->setInactiveGraphic( PLUGIN_NAME::getIconPixmap("btn_off") ); - ToolTip::add( m_ch4So2Button, tr( "Channel 4 to SO2 (Left)" ) ); + m_ch4So2Button->setToolTip(tr("Channel 4 to SO2 (Left)")); m_graph = new Graph( this ); @@ -673,7 +672,7 @@ FreeBoyInstrumentView::FreeBoyInstrumentView( Instrument * _instrument, m_graph->setGraphColor( QColor(0x4E, 0x83, 0x2B) ); m_graph->move( 37, 199 ); m_graph->resize(208, 47); - ToolTip::add( m_graph, tr( "Wave pattern graph" ) ); + m_graph->setToolTip(tr("Wave pattern graph")); } diff --git a/plugins/GigPlayer/GigPlayer.cpp b/plugins/GigPlayer/GigPlayer.cpp index feed428d1..b2239d895 100644 --- a/plugins/GigPlayer/GigPlayer.cpp +++ b/plugins/GigPlayer/GigPlayer.cpp @@ -50,7 +50,6 @@ #include "Song.h" #include "PatchesDialog.h" -#include "ToolTip.h" #include "LcdSpinBox.h" #include "embed.h" @@ -939,7 +938,7 @@ GigInstrumentView::GigInstrumentView( Instrument * _instrument, QWidget * _paren connect( m_fileDialogButton, SIGNAL( clicked() ), this, SLOT( showFileDialog() ) ); - ToolTip::add( m_fileDialogButton, tr( "Open GIG file" ) ); + m_fileDialogButton->setToolTip(tr("Open GIG file")); // Patch Button m_patchDialogButton = new PixmapButton( this ); @@ -951,7 +950,7 @@ GigInstrumentView::GigInstrumentView( Instrument * _instrument, QWidget * _paren connect( m_patchDialogButton, SIGNAL( clicked() ), this, SLOT( showPatchDialog() ) ); - ToolTip::add( m_patchDialogButton, tr( "Choose patch" ) ); + m_patchDialogButton->setToolTip(tr("Choose patch")); // LCDs m_bankNumLcd = new LcdSpinBox( 3, "21pink", this ); diff --git a/plugins/Lb302/Lb302.cpp b/plugins/Lb302/Lb302.cpp index ace654596..949f85510 100644 --- a/plugins/Lb302/Lb302.cpp +++ b/plugins/Lb302/Lb302.cpp @@ -42,7 +42,6 @@ #include "NotePlayHandle.h" #include "Oscillator.h" #include "PixmapButton.h" -#include "ToolTip.h" #include "BandLimitedWave.h" #include "embed.h" @@ -845,7 +844,7 @@ Lb302SynthView::Lb302SynthView( Instrument * _instrument, QWidget * _parent ) : m_db24Toggle = new LedCheckBox( "", this ); m_db24Toggle->move( 10, 150); - ToolTip::add( m_db24Toggle, + m_db24Toggle->setToolTip( tr( "303-es-que, 24dB/octave, 3 pole filter" ) ); @@ -870,7 +869,7 @@ Lb302SynthView::Lb302SynthView( Instrument * _instrument, QWidget * _parent ) : "saw_wave_active" ) ); sawWaveBtn->setInactiveGraphic( embed::getIconPixmap( "saw_wave_inactive" ) ); - ToolTip::add( sawWaveBtn, + sawWaveBtn->setToolTip( tr( "Click here for a saw-wave." ) ); PixmapButton * triangleWaveBtn = @@ -880,7 +879,7 @@ Lb302SynthView::Lb302SynthView( Instrument * _instrument, QWidget * _parent ) : embed::getIconPixmap( "triangle_wave_active" ) ); triangleWaveBtn->setInactiveGraphic( embed::getIconPixmap( "triangle_wave_inactive" ) ); - ToolTip::add( triangleWaveBtn, + triangleWaveBtn->setToolTip( tr( "Click here for a triangle-wave." ) ); PixmapButton * sqrWaveBtn = new PixmapButton( this, tr( "Square wave" ) ); @@ -889,7 +888,7 @@ Lb302SynthView::Lb302SynthView( Instrument * _instrument, QWidget * _parent ) : "square_wave_active" ) ); sqrWaveBtn->setInactiveGraphic( embed::getIconPixmap( "square_wave_inactive" ) ); - ToolTip::add( sqrWaveBtn, + sqrWaveBtn->setToolTip( tr( "Click here for a square-wave." ) ); PixmapButton * roundSqrWaveBtn = @@ -899,7 +898,7 @@ Lb302SynthView::Lb302SynthView( Instrument * _instrument, QWidget * _parent ) : "round_square_wave_active" ) ); roundSqrWaveBtn->setInactiveGraphic( embed::getIconPixmap( "round_square_wave_inactive" ) ); - ToolTip::add( roundSqrWaveBtn, + roundSqrWaveBtn->setToolTip( tr( "Click here for a square-wave with a rounded end." ) ); PixmapButton * moogWaveBtn = @@ -909,7 +908,7 @@ Lb302SynthView::Lb302SynthView( Instrument * _instrument, QWidget * _parent ) : embed::getIconPixmap( "moog_saw_wave_active" ) ); moogWaveBtn->setInactiveGraphic( embed::getIconPixmap( "moog_saw_wave_inactive" ) ); - ToolTip::add( moogWaveBtn, + moogWaveBtn->setToolTip( tr( "Click here for a moog-like wave." ) ); PixmapButton * sinWaveBtn = new PixmapButton( this, tr( "Sine wave" ) ); @@ -918,7 +917,7 @@ Lb302SynthView::Lb302SynthView( Instrument * _instrument, QWidget * _parent ) : "sin_wave_active" ) ); sinWaveBtn->setInactiveGraphic( embed::getIconPixmap( "sin_wave_inactive" ) ); - ToolTip::add( sinWaveBtn, + sinWaveBtn->setToolTip( tr( "Click for a sine-wave." ) ); PixmapButton * exponentialWaveBtn = @@ -928,7 +927,7 @@ Lb302SynthView::Lb302SynthView( Instrument * _instrument, QWidget * _parent ) : embed::getIconPixmap( "exp_wave_active" ) ); exponentialWaveBtn->setInactiveGraphic( embed::getIconPixmap( "exp_wave_inactive" ) ); - ToolTip::add( exponentialWaveBtn, + exponentialWaveBtn->setToolTip( tr( "Click here for an exponential wave." ) ); @@ -939,7 +938,7 @@ Lb302SynthView::Lb302SynthView( Instrument * _instrument, QWidget * _parent ) : embed::getIconPixmap( "white_noise_wave_active" ) ); whiteNoiseWaveBtn->setInactiveGraphic( embed::getIconPixmap( "white_noise_wave_inactive" ) ); - ToolTip::add( whiteNoiseWaveBtn, + whiteNoiseWaveBtn->setToolTip( tr( "Click here for white-noise." ) ); PixmapButton * blSawWaveBtn = @@ -949,7 +948,7 @@ Lb302SynthView::Lb302SynthView( Instrument * _instrument, QWidget * _parent ) : embed::getIconPixmap( "saw_wave_active" ) ); blSawWaveBtn->setInactiveGraphic( embed::getIconPixmap( "saw_wave_inactive" ) ); - ToolTip::add( blSawWaveBtn, + blSawWaveBtn->setToolTip( tr( "Click here for bandlimited saw wave." ) ); PixmapButton * blSquareWaveBtn = @@ -959,7 +958,7 @@ Lb302SynthView::Lb302SynthView( Instrument * _instrument, QWidget * _parent ) : embed::getIconPixmap( "square_wave_active" ) ); blSquareWaveBtn->setInactiveGraphic( embed::getIconPixmap( "square_wave_inactive" ) ); - ToolTip::add( blSquareWaveBtn, + blSquareWaveBtn->setToolTip( tr( "Click here for bandlimited square wave." ) ); PixmapButton * blTriangleWaveBtn = @@ -969,7 +968,7 @@ Lb302SynthView::Lb302SynthView( Instrument * _instrument, QWidget * _parent ) : embed::getIconPixmap( "triangle_wave_active" ) ); blTriangleWaveBtn->setInactiveGraphic( embed::getIconPixmap( "triangle_wave_inactive" ) ); - ToolTip::add( blTriangleWaveBtn, + blTriangleWaveBtn->setToolTip( tr( "Click here for bandlimited triangle wave." ) ); PixmapButton * blMoogWaveBtn = @@ -979,7 +978,7 @@ Lb302SynthView::Lb302SynthView( Instrument * _instrument, QWidget * _parent ) : embed::getIconPixmap( "moog_saw_wave_active" ) ); blMoogWaveBtn->setInactiveGraphic( embed::getIconPixmap( "moog_saw_wave_inactive" ) ); - ToolTip::add( blMoogWaveBtn, + blMoogWaveBtn->setToolTip( tr( "Click here for bandlimited moog saw wave." ) ); diff --git a/plugins/Monstro/Monstro.cpp b/plugins/Monstro/Monstro.cpp index 90ce43c8c..e95b05030 100644 --- a/plugins/Monstro/Monstro.cpp +++ b/plugins/Monstro/Monstro.cpp @@ -31,7 +31,6 @@ #include "Engine.h" #include "InstrumentTrack.h" #include "gui_templates.h" -#include "ToolTip.h" #include "lmms_math.h" #include "interpolation.h" @@ -1466,13 +1465,13 @@ MonstroView::MonstroView( Instrument * _instrument, m_opViewButton -> move( 0,0 ); m_opViewButton -> setActiveGraphic( PLUGIN_NAME::getIconPixmap( "opview_active" ) ); m_opViewButton -> setInactiveGraphic( PLUGIN_NAME::getIconPixmap( "opview_inactive" ) ); - ToolTip::add( m_opViewButton, tr( "Operators view" ) ); + m_opViewButton->setToolTip(tr("Operators view")); PixmapButton * m_matViewButton = new PixmapButton( this, nullptr ); m_matViewButton -> move( 125,0 ); m_matViewButton -> setActiveGraphic( PLUGIN_NAME::getIconPixmap( "matview_active" ) ); m_matViewButton -> setInactiveGraphic( PLUGIN_NAME::getIconPixmap( "matview_inactive" ) ); - ToolTip::add( m_matViewButton, tr( "Matrix view" ) ); + m_matViewButton->setToolTip(tr("Matrix view")); m_selectedViewGroup = new automatableButtonGroup( this ); m_selectedViewGroup -> addButton( m_opViewButton ); @@ -1727,25 +1726,25 @@ QWidget * MonstroView::setupOperatorsView( QWidget * _parent ) m_mixButton -> move( 225, 185 ); m_mixButton -> setActiveGraphic( PLUGIN_NAME::getIconPixmap( "mix_active" ) ); m_mixButton -> setInactiveGraphic( PLUGIN_NAME::getIconPixmap( "mix_inactive" ) ); - ToolTip::add( m_mixButton, tr( "Mix osc 2 with osc 3" ) ); + m_mixButton->setToolTip(tr("Mix osc 2 with osc 3")); PixmapButton * m_amButton = new PixmapButton( view, nullptr ); m_amButton -> move( 225, 185 + 15 ); m_amButton -> setActiveGraphic( PLUGIN_NAME::getIconPixmap( "am_active" ) ); m_amButton -> setInactiveGraphic( PLUGIN_NAME::getIconPixmap( "am_inactive" ) ); - ToolTip::add( m_amButton, tr( "Modulate amplitude of osc 3 by osc 2" ) ); + m_amButton->setToolTip(tr("Modulate amplitude of osc 3 by osc 2")); PixmapButton * m_fmButton = new PixmapButton( view, nullptr ); m_fmButton -> move( 225, 185 + 15*2 ); m_fmButton -> setActiveGraphic( PLUGIN_NAME::getIconPixmap( "fm_active" ) ); m_fmButton -> setInactiveGraphic( PLUGIN_NAME::getIconPixmap( "fm_inactive" ) ); - ToolTip::add( m_fmButton, tr( "Modulate frequency of osc 3 by osc 2" ) ); + m_fmButton->setToolTip(tr("Modulate frequency of osc 3 by osc 2")); PixmapButton * m_pmButton = new PixmapButton( view, nullptr ); m_pmButton -> move( 225, 185 + 15*3 ); m_pmButton -> setActiveGraphic( PLUGIN_NAME::getIconPixmap( "pm_active" ) ); m_pmButton -> setInactiveGraphic( PLUGIN_NAME::getIconPixmap( "pm_inactive" ) ); - ToolTip::add( m_pmButton, tr( "Modulate phase of osc 3 by osc 2" ) ); + m_pmButton->setToolTip(tr("Modulate phase of osc 3 by osc 2")); m_o23ModGroup = new automatableButtonGroup( view ); m_o23ModGroup-> addButton( m_mixButton ); diff --git a/plugins/Monstro/Monstro.h b/plugins/Monstro/Monstro.h index c535fc92c..98c5d6600 100644 --- a/plugins/Monstro/Monstro.h +++ b/plugins/Monstro/Monstro.h @@ -64,7 +64,7 @@ class ComboBox; name -> move( x, y ); \ name -> setActiveGraphic( PLUGIN_NAME::getIconPixmap( "tinyled_on" ) ); \ name -> setInactiveGraphic( PLUGIN_NAME::getIconPixmap( "tinyled_off" ) ); \ - ToolTip::add( name, ttip ); + name->setToolTip(ttip); // UI constants const int O1ROW = 22; diff --git a/plugins/MultitapEcho/MultitapEchoControlDialog.cpp b/plugins/MultitapEcho/MultitapEchoControlDialog.cpp index c71c69a6d..ac8f480da 100644 --- a/plugins/MultitapEcho/MultitapEchoControlDialog.cpp +++ b/plugins/MultitapEcho/MultitapEchoControlDialog.cpp @@ -28,7 +28,6 @@ #include "MultitapEchoControls.h" #include "embed.h" #include "Graph.h" -#include "ToolTip.h" #include "LedCheckBox.h" #include "Knob.h" #include "TempoSyncKnob.h" @@ -98,5 +97,5 @@ MultitapEchoControlDialog::MultitapEchoControlDialog( MultitapEchoControls * con LedCheckBox * swapInputs = new LedCheckBox( "Swap inputs", this, tr( "Swap inputs" ), LedCheckBox::Green ); swapInputs->move( 20, 275 ); swapInputs->setModel( & controls->m_swapInputs ); - ToolTip::add( swapInputs, tr( "Swap left and right input channels for reflections" ) ); + swapInputs->setToolTip(tr("Swap left and right input channels for reflections")); } diff --git a/plugins/Nes/Nes.cpp b/plugins/Nes/Nes.cpp index fb18a8fe0..a84f6e6a4 100644 --- a/plugins/Nes/Nes.cpp +++ b/plugins/Nes/Nes.cpp @@ -32,7 +32,6 @@ #include "interpolation.h" #include "Knob.h" #include "Oscillator.h" -#include "ToolTip.h" #include "embed.h" #include "plugin_export.h" diff --git a/plugins/Nes/Nes.h b/plugins/Nes/Nes.h index 9d4ca5357..f17265c14 100644 --- a/plugins/Nes/Nes.h +++ b/plugins/Nes/Nes.h @@ -47,14 +47,14 @@ name -> move( x, y ); \ name -> setActiveGraphic( PLUGIN_NAME::getIconPixmap( "nesled_on" ) ); \ name -> setInactiveGraphic( PLUGIN_NAME::getIconPixmap( "nesled_off" ) ); \ - ToolTip::add( name, ttip ); + name->setToolTip(ttip); #define makedcled( name, x, y, ttip, active ) \ PixmapButton * name = new PixmapButton( this, nullptr ); \ name -> move( x, y ); \ name -> setActiveGraphic( PLUGIN_NAME::getIconPixmap( active ) ); \ name -> setInactiveGraphic( PLUGIN_NAME::getIconPixmap( "nesdc_off" ) ); \ - ToolTip::add( name, ttip ); + name->setToolTip(ttip); const float NES_SIMPLE_FILTER = 1.0 / 20.0; // simulate nes analog audio output const float NFB = 895000.0f; diff --git a/plugins/OpulenZ/OpulenZ.cpp b/plugins/OpulenZ/OpulenZ.cpp index b09d2c60b..da85e2d02 100644 --- a/plugins/OpulenZ/OpulenZ.cpp +++ b/plugins/OpulenZ/OpulenZ.cpp @@ -55,7 +55,6 @@ #include "Knob.h" #include "PixmapButton.h" -#include "ToolTip.h" #include "plugin_export.h" @@ -695,14 +694,14 @@ OpulenzInstrumentView::OpulenzInstrumentView( Instrument * _instrument, buttname->setActiveGraphic( PLUGIN_NAME::getIconPixmap( "led_on" ) );\ buttname->setInactiveGraphic( PLUGIN_NAME::getIconPixmap( "led_off" ) );\ buttname->setCheckable( true );\ - ToolTip::add( buttname, tr( tooltip ) );\ + buttname->setToolTip(tr(tooltip));\ buttname->move( xpos, ypos ); #define WAVEBUTTON_GEN(buttname, tooltip, xpos, ypos, icon_on, icon_off, buttgroup) \ buttname = new PixmapButton( this, nullptr );\ buttname->setActiveGraphic( PLUGIN_NAME::getIconPixmap( icon_on ) ); \ buttname->setInactiveGraphic( PLUGIN_NAME::getIconPixmap( icon_off ) ); \ - ToolTip::add( buttname, tr( tooltip ) );\ + buttname->setToolTip(tr(tooltip));\ buttname->move( xpos, ypos );\ buttgroup->addButton(buttname); diff --git a/plugins/Patman/Patman.cpp b/plugins/Patman/Patman.cpp index 63f41fe71..9268b2919 100644 --- a/plugins/Patman/Patman.cpp +++ b/plugins/Patman/Patman.cpp @@ -40,7 +40,6 @@ #include "PixmapButton.h" #include "Song.h" #include "StringPairDrag.h" -#include "ToolTip.h" #include "Clipboard.h" #include "embed.h" @@ -463,7 +462,7 @@ PatmanView::PatmanView( Instrument * _instrument, QWidget * _parent ) : "select_file" ) ); connect( m_openFileButton, SIGNAL( clicked() ), this, SLOT( openFile() ) ); - ToolTip::add( m_openFileButton, tr( "Open patch" ) ); + m_openFileButton->setToolTip(tr("Open patch")); m_loopButton = new PixmapButton( this, tr( "Loop" ) ); m_loopButton->setObjectName("loopButton"); @@ -473,7 +472,7 @@ PatmanView::PatmanView( Instrument * _instrument, QWidget * _parent ) : "loop_on" ) ); m_loopButton->setInactiveGraphic( PLUGIN_NAME::getIconPixmap( "loop_off" ) ); - ToolTip::add( m_loopButton, tr( "Loop mode" ) ); + m_loopButton->setToolTip(tr("Loop mode")); m_tuneButton = new PixmapButton( this, tr( "Tune" ) ); m_tuneButton->setObjectName("tuneButton"); @@ -483,7 +482,7 @@ PatmanView::PatmanView( Instrument * _instrument, QWidget * _parent ) : "tune_on" ) ); m_tuneButton->setInactiveGraphic( PLUGIN_NAME::getIconPixmap( "tune_off" ) ); - ToolTip::add( m_tuneButton, tr( "Tune mode" ) ); + m_tuneButton->setToolTip(tr("Tune mode")); m_displayFilename = tr( "No file selected" ); diff --git a/plugins/Sf2Player/Sf2Player.cpp b/plugins/Sf2Player/Sf2Player.cpp index 7d6fa57ec..ee9156a0b 100644 --- a/plugins/Sf2Player/Sf2Player.cpp +++ b/plugins/Sf2Player/Sf2Player.cpp @@ -44,7 +44,6 @@ #include "fluidsynthshims.h" #include "PatchesDialog.h" -#include "ToolTip.h" #include "LcdSpinBox.h" #include "embed.h" @@ -918,7 +917,7 @@ Sf2InstrumentView::Sf2InstrumentView( Instrument * _instrument, QWidget * _paren connect( m_fileDialogButton, SIGNAL( clicked() ), this, SLOT( showFileDialog() ) ); - ToolTip::add( m_fileDialogButton, tr( "Open SoundFont file" ) ); + m_fileDialogButton->setToolTip(tr("Open SoundFont file")); // Patch Button m_patchDialogButton = new PixmapButton( this ); @@ -930,7 +929,7 @@ Sf2InstrumentView::Sf2InstrumentView( Instrument * _instrument, QWidget * _paren connect( m_patchDialogButton, SIGNAL( clicked() ), this, SLOT( showPatchDialog() ) ); - ToolTip::add( m_patchDialogButton, tr( "Choose patch" ) ); + m_patchDialogButton->setToolTip(tr("Choose patch")); // LCDs @@ -978,7 +977,7 @@ Sf2InstrumentView::Sf2InstrumentView( Instrument * _instrument, QWidget * _paren m_reverbButton->move( 14, 180 ); m_reverbButton->setActiveGraphic( PLUGIN_NAME::getIconPixmap( "reverb_on" ) ); m_reverbButton->setInactiveGraphic( PLUGIN_NAME::getIconPixmap( "reverb_off" ) ); - ToolTip::add( m_reverbButton, tr( "Apply reverb (if supported)" ) ); + m_reverbButton->setToolTip(tr("Apply reverb (if supported)")); m_reverbRoomSizeKnob = new Sf2Knob( this ); @@ -1014,7 +1013,7 @@ Sf2InstrumentView::Sf2InstrumentView( Instrument * _instrument, QWidget * _paren m_chorusButton->move( 14, 226 ); m_chorusButton->setActiveGraphic( PLUGIN_NAME::getIconPixmap( "chorus_on" ) ); m_chorusButton->setInactiveGraphic( PLUGIN_NAME::getIconPixmap( "chorus_off" ) ); - ToolTip::add( m_chorusButton, tr( "Apply chorus (if supported)" ) ); + m_chorusButton->setToolTip(tr("Apply chorus (if supported)")); m_chorusNumKnob = new Sf2Knob( this ); m_chorusNumKnob->setHintText( tr("Voices:"), "" ); diff --git a/plugins/Sfxr/Sfxr.cpp b/plugins/Sfxr/Sfxr.cpp index 08d7e3c61..cdce50430 100644 --- a/plugins/Sfxr/Sfxr.cpp +++ b/plugins/Sfxr/Sfxr.cpp @@ -46,7 +46,6 @@ float frnd(float range) #include "Knob.h" #include "NotePlayHandle.h" #include "PixmapButton.h" -#include "ToolTip.h" #include "MidiEvent.h" #include "embed.h" @@ -572,7 +571,7 @@ public: _knob = new SfxrKnob( this ); \ _knob->setHintText( tr( _name ":" ), "" ); \ _knob->move( _x, _y ); \ - ToolTip::add( _knob, tr( _name ) ); + _knob->setToolTip(tr(_name)); @@ -582,7 +581,7 @@ public: _button->move( _x, _y );\ _button->setActiveGraphic( embed::getIconPixmap( _resName "_active" ) );\ _button->setInactiveGraphic( embed::getIconPixmap( _resName "_inactive" ) );\ - ToolTip::add( _button, tr( _name ) ); + _button->setToolTip(tr(_name)); @@ -592,7 +591,7 @@ public: _button->move( _x, _y );\ _button->setActiveGraphic( PLUGIN_NAME::getIconPixmap( _resName "_active" ) );\ _button->setInactiveGraphic( PLUGIN_NAME::getIconPixmap( _resName "_inactive" ) );\ - ToolTip::add( _button, tr( _name ) ); + _button->setToolTip(tr(_name)); diff --git a/plugins/Sid/SidInstrument.cpp b/plugins/Sid/SidInstrument.cpp index 58b5fcf49..32b0d7a24 100644 --- a/plugins/Sid/SidInstrument.cpp +++ b/plugins/Sid/SidInstrument.cpp @@ -38,7 +38,6 @@ #include "Knob.h" #include "NotePlayHandle.h" #include "PixmapButton.h" -#include "ToolTip.h" #include "embed.h" #include "plugin_export.h" @@ -506,19 +505,19 @@ SidInstrumentView::SidInstrumentView( Instrument * _instrument, hp_btn->move( 140, 77 ); hp_btn->setActiveGraphic( PLUGIN_NAME::getIconPixmap( "hpred" ) ); hp_btn->setInactiveGraphic( PLUGIN_NAME::getIconPixmap( "hp" ) ); - ToolTip::add( hp_btn, tr( "High-pass filter ") ); + hp_btn->setToolTip(tr("High-pass filter ")); PixmapButton * bp_btn = new PixmapButton( this, nullptr ); bp_btn->move( 164, 77 ); bp_btn->setActiveGraphic( PLUGIN_NAME::getIconPixmap( "bpred" ) ); bp_btn->setInactiveGraphic( PLUGIN_NAME::getIconPixmap( "bp" ) ); - ToolTip::add( bp_btn, tr( "Band-pass filter ") ); + bp_btn->setToolTip(tr("Band-pass filter ")); PixmapButton * lp_btn = new PixmapButton( this, nullptr ); lp_btn->move( 185, 77 ); lp_btn->setActiveGraphic( PLUGIN_NAME::getIconPixmap( "lpred" ) ); lp_btn->setInactiveGraphic( PLUGIN_NAME::getIconPixmap( "lp" ) ); - ToolTip::add( lp_btn, tr( "Low-pass filter ") ); + lp_btn->setToolTip(tr("Low-pass filter ")); m_passBtnGrp = new automatableButtonGroup( this ); m_passBtnGrp->addButton( hp_btn ); @@ -530,19 +529,19 @@ SidInstrumentView::SidInstrumentView( Instrument * _instrument, m_offButton->move( 207, 77 ); m_offButton->setActiveGraphic( PLUGIN_NAME::getIconPixmap( "3offred" ) ); m_offButton->setInactiveGraphic( PLUGIN_NAME::getIconPixmap( "3off" ) ); - ToolTip::add( m_offButton, tr( "Voice 3 off ") ); + m_offButton->setToolTip(tr("Voice 3 off ")); PixmapButton * mos6581_btn = new PixmapButton( this, nullptr ); mos6581_btn->move( 170, 59 ); mos6581_btn->setActiveGraphic( PLUGIN_NAME::getIconPixmap( "6581red" ) ); mos6581_btn->setInactiveGraphic( PLUGIN_NAME::getIconPixmap( "6581" ) ); - ToolTip::add( mos6581_btn, tr( "MOS6581 SID ") ); + mos6581_btn->setToolTip(tr("MOS6581 SID ")); PixmapButton * mos8580_btn = new PixmapButton( this, nullptr ); mos8580_btn->move( 207, 59 ); mos8580_btn->setActiveGraphic( PLUGIN_NAME::getIconPixmap( "8580red" ) ); mos8580_btn->setInactiveGraphic( PLUGIN_NAME::getIconPixmap( "8580" ) ); - ToolTip::add( mos8580_btn, tr( "MOS8580 SID ") ); + mos8580_btn->setToolTip(tr("MOS8580 SID ")); m_sidTypeBtnGrp = new automatableButtonGroup( this ); m_sidTypeBtnGrp->addButton( mos6581_btn ); @@ -580,7 +579,7 @@ SidInstrumentView::SidInstrumentView( Instrument * _instrument, PLUGIN_NAME::getIconPixmap( "pulsered" ) ); pulse_btn->setInactiveGraphic( PLUGIN_NAME::getIconPixmap( "pulse" ) ); - ToolTip::add( pulse_btn, tr( "Pulse wave" ) ); + pulse_btn->setToolTip(tr("Pulse wave")); PixmapButton * triangle_btn = new PixmapButton( this, nullptr ); triangle_btn->move( 168, 101 + i*50 ); @@ -588,7 +587,7 @@ SidInstrumentView::SidInstrumentView( Instrument * _instrument, PLUGIN_NAME::getIconPixmap( "trianglered" ) ); triangle_btn->setInactiveGraphic( PLUGIN_NAME::getIconPixmap( "triangle" ) ); - ToolTip::add( triangle_btn, tr( "Triangle wave" ) ); + triangle_btn->setToolTip(tr("Triangle wave")); PixmapButton * saw_btn = new PixmapButton( this, nullptr ); saw_btn->move( 207, 101 + i*50 ); @@ -596,7 +595,7 @@ SidInstrumentView::SidInstrumentView( Instrument * _instrument, PLUGIN_NAME::getIconPixmap( "sawred" ) ); saw_btn->setInactiveGraphic( PLUGIN_NAME::getIconPixmap( "saw" ) ); - ToolTip::add( saw_btn, tr( "Saw wave" ) ); + saw_btn->setToolTip(tr("Saw wave")); PixmapButton * noise_btn = new PixmapButton( this, nullptr ); noise_btn->move( 226, 101 + i*50 ); @@ -604,7 +603,7 @@ SidInstrumentView::SidInstrumentView( Instrument * _instrument, PLUGIN_NAME::getIconPixmap( "noisered" ) ); noise_btn->setInactiveGraphic( PLUGIN_NAME::getIconPixmap( "noise" ) ); - ToolTip::add( noise_btn, tr( "Noise" ) ); + noise_btn->setToolTip(tr("Noise")); automatableButtonGroup * wfbg = new automatableButtonGroup( this ); @@ -621,7 +620,7 @@ SidInstrumentView::SidInstrumentView( Instrument * _instrument, PLUGIN_NAME::getIconPixmap( "syncred" ) ); sync_btn->setInactiveGraphic( PLUGIN_NAME::getIconPixmap( "sync" ) ); - ToolTip::add( sync_btn, tr( "Sync" ) ); + sync_btn->setToolTip(tr("Sync")); PixmapButton * ringMod_btn = new PixmapButton( this, nullptr ); ringMod_btn->setCheckable( true ); @@ -630,7 +629,7 @@ SidInstrumentView::SidInstrumentView( Instrument * _instrument, PLUGIN_NAME::getIconPixmap( "ringred" ) ); ringMod_btn->setInactiveGraphic( PLUGIN_NAME::getIconPixmap( "ring" ) ); - ToolTip::add( ringMod_btn, tr( "Ring modulation" ) ); + ringMod_btn->setToolTip(tr("Ring modulation")); PixmapButton * filter_btn = new PixmapButton( this, nullptr ); filter_btn->setCheckable( true ); @@ -639,7 +638,7 @@ SidInstrumentView::SidInstrumentView( Instrument * _instrument, PLUGIN_NAME::getIconPixmap( "filterred" ) ); filter_btn->setInactiveGraphic( PLUGIN_NAME::getIconPixmap( "filter" ) ); - ToolTip::add( filter_btn, tr( "Filtered" ) ); + filter_btn->setToolTip(tr("Filtered")); PixmapButton * test_btn = new PixmapButton( this, nullptr ); test_btn->setCheckable( true ); @@ -648,7 +647,7 @@ SidInstrumentView::SidInstrumentView( Instrument * _instrument, PLUGIN_NAME::getIconPixmap( "testred" ) ); test_btn->setInactiveGraphic( PLUGIN_NAME::getIconPixmap( "test" ) ); - ToolTip::add( test_btn, tr( "Test" ) ); + test_btn->setToolTip(tr("Test")); m_voiceKnobs[i] = voiceKnobs( ak, dk, sk, rk, pwk, crsk, wfbg, sync_btn, ringMod_btn, filter_btn, test_btn ); @@ -669,32 +668,32 @@ void SidInstrumentView::updateKnobHint() m_voiceKnobs[i].m_attKnob->setHintText( tr( "Attack:" ) + " ", " (" + QString::fromLatin1( attackTime[(int)k->m_voice[i]-> m_attackModel.value()] ) + ")" ); - ToolTip::add( m_voiceKnobs[i].m_attKnob, + m_voiceKnobs[i].m_attKnob->setToolTip( attackTime[(int)k->m_voice[i]->m_attackModel.value()] ); m_voiceKnobs[i].m_decKnob->setHintText( tr( "Decay:" ) + " ", " (" + QString::fromLatin1( decRelTime[(int)k->m_voice[i]-> m_decayModel.value()] ) + ")" ); - ToolTip::add( m_voiceKnobs[i].m_decKnob, + m_voiceKnobs[i].m_decKnob->setToolTip( decRelTime[(int)k->m_voice[i]->m_decayModel.value()] ); m_voiceKnobs[i].m_relKnob->setHintText( tr( "Release:" ) + " ", " (" + QString::fromLatin1( decRelTime[(int)k->m_voice[i]-> m_releaseModel.value()] ) + ")" ); - ToolTip::add( m_voiceKnobs[i].m_relKnob, + m_voiceKnobs[i].m_relKnob->setToolTip( decRelTime[(int)k->m_voice[i]->m_releaseModel.value()]); m_voiceKnobs[i].m_pwKnob->setHintText( tr( "Pulse width:" )+ " ", " (" + QString::number( (double)k->m_voice[i]-> m_pulseWidthModel.value() / 40.95 ) + "%)" ); - ToolTip::add( m_voiceKnobs[i].m_pwKnob, + m_voiceKnobs[i].m_pwKnob->setToolTip( QString::number( (double)k->m_voice[i]-> m_pulseWidthModel.value() / 40.95 ) + "%" ); } m_cutKnob->setHintText( tr( "Cutoff frequency:" ) + " ", " (" + QString::number ( (int) ( 9970.0 / 2047.0 * (double)k->m_filterFCModel.value() + 30.0 ) ) + " Hz)" ); - ToolTip::add( m_cutKnob, QString::number( (int) ( 9970.0 / 2047.0 * + m_cutKnob->setToolTip(QString::number((int) (9970.0 / 2047.0 * (double)k->m_filterFCModel.value() + 30.0 ) ) + " Hz" ); } @@ -706,15 +705,15 @@ void SidInstrumentView::updateKnobToolTip() SidInstrument * k = castModel(); for( int i = 0; i < 3; ++i ) { - ToolTip::add( m_voiceKnobs[i].m_sustKnob, + m_voiceKnobs[i].m_sustKnob->setToolTip( QString::number( (int)k->m_voice[i]->m_sustainModel.value() ) ); - ToolTip::add( m_voiceKnobs[i].m_crsKnob, + m_voiceKnobs[i].m_crsKnob->setToolTip( QString::number( (int)k->m_voice[i]->m_coarseModel.value() ) + " semitones" ); } - ToolTip::add( m_volKnob, + m_volKnob->setToolTip( QString::number( (int)k->m_volumeModel.value() ) ); - ToolTip::add( m_resKnob, + m_resKnob->setToolTip( QString::number( (int)k->m_filterResonanceModel.value() ) ); } diff --git a/plugins/TripleOscillator/TripleOscillator.cpp b/plugins/TripleOscillator/TripleOscillator.cpp index 29f5fbce5..897b03586 100644 --- a/plugins/TripleOscillator/TripleOscillator.cpp +++ b/plugins/TripleOscillator/TripleOscillator.cpp @@ -37,7 +37,6 @@ #include "Oscillator.h" #include "PixmapButton.h" #include "SampleBuffer.h" -#include "ToolTip.h" #include "embed.h" #include "plugin_export.h" @@ -147,7 +146,7 @@ void OscillatorObject::oscUserDefWaveDblClick() if( af != "" ) { // TODO: - //ToolTip::add( m_usrWaveBtn, m_sampleBuffer->audioFile() ); + //m_usrWaveBtn->setToolTip(m_sampleBuffer->audioFile()); } } @@ -459,7 +458,7 @@ TripleOscillatorView::TripleOscillatorView( Instrument * _instrument, "pm_active" ) ); pm_osc1_btn->setInactiveGraphic( PLUGIN_NAME::getIconPixmap( "pm_inactive" ) ); - ToolTip::add( pm_osc1_btn, tr( "Modulate phase of oscillator 1 by oscillator 2" ) ); + pm_osc1_btn->setToolTip(tr("Modulate phase of oscillator 1 by oscillator 2")); PixmapButton * am_osc1_btn = new PixmapButton( this, nullptr ); am_osc1_btn->move( mod_x + 35, mod1_y ); @@ -467,7 +466,7 @@ TripleOscillatorView::TripleOscillatorView( Instrument * _instrument, "am_active" ) ); am_osc1_btn->setInactiveGraphic( PLUGIN_NAME::getIconPixmap( "am_inactive" ) ); - ToolTip::add( am_osc1_btn, tr( "Modulate amplitude of oscillator 1 by oscillator 2" ) ); + am_osc1_btn->setToolTip(tr("Modulate amplitude of oscillator 1 by oscillator 2")); PixmapButton * mix_osc1_btn = new PixmapButton( this, nullptr ); mix_osc1_btn->move( mod_x + 70, mod1_y ); @@ -475,7 +474,7 @@ TripleOscillatorView::TripleOscillatorView( Instrument * _instrument, "mix_active" ) ); mix_osc1_btn->setInactiveGraphic( PLUGIN_NAME::getIconPixmap( "mix_inactive" ) ); - ToolTip::add( mix_osc1_btn, tr( "Mix output of oscillators 1 & 2" ) ); + mix_osc1_btn->setToolTip(tr("Mix output of oscillators 1 & 2")); PixmapButton * sync_osc1_btn = new PixmapButton( this, nullptr ); sync_osc1_btn->move( mod_x + 105, mod1_y ); @@ -483,7 +482,7 @@ TripleOscillatorView::TripleOscillatorView( Instrument * _instrument, "sync_active" ) ); sync_osc1_btn->setInactiveGraphic( PLUGIN_NAME::getIconPixmap( "sync_inactive" ) ); - ToolTip::add( sync_osc1_btn, tr( "Synchronize oscillator 1 with " + sync_osc1_btn->setToolTip(tr("Synchronize oscillator 1 with " "oscillator 2" ) ); PixmapButton * fm_osc1_btn = new PixmapButton( this, nullptr ); @@ -492,7 +491,7 @@ TripleOscillatorView::TripleOscillatorView( Instrument * _instrument, "fm_active" ) ); fm_osc1_btn->setInactiveGraphic( PLUGIN_NAME::getIconPixmap( "fm_inactive" ) ); - ToolTip::add( fm_osc1_btn, tr( "Modulate frequency of oscillator 1 by oscillator 2" ) ); + fm_osc1_btn->setToolTip(tr("Modulate frequency of oscillator 1 by oscillator 2")); m_mod1BtnGrp = new automatableButtonGroup( this ); m_mod1BtnGrp->addButton( pm_osc1_btn ); @@ -509,7 +508,7 @@ TripleOscillatorView::TripleOscillatorView( Instrument * _instrument, "pm_active" ) ); pm_osc2_btn->setInactiveGraphic( PLUGIN_NAME::getIconPixmap( "pm_inactive" ) ); - ToolTip::add( pm_osc2_btn, tr( "Modulate phase of oscillator 2 by oscillator 3" ) ); + pm_osc2_btn->setToolTip(tr("Modulate phase of oscillator 2 by oscillator 3")); PixmapButton * am_osc2_btn = new PixmapButton( this, nullptr ); am_osc2_btn->move( mod_x + 35, mod2_y ); @@ -517,7 +516,7 @@ TripleOscillatorView::TripleOscillatorView( Instrument * _instrument, "am_active" ) ); am_osc2_btn->setInactiveGraphic( PLUGIN_NAME::getIconPixmap( "am_inactive" ) ); - ToolTip::add( am_osc2_btn, tr( "Modulate amplitude of oscillator 2 by oscillator 3" ) ); + am_osc2_btn->setToolTip(tr("Modulate amplitude of oscillator 2 by oscillator 3")); PixmapButton * mix_osc2_btn = new PixmapButton( this, nullptr ); mix_osc2_btn->move( mod_x + 70, mod2_y ); @@ -525,7 +524,7 @@ TripleOscillatorView::TripleOscillatorView( Instrument * _instrument, "mix_active" ) ); mix_osc2_btn->setInactiveGraphic( PLUGIN_NAME::getIconPixmap( "mix_inactive" ) ); - ToolTip::add( mix_osc2_btn, tr("Mix output of oscillators 2 & 3" ) ); + mix_osc2_btn->setToolTip(tr("Mix output of oscillators 2 & 3")); PixmapButton * sync_osc2_btn = new PixmapButton( this, nullptr ); sync_osc2_btn->move( mod_x + 105, mod2_y ); @@ -533,7 +532,7 @@ TripleOscillatorView::TripleOscillatorView( Instrument * _instrument, "sync_active" ) ); sync_osc2_btn->setInactiveGraphic( PLUGIN_NAME::getIconPixmap( "sync_inactive" ) ); - ToolTip::add( sync_osc2_btn, tr( "Synchronize oscillator 2 with oscillator 3" ) ); + sync_osc2_btn->setToolTip(tr("Synchronize oscillator 2 with oscillator 3")); PixmapButton * fm_osc2_btn = new PixmapButton( this, nullptr ); fm_osc2_btn->move( mod_x + 140, mod2_y ); @@ -541,7 +540,7 @@ TripleOscillatorView::TripleOscillatorView( Instrument * _instrument, "fm_active" ) ); fm_osc2_btn->setInactiveGraphic( PLUGIN_NAME::getIconPixmap( "fm_inactive" ) ); - ToolTip::add( fm_osc2_btn, tr( "Modulate frequency of oscillator 2 by oscillator 3" ) ); + fm_osc2_btn->setToolTip(tr("Modulate frequency of oscillator 2 by oscillator 3")); m_mod2BtnGrp = new automatableButtonGroup( this ); @@ -611,7 +610,7 @@ TripleOscillatorView::TripleOscillatorView( Instrument * _instrument, "sin_shape_active" ) ); sin_wave_btn->setInactiveGraphic( PLUGIN_NAME::getIconPixmap( "sin_shape_inactive" ) ); - ToolTip::add( sin_wave_btn, + sin_wave_btn->setToolTip( tr( "Sine wave" ) ); PixmapButton * triangle_wave_btn = @@ -621,7 +620,7 @@ TripleOscillatorView::TripleOscillatorView( Instrument * _instrument, PLUGIN_NAME::getIconPixmap( "triangle_shape_active" ) ); triangle_wave_btn->setInactiveGraphic( PLUGIN_NAME::getIconPixmap( "triangle_shape_inactive" ) ); - ToolTip::add( triangle_wave_btn, + triangle_wave_btn->setToolTip( tr( "Triangle wave") ); PixmapButton * saw_wave_btn = new PixmapButton( this, nullptr ); @@ -630,7 +629,7 @@ TripleOscillatorView::TripleOscillatorView( Instrument * _instrument, "saw_shape_active" ) ); saw_wave_btn->setInactiveGraphic( PLUGIN_NAME::getIconPixmap( "saw_shape_inactive" ) ); - ToolTip::add( saw_wave_btn, + saw_wave_btn->setToolTip( tr( "Saw wave" ) ); PixmapButton * sqr_wave_btn = new PixmapButton( this, nullptr ); @@ -639,7 +638,7 @@ TripleOscillatorView::TripleOscillatorView( Instrument * _instrument, "square_shape_active" ) ); sqr_wave_btn->setInactiveGraphic( PLUGIN_NAME::getIconPixmap( "square_shape_inactive" ) ); - ToolTip::add( sqr_wave_btn, + sqr_wave_btn->setToolTip( tr( "Square wave" ) ); PixmapButton * moog_saw_wave_btn = @@ -649,7 +648,7 @@ TripleOscillatorView::TripleOscillatorView( Instrument * _instrument, PLUGIN_NAME::getIconPixmap( "moog_saw_shape_active" ) ); moog_saw_wave_btn->setInactiveGraphic( PLUGIN_NAME::getIconPixmap( "moog_saw_shape_inactive" ) ); - ToolTip::add( moog_saw_wave_btn, + moog_saw_wave_btn->setToolTip( tr( "Moog-like saw wave" ) ); PixmapButton * exp_wave_btn = new PixmapButton( this, nullptr ); @@ -658,7 +657,7 @@ TripleOscillatorView::TripleOscillatorView( Instrument * _instrument, "exp_shape_active" ) ); exp_wave_btn->setInactiveGraphic( PLUGIN_NAME::getIconPixmap( "exp_shape_inactive" ) ); - ToolTip::add( exp_wave_btn, + exp_wave_btn->setToolTip( tr( "Exponential wave" ) ); PixmapButton * white_noise_btn = new PixmapButton( this, nullptr ); @@ -667,7 +666,7 @@ TripleOscillatorView::TripleOscillatorView( Instrument * _instrument, PLUGIN_NAME::getIconPixmap( "white_noise_shape_active" ) ); white_noise_btn->setInactiveGraphic( PLUGIN_NAME::getIconPixmap( "white_noise_shape_inactive" ) ); - ToolTip::add( white_noise_btn, + white_noise_btn->setToolTip( tr( "White noise" ) ); PixmapButton * uwb = new PixmapButton( this, nullptr ); @@ -676,7 +675,7 @@ TripleOscillatorView::TripleOscillatorView( Instrument * _instrument, "usr_shape_active" ) ); uwb->setInactiveGraphic( PLUGIN_NAME::getIconPixmap( "usr_shape_inactive" ) ); - ToolTip::add( uwb, tr( "User-defined wave" ) ); + uwb->setToolTip(tr("User-defined wave")); PixmapButton * uwt = new PixmapButton( this, nullptr ); uwt->move( 110, btn_y ); @@ -685,7 +684,7 @@ TripleOscillatorView::TripleOscillatorView( Instrument * _instrument, uwt->setInactiveGraphic( PLUGIN_NAME::getIconPixmap( "wavetable_inactive" ) ); uwt->setCheckable(true); - ToolTip::add( uwt, tr( "Use alias-free wavetable oscillators." ) ); + uwt->setToolTip(tr("Use alias-free wavetable oscillators.")); automatableButtonGroup * wsbg = new automatableButtonGroup( this ); diff --git a/plugins/Vestige/Vestige.cpp b/plugins/Vestige/Vestige.cpp index cfd08a88c..cb1902c66 100644 --- a/plugins/Vestige/Vestige.cpp +++ b/plugins/Vestige/Vestige.cpp @@ -57,7 +57,6 @@ #include "StringPairDrag.h" #include "SubWindow.h" #include "TextFloat.h" -#include "ToolTip.h" #include "Clipboard.h" @@ -508,7 +507,7 @@ VestigeInstrumentView::VestigeInstrumentView( Instrument * _instrument, "select_file" ) ); connect( m_openPluginButton, SIGNAL( clicked() ), this, SLOT( openPlugin() ) ); - ToolTip::add( m_openPluginButton, tr( "Open VST plugin" ) ); + m_openPluginButton->setToolTip(tr("Open VST plugin")); m_managePluginButton = new PixmapButton( this, "" ); m_managePluginButton->setCheckable( false ); @@ -520,7 +519,7 @@ VestigeInstrumentView::VestigeInstrumentView( Instrument * _instrument, "controls" ) ); connect( m_managePluginButton, SIGNAL( clicked() ), this, SLOT( managePlugin() ) ); - ToolTip::add( m_managePluginButton, tr( "Control VST plugin from LMMS host" ) ); + m_managePluginButton->setToolTip(tr("Control VST plugin from LMMS host")); m_openPresetButton = new PixmapButton( this, "" ); @@ -533,7 +532,7 @@ VestigeInstrumentView::VestigeInstrumentView( Instrument * _instrument, "project_open", 20, 20 ) ); connect( m_openPresetButton, SIGNAL( clicked() ), this, SLOT( openPreset() ) ); - ToolTip::add( m_openPresetButton, tr( "Open VST plugin preset" ) ); + m_openPresetButton->setToolTip(tr("Open VST plugin preset")); m_rolLPresetButton = new PixmapButton( this, "" ); @@ -546,7 +545,7 @@ VestigeInstrumentView::VestigeInstrumentView( Instrument * _instrument, "stepper-left" ) ); connect( m_rolLPresetButton, SIGNAL( clicked() ), this, SLOT( previousProgram() ) ); - ToolTip::add( m_rolLPresetButton, tr( "Previous (-)" ) ); + m_rolLPresetButton->setToolTip(tr("Previous (-)")); m_rolLPresetButton->setShortcut( Qt::Key_Minus ); @@ -561,7 +560,7 @@ VestigeInstrumentView::VestigeInstrumentView( Instrument * _instrument, "project_save", 20, 20 ) ); connect( m_savePresetButton, SIGNAL( clicked() ), this, SLOT( savePreset() ) ); - ToolTip::add( m_savePresetButton, tr( "Save preset" ) ); + m_savePresetButton->setToolTip(tr("Save preset")); m_rolRPresetButton = new PixmapButton( this, "" ); @@ -574,7 +573,7 @@ VestigeInstrumentView::VestigeInstrumentView( Instrument * _instrument, "stepper-right" ) ); connect( m_rolRPresetButton, SIGNAL( clicked() ), this, SLOT( nextProgram() ) ); - ToolTip::add( m_rolRPresetButton, tr( "Next (+)" ) ); + m_rolRPresetButton->setToolTip(tr("Next (+)")); m_rolRPresetButton->setShortcut( Qt::Key_Plus ); diff --git a/plugins/Vibed/Vibed.cpp b/plugins/Vibed/Vibed.cpp index 5f2d4b3dd..0a6f14c2a 100644 --- a/plugins/Vibed/Vibed.cpp +++ b/plugins/Vibed/Vibed.cpp @@ -34,7 +34,6 @@ #include "LedCheckBox.h" #include "NotePlayHandle.h" #include "PixmapButton.h" -#include "ToolTip.h" #include "base64.h" #include "CaptionMenu.h" #include "StringContainer.h" @@ -400,7 +399,7 @@ VibedView::VibedView( Instrument * _instrument, m_impulse = new LedCheckBox( "", this ); m_impulse->move( 23, 94 ); - ToolTip::add( m_impulse, + m_impulse->setToolTip( tr( "Impulse" ) ); m_harmonic = new NineButtonSelector( @@ -461,7 +460,7 @@ VibedView::VibedView( Instrument * _instrument, m_power = new LedCheckBox( "", this, tr( "Enable waveform" ) ); m_power->move( 212, 130 ); - ToolTip::add( m_power, + m_power->setToolTip( tr( "Enable/disable string" ) ); @@ -479,7 +478,7 @@ VibedView::VibedView( Instrument * _instrument, "sin_wave_active" ) ); m_sinWaveBtn->setInactiveGraphic( embed::getIconPixmap( "sin_wave_inactive" ) ); - ToolTip::add( m_sinWaveBtn, + m_sinWaveBtn->setToolTip( tr( "Sine wave" ) ); connect( m_sinWaveBtn, SIGNAL (clicked () ), this, SLOT ( sinWaveClicked() ) ); @@ -491,7 +490,7 @@ VibedView::VibedView( Instrument * _instrument, embed::getIconPixmap( "triangle_wave_active" ) ); m_triangleWaveBtn->setInactiveGraphic( embed::getIconPixmap( "triangle_wave_inactive" ) ); - ToolTip::add( m_triangleWaveBtn, + m_triangleWaveBtn->setToolTip( tr( "Triangle wave" ) ); connect( m_triangleWaveBtn, SIGNAL ( clicked () ), this, SLOT ( triangleWaveClicked( ) ) ); @@ -503,7 +502,7 @@ VibedView::VibedView( Instrument * _instrument, "saw_wave_active" ) ); m_sawWaveBtn->setInactiveGraphic( embed::getIconPixmap( "saw_wave_inactive" ) ); - ToolTip::add( m_sawWaveBtn, + m_sawWaveBtn->setToolTip( tr( "Saw wave" ) ); connect( m_sawWaveBtn, SIGNAL (clicked () ), this, SLOT ( sawWaveClicked() ) ); @@ -515,7 +514,7 @@ VibedView::VibedView( Instrument * _instrument, "square_wave_active" ) ); m_sqrWaveBtn->setInactiveGraphic( embed::getIconPixmap( "square_wave_inactive" ) ); - ToolTip::add( m_sqrWaveBtn, + m_sqrWaveBtn->setToolTip( tr( "Square wave" ) ); connect( m_sqrWaveBtn, SIGNAL ( clicked () ), this, SLOT ( sqrWaveClicked() ) ); @@ -527,7 +526,7 @@ VibedView::VibedView( Instrument * _instrument, embed::getIconPixmap( "white_noise_wave_active" ) ); m_whiteNoiseWaveBtn->setInactiveGraphic( embed::getIconPixmap( "white_noise_wave_inactive" ) ); - ToolTip::add( m_whiteNoiseWaveBtn, + m_whiteNoiseWaveBtn->setToolTip( tr( "White noise" ) ); connect( m_whiteNoiseWaveBtn, SIGNAL ( clicked () ), this, SLOT ( noiseWaveClicked() ) ); @@ -539,7 +538,7 @@ VibedView::VibedView( Instrument * _instrument, "usr_wave_active" ) ); m_usrWaveBtn->setInactiveGraphic( embed::getIconPixmap( "usr_wave_inactive" ) ); - ToolTip::add( m_usrWaveBtn, + m_usrWaveBtn->setToolTip( tr( "User-defined wave" ) ); connect( m_usrWaveBtn, SIGNAL ( clicked () ), this, SLOT ( usrWaveClicked() ) ); @@ -552,7 +551,7 @@ VibedView::VibedView( Instrument * _instrument, m_smoothBtn->setInactiveGraphic( PLUGIN_NAME::getIconPixmap( "smooth_inactive" ) ); m_smoothBtn->setChecked( false ); - ToolTip::add( m_smoothBtn, + m_smoothBtn->setToolTip( tr( "Smooth waveform" ) ); connect( m_smoothBtn, SIGNAL ( clicked () ), this, SLOT ( smoothClicked() ) ); @@ -564,7 +563,7 @@ VibedView::VibedView( Instrument * _instrument, m_normalizeBtn->setInactiveGraphic( PLUGIN_NAME::getIconPixmap( "normalize_inactive" ) ); m_normalizeBtn->setChecked( false ); - ToolTip::add( m_normalizeBtn, + m_normalizeBtn->setToolTip( tr( "Normalize waveform" ) ); connect( m_normalizeBtn, SIGNAL ( clicked () ), @@ -648,7 +647,7 @@ void VibedView::noiseWaveClicked() void VibedView::usrWaveClicked() { QString fileName = m_graph->model()->setWaveToUser(); - ToolTip::add( m_usrWaveBtn, fileName ); + m_usrWaveBtn->setToolTip(fileName); Engine::getSong()->setModified(); } diff --git a/plugins/VstEffect/VstEffectControlDialog.cpp b/plugins/VstEffect/VstEffectControlDialog.cpp index a675ea1f5..4e86cc71d 100644 --- a/plugins/VstEffect/VstEffectControlDialog.cpp +++ b/plugins/VstEffect/VstEffectControlDialog.cpp @@ -32,7 +32,6 @@ #include "PixmapButton.h" #include "embed.h" -#include "ToolTip.h" #include "gui_templates.h" #include @@ -97,7 +96,7 @@ VstEffectControlDialog::VstEffectControlDialog( VstEffectControls * _ctl ) : "controls" ) ); connect( m_managePluginButton, SIGNAL( clicked() ), _ctl, SLOT( managePlugin() ) ); - ToolTip::add( m_managePluginButton, tr( "Control VST plugin from LMMS host" ) ); + m_managePluginButton->setToolTip(tr("Control VST plugin from LMMS host")); m_managePluginButton->setMinimumWidth( 26 ); m_managePluginButton->setMaximumWidth( 26 ); @@ -113,7 +112,7 @@ VstEffectControlDialog::VstEffectControlDialog( VstEffectControls * _ctl ) : "project_open" ) ); connect( m_openPresetButton, SIGNAL( clicked() ), _ctl, SLOT( openPreset() ) ); - ToolTip::add( m_openPresetButton, tr( "Open VST plugin preset" ) ); + m_openPresetButton->setToolTip(tr("Open VST plugin preset")); m_openPresetButton->setMinimumWidth( 16 ); m_openPresetButton->setMaximumWidth( 16 ); @@ -133,7 +132,7 @@ VstEffectControlDialog::VstEffectControlDialog( VstEffectControls * _ctl ) : connect( m_rolLPresetButton, SIGNAL( clicked() ), this, SLOT( update() ) ); - ToolTip::add( m_rolLPresetButton, tr( "Previous (-)" ) ); + m_rolLPresetButton->setToolTip(tr("Previous (-)")); m_rolLPresetButton->setShortcut( Qt::Key_Minus ); @@ -155,7 +154,7 @@ VstEffectControlDialog::VstEffectControlDialog( VstEffectControls * _ctl ) : connect( m_rolRPresetButton, SIGNAL( clicked() ), this, SLOT( update() ) ); - ToolTip::add( m_rolRPresetButton, tr( "Next (+)" ) ); + m_rolRPresetButton->setToolTip(tr("Next (+)")); m_rolRPresetButton->setShortcut( Qt::Key_Plus ); @@ -189,7 +188,7 @@ VstEffectControlDialog::VstEffectControlDialog( VstEffectControls * _ctl ) : "project_save", 21, 21 ) ); connect( m_savePresetButton, SIGNAL( clicked() ), _ctl, SLOT( savePreset() ) ); - ToolTip::add( m_savePresetButton, tr( "Save preset" ) ); + m_savePresetButton->setToolTip(tr("Save preset")); m_savePresetButton->setMinimumWidth( 21 ); m_savePresetButton->setMaximumWidth( 21 ); diff --git a/plugins/Watsyn/Watsyn.cpp b/plugins/Watsyn/Watsyn.cpp index 01b74e52c..0be4af29a 100644 --- a/plugins/Watsyn/Watsyn.cpp +++ b/plugins/Watsyn/Watsyn.cpp @@ -30,7 +30,6 @@ #include "Engine.h" #include "InstrumentTrack.h" #include "PixmapButton.h" -#include "ToolTip.h" #include "Song.h" #include "lmms_math.h" #include "interpolation.h" @@ -727,25 +726,25 @@ WatsynView::WatsynView( Instrument * _instrument, a1_selectButton -> move( 4, 121 ); a1_selectButton -> setActiveGraphic( PLUGIN_NAME::getIconPixmap( "a1_active" ) ); a1_selectButton -> setInactiveGraphic( PLUGIN_NAME::getIconPixmap( "a1_inactive" ) ); - ToolTip::add( a1_selectButton, tr( "Select oscillator A1") ); + a1_selectButton->setToolTip(tr("Select oscillator A1")); PixmapButton * a2_selectButton = new PixmapButton( this, nullptr ); a2_selectButton -> move( 44, 121 ); a2_selectButton -> setActiveGraphic( PLUGIN_NAME::getIconPixmap( "a2_active" ) ); a2_selectButton -> setInactiveGraphic( PLUGIN_NAME::getIconPixmap( "a2_inactive" ) ); - ToolTip::add( a2_selectButton, tr( "Select oscillator A2") ); + a2_selectButton->setToolTip(tr("Select oscillator A2")); PixmapButton * b1_selectButton = new PixmapButton( this, nullptr ); b1_selectButton -> move( 84, 121 ); b1_selectButton -> setActiveGraphic( PLUGIN_NAME::getIconPixmap( "b1_active" ) ); b1_selectButton -> setInactiveGraphic( PLUGIN_NAME::getIconPixmap( "b1_inactive" ) ); - ToolTip::add( b1_selectButton, tr( "Select oscillator B1") ); + b1_selectButton->setToolTip(tr("Select oscillator B1")); PixmapButton * b2_selectButton = new PixmapButton( this, nullptr ); b2_selectButton -> move( 124, 121 ); b2_selectButton -> setActiveGraphic( PLUGIN_NAME::getIconPixmap( "b2_active" ) ); b2_selectButton -> setInactiveGraphic( PLUGIN_NAME::getIconPixmap( "b2_inactive" ) ); - ToolTip::add( b2_selectButton, tr( "Select oscillator B2") ); + b2_selectButton->setToolTip(tr("Select oscillator B2")); m_selectedGraphGroup = new automatableButtonGroup( this ); m_selectedGraphGroup -> addButton( a1_selectButton ); @@ -760,25 +759,25 @@ WatsynView::WatsynView( Instrument * _instrument, amod_mixButton -> move( 4, 50 ); amod_mixButton -> setActiveGraphic( PLUGIN_NAME::getIconPixmap( "amix_active" ) ); amod_mixButton -> setInactiveGraphic( PLUGIN_NAME::getIconPixmap( "amix_inactive" ) ); - ToolTip::add( amod_mixButton, tr( "Mix output of A2 to A1" ) ); + amod_mixButton->setToolTip(tr("Mix output of A2 to A1")); PixmapButton * amod_amButton = new PixmapButton( this, nullptr ); amod_amButton -> move( 4, 66 ); amod_amButton -> setActiveGraphic( PLUGIN_NAME::getIconPixmap( "aam_active" ) ); amod_amButton -> setInactiveGraphic( PLUGIN_NAME::getIconPixmap( "aam_inactive" ) ); - ToolTip::add( amod_amButton, tr( "Modulate amplitude of A1 by output of A2" ) ); + amod_amButton->setToolTip(tr("Modulate amplitude of A1 by output of A2")); PixmapButton * amod_rmButton = new PixmapButton( this, nullptr ); amod_rmButton -> move( 4, 82 ); amod_rmButton -> setActiveGraphic( PLUGIN_NAME::getIconPixmap( "arm_active" ) ); amod_rmButton -> setInactiveGraphic( PLUGIN_NAME::getIconPixmap( "arm_inactive" ) ); - ToolTip::add( amod_rmButton, tr( "Ring modulate A1 and A2" ) ); + amod_rmButton->setToolTip(tr("Ring modulate A1 and A2")); PixmapButton * amod_pmButton = new PixmapButton( this, nullptr ); amod_pmButton -> move( 4, 98 ); amod_pmButton -> setActiveGraphic( PLUGIN_NAME::getIconPixmap( "apm_active" ) ); amod_pmButton -> setInactiveGraphic( PLUGIN_NAME::getIconPixmap( "apm_inactive" ) ); - ToolTip::add( amod_pmButton, tr( "Modulate phase of A1 by output of A2" ) ); + amod_pmButton->setToolTip(tr("Modulate phase of A1 by output of A2")); m_aModGroup = new automatableButtonGroup( this ); m_aModGroup -> addButton( amod_mixButton ); @@ -791,25 +790,25 @@ WatsynView::WatsynView( Instrument * _instrument, bmod_mixButton -> move( 44, 50 ); bmod_mixButton -> setActiveGraphic( PLUGIN_NAME::getIconPixmap( "bmix_active" ) ); bmod_mixButton -> setInactiveGraphic( PLUGIN_NAME::getIconPixmap( "bmix_inactive" ) ); - ToolTip::add( bmod_mixButton, tr( "Mix output of B2 to B1" ) ); + bmod_mixButton->setToolTip(tr("Mix output of B2 to B1")); PixmapButton * bmod_amButton = new PixmapButton( this, nullptr ); bmod_amButton -> move( 44, 66 ); bmod_amButton -> setActiveGraphic( PLUGIN_NAME::getIconPixmap( "bam_active" ) ); bmod_amButton -> setInactiveGraphic( PLUGIN_NAME::getIconPixmap( "bam_inactive" ) ); - ToolTip::add( bmod_amButton, tr( "Modulate amplitude of B1 by output of B2" ) ); + bmod_amButton->setToolTip(tr("Modulate amplitude of B1 by output of B2")); PixmapButton * bmod_rmButton = new PixmapButton( this, nullptr ); bmod_rmButton -> move( 44, 82 ); bmod_rmButton -> setActiveGraphic( PLUGIN_NAME::getIconPixmap( "brm_active" ) ); bmod_rmButton -> setInactiveGraphic( PLUGIN_NAME::getIconPixmap( "brm_inactive" ) ); - ToolTip::add( bmod_rmButton, tr( "Ring modulate B1 and B2" ) ); + bmod_rmButton->setToolTip(tr("Ring modulate B1 and B2")); PixmapButton * bmod_pmButton = new PixmapButton( this, nullptr ); bmod_pmButton -> move( 44, 98 ); bmod_pmButton -> setActiveGraphic( PLUGIN_NAME::getIconPixmap( "bpm_active" ) ); bmod_pmButton -> setInactiveGraphic( PLUGIN_NAME::getIconPixmap( "bpm_inactive" ) ); - ToolTip::add( bmod_pmButton, tr( "Modulate phase of B1 by output of B2" ) ); + bmod_pmButton->setToolTip(tr("Modulate phase of B1 by output of B2")); m_bModGroup = new automatableButtonGroup( this ); m_bModGroup -> addButton( bmod_mixButton ); @@ -826,7 +825,7 @@ WatsynView::WatsynView( Instrument * _instrument, a1_graph->move( 4, 141 ); a1_graph->setAutoFillBackground( true ); a1_graph->setGraphColor( QColor( 0x43, 0xb2, 0xff ) ); - ToolTip::add( a1_graph, tr ( "Draw your own waveform here by dragging your mouse on this graph." ) ); + a1_graph->setToolTip(tr("Draw your own waveform here by dragging your mouse on this graph.")); a1_graph->setPalette( pal ); // a2 graph @@ -834,7 +833,7 @@ WatsynView::WatsynView( Instrument * _instrument, a2_graph->move( 4, 141 ); a2_graph->setAutoFillBackground( true ); a2_graph->setGraphColor( QColor( 0x43, 0xb2, 0xff ) ); - ToolTip::add( a2_graph, tr ( "Draw your own waveform here by dragging your mouse on this graph." ) ); + a2_graph->setToolTip(tr("Draw your own waveform here by dragging your mouse on this graph.")); a2_graph->setPalette( pal ); // b1 graph @@ -842,7 +841,7 @@ WatsynView::WatsynView( Instrument * _instrument, b1_graph->move( 4, 141 ); b1_graph->setAutoFillBackground( true ); b1_graph->setGraphColor( QColor( 0xfc, 0x54, 0x31 ) ); - ToolTip::add( b1_graph, tr ( "Draw your own waveform here by dragging your mouse on this graph." ) ); + b1_graph->setToolTip(tr("Draw your own waveform here by dragging your mouse on this graph.")); b1_graph->setPalette( pal ); // b2 graph @@ -850,7 +849,7 @@ WatsynView::WatsynView( Instrument * _instrument, b2_graph->move( 4, 141 ); b2_graph->setAutoFillBackground( true ); b2_graph->setGraphColor( QColor( 0xfc, 0x54, 0x31 ) ); - ToolTip::add( b2_graph, tr ( "Draw your own waveform here by dragging your mouse on this graph." ) ); + b2_graph->setToolTip(tr("Draw your own waveform here by dragging your mouse on this graph.")); b2_graph->setPalette( pal ); @@ -861,38 +860,38 @@ WatsynView::WatsynView( Instrument * _instrument, m_loadButton -> move ( 173, 121 ); m_loadButton -> setActiveGraphic( PLUGIN_NAME::getIconPixmap( "load_active" ) ); m_loadButton -> setInactiveGraphic( PLUGIN_NAME::getIconPixmap( "load_inactive" ) ); - ToolTip::add( m_loadButton, tr( "Load a waveform from a sample file" ) ); + m_loadButton->setToolTip(tr("Load a waveform from a sample file")); m_phaseLeftButton = new PixmapButton( this, tr( "Phase left" ) ); m_phaseLeftButton -> move ( 193, 121 ); m_phaseLeftButton -> setActiveGraphic( PLUGIN_NAME::getIconPixmap( "phl_active" ) ); m_phaseLeftButton -> setInactiveGraphic( PLUGIN_NAME::getIconPixmap( "phl_inactive" ) ); - ToolTip::add( m_phaseLeftButton, tr( "Shift phase by -15 degrees" ) ); + m_phaseLeftButton->setToolTip(tr("Shift phase by -15 degrees")); m_phaseRightButton = new PixmapButton( this, tr( "Phase right" ) ); m_phaseRightButton -> move ( 210, 121 ); m_phaseRightButton -> setActiveGraphic( PLUGIN_NAME::getIconPixmap( "phr_active" ) ); m_phaseRightButton -> setInactiveGraphic( PLUGIN_NAME::getIconPixmap( "phr_inactive" ) ); - ToolTip::add( m_phaseRightButton, tr( "Shift phase by +15 degrees" ) ); + m_phaseRightButton->setToolTip(tr("Shift phase by +15 degrees")); m_normalizeButton = new PixmapButton( this, tr( "Normalize" ) ); m_normalizeButton -> move ( 230, 121 ); m_normalizeButton -> setActiveGraphic( PLUGIN_NAME::getIconPixmap( "norm_active" ) ); m_normalizeButton -> setInactiveGraphic( PLUGIN_NAME::getIconPixmap( "norm_inactive" ) ); - ToolTip::add( m_normalizeButton, tr( "Normalize" ) ); + m_normalizeButton->setToolTip(tr("Normalize")); m_invertButton = new PixmapButton( this, tr( "Invert" ) ); m_invertButton -> move ( 230, 138 ); m_invertButton -> setActiveGraphic( PLUGIN_NAME::getIconPixmap( "inv_active" ) ); m_invertButton -> setInactiveGraphic( PLUGIN_NAME::getIconPixmap( "inv_inactive" ) ); - ToolTip::add( m_invertButton, tr( "Invert" ) ); + m_invertButton->setToolTip(tr("Invert")); m_smoothButton = new PixmapButton( this, tr( "Smooth" ) ); m_smoothButton -> move ( 230, 155 ); m_smoothButton -> setActiveGraphic( PLUGIN_NAME::getIconPixmap( "smooth_active" ) ); m_smoothButton -> setInactiveGraphic( PLUGIN_NAME::getIconPixmap( "smooth_inactive" ) ); - ToolTip::add( m_smoothButton, tr( "Smooth" ) ); + m_smoothButton->setToolTip(tr("Smooth")); // waveforms @@ -900,25 +899,25 @@ WatsynView::WatsynView( Instrument * _instrument, m_sinWaveButton -> move ( 230, 176 ); m_sinWaveButton -> setActiveGraphic( PLUGIN_NAME::getIconPixmap( "sin_active" ) ); m_sinWaveButton -> setInactiveGraphic( PLUGIN_NAME::getIconPixmap( "sin_inactive" ) ); - ToolTip::add( m_sinWaveButton, tr( "Sine wave" ) ); + m_sinWaveButton->setToolTip(tr("Sine wave")); m_triWaveButton = new PixmapButton( this, tr( "Triangle wave" ) ); m_triWaveButton -> move ( 230, 194 ); m_triWaveButton -> setActiveGraphic( PLUGIN_NAME::getIconPixmap( "tri_active" ) ); m_triWaveButton -> setInactiveGraphic( PLUGIN_NAME::getIconPixmap( "tri_inactive" ) ); - ToolTip::add( m_triWaveButton, tr( "Triangle wave" ) ); + m_triWaveButton->setToolTip(tr("Triangle wave")); m_sawWaveButton = new PixmapButton( this, tr( "Triangle wave" ) ); m_sawWaveButton -> move ( 230, 212 ); m_sawWaveButton -> setActiveGraphic( PLUGIN_NAME::getIconPixmap( "saw_active" ) ); m_sawWaveButton -> setInactiveGraphic( PLUGIN_NAME::getIconPixmap( "saw_inactive" ) ); - ToolTip::add( m_sawWaveButton, tr( "Saw wave" ) ); + m_sawWaveButton->setToolTip(tr("Saw wave")); m_sqrWaveButton = new PixmapButton( this, tr( "Square wave" ) ); m_sqrWaveButton -> move ( 230, 230 ); m_sqrWaveButton -> setActiveGraphic( PLUGIN_NAME::getIconPixmap( "sqr_active" ) ); m_sqrWaveButton -> setInactiveGraphic( PLUGIN_NAME::getIconPixmap( "sqr_inactive" ) ); - ToolTip::add( m_sqrWaveButton, tr( "Square wave" ) ); + m_sqrWaveButton->setToolTip(tr("Square wave")); diff --git a/plugins/WaveShaper/WaveShaperControlDialog.cpp b/plugins/WaveShaper/WaveShaperControlDialog.cpp index 938033946..aede7317e 100644 --- a/plugins/WaveShaper/WaveShaperControlDialog.cpp +++ b/plugins/WaveShaper/WaveShaperControlDialog.cpp @@ -31,7 +31,6 @@ #include "Graph.h" #include "Knob.h" #include "PixmapButton.h" -#include "ToolTip.h" #include "LedCheckBox.h" @@ -78,34 +77,34 @@ WaveShaperControlDialog::WaveShaperControlDialog( resetButton -> resize( 13, 46 ); resetButton -> setActiveGraphic( PLUGIN_NAME::getIconPixmap( "reset_active" ) ); resetButton -> setInactiveGraphic( PLUGIN_NAME::getIconPixmap( "reset_inactive" ) ); - ToolTip::add( resetButton, tr( "Reset wavegraph" ) ); + resetButton->setToolTip(tr("Reset wavegraph")); PixmapButton * smoothButton = new PixmapButton( this, tr("Smooth wavegraph") ); smoothButton -> move( 162, 237 ); smoothButton -> resize( 13, 46 ); smoothButton -> setActiveGraphic( PLUGIN_NAME::getIconPixmap( "smooth_active" ) ); smoothButton -> setInactiveGraphic( PLUGIN_NAME::getIconPixmap( "smooth_inactive" ) ); - ToolTip::add( smoothButton, tr( "Smooth wavegraph" ) ); + smoothButton->setToolTip(tr("Smooth wavegraph")); PixmapButton * addOneButton = new PixmapButton( this, tr("Increase wavegraph amplitude by 1 dB") ); addOneButton -> move( 131, 221 ); addOneButton -> resize( 13, 29 ); addOneButton -> setActiveGraphic( PLUGIN_NAME::getIconPixmap( "add1_active" ) ); addOneButton -> setInactiveGraphic( PLUGIN_NAME::getIconPixmap( "add1_inactive" ) ); - ToolTip::add( addOneButton, tr( "Increase wavegraph amplitude by 1 dB" ) ); + addOneButton->setToolTip(tr("Increase wavegraph amplitude by 1 dB")); PixmapButton * subOneButton = new PixmapButton( this, tr("Decrease wavegraph amplitude by 1 dB") ); subOneButton -> move( 131, 237 ); subOneButton -> resize( 13, 29 ); subOneButton -> setActiveGraphic( PLUGIN_NAME::getIconPixmap( "sub1_active" ) ); subOneButton -> setInactiveGraphic( PLUGIN_NAME::getIconPixmap( "sub1_inactive" ) ); - ToolTip::add( subOneButton, tr( "Decrease wavegraph amplitude by 1 dB" ) ); + subOneButton->setToolTip(tr("Decrease wavegraph amplitude by 1 dB")); LedCheckBox * clipInputToggle = new LedCheckBox( "Clip input", this, tr( "Clip input" ), LedCheckBox::Green ); clipInputToggle -> move( 131, 252 ); clipInputToggle -> setModel( &_controls -> m_clipModel ); - ToolTip::add( clipInputToggle, tr( "Clip input signal to 0 dB" ) ); + clipInputToggle->setToolTip(tr("Clip input signal to 0 dB")); connect( resetButton, SIGNAL (clicked () ), _controls, SLOT ( resetClicked() ) ); diff --git a/plugins/Xpressive/Xpressive.cpp b/plugins/Xpressive/Xpressive.cpp index 61a1460b7..bf543c695 100644 --- a/plugins/Xpressive/Xpressive.cpp +++ b/plugins/Xpressive/Xpressive.cpp @@ -38,7 +38,6 @@ #include "NotePlayHandle.h" #include "PixmapButton.h" #include "Song.h" -#include "ToolTip.h" #include "base64.h" #include "lmms_constants.h" @@ -300,7 +299,7 @@ XpressiveView::XpressiveView(Instrument * _instrument, QWidget * _parent) : m_graph->setGraphColor(QColor(255, 255, 255)); m_graph->setEnabled(false); - ToolTip::add(m_graph, tr("Draw your own waveform here " + m_graph->setToolTip(tr("Draw your own waveform here " "by dragging your mouse on this graph.")); pal = QPalette(); @@ -318,37 +317,37 @@ XpressiveView::XpressiveView(Instrument * _instrument, QWidget * _parent) : m_w1Btn->move(3, ROW_BTN); m_w1Btn->setActiveGraphic(PLUGIN_NAME::getIconPixmap("w1_active")); m_w1Btn->setInactiveGraphic(PLUGIN_NAME::getIconPixmap("w1_inactive")); - ToolTip::add(m_w1Btn, tr("Select oscillator W1")); + m_w1Btn->setToolTip(tr("Select oscillator W1")); m_w2Btn = new PixmapButton(this, nullptr); m_w2Btn->move(26, ROW_BTN); m_w2Btn->setActiveGraphic(PLUGIN_NAME::getIconPixmap("w2_active")); m_w2Btn->setInactiveGraphic(PLUGIN_NAME::getIconPixmap("w2_inactive")); - ToolTip::add(m_w2Btn, tr("Select oscillator W2")); + m_w2Btn->setToolTip(tr("Select oscillator W2")); m_w3Btn = new PixmapButton(this, nullptr); m_w3Btn->move(49, ROW_BTN); m_w3Btn->setActiveGraphic(PLUGIN_NAME::getIconPixmap("w3_active")); m_w3Btn->setInactiveGraphic(PLUGIN_NAME::getIconPixmap("w3_inactive")); - ToolTip::add(m_w3Btn, tr("Select oscillator W3")); + m_w3Btn->setToolTip(tr("Select oscillator W3")); m_o1Btn = new PixmapButton(this, nullptr); m_o1Btn->move(79, ROW_BTN); m_o1Btn->setActiveGraphic(PLUGIN_NAME::getIconPixmap("o1_active")); m_o1Btn->setInactiveGraphic(PLUGIN_NAME::getIconPixmap("o1_inactive")); - ToolTip::add(m_o1Btn, tr("Select output O1")); + m_o1Btn->setToolTip(tr("Select output O1")); m_o2Btn = new PixmapButton(this, nullptr); m_o2Btn->move(101, ROW_BTN); m_o2Btn->setActiveGraphic(PLUGIN_NAME::getIconPixmap("o2_active")); m_o2Btn->setInactiveGraphic(PLUGIN_NAME::getIconPixmap("o2_inactive")); - ToolTip::add(m_o2Btn, tr("Select output O2")); + m_o2Btn->setToolTip(tr("Select output O2")); m_helpBtn = new PixmapButton(this, nullptr); m_helpBtn->move(133, ROW_BTN); m_helpBtn->setActiveGraphic(PLUGIN_NAME::getIconPixmap("help_active")); m_helpBtn->setInactiveGraphic(PLUGIN_NAME::getIconPixmap("help_inactive")); - ToolTip::add(m_helpBtn, tr("Open help window")); + m_helpBtn->setToolTip(tr("Open help window")); m_selectedGraphGroup = new automatableButtonGroup(this); m_selectedGraphGroup->addButton(m_w1Btn); @@ -364,32 +363,32 @@ XpressiveView::XpressiveView(Instrument * _instrument, QWidget * _parent) : m_sinWaveBtn->move(4, ROW_WAVEBTN); m_sinWaveBtn->setActiveGraphic(embed::getIconPixmap("sin_wave_active")); m_sinWaveBtn->setInactiveGraphic(embed::getIconPixmap("sin_wave_inactive")); - ToolTip::add(m_sinWaveBtn, tr("Sine wave")); + m_sinWaveBtn->setToolTip(tr("Sine wave")); m_moogWaveBtn = new PixmapButton(this, tr("Moog-saw wave")); m_moogWaveBtn->move(4, ROW_WAVEBTN-14); m_moogWaveBtn->setActiveGraphic( embed::getIconPixmap( "moog_saw_wave_active" ) ); m_moogWaveBtn->setInactiveGraphic(embed::getIconPixmap("moog_saw_wave_inactive")); - ToolTip::add(m_moogWaveBtn, tr("Moog-saw wave")); + m_moogWaveBtn->setToolTip(tr("Moog-saw wave")); m_expWaveBtn = new PixmapButton(this, tr("Exponential wave")); m_expWaveBtn->move(4 +14, ROW_WAVEBTN-14); m_expWaveBtn->setActiveGraphic(embed::getIconPixmap( "exp_wave_active" ) ); m_expWaveBtn->setInactiveGraphic(embed::getIconPixmap( "exp_wave_inactive" ) ); - ToolTip::add(m_expWaveBtn, tr("Exponential wave")); + m_expWaveBtn->setToolTip(tr("Exponential wave")); m_sawWaveBtn = new PixmapButton(this, tr("Saw wave")); m_sawWaveBtn->move(4 + 14 * 2, ROW_WAVEBTN-14); m_sawWaveBtn->setActiveGraphic(embed::getIconPixmap("saw_wave_active")); m_sawWaveBtn->setInactiveGraphic(embed::getIconPixmap("saw_wave_inactive")); - ToolTip::add(m_sawWaveBtn, tr("Saw wave")); + m_sawWaveBtn->setToolTip(tr("Saw wave")); m_usrWaveBtn = new PixmapButton(this, tr("User-defined wave")); m_usrWaveBtn->move(4 + 14 * 3, ROW_WAVEBTN-14); m_usrWaveBtn->setActiveGraphic(embed::getIconPixmap("usr_wave_active")); m_usrWaveBtn->setInactiveGraphic(embed::getIconPixmap("usr_wave_inactive")); - ToolTip::add(m_usrWaveBtn, tr("User-defined wave")); + m_usrWaveBtn->setToolTip(tr("User-defined wave")); m_triangleWaveBtn = new PixmapButton(this, tr("Triangle wave")); m_triangleWaveBtn->move(4 + 14, ROW_WAVEBTN); @@ -397,14 +396,14 @@ XpressiveView::XpressiveView(Instrument * _instrument, QWidget * _parent) : embed::getIconPixmap("triangle_wave_active")); m_triangleWaveBtn->setInactiveGraphic( embed::getIconPixmap("triangle_wave_inactive")); - ToolTip::add(m_triangleWaveBtn, tr("Triangle wave")); + m_triangleWaveBtn->setToolTip(tr("Triangle wave")); m_sqrWaveBtn = new PixmapButton(this, tr("Square wave")); m_sqrWaveBtn->move(4 + 14 * 2, ROW_WAVEBTN); m_sqrWaveBtn->setActiveGraphic(embed::getIconPixmap("square_wave_active")); m_sqrWaveBtn->setInactiveGraphic( embed::getIconPixmap("square_wave_inactive")); - ToolTip::add(m_sqrWaveBtn, tr("Square wave")); + m_sqrWaveBtn->setToolTip(tr("Square wave")); m_whiteNoiseWaveBtn = new PixmapButton(this, tr("White noise")); m_whiteNoiseWaveBtn->move(4 + 14 * 3, ROW_WAVEBTN); @@ -412,7 +411,7 @@ XpressiveView::XpressiveView(Instrument * _instrument, QWidget * _parent) : embed::getIconPixmap("white_noise_wave_active")); m_whiteNoiseWaveBtn->setInactiveGraphic( embed::getIconPixmap("white_noise_wave_inactive")); - ToolTip::add(m_whiteNoiseWaveBtn, tr("White noise")); + m_whiteNoiseWaveBtn->setToolTip(tr("White noise")); m_waveInterpolate = new LedCheckBox("Interpolate", this, tr("WaveInterpolate"), diff --git a/src/gui/AutomationClipView.cpp b/src/gui/AutomationClipView.cpp index 16e7c0b86..f11885893 100644 --- a/src/gui/AutomationClipView.cpp +++ b/src/gui/AutomationClipView.cpp @@ -36,7 +36,6 @@ #include "RenameDialog.h" #include "StringPairDrag.h" #include "TextFloat.h" -#include "ToolTip.h" #include "Track.h" #include "Engine.h" @@ -57,7 +56,7 @@ AutomationClipView::AutomationClipView( AutomationClip * _clip, setAttribute( Qt::WA_OpaquePaintEvent, true ); - ToolTip::add(this, m_clip->name()); + setToolTip(m_clip->name()); setStyle( QApplication::style() ); if( s_clip_rec == nullptr ) { s_clip_rec = new QPixmap( embed::getIconPixmap( @@ -85,7 +84,7 @@ void AutomationClipView::openInAutomationEditor() void AutomationClipView::update() { - ToolTip::add(this, m_clip->name()); + setToolTip(m_clip->name()); ClipView::update(); } diff --git a/src/gui/CMakeLists.txt b/src/gui/CMakeLists.txt index bdff3347c..c054277c7 100644 --- a/src/gui/CMakeLists.txt +++ b/src/gui/CMakeLists.txt @@ -110,7 +110,6 @@ SET(LMMS_SRCS gui/widgets/TextFloat.cpp gui/widgets/TimeDisplayWidget.cpp gui/widgets/ToolButton.cpp - gui/widgets/ToolTip.cpp gui/widgets/TrackLabelButton.cpp gui/widgets/TrackContentWidget.cpp gui/widgets/TrackOperationsWidget.cpp diff --git a/src/gui/InstrumentTrackWindow.cpp b/src/gui/InstrumentTrackWindow.cpp index 59e1c7f41..6c4acbfa1 100644 --- a/src/gui/InstrumentTrackWindow.cpp +++ b/src/gui/InstrumentTrackWindow.cpp @@ -65,7 +65,6 @@ #include "StringPairDrag.h" #include "SubWindow.h" #include "TabWidget.h" -#include "ToolTip.h" #include "TrackContainerView.h" #include "TrackLabelButton.h" @@ -209,7 +208,7 @@ InstrumentTrackWindow::InstrumentTrackWindow( InstrumentTrackView * _itv ) : connect( saveSettingsBtn, SIGNAL( clicked() ), this, SLOT( saveSettingsBtnClicked() ) ); - ToolTip::add( saveSettingsBtn, tr( "Save current instrument track settings in a preset file" ) ); + saveSettingsBtn->setToolTip(tr("Save current instrument track settings in a preset file")); basicControlsLayout->addWidget( saveSettingsBtn, 0, 7 ); diff --git a/src/gui/LfoControllerDialog.cpp b/src/gui/LfoControllerDialog.cpp index 564f85e54..672e22ed5 100644 --- a/src/gui/LfoControllerDialog.cpp +++ b/src/gui/LfoControllerDialog.cpp @@ -25,7 +25,6 @@ #include "embed.h" -#include "ToolTip.h" #include "LfoController.h" @@ -84,7 +83,7 @@ LfoControllerDialog::LfoControllerDialog( Controller * _model, QWidget * _parent "sin_wave_active" ) ); sin_wave_btn->setInactiveGraphic( embed::getIconPixmap( "sin_wave_inactive" ) ); - ToolTip::add( sin_wave_btn, + sin_wave_btn->setToolTip( tr( "Sine wave" ) ); PixmapButton * triangle_wave_btn = @@ -94,7 +93,7 @@ LfoControllerDialog::LfoControllerDialog( Controller * _model, QWidget * _parent embed::getIconPixmap( "triangle_wave_active" ) ); triangle_wave_btn->setInactiveGraphic( embed::getIconPixmap( "triangle_wave_inactive" ) ); - ToolTip::add( triangle_wave_btn, + triangle_wave_btn->setToolTip( tr( "Triangle wave" ) ); PixmapButton * saw_wave_btn = new PixmapButton( this, nullptr ); @@ -103,7 +102,7 @@ LfoControllerDialog::LfoControllerDialog( Controller * _model, QWidget * _parent "saw_wave_active" ) ); saw_wave_btn->setInactiveGraphic( embed::getIconPixmap( "saw_wave_inactive" ) ); - ToolTip::add( saw_wave_btn, + saw_wave_btn->setToolTip( tr( "Saw wave" ) ); PixmapButton * sqr_wave_btn = new PixmapButton( this, nullptr ); @@ -112,7 +111,7 @@ LfoControllerDialog::LfoControllerDialog( Controller * _model, QWidget * _parent "square_wave_active" ) ); sqr_wave_btn->setInactiveGraphic( embed::getIconPixmap( "square_wave_inactive" ) ); - ToolTip::add( sqr_wave_btn, + sqr_wave_btn->setToolTip( tr( "Square wave" ) ); PixmapButton * moog_saw_wave_btn = @@ -122,7 +121,7 @@ LfoControllerDialog::LfoControllerDialog( Controller * _model, QWidget * _parent embed::getIconPixmap( "moog_saw_wave_active" ) ); moog_saw_wave_btn->setInactiveGraphic( embed::getIconPixmap( "moog_saw_wave_inactive" ) ); - ToolTip::add( moog_saw_wave_btn, + moog_saw_wave_btn->setToolTip( tr( "Moog saw wave" ) ); PixmapButton * exp_wave_btn = new PixmapButton( this, nullptr ); @@ -131,7 +130,7 @@ LfoControllerDialog::LfoControllerDialog( Controller * _model, QWidget * _parent "exp_wave_active" ) ); exp_wave_btn->setInactiveGraphic( embed::getIconPixmap( "exp_wave_inactive" ) ); - ToolTip::add( exp_wave_btn, + exp_wave_btn->setToolTip( tr( "Exponential wave" ) ); PixmapButton * white_noise_btn = new PixmapButton( this, nullptr ); @@ -140,7 +139,7 @@ LfoControllerDialog::LfoControllerDialog( Controller * _model, QWidget * _parent embed::getIconPixmap( "white_noise_wave_active" ) ); white_noise_btn->setInactiveGraphic( embed::getIconPixmap( "white_noise_wave_inactive" ) ); - ToolTip::add( white_noise_btn, + white_noise_btn->setToolTip( tr( "White noise" ) ); m_userWaveBtn = new PixmapButton( this, nullptr ); @@ -152,7 +151,7 @@ LfoControllerDialog::LfoControllerDialog( Controller * _model, QWidget * _parent connect( m_userWaveBtn, SIGNAL( doubleClicked() ), this, SLOT( askUserDefWave() ) ); - ToolTip::add( m_userWaveBtn, + m_userWaveBtn->setToolTip( tr( "User-defined shape.\nDouble click to pick a file." ) ); m_waveBtnGrp = new automatableButtonGroup( this ); @@ -172,7 +171,7 @@ LfoControllerDialog::LfoControllerDialog( Controller * _model, QWidget * _parent "lfo_x1_active" ) ); x1->setInactiveGraphic( embed::getIconPixmap( "lfo_x1_inactive" ) ); - ToolTip::add( x1, + x1->setToolTip( tr( "Mutliply modulation frequency by 1" )); PixmapButton * x100 = new PixmapButton( this, nullptr ); @@ -181,7 +180,7 @@ LfoControllerDialog::LfoControllerDialog( Controller * _model, QWidget * _parent "lfo_x100_active" ) ); x100->setInactiveGraphic( embed::getIconPixmap( "lfo_x100_inactive" ) ); - ToolTip::add( x100, + x100->setToolTip( tr( "Mutliply modulation frequency by 100" )); PixmapButton * d100 = new PixmapButton( this, nullptr ); @@ -190,7 +189,7 @@ LfoControllerDialog::LfoControllerDialog( Controller * _model, QWidget * _parent "lfo_d100_active" ) ); d100->setInactiveGraphic( embed::getIconPixmap( "lfo_d100_inactive" ) ); - ToolTip::add( d100, + d100->setToolTip( tr( "Divide modulation frequency by 100" )); m_multiplierBtnGrp = new automatableButtonGroup( this ); @@ -225,7 +224,7 @@ void LfoControllerDialog::askUserDefWave() if( fileName.isEmpty() == false ) { // TODO: - ToolTip::add( m_userWaveBtn, sampleBuffer->audioFile() ); + m_userWaveBtn->setToolTip(sampleBuffer->audioFile()); } } diff --git a/src/gui/MainWindow.cpp b/src/gui/MainWindow.cpp index 40ff4c055..2bb1ae599 100644 --- a/src/gui/MainWindow.cpp +++ b/src/gui/MainWindow.cpp @@ -258,6 +258,11 @@ MainWindow::MainWindow() : maximized = isMaximized(); new QShortcut(QKeySequence(Qt::Key_F11), this, SLOT(toggleFullscreen())); + + if (ConfigManager::inst()->value("tooltips", "disabled").toInt()) + { + qApp->installEventFilter(this); + } } @@ -1189,14 +1194,6 @@ void MainWindow::updateViewMenu() qa->setChecked( ConfigManager::inst()->value( "app", "displaydbfs" ).toInt() ); m_viewMenu->addAction(qa); - // Maybe this is impossible? - /* qa = new QAction(tr( "Tooltips" ), this); - qa->setData("tooltips"); - qa->setCheckable( true ); - qa->setChecked( !ConfigManager::inst()->value( "tooltips", "disabled" ).toInt() ); - m_viewMenu->addAction(qa); - */ - qa = new QAction(tr( "Smooth scroll" ), this); qa->setData("smoothscroll"); qa->setCheckable( true ); @@ -1236,6 +1233,10 @@ void MainWindow::updateConfig( QAction * _who ) { ConfigManager::inst()->setValue( "tooltips", "disabled", QString::number(!checked) ); + + if (checked) { qApp->removeEventFilter(this); } + else { qApp->installEventFilter(this); } + } else if ( tag == "smoothscroll" ) { @@ -1363,6 +1364,18 @@ void MainWindow::sessionCleanup() +bool MainWindow::eventFilter(QObject* watched, QEvent* event) +{ + // For now this function is only used to globally block tooltips + // It must be installed to QApplication through installEventFilter + if (event->type() == QEvent::ToolTip) { return true; } + + return QObject::eventFilter(watched, event); +} + + + + void MainWindow::focusOutEvent( QFocusEvent * _fe ) { // TODO Remove this function, since it is apparently never actually called! diff --git a/src/gui/MidiClipView.cpp b/src/gui/MidiClipView.cpp index 12ed7eea7..987d1fe14 100644 --- a/src/gui/MidiClipView.cpp +++ b/src/gui/MidiClipView.cpp @@ -36,7 +36,6 @@ #include "MidiClip.h" #include "PianoRoll.h" #include "RenameDialog.h" -#include "ToolTip.h" MidiClipView::MidiClipView( MidiClip* clip, TrackView* parent ) : ClipView( clip, parent ), @@ -94,7 +93,7 @@ MidiClip* MidiClipView::getMidiClip() void MidiClipView::update() { - ToolTip::add(this, m_clip->name()); + setToolTip(m_clip->name()); ClipView::update(); } diff --git a/src/gui/MixerView.cpp b/src/gui/MixerView.cpp index 502461b7d..15a24721f 100644 --- a/src/gui/MixerView.cpp +++ b/src/gui/MixerView.cpp @@ -297,7 +297,7 @@ MixerView::MixerChannelView::MixerChannelView(QWidget * _parent, MixerView * _mv embed::getIconPixmap( "led_green" ) ); m_muteBtn->setCheckable( true ); m_muteBtn->move( 9, m_fader->y()-11); - ToolTip::add( m_muteBtn, tr( "Mute this channel" ) ); + m_muteBtn->setToolTip(tr("Mute this channel")); m_soloBtn = new PixmapButton( m_mixerLine, tr( "Solo" ) ); m_soloBtn->setModel( &mixerChannel->m_soloModel ); @@ -309,7 +309,7 @@ MixerView::MixerChannelView::MixerChannelView(QWidget * _parent, MixerView * _mv m_soloBtn->move( 9, m_fader->y()-21); connect(&mixerChannel->m_soloModel, SIGNAL( dataChanged() ), _mv, SLOT ( toggledSolo() ), Qt::DirectConnection ); - ToolTip::add( m_soloBtn, tr( "Solo this channel" ) ); + m_soloBtn->setToolTip(tr("Solo this channel")); // Create EffectRack for the channel m_rackView = new EffectRackView( &mixerChannel->m_fxChain, _mv->m_racksWidget ); diff --git a/src/gui/PatternClipView.cpp b/src/gui/PatternClipView.cpp index 30d2096e7..f865f778b 100644 --- a/src/gui/PatternClipView.cpp +++ b/src/gui/PatternClipView.cpp @@ -34,7 +34,6 @@ #include "PatternClip.h" #include "PatternStore.h" #include "RenameDialog.h" -#include "ToolTip.h" PatternClipView::PatternClipView(Clip* _clip, TrackView* _tv) : ClipView( _clip, _tv ), @@ -185,7 +184,7 @@ void PatternClipView::changeName() void PatternClipView::update() { - ToolTip::add(this, m_patternClip->name()); + setToolTip(m_patternClip->name()); ClipView::update(); } diff --git a/src/gui/PeakControllerDialog.cpp b/src/gui/PeakControllerDialog.cpp index 6f95f1a84..923467d7e 100644 --- a/src/gui/PeakControllerDialog.cpp +++ b/src/gui/PeakControllerDialog.cpp @@ -29,7 +29,6 @@ #include #include "embed.h" -#include "ToolTip.h" #include "PeakController.h" @@ -41,7 +40,7 @@ PeakControllerDialog::PeakControllerDialog( Controller * _model, QWidget * _pare setWindowIcon( embed::getIconPixmap( "controller" ) ); setFixedSize( 256, 64 ); - ToolTip::add( this, tr( "LFO Controller" ) ); + setToolTip(tr("LFO Controller")); QLabel * l = new QLabel( this ); l->setText( "Use FX's controls" ); diff --git a/src/gui/SampleClipView.cpp b/src/gui/SampleClipView.cpp index aff412120..80b0e6ef2 100644 --- a/src/gui/SampleClipView.cpp +++ b/src/gui/SampleClipView.cpp @@ -34,7 +34,6 @@ #include "SampleClip.h" #include "Song.h" #include "StringPairDrag.h" -#include "ToolTip.h" SampleClipView::SampleClipView( SampleClip * _clip, TrackView * _tv ) : ClipView( _clip, _tv ), @@ -57,7 +56,7 @@ void SampleClipView::updateSample() update(); // set tooltip to filename so that user can see what sample this // sample-clip contains - ToolTip::add( this, ( m_clip->m_sampleBuffer->audioFile() != "" ) ? + setToolTip(m_clip->m_sampleBuffer->audioFile() != "" ? PathUtil::toAbsolute(m_clip->m_sampleBuffer->audioFile()) : tr( "Double-click to open sample" ) ); } diff --git a/src/gui/TrackView.cpp b/src/gui/TrackView.cpp index 85c33e8c9..888af3c5f 100644 --- a/src/gui/TrackView.cpp +++ b/src/gui/TrackView.cpp @@ -40,7 +40,6 @@ #include "FadeButton.h" #include "PixmapButton.h" #include "StringPairDrag.h" -#include "ToolTip.h" #include "Track.h" #include "TrackContainerView.h" #include "ClipView.h" @@ -375,7 +374,7 @@ void TrackView::mouseMoveEvent( QMouseEvent * me ) if( height() < DEFAULT_TRACK_HEIGHT ) { - ToolTip::add( this, m_track->m_name ); + setToolTip(m_track->m_name); } } diff --git a/src/gui/editors/AutomationEditor.cpp b/src/gui/editors/AutomationEditor.cpp index 19de943f5..998af4be8 100644 --- a/src/gui/editors/AutomationEditor.cpp +++ b/src/gui/editors/AutomationEditor.cpp @@ -60,7 +60,6 @@ #include "StringPairDrag.h" #include "TextFloat.h" #include "TimeLineWidget.h" -#include "ToolTip.h" QPixmap * AutomationEditor::s_toolDraw = nullptr; @@ -1878,7 +1877,7 @@ AutomationEditorWindow::AutomationEditorWindow() : // setup tension-stuff m_tensionKnob = new Knob( knobSmall_17, this, "Tension" ); m_tensionKnob->setModel(m_editor->m_tensionModel); - ToolTip::add(m_tensionKnob, tr("Tension value for spline")); + m_tensionKnob->setToolTip(tr("Tension value for spline")); connect(m_cubicHermiteAction, SIGNAL(toggled(bool)), m_tensionKnob, SLOT(setEnabled(bool))); diff --git a/src/gui/editors/SongEditor.cpp b/src/gui/editors/SongEditor.cpp index 3c9d108f1..b1acc486f 100644 --- a/src/gui/editors/SongEditor.cpp +++ b/src/gui/editors/SongEditor.cpp @@ -52,7 +52,6 @@ #include "TextFloat.h" #include "TimeDisplayWidget.h" #include "TimeLineWidget.h" -#include "ToolTip.h" #include "TrackView.h" const QVector SongEditor::m_zoomLevels = @@ -112,7 +111,7 @@ SongEditor::SongEditor( Song * song ) : m_tempoSpinBox = new LcdSpinBox( 3, tb, tr( "Tempo" ) ); m_tempoSpinBox->setModel( &m_song->m_tempoModel ); m_tempoSpinBox->setLabel( tr( "TEMPO" ) ); - ToolTip::add( m_tempoSpinBox, tr( "Tempo in BPM" ) ); + m_tempoSpinBox->setToolTip(tr("Tempo in BPM")); int tempoSpinBoxCol = getGUI()->mainWindow()->addWidgetToToolBar( m_tempoSpinBox, 0 ); @@ -149,7 +148,7 @@ SongEditor::SongEditor( Song * song ) : m_masterVolumeSlider->setTickPosition( QSlider::TicksLeft ); m_masterVolumeSlider->setFixedSize( 26, 60 ); m_masterVolumeSlider->setTickInterval( 50 ); - ToolTip::add( m_masterVolumeSlider, tr( "Master volume" ) ); + m_masterVolumeSlider->setToolTip(tr("Master volume")); connect( m_masterVolumeSlider, SIGNAL( logicValueChanged( int ) ), this, SLOT( setMasterVolume( int ) ) ); @@ -182,7 +181,7 @@ SongEditor::SongEditor( Song * song ) : m_masterPitchSlider->setTickPosition( QSlider::TicksLeft ); m_masterPitchSlider->setFixedSize( 26, 60 ); m_masterPitchSlider->setTickInterval( 12 ); - ToolTip::add( m_masterPitchSlider, tr( "Master pitch" ) ); + m_masterPitchSlider->setToolTip(tr("Master pitch")); connect( m_masterPitchSlider, SIGNAL( logicValueChanged( int ) ), this, SLOT( setMasterPitch( int ) ) ); connect( m_masterPitchSlider, SIGNAL( sliderPressed() ), this, diff --git a/src/gui/modals/SetupDialog.cpp b/src/gui/modals/SetupDialog.cpp index 50b92befa..035912a47 100644 --- a/src/gui/modals/SetupDialog.cpp +++ b/src/gui/modals/SetupDialog.cpp @@ -43,7 +43,6 @@ #include "SetupDialog.h" #include "TabBar.h" #include "TabButton.h" -#include "ToolTip.h" // Platform-specific audio-interface classes. @@ -589,7 +588,7 @@ SetupDialog::SetupDialog(ConfigTabs tab_to_open) : bufferSize_reset_btn->setGeometry(320, 40, 28, 28); connect(bufferSize_reset_btn, SIGNAL(clicked()), this, SLOT(resetBufferSize())); - ToolTip::add(bufferSize_reset_btn, + bufferSize_reset_btn->setToolTip( tr("Reset to default value")); diff --git a/src/gui/widgets/EffectView.cpp b/src/gui/widgets/EffectView.cpp index 8b5ca4392..11d95cb2e 100644 --- a/src/gui/widgets/EffectView.cpp +++ b/src/gui/widgets/EffectView.cpp @@ -38,7 +38,6 @@ #include "MainWindow.h" #include "SubWindow.h" #include "TempoSyncKnob.h" -#include "ToolTip.h" EffectView::EffectView( Effect * _model, QWidget * _parent ) : @@ -55,7 +54,7 @@ EffectView::EffectView( Effect * _model, QWidget * _parent ) : m_bypass->move( 3, 3 ); m_bypass->setEnabled( isEnabled ); - ToolTip::add( m_bypass, tr( "On/Off" ) ); + m_bypass->setToolTip(tr("On/Off")); m_wetDry = new Knob( knobBright_26, this ); diff --git a/src/gui/widgets/EnvelopeAndLfoView.cpp b/src/gui/widgets/EnvelopeAndLfoView.cpp index 545294e61..3ca55c9a8 100644 --- a/src/gui/widgets/EnvelopeAndLfoView.cpp +++ b/src/gui/widgets/EnvelopeAndLfoView.cpp @@ -40,7 +40,6 @@ #include "StringPairDrag.h" #include "TempoSyncKnob.h" #include "TextFloat.h" -#include "ToolTip.h" #include "Track.h" @@ -218,14 +217,14 @@ EnvelopeAndLfoView::EnvelopeAndLfoView( QWidget * _parent ) : m_x100Cb = new LedCheckBox( tr( "FREQ x 100" ), this ); m_x100Cb->setFont( pointSizeF( m_x100Cb->font(), 6.5 ) ); m_x100Cb->move( LFO_PREDELAY_KNOB_X, LFO_GRAPH_Y + 36 ); - ToolTip::add( m_x100Cb, tr( "Multiply LFO frequency by 100" ) ); + m_x100Cb->setToolTip(tr("Multiply LFO frequency by 100")); m_controlEnvAmountCb = new LedCheckBox( tr( "MODULATE ENV AMOUNT" ), this ); m_controlEnvAmountCb->move( LFO_PREDELAY_KNOB_X, LFO_GRAPH_Y + 54 ); m_controlEnvAmountCb->setFont( pointSizeF( m_controlEnvAmountCb->font(), 6.5 ) ); - ToolTip::add( m_controlEnvAmountCb, + m_controlEnvAmountCb->setToolTip( tr( "Control envelope amount by this LFO" ) ); diff --git a/src/gui/widgets/LadspaControlView.cpp b/src/gui/widgets/LadspaControlView.cpp index c8fb1822e..9b539ff21 100644 --- a/src/gui/widgets/LadspaControlView.cpp +++ b/src/gui/widgets/LadspaControlView.cpp @@ -31,7 +31,6 @@ #include "LadspaBase.h" #include "LedCheckBox.h" #include "TempoSyncKnob.h" -#include "ToolTip.h" LadspaControlView::LadspaControlView( QWidget * _parent, @@ -50,7 +49,7 @@ LadspaControlView::LadspaControlView( QWidget * _parent, { link = new LedCheckBox( "", this ); link->setModel( &m_ctl->m_linkEnabledModel ); - ToolTip::add( link, tr( "Link channels" ) ); + link->setToolTip(tr("Link channels")); layout->addWidget( link ); } diff --git a/src/gui/widgets/LeftRightNav.cpp b/src/gui/widgets/LeftRightNav.cpp index 8d614fa3e..a76b4ec6d 100644 --- a/src/gui/widgets/LeftRightNav.cpp +++ b/src/gui/widgets/LeftRightNav.cpp @@ -26,7 +26,6 @@ #include #include "LeftRightNav.h" -#include "ToolTip.h" #include "embed.h" @@ -60,8 +59,8 @@ LeftRightNav::LeftRightNav(QWidget *parent) connect(&m_rightBtn, SIGNAL(clicked()), this, SIGNAL(onNavRight())); - ToolTip::add(&m_leftBtn, tr("Previous")); - ToolTip::add(&m_rightBtn, tr("Next")); + m_leftBtn.setToolTip(tr("Previous")); + m_rightBtn.setToolTip(tr("Next")); m_leftBtn.setWindowTitle(tr("Previous")); m_rightBtn.setWindowTitle(tr("Next")); @@ -88,6 +87,6 @@ void LeftRightNav::setShortcuts(const QKeySequence &leftShortcut, const QKeySequ m_leftBtn.setShortcut(leftShortcut); m_rightBtn.setShortcut(rightShortcut); - ToolTip::add(&m_leftBtn, tr("Previous (%1)").arg(leftShortcut.toString())); - ToolTip::add(&m_rightBtn, tr("Next (%1)").arg(rightShortcut.toString())); + m_leftBtn.setToolTip(tr("Previous (%1)").arg(leftShortcut.toString())); + m_rightBtn.setToolTip(tr("Next (%1)").arg(rightShortcut.toString())); } diff --git a/src/gui/widgets/MeterDialog.cpp b/src/gui/widgets/MeterDialog.cpp index 10153c632..deeeb0599 100644 --- a/src/gui/widgets/MeterDialog.cpp +++ b/src/gui/widgets/MeterDialog.cpp @@ -32,7 +32,6 @@ #include "MeterModel.h" #include "gui_templates.h" #include "LcdSpinBox.h" -#include "ToolTip.h" MeterDialog::MeterDialog( QWidget * _parent, bool _simple ) : @@ -50,7 +49,7 @@ MeterDialog::MeterDialog( QWidget * _parent, bool _simple ) : m_numerator = new LcdSpinBox( 2, num, tr( "Meter Numerator" ) ); - ToolTip::add( m_numerator, tr( "Meter numerator" ) ); + m_numerator->setToolTip(tr("Meter numerator")); num_layout->addWidget( m_numerator ); @@ -71,7 +70,7 @@ MeterDialog::MeterDialog( QWidget * _parent, bool _simple ) : den_layout->setMargin( 0 ); m_denominator = new LcdSpinBox( 2, den, tr( "Meter Denominator" ) ); - ToolTip::add( m_denominator, tr( "Meter denominator" ) ); + m_denominator->setToolTip(tr("Meter denominator")); if( _simple ) { m_denominator->setLabel( tr( "TIME SIG" ) ); diff --git a/src/gui/widgets/NStateButton.cpp b/src/gui/widgets/NStateButton.cpp index 44736f33c..41832138b 100644 --- a/src/gui/widgets/NStateButton.cpp +++ b/src/gui/widgets/NStateButton.cpp @@ -26,7 +26,6 @@ #include #include "NStateButton.h" -#include "ToolTip.h" @@ -75,7 +74,7 @@ void NStateButton::changeState( int _n ) ( m_states[m_curState].second != "" ) ? m_states[m_curState].second : m_generalToolTip; - ToolTip::add( this, _tooltip ); + setToolTip(_tooltip); setIcon( m_states[m_curState].first ); diff --git a/src/gui/widgets/Oscilloscope.cpp b/src/gui/widgets/Oscilloscope.cpp index 2a8f04acb..30296b805 100644 --- a/src/gui/widgets/Oscilloscope.cpp +++ b/src/gui/widgets/Oscilloscope.cpp @@ -32,7 +32,6 @@ #include "MainWindow.h" #include "AudioEngine.h" #include "Engine.h" -#include "ToolTip.h" #include "Song.h" #include "embed.h" #include "BufferManager.h" @@ -56,7 +55,7 @@ Oscilloscope::Oscilloscope( QWidget * _p ) : BufferManager::clear( m_buffer, frames ); - ToolTip::add( this, tr( "Oscilloscope" ) ); + setToolTip(tr("Oscilloscope")); } diff --git a/src/gui/widgets/SideBar.cpp b/src/gui/widgets/SideBar.cpp index 130616e55..92b7d8884 100644 --- a/src/gui/widgets/SideBar.cpp +++ b/src/gui/widgets/SideBar.cpp @@ -28,7 +28,6 @@ #include "SideBar.h" #include "SideBarWidget.h" -#include "ToolTip.h" // internal helper class allowing to create QToolButtons with @@ -120,7 +119,7 @@ void SideBar::appendTab( SideBarWidget *widget ) widget->hide(); widget->setMinimumWidth( 200 ); - ToolTip::add( button, widget->title() ); + button->setToolTip(widget->title()); connect(widget, &SideBarWidget::closeButtonClicked, [=]() { button->click(); }); diff --git a/src/gui/widgets/TabBar.cpp b/src/gui/widgets/TabBar.cpp index d40b41d98..30822c85f 100644 --- a/src/gui/widgets/TabBar.cpp +++ b/src/gui/widgets/TabBar.cpp @@ -26,7 +26,6 @@ #include "TabBar.h" #include "TabButton.h" #include "gui_templates.h" -#include "ToolTip.h" @@ -59,7 +58,7 @@ TabButton * TabBar::addTab( QWidget * _w, const QString & _text, int _id, b->show(); if( _text_is_tooltip ) { - ToolTip::add( b, _text ); + b->setToolTip(_text); } // small workaround, because QBoxLayout::addWidget(...) doesn't diff --git a/src/gui/widgets/TimeDisplayWidget.cpp b/src/gui/widgets/TimeDisplayWidget.cpp index bc5e5d604..bde9e7dfe 100644 --- a/src/gui/widgets/TimeDisplayWidget.cpp +++ b/src/gui/widgets/TimeDisplayWidget.cpp @@ -28,7 +28,6 @@ #include "GuiApplication.h" #include "MainWindow.h" #include "Engine.h" -#include "ToolTip.h" #include "Song.h" @@ -49,7 +48,7 @@ TimeDisplayWidget::TimeDisplayWidget() : setMaximumHeight( 32 ); - ToolTip::add( this, tr( "Time units" ) ); + setToolTip(tr("Time units")); // update labels of LCD spinboxes setDisplayMode( m_displayMode ); diff --git a/src/gui/widgets/ToolButton.cpp b/src/gui/widgets/ToolButton.cpp index f5ef3560a..6dea411d8 100644 --- a/src/gui/widgets/ToolButton.cpp +++ b/src/gui/widgets/ToolButton.cpp @@ -24,7 +24,6 @@ #include "ToolButton.h" -#include "ToolTip.h" ToolButton::ToolButton( const QPixmap & _pixmap, const QString & _tooltip, @@ -38,6 +37,6 @@ ToolButton::ToolButton( const QPixmap & _pixmap, const QString & _tooltip, { connect( this, SIGNAL( clicked() ), _receiver, _slot ); } - ToolTip::add( this, _tooltip ); + setToolTip(_tooltip); setIcon( _pixmap ); } diff --git a/src/gui/widgets/ToolTip.cpp b/src/gui/widgets/ToolTip.cpp deleted file mode 100644 index 95dde8344..000000000 --- a/src/gui/widgets/ToolTip.cpp +++ /dev/null @@ -1,41 +0,0 @@ -/* - * ToolTip.cpp - namespace toolTip, a tooltip-wrapper for LMMS - * - * Copyright (c) 2005-2006 Tobias Doerffel - * - * This file is part of LMMS - https://lmms.io - * - * 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 - -#include "ToolTip.h" -#include "ConfigManager.h" - - -void ToolTip::add( QWidget * _w, const QString & _txt ) -{ - if( !ConfigManager::inst()->value( "tooltips", "disabled" ).toInt() ) - { - _w->setToolTip( _txt ); - } -} - - diff --git a/src/gui/widgets/TrackOperationsWidget.cpp b/src/gui/widgets/TrackOperationsWidget.cpp index 0b85dd9c5..4b56282a6 100644 --- a/src/gui/widgets/TrackOperationsWidget.cpp +++ b/src/gui/widgets/TrackOperationsWidget.cpp @@ -43,7 +43,6 @@ #include "PixmapButton.h" #include "Song.h" #include "StringPairDrag.h" -#include "ToolTip.h" #include "Track.h" #include "TrackContainerView.h" #include "TrackView.h" @@ -58,7 +57,7 @@ TrackOperationsWidget::TrackOperationsWidget( TrackView * parent ) : QWidget( parent ), /*!< The parent widget */ m_trackView( parent ) /*!< The parent track view */ { - ToolTip::add( this, tr( "Press <%1> while clicking on move-grip " + setToolTip(tr("Press <%1> while clicking on move-grip " "to begin a new drag'n'drop action." ).arg(UI_CTRL_KEY) ); QMenu * toMenu = new QMenu( this ); @@ -73,7 +72,7 @@ TrackOperationsWidget::TrackOperationsWidget( TrackView * parent ) : m_trackOps->move( 12, 1 ); m_trackOps->setFocusPolicy( Qt::NoFocus ); m_trackOps->setMenu( toMenu ); - ToolTip::add( m_trackOps, tr( "Actions" ) ); + m_trackOps->setToolTip(tr("Actions")); m_muteBtn = new PixmapButton( this, tr( "Mute" ) ); @@ -99,10 +98,10 @@ TrackOperationsWidget::TrackOperationsWidget( TrackView * parent ) : } m_muteBtn->show(); - ToolTip::add( m_muteBtn, tr( "Mute" ) ); + m_muteBtn->setToolTip(tr("Mute")); m_soloBtn->show(); - ToolTip::add( m_soloBtn, tr( "Solo" ) ); + m_soloBtn->setToolTip(tr("Solo")); connect( this, SIGNAL( trackRemovalScheduled( TrackView * ) ), m_trackView->trackContainerView(),