GalleryConfigurationGroup() : TriggeredConfigurationGroup(false, true, false, false) { setLabel(QObject::tr("MythGallery Settings (Slideshow)")); setUseLabel(false); #ifdef USING_OPENGL HostCheckBox* useOpenGL = SlideshowUseOpenGL(); addChild(useOpenGL); setTrigger(useOpenGL); ConfigurationGroup* openGLConfig = new VerticalConfigurationGroup(false); openGLConfig->addChild(SlideshowOpenGLTransition()); openGLConfig->addChild(SlideshowOpenGLTransitionLength()); addTarget("1", openGLConfig); #endif ConfigurationGroup* regularConfig = new VerticalConfigurationGroup(false); regularConfig->addChild(MythGalleryOverlayCaption()); regularConfig->addChild(SlideshowTransition()); regularConfig->addChild(SlideshowBackground()); addTarget("0", regularConfig); addChild(SlideshowDelay()); addChild(SlideshowRecursive()); }
AudioMixerSettings::AudioMixerSettings() : TriggeredConfigurationGroup(false, true, false, false) { setLabel(QObject::tr("Audio Mixer")); setUseLabel(false); Setting *volumeControl = MythControlsVolume(); addChild(volumeControl); // Mixer settings ConfigurationGroup *settings = new VerticalConfigurationGroup(false, true, false, false); settings->addChild(MixerDevice()); settings->addChild(MixerControl()); settings->addChild(MixerVolume()); settings->addChild(PCMVolume()); ConfigurationGroup *dummy = new VerticalConfigurationGroup(false, true, false, false); // Show Mixer config only if internal volume controls enabled setTrigger(volumeControl); addTarget("0", dummy); addTarget("1", settings); }
SCRConfig::SCRConfig(DiSEqCDevSCR &scr) : m_scr(scr) { ConfigurationGroup *group = new VerticalConfigurationGroup(false, false); group->setLabel(DeviceTree::tr("Unicable Configuration")); group->addChild(new SCRUserBandSetting(scr)); group->addChild(new SCRFrequencySetting(scr)); group->addChild(new SCRPINSetting(scr)); group->addChild(new DeviceRepeatSetting(scr)); addChild(group); }
PlayGroup::PlayGroup(QString _name) : name(_name) { ConfigurationGroup* cgroup = new VerticalConfigurationGroup(false); cgroup->setLabel(getName() + " " + QObject::tr("Group", "Play Group")); cgroup->addChild(new TitleMatch(*this)); cgroup->addChild(new SkipAhead(*this)); cgroup->addChild(new SkipBack(*this)); cgroup->addChild(new JumpMinutes(*this)); cgroup->addChild(new TimeStretch(*this)); addChild(cgroup); };
RotorConfig::RotorConfig(DiSEqCDevRotor &rotor) : m_rotor(rotor) { ConfigurationGroup *group = new VerticalConfigurationGroup(false, false); group->setLabel(DeviceTree::tr("Rotor Configuration")); group->addChild(new DeviceDescrSetting(rotor)); group->addChild(new DeviceRepeatSetting(rotor)); ConfigurationGroup *tgroup = new HorizontalConfigurationGroup(false, false, true, true); RotorTypeSetting *rtype = new RotorTypeSetting(rotor); connect(rtype, SIGNAL(valueChanged(const QString&)), this, SLOT( SetType( const QString&))); tgroup->addChild(rtype); m_pos = new TransButtonSetting(); m_pos->setLabel(DeviceTree::tr("Positions")); m_pos->setHelpText(DeviceTree::tr("Rotor position setup.")); m_pos->setEnabled(rotor.GetType() == DiSEqCDevRotor::kTypeDiSEqC_1_2); connect(m_pos, SIGNAL(pressed(void)), this, SLOT( RunRotorPositionsDialog(void))); tgroup->addChild(m_pos); group->addChild(tgroup); group->addChild(new RotorLoSpeedSetting(rotor)); group->addChild(new RotorHiSpeedSetting(rotor)); group->addChild(DiSEqCLatitude()); group->addChild(DiSEqCLongitude()); addChild(group); }
ProfileGroup::ProfileGroup() { // This must be first because it is needed to load/save the other settings addChild(id = new ID()); addChild(is_default = new Is_default(*this)); ConfigurationGroup* profile = new VerticalConfigurationGroup(false); profile->setLabel(QObject::tr("ProfileGroup")); profile->addChild(name = new Name(*this)); CardInfo *cardInfo = new CardInfo(*this); profile->addChild(cardInfo); CardType::fillSelections(cardInfo); host = new HostName(*this); profile->addChild(host); host->fillSelections(); addChild(profile); };
LNBConfig::LNBConfig(DiSEqCDevLNB &lnb) { ConfigurationGroup *group = new VerticalConfigurationGroup(false, false); group->setLabel(DeviceTree::tr("LNB Configuration")); group->addChild(new DeviceDescrSetting(lnb)); LNBPresetSetting *preset = new LNBPresetSetting(lnb); group->addChild(preset); m_type = new LNBTypeSetting(lnb); group->addChild(m_type); m_lof_switch = new LNBLOFSwitchSetting(lnb); group->addChild(m_lof_switch); m_lof_lo = new LNBLOFLowSetting(lnb); group->addChild(m_lof_lo); m_lof_hi = new LNBLOFHighSetting(lnb); group->addChild(m_lof_hi); m_pol_inv = new LNBPolarityInvertedSetting(lnb); group->addChild(m_pol_inv); connect(m_type, SIGNAL(valueChanged(const QString&)), this, SLOT( UpdateType( void))); connect(preset, SIGNAL(valueChanged(const QString&)), this, SLOT( SetPreset( const QString&))); addChild(group); }
SwitchConfig::SwitchConfig(DiSEqCDevSwitch &switch_dev) { ConfigurationGroup *group = new VerticalConfigurationGroup(false, false); group->setLabel(DeviceTree::tr("Switch Configuration")); group->addChild(new DeviceDescrSetting(switch_dev)); group->addChild(new DeviceRepeatSetting(switch_dev)); m_type = new SwitchTypeSetting(switch_dev); group->addChild(m_type); m_address = new SwitchAddressSetting(switch_dev); group->addChild(m_address); m_ports = new SwitchPortsSetting(switch_dev); group->addChild(m_ports); connect(m_type, SIGNAL(valueChanged(const QString&)), this, SLOT( update(void))); addChild(group); }
MythFillSettings() : TriggeredConfigurationGroup(false, true, false, false) { setLabel(QObject::tr("Program Schedule Downloading Options")); setUseLabel(false); Setting* fillEnabled = MythFillEnabled(); addChild(fillEnabled); setTrigger(fillEnabled); ConfigurationGroup* settings = new VerticalConfigurationGroup(false); settings->addChild(MythFillDatabasePath()); settings->addChild(MythFillDatabaseArgs()); settings->addChild(MythFillMinHour()); settings->addChild(MythFillMaxHour()); settings->addChild(MythFillGrabberSuggestsTime()); addTarget("1", settings); // show nothing if fillEnabled is off addTarget("0", new VerticalConfigurationGroup(true)); };
ScanWizardConfig::ScanWizardConfig( ScanWizard *_parent, uint default_sourceid, uint default_cardid, QString default_inputname) : VerticalConfigurationGroup(false, true, false, false), videoSource(new VideoSourceSelector( default_sourceid, CardUtil::GetScanableInputTypes(), false)), input(new InputSelector(default_cardid, default_inputname)), scanType(new ScanTypeSetting()), scanConfig(new ScanOptionalConfig(scanType)), services(new DesiredServices()), ftaOnly(new FreeToAirOnly()), trustEncSI(new TrustEncSISetting()) { setLabel(tr("Scan Configuration")); ConfigurationGroup *cfg = new HorizontalConfigurationGroup(false, false, true, true); cfg->addChild(services); cfg->addChild(ftaOnly); cfg->addChild(trustEncSI); addChild(videoSource); addChild(input); addChild(cfg); addChild(scanType); addChild(scanConfig); connect(videoSource, SIGNAL(valueChanged(const QString&)), scanConfig, SLOT( SetSourceID( const QString&))); connect(videoSource, SIGNAL(valueChanged(const QString&)), input, SLOT( SetSourceID( const QString&))); connect(input, SIGNAL(valueChanged(const QString&)), scanType, SLOT( SetInput( const QString&))); connect(input, SIGNAL(valueChanged(const QString&)), _parent, SLOT( SetInput( const QString&))); }
MythGamePlayerSettings::MythGamePlayerSettings() { // must be first addChild(id = new ID()); ConfigurationGroup *group = new VerticalConfigurationGroup(false, false); group->setLabel(tr("Game Player Setup")); group->addChild(name = new Name(*this)); group->addChild(new GameType(*this)); group->addChild(new Command(*this)); group->addChild(new RomPath(*this)); group->addChild(new WorkingDirPath(*this)); group->addChild(new Extensions(*this)); group->addChild(new AllowMultipleRoms(*this)); addChild(group); };
AudioTest::AudioTest(QString main, QString passthrough, int channels, AudioOutputSettings settings) : VerticalConfigurationGroup(false, true, false, false), m_channels(channels), m_frontleft(NULL), m_frontright(NULL), m_center(NULL), m_surroundleft(NULL), m_surroundright(NULL), m_rearleft(NULL), m_rearright(NULL), m_lfe(NULL), m_main(main), m_passthrough(passthrough), m_settings(settings), m_quality(false) { setLabel(QObject::tr("Audio Configuration Testing")); m_at = new AudioTestThread(this, main, passthrough, channels, settings, m_quality); if (!m_at->result().isEmpty()) { QString msg = main + QObject::tr(" is invalid or not " "useable."); MythPopupBox::showOkPopup( GetMythMainWindow(), QObject::tr("Warning"), msg); return; } m_button = new TransButtonSetting("start"); m_button->setLabel(QObject::tr("Test All")); m_button->setHelpText(QObject::tr("Start all channels test")); connect(m_button, SIGNAL(pressed(QString)), this, SLOT(toggle(QString))); ConfigurationGroup *frontgroup = new HorizontalConfigurationGroup(false, false); ConfigurationGroup *middlegroup = new HorizontalConfigurationGroup(false, false); ConfigurationGroup *reargroup = new HorizontalConfigurationGroup(false, false); m_frontleft = new TransButtonSetting("0"); m_frontleft->setLabel(QObject::tr("Front Left")); connect(m_frontleft, SIGNAL(pressed(QString)), this, SLOT(toggle(QString))); m_frontright = new TransButtonSetting(m_channels == 2 ? "1" : "2"); m_frontright->setLabel(QObject::tr("Front Right")); connect(m_frontright, SIGNAL(pressed(QString)), this, SLOT(toggle(QString))); m_center = new TransButtonSetting("1"); m_center->setLabel(QObject::tr("Center")); connect(m_center, SIGNAL(pressed(QString)), this, SLOT(toggle(QString))); frontgroup->addChild(m_frontleft); switch(m_channels) { case 8: m_rearleft = new TransButtonSetting("5"); m_rearleft->setLabel(QObject::tr("Rear Left")); connect(m_rearleft, SIGNAL(pressed(QString)), this, SLOT(toggle(QString))); m_rearright = new TransButtonSetting("4"); m_rearright->setLabel(QObject::tr("Rear Right")); connect(m_rearright, SIGNAL(pressed(QString)), this, SLOT(toggle(QString))); reargroup->addChild(m_rearleft); reargroup->addChild(m_rearright); case 6: m_surroundleft = new TransButtonSetting(m_channels == 6 ? "4" : "6"); m_surroundleft->setLabel(QObject::tr("Surround Left")); connect(m_surroundleft, SIGNAL(pressed(QString)), this, SLOT(toggle(QString))); m_surroundright = new TransButtonSetting("3"); m_surroundright->setLabel(QObject::tr("Surround Right")); connect(m_surroundright, SIGNAL(pressed(QString)), this, SLOT(toggle(QString))); m_lfe = new TransButtonSetting(m_channels == 6 ? "5" : "7"); m_lfe->setLabel(QObject::tr("LFE")); connect(m_lfe, SIGNAL(pressed(QString)), this, SLOT(toggle(QString))); frontgroup->addChild(m_center); middlegroup->addChild(m_surroundleft); middlegroup->addChild(m_lfe); middlegroup->addChild(m_surroundright); case 2: break; } frontgroup->addChild(m_frontright); addChild(frontgroup); addChild(middlegroup); addChild(reargroup); addChild(m_button); m_hd = new TransCheckBoxSetting(); m_hd->setLabel(QObject::tr("Use Highest Quality Mode")); m_hd->setHelpText(QObject::tr("Use the highest audio quality settings " "supported by your audio card. This will be " "a good place to start troubleshooting " "potential errors")); addChild(m_hd); connect(m_hd, SIGNAL(valueChanged(QString)), this, SLOT(togglequality())); }
AudioConfigSettings::AudioConfigSettings(ConfigurationWizard *parent) : VerticalConfigurationGroup(false, true, false, false), m_OutputDevice(NULL), m_MaxAudioChannels(NULL), m_AudioUpmix(NULL), m_AudioUpmixType(NULL), m_AC3PassThrough(NULL), m_DTSPassThrough(NULL), m_EAC3PassThrough(NULL),m_TrueHDPassThrough(NULL), m_DTSHDPassThrough(NULL), m_parent(parent) { setLabel(QObject::tr("Audio System")); setUseLabel(false); ConfigurationGroup *devicegroup = new HorizontalConfigurationGroup(false, false); devicegroup->addChild((m_OutputDevice = new AudioDeviceComboBox(this))); // Rescan button TransButtonSetting *rescan = new TransButtonSetting("rescan"); rescan->setLabel(QObject::tr("Rescan")); rescan->setHelpText(QObject::tr("Rescan for available audio devices. " "Current entry will be checked and " "capability entries populated.")); devicegroup->addChild(rescan); connect(rescan, SIGNAL(pressed()), this, SLOT(AudioRescan())); addChild(devicegroup); QString name = m_OutputDevice->getValue(); AudioOutput::AudioDeviceConfig *adc = AudioOutput::GetAudioDeviceConfig(name, name, true); if (adc->settings.IsInvalid()) { LOG(VB_GENERAL, LOG_ERR, QString("Audio device %1 isn't usable Check audio configuration") .arg(name)); } audiodevs.insert(name, *adc); devices.append(*adc); delete adc; ConfigurationGroup *maingroup = new VerticalConfigurationGroup(false, false); addChild(maingroup); m_triggerDigital = new TransCheckBoxSetting(); m_AC3PassThrough = AC3PassThrough(); m_DTSPassThrough = DTSPassThrough(); m_EAC3PassThrough = EAC3PassThrough(); m_TrueHDPassThrough = TrueHDPassThrough(); m_DTSHDPassThrough = DTSHDPassThrough(); m_cgsettings = new HorizontalConfigurationGroup(); m_cgsettings->setLabel(QObject::tr("Digital Audio Capabilities")); m_cgsettings->addChild(m_AC3PassThrough); m_cgsettings->addChild(m_DTSPassThrough); m_cgsettings->addChild(m_EAC3PassThrough); m_cgsettings->addChild(m_TrueHDPassThrough); m_cgsettings->addChild(m_DTSHDPassThrough); TriggeredItem *sub1 = new TriggeredItem(m_triggerDigital, m_cgsettings); maingroup->addChild(sub1); maingroup->addChild((m_MaxAudioChannels = MaxAudioChannels())); maingroup->addChild((m_AudioUpmix = AudioUpmix())); maingroup->addChild((m_AudioUpmixType = AudioUpmixType())); TransButtonSetting *test = new TransButtonSetting("test"); test->setLabel(QObject::tr("Test")); test->setHelpText(QObject::tr("Will play a test pattern on all configured " "speakers")); connect(test, SIGNAL(pressed()), this, SLOT(StartAudioTest())); addChild(test); TransButtonSetting *advanced = new TransButtonSetting("advanced"); advanced->setLabel(QObject::tr("Advanced Audio Settings")); advanced->setHelpText(QObject::tr("Enable extra audio settings. Under most " "usage all options should be left alone")); connect(advanced, SIGNAL(pressed()), this, SLOT(AudioAdvanced())); addChild(advanced); // Set slots connect(m_MaxAudioChannels, SIGNAL(valueChanged(const QString&)), this, SLOT(UpdateVisibility(const QString&))); connect(m_OutputDevice, SIGNAL(valueChanged(const QString&)), this, SLOT(UpdateCapabilities(const QString&))); connect(m_AC3PassThrough, SIGNAL(valueChanged(const QString&)), this, SLOT(UpdateCapabilities(const QString&))); connect(m_DTSPassThrough, SIGNAL(valueChanged(const QString&)), this, SLOT(UpdateCapabilities(const QString&))); connect(m_EAC3PassThrough, SIGNAL(valueChanged(const QString&)), this, SLOT(UpdateCapabilities(const QString&))); connect(m_TrueHDPassThrough, SIGNAL(valueChanged(const QString&)), this, SLOT(UpdateCapabilities(const QString&))); connect(m_DTSHDPassThrough, SIGNAL(valueChanged(const QString&)), this, SLOT(UpdateCapabilities(const QString&))); AudioRescan(); }
ChannelScannerGUIScanPane::ChannelScannerGUIScanPane( bool lock, bool strength, bool snr, bool rotorpos, QObject *target, const char *slot) : VerticalConfigurationGroup(false, false, true, true), ss(NULL), sn(NULL), pos(NULL), progressBar(NULL), sl(NULL), sta(NULL) { setLabel(tr("Scan Progress")); ConfigurationGroup *slg = new HorizontalConfigurationGroup(false, false, true, true); slg->addChild(sta = new TransLabelSetting()); sta->setLabel(tr("Status")); sta->setValue(tr("Tuning")); if (lock) { slg->addChild(sl = new TransLabelSetting()); sl->setValue(" " " "); } addChild(slg); if (rotorpos) { addChild(pos = new TransProgressSetting()); pos->setLabel(tr("Rotor Movement")); } ConfigurationGroup *ssg = NULL; if (strength || snr) ssg = new HorizontalConfigurationGroup(false, false, true, true); if (strength) { ssg->addChild(ss = new TransProgressSetting()); ss->setLabel(tr("Signal Strength")); } if (snr) { ssg->addChild(sn = new TransProgressSetting()); sn->setLabel(tr("Signal/Noise")); } if (strength || snr) addChild(ssg); addChild(progressBar = new TransProgressSetting()); progressBar->setValue(0); progressBar->setLabel(tr("Scan")); addChild(log = new LogList()); TransButtonSetting *cancel = new TransButtonSetting(); cancel->setLabel(tr("Stop Scan")); addChild(cancel); connect(cancel, SIGNAL(pressed(void)), target, slot); //Seem to need to do this as the constructor doesn't seem enough setUseLabel(false); setUseFrame(false); }