Ejemplo n.º 1
0
static HostComboBox *LocalServerIP6()
{
    HostComboBox *gc = new HostComboBox("BackendServerIP6");
    gc->setLabel(QObject::tr("IPv6 address"));
    QList<QHostAddress> list = ServerPool::DefaultListenIPv6();
    QList<QHostAddress>::iterator it;
    for (it = list.begin(); it != list.end(); ++it)
    {
        gc->addSelection((*it).toString(), (*it).toString());
    }

#if defined(QT_NO_IPV6)
    gc->setEnabled(false);
    gc->setValue("");
#else
    if (list.isEmpty())
    {
        gc->setEnabled(false);
        gc->setValue("");
    }
    else if (list.contains(QHostAddress("::1")))
        gc->setValue("::1");
#endif
        
    gc->setHelpText(QObject::tr("Enter the IPv6 address of this machine. "
                    "Use an externally accessible address (ie, not "
                    "::1) if you are going to be running a frontend "
                    "on a different machine than this one."));
    return gc;
}
Ejemplo n.º 2
0
static HostComboBox *MainMenuAspectRatio()
{
    HostComboBox *gc = new HostComboBox("MythArchiveMainMenuAR");
    gc->setLabel(QObject::tr("Main Menu Aspect Ratio"));
    gc->addSelection("4:3");
    gc->addSelection("16:9");
    gc->setValue(1);
    gc->setHelpText(QObject::tr("Aspect ratio to use when creating the main menu."));
    return gc;
};
Ejemplo n.º 3
0
static HostComboBox *ChapterMenuAspectRatio()
{
    HostComboBox *gc = new HostComboBox("MythArchiveChapterMenuAR");
    gc->setLabel(QObject::tr("Chapter Menu Aspect Ratio"));
    gc->addSelection("4:3");
    gc->addSelection("16:9");
    gc->addSelection("Video");
    gc->setValue(2);
    gc->setHelpText(QObject::tr("Aspect ratio to use when creating the chapter menu. "
            "Video means use the same aspect ratio as the associated video."));
    return gc;
};
Ejemplo n.º 4
0
static HostComboBox *MythArchiveDefaultEncProfile()
{
    HostComboBox *gc = new HostComboBox("MythArchiveDefaultEncProfile");
    gc->setLabel(QObject::tr("Default Encoder Profile"));

    gc->addSelection("HQ", "HQ");
    gc->addSelection("SP", "SP");
    gc->addSelection("LP", "LP");
    gc->addSelection("EP", "EP");
    gc->setValue(1);
    gc->setHelpText(QObject::tr("Default encoding profile to use if a file "
                                "needs re-encoding."));
    return gc;
}
Ejemplo n.º 5
0
static HostComboBox *LocalServerIP6()
{
    HostComboBox *gc = new HostComboBox("BackendServerIP6");
    gc->setLabel(QObject::tr("IPv6 address"));
    QList<QHostAddress> list = QNetworkInterface::allAddresses();
    QList<QHostAddress>::iterator it;
    for (it = list.begin(); it != list.end(); ++it)
    {
        if ((*it).protocol() == QAbstractSocket::IPv6Protocol)
            gc->addSelection((*it).toString(), (*it).toString());
    }

#if defined(QT_NO_IPV6)
    gc->setEnabled(false);
    gc->setValue("");
#else
    if (list.isEmpty())
    {
        gc->setEnabled(false);
        gc->setValue("");
    }
    else
    {
        // Allow ability to have no value set, this disable IPv6
        gc->addSelection("");
        if (list.contains(QHostAddress("::1")))
            gc->setValue("::1");
    }
#endif

    gc->setHelpText(QObject::tr("Enter the IPv6 address of this machine. "
                    "Use an externally accessible address (ie, not "
                    "::1) if you are going to be running a frontend "
                    "on a different machine than this one."));
    return gc;
}
Ejemplo n.º 6
0
static HostComboBox *LocalServerIP()
{
    HostComboBox *gc = new HostComboBox("BackendServerIP");
    gc->setLabel(QObject::tr("IPv4 address"));
    QList<QHostAddress> list = ServerPool::DefaultListenIPv4();
    QList<QHostAddress>::iterator it;
    for (it = list.begin(); it != list.end(); ++it)
    {
        gc->addSelection((*it).toString(), (*it).toString());
    }

    gc->setValue("127.0.0.1");
    gc->setHelpText(QObject::tr("Enter the IP address of this machine. "
                    "Use an externally accessible address (ie, not "
                    "127.0.0.1) if you are going to be running a frontend "
                    "on a different machine than this one. Note, in IPv6 "
                    "setups, this is still required for certain extras "
                    "such as UPnP."));
    return gc;
};