Exemple #1
0
static TransButtonSetting *EditVisualizationModes()
{
    TransButtonSetting *gc = new TransButtonSetting();
    gc->setLabel(QObject::tr("Edit Visualizations"));
    gc->setHelpText(QObject::tr("Edit the list of visualizations to use during playback."));

    return gc;
}
Exemple #2
0
JumpPane::JumpPane(const QStringList &labels, const QStringList &helptext) :
    VerticalConfigurationGroup(true, false, true, true)
{
    //setLabel(tr("Jump To Buttons"));
    for (uint i = 0; i < labels.size(); i++)
    {
        TransButtonSetting *button =
            new TransButtonSetting(QString::number(i));
        button->setLabel(labels[i]);
        button->setHelpText(helptext[i]);
        connect(button, SIGNAL(pressed(QString)),
                this,   SIGNAL(pressed(QString)));
        addChild(button);
    }
}
Exemple #3
0
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();
}
Exemple #4
0
ChannelEditor::ChannelEditor() : ConfigurationDialog()
{
    setLabel(tr("Channels"));

    addChild(list = new ChannelListSetting());

    SortMode           *sort   = new SortMode();
    source                     = new SourceSetting();
    TransButtonSetting *del    = new TransButtonSetting();
    NoChanNumHide      *hide   = new NoChanNumHide();

    del->setLabel(tr("Delete Channels"));
    del->setHelpText(
        tr("Delete all channels on currently selected source[s]."));

    HorizontalConfigurationGroup *src =
        new HorizontalConfigurationGroup(false, false, true, true);
    src->addChild(source);
    src->addChild(del);

    sort->setValue(sort->getValueIndex(list->getSortMode()));
    source->setValue(max(source->getValueIndex(list->getSourceID()), 0));
    hide->setValue(list->getHideMode());

    addChild(sort);
    addChild(src);
    addChild(hide);

    buttonScan = new TransButtonSetting();
    buttonScan->setLabel(QObject::tr("Channel Scanner"));
    buttonScan->setHelpText(QObject::tr("Starts the channel scanner."));
    buttonScan->setEnabled(SourceUtil::IsAnySourceScanable());
    
    buttonImportIcon = new TransButtonSetting();
    buttonImportIcon->setLabel(QObject::tr("Icon Download"));
    buttonImportIcon->setHelpText(QObject::tr("Starts the icon downloader"));
    buttonImportIcon->setEnabled(SourceUtil::IsAnySourceScanable());

    buttonTransportEditor = new TransButtonSetting();
    buttonTransportEditor->setLabel(QObject::tr("Transport Editor"));
    buttonTransportEditor->setHelpText(
        QObject::tr("Allows you to edit the transports directly") + " " +
        QObject::tr("This is rarely required unless you are using "
                    "a satellite dish and must enter an initial "
                    "frequency to for the channel scanner to try."));

    HorizontalConfigurationGroup *h = 
        new HorizontalConfigurationGroup(false, false);
    h->addChild(buttonScan);
    h->addChild(buttonImportIcon);
    h->addChild(buttonTransportEditor);
    addChild(h);

    connect(source, SIGNAL(valueChanged(const QString&)),
            list, SLOT(setSourceID(const QString&)));
    connect(sort, SIGNAL(valueChanged(const QString&)),
            list, SLOT(setSortMode(const QString&)));
    connect(hide, SIGNAL(valueChanged(bool)),
            list, SLOT(setHideMode(bool)));
    connect(list, SIGNAL(accepted(int)),
            this, SLOT(edit(int)));
    connect(list, SIGNAL(menuButtonPressed(int)),
            this, SLOT(menu(int)));
    connect(buttonScan, SIGNAL(pressed()),
            this, SLOT(scan()));
    connect(buttonImportIcon,  SIGNAL(pressed()),
            this, SLOT(channelIconImport()));
    connect(buttonTransportEditor, SIGNAL(pressed()),
            this, SLOT(transportEditor()));
    connect(del,  SIGNAL(pressed()),
            this, SLOT(deleteChannels()));
}
Exemple #5
0
/*!
 \brief Settings Page 2
 \param enable True if password has been entered
*/
DatabaseSettings::DatabaseSettings(bool enable)
    : VerticalConfigurationGroup(false)
{
    setLabel(tr("Database Settings") + (enable ? "" : tr(" (Requires edit privileges)")));

    addChild(new ImportSettings(enable));

    // Exclusions - Use stacked to preserve spacing
    StackedConfigurationGroup *group1 = new StackedConfigurationGroup(false, false);
    addChild(group1);

    GlobalLineEdit *exclusions = new GlobalLineEdit("GalleryIgnoreFilter");
    exclusions->setLabel(tr("Scanner Exclusions"));
    exclusions->setHelpText(tr("Comma-separated list of filenames/directory names "
                               "to be ignored when scanning. "
                               "Glob wildcards * and ? are valid."));
    exclusions->setEnabled(enable);
    group1->addChild(exclusions);

    // Autorun - Use stacked to preserve spacing
    StackedConfigurationGroup *group4 = new StackedConfigurationGroup(false, false);
    addChild(group4);

    HostCheckBox *autorun = new HostCheckBox("GalleryAutoLoad");
    autorun->setLabel(tr("Start Gallery when media inserted"));
    autorun->setHelpText(tr("Set to automatically start Gallery when media "
                            "(USB/CD's containing images) are inserted."));
    autorun->setEnabled(enable);
    group4->addChild(autorun);

    // Password - Use stacked to preserve spacing
    StackedConfigurationGroup *group2 = new StackedConfigurationGroup(false, false);
    addChild(group2);

    GlobalLineEdit *password = new GlobalLineEdit("GalleryPassword");
    password->setLabel(tr("Password"));
    password->SetPasswordEcho(true);
    password->setHelpText(tr("When set all actions that modify the filesystem or "
                             "database are protected (copy, move, transform, "
                             "hiding, covers). Hidden items cannot be viewed. "
                             "Applies to all frontends. "
                             "\nDisabled by an empty password. "
                             "Privileges persist until Gallery exits to main menu."));
    password->setEnabled(enable);
    group2->addChild(password);

    // Clear Db
    TriggeredConfigurationGroup *group3 = new TriggeredConfigurationGroup(false, false);
    group3->SetVertical(false);
    addChild(group3);

    TransCheckBoxSetting *clear = new TransCheckBoxSetting();
    clear->setLabel(tr("Reset Image Database"));
    clear->setHelpText(tr("Clears the database and thumbnails for the Image Storage Group. "
                          "A rescan will be required. Images for local media will persist."));
    clear->setEnabled(enable);
    group3->addChild(clear);

    HorizontalConfigurationGroup *clrSub =new HorizontalConfigurationGroup(false, false);

    TransButtonSetting *confirm = new TransButtonSetting("clearDb");
    confirm->setLabel(tr("Clear Now!"));
    confirm->setHelpText(tr("Warning! This will erase settings for: hidden images, "
                            "directory covers and re-orientations. "
                            "You will have to set them again after re-scanning."));
    connect(confirm, SIGNAL(pressed()), this, SIGNAL(ClearDbPressed()));
    clrSub->addChild(confirm);

    group3->setTrigger(clear);
    group3->addTarget("0", new HorizontalConfigurationGroup(false, false));
    group3->addTarget("1", clrSub);
}
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);
}