当前位置: 首页>>代码示例>>C++>>正文


C++ HostComboBox::addSelection方法代码示例

本文整理汇总了C++中HostComboBox::addSelection方法的典型用法代码示例。如果您正苦于以下问题:C++ HostComboBox::addSelection方法的具体用法?C++ HostComboBox::addSelection怎么用?C++ HostComboBox::addSelection使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在HostComboBox的用法示例。


在下文中一共展示了HostComboBox::addSelection方法的13个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。

示例1: HostComboBox

static HostComboBox *JobQueueCPU()
{
    HostComboBox *gc = new HostComboBox("JobQueueCPU");
    gc->setLabel(QObject::tr("CPU usage"));
    gc->addSelection(QObject::tr("Low"), "0");
    gc->addSelection(QObject::tr("Medium"), "1");
    gc->addSelection(QObject::tr("High"), "2");
    gc->setHelpText(QObject::tr("This setting controls approximately how "
                    "much CPU jobs in the queue may consume. "
                    "On 'High', all available CPU time may be used, "
                    "which could cause problems on slower systems." ));
    return gc;
};
开发者ID:Olti,项目名称:mythtv,代码行数:13,代码来源:backendsettings.cpp

示例2: HostComboBox

static HostComboBox *MythArchiveTimeFormat()
{
    HostComboBox *gc = new HostComboBox("MythArchiveTimeFormat");
    gc->setLabel(QObject::tr("Time format"));

    QTime samptime = QTime::currentTime();

    gc->addSelection(samptime.toString("hh:mm AP"), "%I:%M %p");
    gc->addSelection(samptime.toString("hh:mm"), "%H:%M");
    gc->setHelpText(QObject::tr("Your preferred time format to display on DVD menus. "
            "You must choose a format with \"AM\" or \"PM\" in it, otherwise your "
            "time display will be 24-hour or \"military\" time."));
    return gc;
}
开发者ID:camdbug,项目名称:mythtv,代码行数:14,代码来源:archivesettings.cpp

示例3: HostComboBox

HostComboBox *AudioAdvancedSettings::SRCQuality()
{
    HostComboBox *gc = new HostComboBox("SRCQuality", false);
    gc->setLabel(QObject::tr("Sample rate conversion"));
    gc->addSelection(QObject::tr("Disabled"), "-1");
    gc->addSelection(QObject::tr("Fastest"), "0");
    gc->addSelection(QObject::tr("Good"), "1", true); // default
    gc->addSelection(QObject::tr("Best"), "2");
    gc->setHelpText(QObject::tr("Set the quality of audio sample-rate "
                                "conversion. \"Good\" (default) provides the best "
                                "compromise between CPU usage and quality. \"Disabled\" "
                                "lets the audio device handle sample-rate conversion."));
    return gc;
}
开发者ID:,项目名称:,代码行数:14,代码来源:

示例4: HostComboBox

static HostComboBox *CDWriteSpeed()
{
    HostComboBox *gc = new HostComboBox("CDWriteSpeed");
    gc->setLabel(QObject::tr("CD Write Speed"));
    gc->addSelection(QObject::tr("Auto"), "0");
    gc->addSelection("1x", "1");
    gc->addSelection("2x", "2");
    gc->addSelection("4x", "4");
    gc->addSelection("8x", "8");
    gc->addSelection("16x", "16");
    gc->setHelpText(QObject::tr("CD Writer speed. Auto will use the recomended "
                    "speed."));
    return gc;
};
开发者ID:txase,项目名称:mythtv,代码行数:14,代码来源:globalsettings.cpp

示例5: HostComboBox

static HostComboBox *ZMTimeFormat()
{
    HostComboBox *gc = new HostComboBox("ZoneMinderTimeFormat");
    gc->setLabel(QObject::tr("Time format"));

    QTime samptime = QTime::currentTime();

    gc->addSelection(samptime.toString("hh:mm AP"), "hh:mm AP");
    gc->addSelection(samptime.toString("hh:mm"), "hh:mm");
    gc->addSelection(samptime.toString("hh:mm:ss"), "hh:mm:ss");

    gc->setHelpText(QObject::tr("Your preferred time format to display "
                                "on the events screens."));
    return gc;
}
开发者ID:ChristopherNeufeld,项目名称:mythtv,代码行数:15,代码来源:zmsettings.cpp

示例6: if

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;
}
开发者ID:matt-schrader,项目名称:mythtv,代码行数:30,代码来源:backendsettings.cpp

示例7: availableTransitions

SlideSettings::SlideSettings() : VerticalConfigurationGroup()
{
    setLabel(tr("Slideshow"));
    
    HostComboBox *tranBox = new HostComboBox("GalleryTransitionType");
    tranBox->setLabel(tr("Transition"));
    tranBox->setHelpText(tr("Effect to use between slides"));
    
    // Initialise selected transition
    TransitionRegistry availableTransitions(GetMythPainter()->SupportsAnimation());
    TransitionMap transitions = availableTransitions.GetAll();
    QMapIterator<int, Transition*> i(transitions);
    while (i.hasNext())
    {
        i.next();
        tranBox->addSelection(i.value()->objectName(), QString::number(i.key()));
    }
    addChild(tranBox);
    
    HostSpinBox *slide = new HostSpinBox("GallerySlideShowTime", 100, 60000, 100);
    slide->setLabel(tr("Slide Duration (ms)"));
    slide->setHelpText(tr("The time that a slide is displayed (between transitions), "
                          "in milliseconds."));
    addChild(slide);
    
    HostSpinBox *transition = new HostSpinBox("GalleryTransitionTime", 100, 60000, 100);
    transition->setLabel(tr("Transition Duration (ms)"));
    transition->setHelpText(tr("The time that each transition lasts, in milliseconds."));
    addChild(transition);
}
开发者ID:dragonian,项目名称:mythtv,代码行数:30,代码来源:galleryconfig.cpp

示例8: HostComboBox

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;
}
开发者ID:JGunning,项目名称:OpenAOL-TV,代码行数:36,代码来源:backendsettings.cpp

示例9: dev

static HostComboBox *MusicAudioDevice()
{
    HostComboBox *gc = new HostComboBox("MusicAudioDevice", true);
    gc->setLabel(QObject::tr("Audio device"));
    gc->addSelection(QObject::tr("default"), "default");
    QDir dev("/dev", "dsp*", QDir::Name, QDir::System);
    gc->fillSelectionsFromDir(dev);
    dev.setNameFilter("adsp*");
    gc->fillSelectionsFromDir(dev);

    dev.setNameFilter("dsp*");
    dev.setPath("/dev/sound");
    gc->fillSelectionsFromDir(dev);
    dev.setNameFilter("adsp*");
    gc->fillSelectionsFromDir(dev);
    gc->setHelpText(QObject::tr("Audio Device used for playback. 'default' will use the device specified in MythTV"));
    return gc;
};
开发者ID:txase,项目名称:mythtv,代码行数:18,代码来源:globalsettings.cpp

示例10: HostComboBox

static HostComboBox *MythGallerySortOrder()
{
    HostComboBox *gc = new HostComboBox("GallerySortOrder");
    gc->setLabel(QObject::tr("Sort order when browsing"));
    gc->addSelection("Unsorted", QString::number(kSortOrderUnsorted));
    gc->addSelection("Name (A-Z alpha)", QString::number(kSortOrderNameAsc));
    gc->addSelection("Reverse Name (Z-A alpha)",
                     QString::number(kSortOrderNameDesc));
    gc->addSelection("Mod Time (oldest first)",
                     QString::number(kSortOrderModTimeAsc));
    gc->addSelection("Reverse Mod Time (newest first)",
                     QString::number(kSortOrderModTimeDesc));
    gc->addSelection("Extension (A-Z alpha)",
                     QString::number(kSortOrderExtAsc));
    gc->addSelection("Reverse Extension (Z-A alpha)",
                     QString::number(kSortOrderExtDesc));
    gc->addSelection("Filesize (smallest first)",
                     QString::number(kSortOrderSizeAsc));
    gc->addSelection("Reverse Filesize (largest first)",
                     QString::number(kSortOrderSizeDesc));
    gc->setHelpText(QObject::tr("This is the sort order for the displayed "
                    "picture thumbnails."));
    return gc;
};
开发者ID:JackOfMostTrades,项目名称:mythtv,代码行数:24,代码来源:gallerysettings.cpp

示例11: HostComboBox

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;
};
开发者ID:matt-schrader,项目名称:mythtv,代码行数:20,代码来源:backendsettings.cpp

示例12: VerticalConfigurationGroup

ThumbSettings::ThumbSettings() : VerticalConfigurationGroup()
{
    setLabel(tr("Thumbnails"));
    
    HostComboBox *order = new HostComboBox("GalleryImageOrder");
    order->setLabel(tr("Image Order"));
    order->setHelpText(tr("The order that pictures/videos are shown in thumbnail "
                          "view and ordered slideshows."));
    order->addSelection(tr("Filename (A-Z)"), QString::number(kSortByNameAsc));
    order->addSelection(tr("Reverse Filename (Z-A)"), QString::number(kSortByNameDesc));
    order->addSelection(tr("Exif Date (oldest first)"), QString::number(kSortByDateAsc));
    order->addSelection(tr("Reverse Exif Date (newest first)"), QString::number(kSortByDateDesc));
    order->addSelection(tr("File Modified Time (oldest first)"), QString::number(kSortByModTimeAsc));
    order->addSelection(tr("Reverse File Modified Time (newest first)"), QString::number(kSortByModTimeDesc));
    order->addSelection(tr("File Extension (A-Z)"), QString::number(kSortByExtAsc));
    order->addSelection(tr("Reverse File Extension (Z-A)"), QString::number(kSortByExtDesc));
    order->addSelection(tr("File Size (smallest first)"), QString::number(kSortBySizeAsc));
    order->addSelection(tr("Reverse File Size (largest first)"), QString::number(kSortBySizeDesc));
    addChild(order);
    
    HostComboBox *orderDir = new HostComboBox("GalleryDirOrder");
    orderDir->setLabel(tr("Directory Order"));
    orderDir->setHelpText(tr("The order that dirctories are shown and traversed "
                             "in recursive slideshows."));
    orderDir->addSelection(tr("Filename (A-Z)"), QString::number(kSortByNameAsc));
    orderDir->addSelection(tr("Reverse Filename (Z-A)"), QString::number(kSortByNameDesc));
    orderDir->addSelection(tr("File Modified Time (oldest first)"), QString::number(kSortByModTimeAsc));
    orderDir->addSelection(tr("Reverse File Modified Time (newest first)"), QString::number(kSortByModTimeDesc));
    addChild(orderDir);
    
    HostComboBox *fmt = new HostComboBox("GalleryDateFormat");
    fmt->setLabel(tr("Date Format"));
    
    QDateTime sampdate = MythDate::fromString("2002-05-03");
    
    ADD_FORMAT(sampdate, "dd/MM/yy");
    ADD_FORMAT(sampdate, "dd-MM-yy");
    ADD_FORMAT(sampdate, "d/M/yy");
    ADD_FORMAT(sampdate, "d-M-yy");
    ADD_FORMAT(sampdate, "MM/dd/yy");
    ADD_FORMAT(sampdate, "MM-dd-yy");
    ADD_FORMAT(sampdate, "M/d/yy");
    ADD_FORMAT(sampdate, "M-d-yy");
    ADD_FORMAT(sampdate, "yyyy/MM/dd");
    ADD_FORMAT(sampdate, "yyyy-MM-dd");
    ADD_FORMAT(sampdate, QString("yyyy") % QChar(0x5E74) %
               "M" % QChar(0x6708) % "d" % QChar(0x65E5)); // yyyy年M月d日
    
    fmt->setHelpText(tr("Date format of thumbnail captions. Other places use the system date format. "
                        "Sample shows 3rd May 2002."));
    addChild(fmt);
}
开发者ID:dragonian,项目名称:mythtv,代码行数:52,代码来源:galleryconfig.cpp

示例13: HostComboBox

static HostComboBox *SlideshowOpenGLTransition()
{
    HostComboBox *gc = new HostComboBox("SlideshowOpenGLTransition");
    gc->setLabel(QObject::tr("Type of OpenGL transition"));
    gc->addSelection("none");
    gc->addSelection("blend (gl)");
    gc->addSelection("zoom blend (gl)");
    gc->addSelection("fade (gl)");
    gc->addSelection("rotate (gl)");
    gc->addSelection("bend (gl)");
    gc->addSelection("inout (gl)");
    gc->addSelection("slide (gl)");
    gc->addSelection("flutter (gl)");
    gc->addSelection("cube (gl)");
    gc->addSelection("Ken Burns (gl)");
    gc->addSelection("random (gl)");
    gc->setHelpText(QObject::tr("This is the type of OpenGL transition used "
                    "between pictures in slideshow mode."));
    return gc;
};
开发者ID:Openivo,项目名称:mythtv,代码行数:20,代码来源:gallerysettings.cpp


注:本文中的HostComboBox::addSelection方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。