[Jahshaka-cvs] SF.net SVN: editopia:[218] cinesuite/cineplay-cinecode/trunk/src
Status: Beta
Brought to you by:
jahshaka
From: <tim...@us...> - 2008-11-03 08:57:09
|
Revision: 218 http://editopia.svn.sourceforge.net/editopia/?rev=218&view=rev Author: timdewhirst Date: 2008-11-03 08:57:02 +0000 (Mon, 03 Nov 2008) Log Message: ----------- cinesuite * final remaining q3support code removal for cineplay Modified Paths: -------------- cinesuite/cineplay-cinecode/trunk/src/CineCode.cpp cinesuite/cineplay-cinecode/trunk/src/CinePlay.cpp cinesuite/cineplay-cinecode/trunk/src/Download.cpp cinesuite/cineplay-cinecode/trunk/src/jah.pri cinesuite/cineplay-cinecode/trunk/src/windows/downloadDialog.ui Modified: cinesuite/cineplay-cinecode/trunk/src/CineCode.cpp =================================================================== --- cinesuite/cineplay-cinecode/trunk/src/CineCode.cpp 2008-11-03 08:56:03 UTC (rev 217) +++ cinesuite/cineplay-cinecode/trunk/src/CineCode.cpp 2008-11-03 08:57:02 UTC (rev 218) @@ -382,7 +382,7 @@ new ScrollViewResizer( w, m_encodeTrayViewport, ScrollViewResizer::HORIZONTAL ); QFont f( font() ); - f.setPointSizeFloat( SETTINGS_TRAYFONTPERCENT_DEFAULT * f.pointSizeFloat() / 100 ); + f.setPointSizeF( SETTINGS_TRAYFONTPERCENT_DEFAULT * f.pointSizeF() / 100 ); w->setFont( f ); if ( m_encodeTrayPlaceholder->children().count()%2 ) @@ -504,7 +504,7 @@ m_favouriteTrayPlaceholder->layout()->addWidget( e ); QFont f( font() ); - f.setPointSizeFloat( SETTINGS_TRAYFONTPERCENT_DEFAULT * f.pointSizeFloat() / 100.0 ); + f.setPointSizeF( SETTINGS_TRAYFONTPERCENT_DEFAULT * f.pointSizeF() / 100.0 ); e->setFont( f ); if ( i%2 ) Modified: cinesuite/cineplay-cinecode/trunk/src/CinePlay.cpp =================================================================== --- cinesuite/cineplay-cinecode/trunk/src/CinePlay.cpp 2008-11-03 08:56:03 UTC (rev 217) +++ cinesuite/cineplay-cinecode/trunk/src/CinePlay.cpp 2008-11-03 08:57:02 UTC (rev 218) @@ -22,6 +22,8 @@ #include "CinePlay.h" #include "Common.h" #include "Tray.h" +#include "SetupDefs.h" +#include "Version.h" #include "Utils.h" #include "PlayList.h" #include "FavoriteTrayEntry.h" @@ -34,6 +36,7 @@ #include <QApplication> #include <QScrollArea> #include <QLayout> +#include <QFileInfo> // std #include <algorithm> @@ -69,21 +72,17 @@ connect( toggleRightTrayButton, SIGNAL( toggled( bool ) ), m_favoritesTray, SLOT( setShown( bool ) ) ); // setup a scrollview - QVBoxLayout* placeholderLayout = new QVBoxLayout( m_favoritesTray->placeholder() ); - QScrollView* sv = new QScrollView( m_favoritesTray->placeholder() ); - sv->setFrameStyle( QFrame::NoFrame ); - placeholderLayout->setSpacing( 0 ); - placeholderLayout->setMargin( 0 ); - placeholderLayout->addWidget( sv ); - - sv->setHScrollBarMode( QScrollView::AlwaysOff ); - sv->setVScrollBarMode( QScrollView::AlwaysOn ); - + QScrollArea* sv = new QScrollArea( m_favoritesTray->placeholder() ); + sv->setFrameShape( QFrame::NoFrame ); + sv->setHorizontalScrollBarPolicy( Qt::ScrollBarAlwaysOff ); + sv->setVerticalScrollBarPolicy( Qt::ScrollBarAlwaysOn ); + // setup a placeholder m_trayViewport = sv->viewport(); - m_trayPlaceholder = new QVBox( sv->viewport() ); - sv->addChild( m_trayPlaceholder ); - m_trayPlaceholder->layout()->setAutoAdd( true ); + m_trayPlaceholder = new QWidget( sv->viewport() ); + m_trayPlaceholder->setLayout( new QVBoxLayout ); + m_trayPlaceholder->layout()->setMargin( 0 ); + m_trayPlaceholder->layout()->setSpacing( 0 ); // connect to favourites changing connect( m_impl->m_favList, SIGNAL( changed() ), this, SLOT( onFavouritesChanged() ) ); @@ -103,7 +102,7 @@ bool CinePlay::LoadCmdLineInput( const QString& fname ) { - DEBUG_LOG << fname.ascii(); + DEBUG_LOG << qPrintable( fname ); return m_impl->LoadCmdLineInput( fname ); } @@ -123,11 +122,6 @@ std::for_each( m_trayEntries.begin(), m_trayEntries.end(), cineplay::destroy ); m_trayEntries.clear(); - QPalette darker = palette(); - darker.setColor( QColorGroup::Background, - darker.color( QPalette::Normal, QColorGroup::Background ).dark( 120 ) ); - darker.setColor( QColorGroup::Button, darker.color( QPalette::Normal, QColorGroup::Background ) ); - // create all... CFavourites* favorites = m_impl->m_favList; for ( unsigned int i=0; i<favorites->getEntryCount(); ++i ) @@ -143,11 +137,11 @@ new ScrollViewResizer( e, m_trayViewport, ScrollViewResizer::HORIZONTAL ); QFont f( font() ); - f.setPointSizeFloat( SETTINGS_TRAYFONTPERCENT_DEFAULT * f.pointSizeFloat() / 100.0 ); + f.setPointSizeF( SETTINGS_TRAYFONTPERCENT_DEFAULT * f.pointSizeF() / 100.0 ); e->setFont( f ); if ( i%2 ) - e->setPalette( darker ); + e->setProperty( "alternate", true ); connect( e, SIGNAL( remove( int ) ), this, SLOT( onRemoveFavorite( int ) ) ); connect( e, SIGNAL( selected( int ) ), this, SLOT( onSelectFavorite( int ) ) ); @@ -230,24 +224,24 @@ qInstallMsgHandler( LogMessageHandler ); QApplication::setColorSpec( QApplication::CustomColor ); - QApplication app( argc, argv ); + QApplication a( argc, argv ); a.setApplicationName( "CinePlay" ); // deliberately not translated a.setOrganizationName( CINE_ORG ); a.setApplicationVersion( CINE_VERSION ); cineplay::CinePlay* w = new cineplay::CinePlay; - - if ( !app->init( app.arguments() ) ) + + if ( !w->init( a.arguments() ) ) return 1; { DEBUG_LOG << "starting app"; } - if( app.arguments().size() == 2 ) + if( a.arguments().size() == 2 ) { - if( !app->LoadCmdLineInput( args[1] ) ) + if( !w->LoadCmdLineInput( a.arguments()[1] ) ) return -1; } Modified: cinesuite/cineplay-cinecode/trunk/src/Download.cpp =================================================================== --- cinesuite/cineplay-cinecode/trunk/src/Download.cpp 2008-11-03 08:56:03 UTC (rev 217) +++ cinesuite/cineplay-cinecode/trunk/src/Download.cpp 2008-11-03 08:57:02 UTC (rev 218) @@ -78,7 +78,8 @@ private slots: void onDataReadProgress( int done, int total ) { - ui.progress->setProgress( done, total ); + ui.progress->setMaximum( total ); + ui.progress->setValue( done ); } void onRequestFinished( int, bool error ) @@ -118,7 +119,7 @@ { ui.fetch->setEnabled( true ); ui.cancel->setEnabled( false ); - ui.progress->setProgress( 0, 100 ); + ui.progress->setValue( 0 ); http.abort(); Modified: cinesuite/cineplay-cinecode/trunk/src/jah.pri =================================================================== --- cinesuite/cineplay-cinecode/trunk/src/jah.pri 2008-11-03 08:56:03 UTC (rev 217) +++ cinesuite/cineplay-cinecode/trunk/src/jah.pri 2008-11-03 08:57:02 UTC (rev 218) @@ -6,7 +6,6 @@ HEADERS += \ timelineSlider.h \ - label.h \ progress.h \ widget_store.hpp \ valueFormatters.h \ Modified: cinesuite/cineplay-cinecode/trunk/src/windows/downloadDialog.ui =================================================================== --- cinesuite/cineplay-cinecode/trunk/src/windows/downloadDialog.ui 2008-11-03 08:56:03 UTC (rev 217) +++ cinesuite/cineplay-cinecode/trunk/src/windows/downloadDialog.ui 2008-11-03 08:57:02 UTC (rev 218) @@ -29,7 +29,7 @@ <widget class="QLineEdit" name="url" /> </item> <item> - <widget class="Q3ProgressBar" name="progress" > + <widget class="QProgressBar" name="progress" > <property name="sizePolicy" > <sizepolicy vsizetype="Fixed" hsizetype="Fixed" > <horstretch>0</horstretch> @@ -42,10 +42,10 @@ <height>0</height> </size> </property> - <property name="progress" > + <property name="value" > <number>0</number> </property> - <property name="percentageVisible" > + <property name="textVisible" > <bool>false</bool> </property> </widget> @@ -115,13 +115,6 @@ </layout> </widget> <layoutdefault spacing="6" margin="11" /> - <customwidgets> - <customwidget> - <class>Q3ProgressBar</class> - <extends>QFrame</extends> - <header>Qt3Support/Q3ProgressBar</header> - </customwidget> - </customwidgets> <resources/> <connections/> </ui> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |