2009/1/9 Mark Kretschmann : > SVN commit 907804 by markey: > > Show the current engine volume in the systray tooltip. > > I recently noticed that I really missed a way to quickly see Amarok's > volume setting, so I added this. However, I'm not convinced that the > positioning in the tooltip is very good. Suggestions welcome. I use Win-O. Not sure that the systray tooltip is the best place for it, but then again I never use it. > > M +9 -0 TrackTooltip.cpp > M +1 -0 TrackTooltip.h > > > --- trunk/extragear/multimedia/amarok/src/widgets/TrackTooltip.cpp #907803:907804 > @@ -231,6 +231,8 @@ > m_title += i18n( " on %1", album ); > } > > + m_tooltip += i18n( "Volume: %1%", QString::number( The::engineController()->volume() ) ); > + > m_tooltip += ""; > m_tooltip += ""; > > @@ -332,6 +334,13 @@ > } > } > > +void TrackToolTip::engineVolumeChanged( int percent ) > +{ > + Q_UNUSED( percent ) > + > + setTrack(); > +} > + > bool TrackToolTip::eventFilter( QObject* obj, QEvent* event ) > { > if( event->type() == QEvent::MouseButtonPress ) { > --- trunk/extragear/multimedia/amarok/src/widgets/TrackTooltip.h #907803:907804 > @@ -54,6 +54,7 @@ > virtual void engineNewTrackPlaying(); > virtual void enginePlaybackEnded( int finalPosition, int trackLength, const QString &reason ); > virtual void engineTrackPositionChanged( long position, bool userSeek ); > + virtual void engineVolumeChanged( int percent ); > > bool eventFilter( QObject* obj, QEvent* event ); > virtual void mousePressEvent( QMouseEvent* ); > -- Seb Ruiz http://www.sebruiz.net/ http://amarok.kde.org/