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


C++ QLCFixtureDef::type方法代码示例

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


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

示例1: type

void QLCFixtureDef_Test::type()
{
    QLCFixtureDef* fd = new QLCFixtureDef();
    fd->setType("Scanner");
    QVERIFY(fd->type() == "Scanner");
    delete fd;
}
开发者ID:Andersbakken,项目名称:qlc-svn,代码行数:7,代码来源:qlcfixturedef_test.cpp

示例2: fillTree

void AddFixture::fillTree()
{
	QPtrListIterator <QLCFixtureDef> it(*_app->fixtureDefList());
	QLCFixtureDef* fixtureDef = NULL;
	QListViewItem* parent = NULL;
	QListViewItem* node = NULL;
	QString str;

	/* Clear the tree of any previous data */
	m_tree->clear();

	/* Add all known fixture definitions. */
	while ( (fixtureDef = *it) != NULL )
	{
		parent = NULL;

		/* Search for an existing manufacturer parent node from
		   the tree. If such is found, it will be used as the
		   parent for the current fixture. If not, the manufacturer
		   will be added as a new parent and then used for the
		   current fixture. */
		for (node = m_tree->firstChild(); node != NULL;
		     node = node->nextSibling())
		{
			if (node->text(KColumnName) == fixtureDef->manufacturer())
			{
				parent = node;
				break;
			}
		}

		/* If an existing manufacturer parent node was not found,
		   we must create one. Otherwise we use the found node
		   as the parent for the new item. */
		if (parent == NULL)
			parent = new QListViewItem(m_tree,
						   fixtureDef->manufacturer());

		/* Create a new fixture node, under the parent node */
		node = new QListViewItem(parent);
		node->setText(KColumnName, fixtureDef->model());
		node->setText(KColumnType, fixtureDef->type());

		/* Store the fixture pointer into the tree */
		str.sprintf("%d", (unsigned long) fixtureDef);
		node->setText(KColumnPointer, str);

		++it;
	}

	/* Create a node & parent for generic dimmers */
	parent = new QListViewItem(m_tree);
	parent->setText(KColumnName, KXMLFixtureGeneric);
	node = new QListViewItem(parent);
	node->setText(KColumnName, KXMLFixtureGeneric);
	node->setText(KColumnType, KXMLFixtureDimmer);
	node->setText(KColumnPointer, "0");
}
开发者ID:speakman,项目名称:qlc,代码行数:58,代码来源:addfixture.cpp

示例3: initial

void QLCFixtureDef_Test::initial()
{
    QLCFixtureDef* fd = new QLCFixtureDef();
    QVERIFY(fd->manufacturer().isEmpty());
    QVERIFY(fd->model().isEmpty());
    QVERIFY(fd->name() == " ");
    QVERIFY(fd->type() == "Dimmer");
    delete fd;
}
开发者ID:Andersbakken,项目名称:qlc-svn,代码行数:9,代码来源:qlcfixturedef_test.cpp

示例4: type

void Fixture_Test::type()
{
    Fixture fxi(this);
    QCOMPARE(fxi.type(), QString(KXMLFixtureDimmer));

    QLCFixtureDef* fixtureDef;
    fixtureDef = m_doc->fixtureDefCache()->fixtureDef("Martin", "MAC250+");
    QVERIFY(fixtureDef != NULL);

    QLCFixtureMode* fixtureMode;
    fixtureMode = fixtureDef->modes().at(0);
    QVERIFY(fixtureMode != NULL);

    fxi.setFixtureDefinition(fixtureDef, fixtureMode);
    QCOMPARE(fxi.type(), fixtureDef->type());
}
开发者ID:PML369,项目名称:qlcplus,代码行数:16,代码来源:fixture_test.cpp

示例5: copy

void QLCFixtureDef_Test::copy()
{
    QLCFixtureDef* fd = new QLCFixtureDef();
    fd->setManufacturer("Martin");
    fd->setModel("MAC600");
    fd->setType("Moving Head");

    QLCChannel* ch = new QLCChannel();
    ch->setName("TestChannel");
    fd->addChannel(ch);

    QLCFixtureMode* mode = new QLCFixtureMode(fd);
    mode->setName("TestMode");
    fd->addMode(mode);
    mode->insertChannel(ch, 0);

    QLCFixtureDef* copy = new QLCFixtureDef(fd);
    QVERIFY(copy->manufacturer() == "Martin");
    QVERIFY(copy->model() == "MAC600");
    QVERIFY(copy->type() == "Moving Head");

    /* Verify that modes and channels get copied and that the channels in
       the copied mode are from the copied fixtureDef and not the one that
       the copy is taken FROM. */
    QVERIFY(copy->channels().at(0)->name() == "TestChannel");
    QVERIFY(copy->modes().at(0)->name() == "TestMode");
    QVERIFY(copy->modes().at(0)->channels().size() == 1);
    QVERIFY(copy->modes().size() == 1);
    QVERIFY(copy->modes().at(0)->channel(0) != ch);
    QVERIFY(copy->modes().at(0)->channel(0) == copy->channels().at(0));
    QVERIFY(copy->channels().at(0)->name() == "TestChannel");
    QVERIFY(copy->modes().at(0)->channel(0)->name() == "TestChannel");

    delete fd;
    delete copy;
}
开发者ID:Andersbakken,项目名称:qlc-svn,代码行数:36,代码来源:qlcfixturedef_test.cpp


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