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


C++ HostCheckBox::setEnabled方法代码示例

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


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

示例1: VerticalConfigurationGroup

/*!
 \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);
}
开发者ID:dragonian,项目名称:mythtv,代码行数:76,代码来源:galleryconfig.cpp


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