From 5e57ab35afe0d5ddd960921a76ea11f22561f287 Mon Sep 17 00:00:00 2001 From: mio Date: Tue, 21 Jan 2025 17:00:36 +1000 Subject: Add context menu to status bar It adds an item which toggles the visibility of the Analyzer when watching videos. Signed-off-by: mio --- src/app/mainWindow.h | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'src/app/mainWindow.h') diff --git a/src/app/mainWindow.h b/src/app/mainWindow.h index 3dae1e8..fbb6be4 100644 --- a/src/app/mainWindow.h +++ b/src/app/mainWindow.h @@ -46,6 +46,7 @@ namespace Codeine void fullScreenToggled( bool ); void setAudioChannels(const TQStringList&) const; void setSubtitleChannels(const TQStringList&) const; + void toggleAnalyzer(); private: void setupActions(); @@ -55,6 +56,7 @@ namespace Codeine TQPopupMenu *menu(const TQString&); + void contextMenuEvent(TQContextMenuEvent *event) override; virtual void timerEvent( TQTimerEvent* ); virtual void dragEnterEvent( TQDragEnterEvent* ); virtual void dropEvent( TQDropEvent* ); @@ -73,6 +75,10 @@ namespace Codeine TQWidgetStack *m_widgetStack; VolumeAction *m_volumeAction; + // Keep track of Analyzer visibility separately so swapping between + // Video & Audio correctly restores the state without re-reading the config. + bool m_showAnalyzer; + //undefined MainWindow( const MainWindow& ); MainWindow &operator=( const MainWindow& ); -- cgit v1.2.3