Lines Matching refs:Prefs
97 TrMainWindow :: TrMainWindow( Session& session, Prefs& prefs, TorrentModel& model, bool minimized ):
233 myAltSpeedAction->setIcon( myPrefs.get<bool>(Prefs::ALT_SPEED_LIMIT_ENABLED) ? mySpeedModeOnIcon : mySpeedModeOffIcon );
258 ui.action_TrayIcon->setChecked( minimized || prefs.getBool( Prefs::SHOW_TRAY_ICON ) );
264 initKeys << Prefs :: MAIN_WINDOW_X
265 << Prefs :: SHOW_TRAY_ICON
266 << Prefs :: SORT_REVERSED
267 << Prefs :: SORT_MODE
268 << Prefs :: FILTERBAR
269 << Prefs :: STATUSBAR
270 << Prefs :: STATUSBAR_STATS
271 << Prefs :: TOOLBAR
272 << Prefs :: ALT_SPEED_LIMIT_ENABLED
273 << Prefs :: COMPACT_VIEW
274 << Prefs :: DSPEED
275 << Prefs :: DSPEED_ENABLED
276 << Prefs :: USPEED
277 << Prefs :: USPEED_ENABLED
278 << Prefs :: RATIO
279 << Prefs :: RATIO_ENABLED;
320 if( !myPrefs.getBool( Prefs :: SHOW_TRAY_ICON ) )
396 p->setIcon( myPrefs.get<bool>(Prefs::ALT_SPEED_LIMIT_ENABLED) ? mySpeedModeOnIcon : mySpeedModeOffIcon );
476 int currentVal = myPrefs.get<int>( Prefs::DSPEED );
480 a->setProperty( PREF_VARIANTS_KEY, QVariantList() << Prefs::DSPEED_ENABLED << false );
485 a->setProperty( PREF_VARIANTS_KEY, QVariantList() << Prefs::DSPEED << currentVal << Prefs::DSPEED_ENABLED << true );
491 a->setProperty( PREF_VARIANTS_KEY, QVariantList() << Prefs::DSPEED << i << Prefs::DSPEED_ENABLED << true );
496 currentVal = myPrefs.get<int>( Prefs::USPEED );
500 a->setProperty( PREF_VARIANTS_KEY, QVariantList() << Prefs::USPEED_ENABLED << false );
505 a->setProperty( PREF_VARIANTS_KEY, QVariantList() << Prefs::USPEED << currentVal << Prefs::USPEED_ENABLED << true );
511 a->setProperty( PREF_VARIANTS_KEY, QVariantList() << Prefs::USPEED << i << Prefs::USPEED_ENABLED << true );
518 double d = myPrefs.get<double>( Prefs::RATIO );
522 a->setProperty( PREF_VARIANTS_KEY, QVariantList() << Prefs::RATIO_ENABLED << false );
527 a->setProperty( PREF_VARIANTS_KEY, QVariantList() << Prefs::RATIO << d << Prefs::RATIO_ENABLED << true );
533 a->setProperty( PREF_VARIANTS_KEY, QVariantList() << Prefs::RATIO << i << Prefs::RATIO_ENABLED << true );
547 myPrefs.set( Prefs::SORT_MODE, SortMode( i ) );
562 myPrefs.set( Prefs::SORT_REVERSED, b );
736 const QString mode( myPrefs.getString( Prefs::STATUSBAR_STATS ) );
928 void TrMainWindow :: showTotalRatio ( ) { myPrefs.set( Prefs::STATUSBAR_STATS, "total-ratio"); }
929 void TrMainWindow :: showTotalTransfer ( ) { myPrefs.set( Prefs::STATUSBAR_STATS, "total-transfer"); }
930 void TrMainWindow :: showSessionRatio ( ) { myPrefs.set( Prefs::STATUSBAR_STATS, "session-ratio"); }
931 void TrMainWindow :: showSessionTransfer ( ) { myPrefs.set( Prefs::STATUSBAR_STATS, "session-transfer"); }
940 myPrefs.set( Prefs :: COMPACT_VIEW, visible );
947 myPrefs.toggleBool( Prefs :: ALT_SPEED_LIMIT_ENABLED );
948 mode = myPrefs.get<bool>( Prefs::ALT_SPEED_LIMIT_ENABLED );
954 myPrefs.set( Prefs::TOOLBAR, visible );
959 myPrefs.set( Prefs::FILTERBAR, visible );
964 myPrefs.set( Prefs::STATUSBAR, visible );
1010 case Prefs::STATUSBAR_STATS:
1019 case Prefs::SORT_REVERSED:
1023 case Prefs::SORT_MODE:
1036 case Prefs::DSPEED_ENABLED:
1040 case Prefs::DSPEED:
1044 case Prefs::USPEED_ENABLED:
1048 case Prefs::USPEED:
1052 case Prefs::RATIO_ENABLED:
1056 case Prefs::RATIO:
1060 case Prefs::FILTERBAR:
1066 case Prefs::STATUSBAR:
1072 case Prefs::TOOLBAR:
1078 case Prefs::SHOW_TRAY_ICON:
1085 case Prefs::COMPACT_VIEW: {
1099 case Prefs::MAIN_WINDOW_X:
1100 case Prefs::MAIN_WINDOW_Y:
1101 case Prefs::MAIN_WINDOW_WIDTH:
1102 case Prefs::MAIN_WINDOW_HEIGHT:
1103 setGeometry( myPrefs.getInt( Prefs::MAIN_WINDOW_X ),
1104 myPrefs.getInt( Prefs::MAIN_WINDOW_Y ),
1105 myPrefs.getInt( Prefs::MAIN_WINDOW_WIDTH ),
1106 myPrefs.getInt( Prefs::MAIN_WINDOW_HEIGHT ) );
1109 case Prefs :: ALT_SPEED_LIMIT_ENABLED:
1110 case Prefs :: ALT_SPEED_LIMIT_UP:
1111 case Prefs :: ALT_SPEED_LIMIT_DOWN: {
1112 b = myPrefs.getBool( Prefs :: ALT_SPEED_LIMIT_ENABLED );
1117 const Speed d = Speed::fromKBps( myPrefs.getInt( Prefs::ALT_SPEED_LIMIT_DOWN ) );
1118 const Speed u = Speed::fromKBps( myPrefs.getInt( Prefs::ALT_SPEED_LIMIT_UP ) );
1146 myPrefs.getString( Prefs::OPEN_DIALOG_FOLDER ),
1152 button->setChecked( myPrefs.getBool( Prefs::OPTIONS_PROMPT ) );