Changeset 124 for smplayer/trunk/src/prefperformance.cpp
- Timestamp:
- Mar 16, 2012, 4:02:47 PM (13 years ago)
- Location:
- smplayer/trunk
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
smplayer/trunk
- Property svn:mergeinfo changed
/smplayer/vendor/current merged: 121-122
- Property svn:mergeinfo changed
-
smplayer/trunk/src/prefperformance.cpp
r119 r124 1 1 /* smplayer, GUI front-end for mplayer. 2 Copyright (C) 2006-201 1 Ricardo Villalba <rvm@escomposlinux.org>2 Copyright (C) 2006-2012 Ricardo Villalba <rvm@users.sourceforge.net> 3 3 4 4 This program is free software; you can redistribute it and/or modify … … 23 23 #include "preferences.h" 24 24 25 #if YOUTUBE_SUPPORT 26 #include "retrieveyoutubeurl.h" 27 #endif 28 25 29 using namespace Global; 26 30 … … 39 43 #endif 40 44 45 #if YOUTUBE_SUPPORT 46 yt_quality_combo->addItem( "240p (flv)", RetrieveYoutubeUrl::FLV_240p ); 47 48 yt_quality_combo->addItem( "360p (flv)", RetrieveYoutubeUrl::FLV_360p ); 49 yt_quality_combo->addItem( "360p (mp4)", RetrieveYoutubeUrl::MP4_360p ); 50 yt_quality_combo->addItem( "360p (webm)", RetrieveYoutubeUrl::WEBM_360p ); 51 52 yt_quality_combo->addItem( "480p (flv)", RetrieveYoutubeUrl::FLV_480p ); 53 yt_quality_combo->addItem( "480p (webm)", RetrieveYoutubeUrl::WEBM_480p ); 54 55 yt_quality_combo->addItem( "720p (mp4)", RetrieveYoutubeUrl::MP4_720p ); 56 yt_quality_combo->addItem( "720p (webm)", RetrieveYoutubeUrl::WEBM_720p ); 57 58 yt_quality_combo->addItem( "1080p (mp4)", RetrieveYoutubeUrl::MP4_1080p ); 59 yt_quality_combo->addItem( "1080p (webm)", RetrieveYoutubeUrl::WEBM_1080p ); 60 #else 61 yt_label->hide(); 62 yt_quality_combo->hide(); 63 yt_line->hide(); 64 #endif 65 41 66 retranslateStrings(); 42 67 } … … 51 76 52 77 QPixmap PrefPerformance::sectionIcon() { 53 return Images::icon("pref_performance" );78 return Images::icon("pref_performance", 22); 54 79 } 55 80 … … 90 115 setFastAudioSwitching( pref->fast_audio_change ); 91 116 setThreads( pref->threads ); 117 118 #if YOUTUBE_SUPPORT 119 setYTQuality( pref->yt_quality ); 120 #endif 92 121 } 93 122 … … 112 141 pref->fast_audio_change = fastAudioSwitching(); 113 142 TEST_AND_SET(pref->threads, threads()); 143 144 #if YOUTUBE_SUPPORT 145 pref->yt_quality = YTQuality(); 146 #endif 114 147 } 115 148 … … 227 260 return threads_spin->value(); 228 261 } 262 263 #if YOUTUBE_SUPPORT 264 void PrefPerformance::setYTQuality(int q) { 265 yt_quality_combo->setCurrentIndex(yt_quality_combo->findData(q)); 266 } 267 268 int PrefPerformance::YTQuality() { 269 int index = yt_quality_combo->currentIndex(); 270 return yt_quality_combo->itemData(index).toInt(); 271 } 272 #endif 229 273 230 274 void PrefPerformance::createHelp() { … … 286 330 #endif 287 331 332 #if YOUTUBE_SUPPORT 333 setWhatsThis(yt_quality_combo, tr("Youtube quality"), 334 tr("Select the preferred quality for youtube videos.") ); 335 #endif 336 288 337 addSectionTitle(tr("Cache")); 289 338
Note:
See TracChangeset
for help on using the changeset viewer.