diff options
Diffstat (limited to 'src/app/mainWindow.cpp')
-rw-r--r-- | src/app/mainWindow.cpp | 19 |
1 files changed, 15 insertions, 4 deletions
diff --git a/src/app/mainWindow.cpp b/src/app/mainWindow.cpp index 9409d85..5e5ea37 100644 --- a/src/app/mainWindow.cpp +++ b/src/app/mainWindow.cpp @@ -22,11 +22,13 @@ #include <tqlayout.h> //ctor #include <tqpopupmenu.h> //because XMLGUI is poorly designed #include <tqobjectlist.h> +#include <tqwidgetstack.h> #include "../debug.h" #include "../mxcl.library.h" #include "actions.h" #include "analyzer.h" +#include "audioView.h" #include "codeineConfig.h" #include "extern.h" //dialog creation function definitions #include "fullScreenAction.h" @@ -70,8 +72,20 @@ MainWindow::MainWindow() kapp->setMainWidget( this ); + m_widgetStack = new TQWidgetStack(this, "m_widgetStack"); + m_widgetStack->setMouseTracking(true); + new VideoWindow( this ); - setCentralWidget( videoWindow() ); + + m_audioView = new AudioView(this, "m_audioView"); + + // videoWindow() will be the initial widget. + // m_audioView is raised when no video track is present. + m_widgetStack->addWidget(videoWindow()); + m_widgetStack->addWidget(m_audioView); + + setCentralWidget(m_widgetStack); + setFocusProxy( videoWindow() ); // essential! See VideoWindow::event(), TQEvent::FocusOut // these have no affect beccause "KDE Knows Best" FFS @@ -585,9 +599,6 @@ MainWindow::fullScreenToggled( bool isFullScreen ) s_handler = new FullScreenToolBarHandler( this ); else delete s_handler; - - // prevent videoWindow() moving around when mouse moves - setCentralWidget( isFullScreen ? nullptr : videoWindow() ); } void |