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


C++ QLCInputChannel::name方法代码示例

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


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

示例1: name

void QLCInputChannel_Test::name()
{
	QLCInputChannel ch;
	QVERIFY(ch.name() == QString::null);
	ch.setName("Foobar");
	QVERIFY(ch.name() == "Foobar");
}
开发者ID:,项目名称:,代码行数:7,代码来源:

示例2: sendFeedback

void GrandMasterSlider::sendFeedback()
{
    quint32 universe = VirtualConsole::instance()->properties().grandMasterInputUniverse();
    quint32 channel = VirtualConsole::instance()->properties().grandMasterInputChannel();
    QString chName;

    if (universe == InputOutputMap::invalidUniverse() || channel == QLCChannel::invalid())
        return;

    InputPatch* pat = m_ioMap->inputPatch(universe);
    if (pat != NULL)
    {
        QLCInputProfile* profile = pat->profile();
        if (profile != NULL)
        {
            QLCInputChannel* ich = profile->channel(channel);
            if (ich != NULL)
                chName = ich->name();
        }
    }
    if (m_slider->invertedAppearance())
        m_ioMap->sendFeedBack(universe, channel, UCHAR_MAX - m_slider->value(), chName);
    else
        m_ioMap->sendFeedBack(universe, channel, m_slider->value(), chName);
}
开发者ID:PML369,项目名称:qlcplus,代码行数:25,代码来源:grandmasterslider.cpp

示例3: copy

void QLCInputChannel_Test::copy()
{
	QLCInputChannel ch;
	ch.setType(QLCInputChannel::Slider);
	ch.setName("Foobar");

	QLCInputChannel copy(ch);
	QVERIFY(copy.type() == QLCInputChannel::Slider);
	QVERIFY(copy.name() == "Foobar");

	QLCInputChannel another = ch;
	QVERIFY(another.type() == QLCInputChannel::Slider);
	QVERIFY(another.name() == "Foobar");
}
开发者ID:,项目名称:,代码行数:14,代码来源:

示例4: inputSourceNames

bool VCPropertiesEditor::inputSourceNames(quint32 universe, quint32 channel,
                                          QString& uniName, QString& chName) const
{
    if (universe == InputMap::invalidUniverse() || channel == InputMap::invalidChannel())
    {
        /* Nothing selected for input universe and/or channel */
        return false;
    }

    InputPatch* patch = m_inputMap->patch(universe);
    if (patch == NULL || patch->plugin() == NULL)
    {
        /* There is no patch for the given universe */
        return false;
    }

    QLCInputProfile* profile = patch->profile();
    if (profile == NULL)
    {
        /* There is no profile. Display plugin name and channel number.
           Boring. */
        uniName = patch->plugin()->name();
        chName = tr("%1: Unknown").arg(channel + 1);
    }
    else
    {
        QLCInputChannel* ich;
        QString name;

        /* Display profile name for universe */
        uniName = QString("%1: %2").arg(universe + 1).arg(profile->name());

        /* User can input the channel number by hand, so put something
           rational to the channel name in those cases as well. */
        ich = profile->channel(channel);
        if (ich != NULL)
            name = ich->name();
        else
            name = tr("Unknown");

        /* Display channel name */
        chName = QString("%1: %2").arg(channel + 1).arg(name);
    }

    return true;
}
开发者ID:alexpaulzor,项目名称:qlc,代码行数:46,代码来源:vcpropertieseditor.cpp

示例5: inputSourceNames

bool InputMap::inputSourceNames(const QLCInputSource& src,
                                QString& uniName, QString& chName) const
{
    if (src.isValid() == false)
        return false;

    InputPatch* pat = this->patch(src.universe());
    if (pat == NULL)
    {
        /* There is no patch for the given universe */
        return false;
    }

    QLCInputProfile* profile = pat->profile();
    if (profile == NULL)
    {
        /* There is no profile. Display plugin name and channel number. */
        if (pat->plugin() != NULL)
            uniName = QString("%1: %2").arg(src.universe() + 1).arg(pat->plugin()->name());
        else
            uniName = QString("%1: ??").arg(src.universe() + 1);
        chName = QString("%1: ?").arg(src.channel() + 1);
    }
    else
    {
        QLCInputChannel* ich;
        QString name;

        /* Display profile name for universe */
        uniName = QString("%1: %2").arg(src.universe() + 1).arg(profile->name());

        /* User can input the channel number by hand, so put something
           rational to the channel name in those cases as well. */
        ich = profile->channel(src.channel());
        if (ich != NULL)
            name = ich->name();
        else
            name = QString("?");

        /* Display channel name */
        chName = QString("%1: %2").arg(src.channel() + 1).arg(name);
    }

    return true;
}
开发者ID:Unknownly,项目名称:qlcplus,代码行数:45,代码来源:inputmap.cpp

示例6: loadWrongType

void QLCInputChannel_Test::loadWrongType()
{
	QDomDocument doc;

	QDomElement root = doc.createElement("Channel");
	doc.appendChild(root);

	QDomElement name = doc.createElement("Name");
	QDomText nameText = doc.createTextNode("Foobar");
	name.appendChild(nameText);
	root.appendChild(name);

	QDomElement type = doc.createElement("Type");
	QDomText typeText = doc.createTextNode("Xyzzy");
	type.appendChild(typeText);
	root.appendChild(type);

	QLCInputChannel ch;
	ch.loadXML(&root);
	QVERIFY(ch.name() == "Foobar");
	QVERIFY(ch.type() == QLCInputChannel::NoType);
}
开发者ID:,项目名称:,代码行数:22,代码来源:

示例7: updateInputSource

void VCSliderProperties::updateInputSource()
{
    QLCInputProfile* profile;
    InputPatch* patch;
    QString uniName;
    QString chName;

    if (m_inputUniverse == InputMap::invalidUniverse() ||
            m_inputChannel == InputMap::invalidChannel())
    {
        /* Nothing selected for input universe and/or channel */
        uniName = KInputNone;
        chName = KInputNone;
    }
    else
    {
        patch = m_inputMap->patch(m_inputUniverse);
        if (patch == NULL || patch->plugin() == NULL)
        {
            /* There is no patch for the given universe */
            uniName = KInputNone;
            chName = KInputNone;
        }
        else
        {
            profile = patch->profile();
            if (profile == NULL)
            {
                /* There is no profile. Display plugin
                   name and channel number. Boring. */
                uniName = patch->plugin()->name();
                chName = tr("%1: Unknown")
                         .arg(m_inputChannel + 1);
            }
            else
            {
                QLCInputChannel* ich;
                QString name;

                /* Display profile name for universe */
                uniName = QString("%1: %2")
                          .arg(m_inputUniverse + 1)
                          .arg(profile->name());

                /* User can input the channel number by hand,
                   so put something rational to the channel
                   name in those cases as well. */
                ich = profile->channel(m_inputChannel);
                if (ich != NULL)
                    name = ich->name();
                else
                    name = tr("Unknown");

                /* Display channel name */
                chName = QString("%1: %2")
                         .arg(m_inputChannel + 1).arg(name);
            }
        }
    }

    /* Display the gathered information */
    m_inputUniverseEdit->setText(uniName);
    m_inputChannelEdit->setText(chName);
}
开发者ID:speakman,项目名称:qlc,代码行数:64,代码来源:vcsliderproperties.cpp


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