[Jahshaka-cvs] SF.net SVN: editopia: [61] cinesuite/cineplay-cinecode/trunk/src
Status: Beta
Brought to you by:
jahshaka
From: <tim...@us...> - 2008-03-04 10:08:48
|
Revision: 61 http://editopia.svn.sourceforge.net/editopia/?rev=61&view=rev Author: timdewhirst Date: 2008-03-04 02:08:14 -0800 (Tue, 04 Mar 2008) Log Message: ----------- cinesuite - reinstate encode menu Modified Paths: -------------- cinesuite/cineplay-cinecode/trunk/src/CineCode.cpp cinesuite/cineplay-cinecode/trunk/src/CineCode.h cinesuite/cineplay-cinecode/trunk/src/Common.cpp cinesuite/cineplay-cinecode/trunk/src/Common.h Modified: cinesuite/cineplay-cinecode/trunk/src/CineCode.cpp =================================================================== --- cinesuite/cineplay-cinecode/trunk/src/CineCode.cpp 2008-03-03 22:49:35 UTC (rev 60) +++ cinesuite/cineplay-cinecode/trunk/src/CineCode.cpp 2008-03-04 10:08:14 UTC (rev 61) @@ -26,6 +26,7 @@ // qt #include <qapplication.h> #include <qnetwork.h> +#include <qmenubar.h> namespace cineplay { @@ -37,6 +38,20 @@ { //general main window setup setAcceptDrops( true ); + + // cinecode specific setup + m_impl->m_timeSlider->setProperty( "enableInOutControls", true ); + + // encode + QPopupMenu* encode = new QPopupMenu( m_impl->m_menubar ); + encode->setPalette( m_impl->m_menubar->palette() ); + encode->insertItem( tr( "&encode..." ), this, SLOT( onEncodeEncode() ) ); + encode->insertItem( tr( "&cancel all" ), this, SLOT( onEncodeCancelAll() ) ); + encode->insertItem( tr( "set &in point" ), this, SLOT( onSetInPoint() ) ); + encode->insertItem( tr( "set &out point" ), this, SLOT( onSetOutPoint() ) ); + encode->insertItem( tr( "&reset in/out points" ), this, SLOT( onResetInOPutPoints() ) ); + m_encodeTrayItem = encode->insertItem( tr( "toggle encode &tray" ), this, SLOT( onEncodeTrayShow() ) ); + m_impl->m_menubar->insertItem( "&Encode", encode ); } bool CineCode::LoadCmdLineInput( const QString& fname ) Modified: cinesuite/cineplay-cinecode/trunk/src/CineCode.h =================================================================== --- cinesuite/cineplay-cinecode/trunk/src/CineCode.h 2008-03-03 22:49:35 UTC (rev 60) +++ cinesuite/cineplay-cinecode/trunk/src/CineCode.h 2008-03-04 10:08:14 UTC (rev 61) @@ -51,6 +51,7 @@ private: Common* m_impl; + int m_encodeTrayItem; }; } //namespace cineplay Modified: cinesuite/cineplay-cinecode/trunk/src/Common.cpp =================================================================== --- cinesuite/cineplay-cinecode/trunk/src/Common.cpp 2008-03-03 22:49:35 UTC (rev 60) +++ cinesuite/cineplay-cinecode/trunk/src/Common.cpp 2008-03-04 10:08:14 UTC (rev 61) @@ -159,16 +159,16 @@ menubarPlaceholder->hide(); #endif - QMenuBar* menubar = new QMenuBar( menubarPlaceholder ); - menubar->setFrameShape( QFrame::NoFrame ); - menubar->setPalette( menubarPlaceholder->palette() ); - menubar->setSeparator( QMenuBar::InWindowsStyle ); + m_menubar = new QMenuBar( menubarPlaceholder ); + m_menubar->setFrameShape( QFrame::NoFrame ); + m_menubar->setPalette( menubarPlaceholder->palette() ); + m_menubar->setSeparator( QMenuBar::InWindowsStyle ); // file - m_fileMenu = new QPopupMenu( menubar ); + m_fileMenu = new QPopupMenu( m_menubar ); //mru menu - m_mruMenu = new QPopupMenu( menubar ); + m_mruMenu = new QPopupMenu( m_menubar ); m_mruList.BuildMenu(m_mruMenu, this, SLOT( onMruSelected(int) ) ); m_mruMenu->setPalette( menubarPlaceholder->palette() ); @@ -184,10 +184,10 @@ m_fileMenu->insertItem( tr( "&close" ), this, SLOT( onClose() ) ); //m_fileMenu->insertItem( tr( "save &as" ), this, SLOT( onSaveAs() ) ); m_fileMenu->insertItem( tr( "&quit" ), qApp, SLOT( quit() ) ); - menubar->insertItem( tr( "&File" ), m_fileMenu ); + m_menubar->insertItem( tr( "&File" ), m_fileMenu ); // view - m_menuView = new QPopupMenu( menubar ); + m_menuView = new QPopupMenu( m_menubar ); m_menuView->setPalette( menubarPlaceholder->palette() ); m_menuViewHalfIndex = m_menuView->insertItem( tr( "&half size" ), this, SLOT( onViewHalfSize() ) ); m_menuViewNormalIndex = m_menuView->insertItem( tr( "&normal size" ), this, SLOT( onViewNormalSize() ) ); @@ -197,14 +197,14 @@ m_menuViewShowIndex = m_menuView->insertItem( tr( "hide &video" ), this, SLOT( onViewHideVideo() ) ); m_menuView->insertSeparator(); m_menuViewLoopIndex = m_menuView->insertItem( tr( "&loop" ), this, SLOT( onViewLoop() ) ); - menubar->insertItem( tr( "&View" ), m_menuView ); + m_menubar->insertItem( tr( "&View" ), m_menuView ); // window - m_windowMenu = new QPopupMenu( menubar ); + m_windowMenu = new QPopupMenu( m_menubar ); m_windowMenu->setPalette( menubarPlaceholder->palette() ); m_windowMenu->insertItem( tr( "&movie info" ), this, SLOT( onShowMovieInfo() ) ); - m_favMenu = new QPopupMenu( menubar ); + m_favMenu = new QPopupMenu( m_menubar ); m_favList.BuildMenu(m_favMenu, this, SLOT( onFavSelected(int) ) ); m_favMenu->setPalette( menubarPlaceholder->palette() ); @@ -214,16 +214,16 @@ m_favItemRef = m_windowMenu->insertItem( tr( "&favorites" ), m_favMenu ); updateFavMenu(); - menubar->insertItem( tr( "&Window" ), m_windowMenu ); + m_menubar->insertItem( tr( "&Window" ), m_windowMenu ); // help - QPopupMenu* help = new QPopupMenu( menubar ); + QPopupMenu* help = new QPopupMenu( m_menubar ); help->setPalette( menubarPlaceholder->palette() ); help->insertItem( tr( "&help" ), this, SLOT( onHelp() ) ); help->insertItem( tr( "&check for release" ), this, SLOT( onCheckVersion() ) ); help->insertItem( tr( "&website" ), this, SLOT( onGotoWebsite() ) ); help->insertItem( tr( "&about" ), this, SLOT( onAbout() ) ); - menubar->insertItem( "&Help", help ); + m_menubar->insertItem( "&Help", help ); if( !SetupStores() ) { Modified: cinesuite/cineplay-cinecode/trunk/src/Common.h =================================================================== --- cinesuite/cineplay-cinecode/trunk/src/Common.h 2008-03-03 22:49:35 UTC (rev 60) +++ cinesuite/cineplay-cinecode/trunk/src/Common.h 2008-03-04 10:08:14 UTC (rev 61) @@ -40,6 +40,7 @@ class Release; class ReleaseDlg; class TrayDlg; +class QMenuBar; namespace cineplay { @@ -166,6 +167,7 @@ bool m_playerRefresh; bool m_playControlPopup; + QMenuBar* m_menubar; QPopupMenu* m_menuView; int m_menuViewHalfIndex; int m_menuViewNormalIndex; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |