int QMPwidget::qt_metacall(QMetaObject::Call _c, int _id, void **_a) { _id = QWidget::qt_metacall(_c, _id, _a); if (_id < 0) return _id; if (_c == QMetaObject::InvokeMetaMethod) { if (_id < 21) qt_static_metacall(this, _c, _id, _a); _id -= 21; } else if (_c == QMetaObject::RegisterMethodArgumentMetaType) { if (_id < 21) *reinterpret_cast<int*>(_a[0]) = -1; _id -= 21; } #ifndef QT_NO_PROPERTIES else if (_c == QMetaObject::ReadProperty) { void *_v = _a[0]; switch (_id) { case 0: *reinterpret_cast< State*>(_v) = state(); break; case 1: *reinterpret_cast< double*>(_v) = tell(); break; case 2: *reinterpret_cast< QString*>(_v) = videoOutput(); break; case 3: *reinterpret_cast< QString*>(_v) = mplayerPath(); break; case 4: *reinterpret_cast< QString*>(_v) = mplayerVersion(); break; } _id -= 5; } else if (_c == QMetaObject::WriteProperty) { void *_v = _a[0]; switch (_id) { case 2: setVideoOutput(*reinterpret_cast< QString*>(_v)); break; case 3: setMPlayerPath(*reinterpret_cast< QString*>(_v)); break; } _id -= 5; } else if (_c == QMetaObject::ResetProperty) { _id -= 5; } else if (_c == QMetaObject::QueryPropertyDesignable) { _id -= 5; } else if (_c == QMetaObject::QueryPropertyScriptable) { _id -= 5; } else if (_c == QMetaObject::QueryPropertyStored) { _id -= 5; } else if (_c == QMetaObject::QueryPropertyEditable) { _id -= 5; } else if (_c == QMetaObject::QueryPropertyUser) { _id -= 5; } else if (_c == QMetaObject::RegisterPropertyMetaType) { if (_id < 5) *reinterpret_cast<int*>(_a[0]) = -1; _id -= 5; } #endif // QT_NO_PROPERTIES return _id; }
void PrefGeneral::getData(Preferences * pref) { requires_restart = false; filesettings_method_changed = false; if (pref->mplayer_bin != mplayerPath()) { requires_restart = true; pref->mplayer_bin = mplayerPath(); qDebug("PrefGeneral::getData: mplayer binary has changed, getting version number"); // Forces to get info from mplayer to update version number InfoReader i( pref->mplayer_bin ); i.getInfo(); // Update the drivers list at the same time //setDrivers( i.voList(), i.aoList() ); } TEST_AND_SET(pref->use_screenshot, useScreenshots()); TEST_AND_SET(pref->screenshot_directory, screenshotDir()); TEST_AND_SET(pref->vo, VO()); TEST_AND_SET(pref->ao, AO()); bool dont_remember_ms = !rememberSettings(); TEST_AND_SET(pref->dont_remember_media_settings, dont_remember_ms); bool dont_remember_time = !rememberTimePos(); TEST_AND_SET(pref->dont_remember_time_pos, dont_remember_time); if (pref->file_settings_method != fileSettingsMethod()) { pref->file_settings_method = fileSettingsMethod(); filesettings_method_changed = true; } pref->audio_lang = audioLang(); pref->subtitle_lang = subtitleLang(); pref->initial_audio_track = audioTrack(); pref->initial_subtitle_track = subtitleTrack(); pref->close_on_finish = closeOnFinish(); pref->pause_when_hidden = pauseWhenHidden(); TEST_AND_SET(pref->use_soft_video_eq, eq2()); TEST_AND_SET(pref->use_soft_vol, softVol()); pref->global_volume = globalVolume(); TEST_AND_SET(pref->use_audio_equalizer, useAudioEqualizer()); TEST_AND_SET(pref->use_hwac3, Ac3DTSPassthrough()); pref->initial_volnorm = initialVolNorm(); TEST_AND_SET(pref->softvol_max, amplification()); pref->initial_postprocessing = initialPostprocessing(); pref->initial_deinterlace = initialDeinterlace(); pref->initial_zoom_factor = initialZoom(); TEST_AND_SET(pref->use_direct_rendering, directRendering()); TEST_AND_SET(pref->use_double_buffer, doubleBuffer()); TEST_AND_SET(pref->use_slices, useSlices()); pref->start_in_fullscreen = startInFullscreen(); if (pref->add_blackborders_on_fullscreen != blackbordersOnFullscreen()) { pref->add_blackborders_on_fullscreen = blackbordersOnFullscreen(); if (pref->fullscreen) requires_restart = true; } TEST_AND_SET(pref->autoq, autoq()); #ifdef Q_OS_WIN pref->avoid_screensaver = avoidScreensaver(); TEST_AND_SET(pref->turn_screensaver_off, turnScreensaverOff()); #else TEST_AND_SET(pref->disable_screensaver, disableScreensaver()); #endif #ifndef Q_OS_WIN pref->vdpau = vdpau; #endif pref->initial_audio_channels = audioChannels(); TEST_AND_SET(pref->use_scaletempo, scaleTempoFilter()); TEST_AND_SET(pref->autosync, autoSyncActivated()); TEST_AND_SET(pref->autosync_factor, autoSyncFactor()); TEST_AND_SET(pref->use_mc, mcActivated()); TEST_AND_SET(pref->mc_value, mc()); }