• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

C++ quint32函数代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了C++中quint32函数的典型用法代码示例。如果您正苦于以下问题:C++ quint32函数的具体用法?C++ quint32怎么用?C++ quint32使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。



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

示例1: doc

void FadeChannel_Test::address()
{
    Doc doc(this);
    Fixture* fxi = new Fixture(&doc);
    fxi->setAddress(400);
    fxi->setChannels(5);
    doc.addFixture(fxi);

    FadeChannel fc;
    fc.setChannel(2);
    QCOMPARE(fc.address(), quint32(2));

    fc.setFixture(&doc, fxi->id());
    QCOMPARE(fc.address(), quint32(402));

    fc.setFixture(&doc, 12345);
    QCOMPARE(fc.address(), QLCChannel::invalid());
}
开发者ID:basileus,项目名称:qlcplus,代码行数:18,代码来源:fadechannel_test.cpp


示例2: QString

void KCTimeDict::save(QDataStream &str) const
{
    Hash::const_iterator it = m_hash.constBegin();
    const Hash::const_iterator end = m_hash.constEnd();
    for (; it != end; ++it) {
        str << it.key() << it.value();
    }
    str << QString() << quint32(0);
}
开发者ID:KDE,项目名称:kservice,代码行数:9,代码来源:kctimefactory.cpp


示例3: size

void AudioRecorder::close()
{
    // Fill the header size placeholders
    quint32 fileSize = size();

    QDataStream out(this);
    // Set the same ByteOrder like in writeHeader()
    out.setByteOrder(QDataStream::LittleEndian);
    // RIFF chunk size
    seek(4);
    out << quint32(fileSize - 8);

    // data chunk size
    seek(40);
    out << quint32(fileSize - 44);

    QFile::close();
}
开发者ID:spoggie,项目名称:AudioStreaming,代码行数:18,代码来源:audiorecorder.cpp


示例4: quint32

QT_BEGIN_NAMESPACE
QDataStream &operator<<(QDataStream &stream, const QList<QNetworkCookie> &list)
{
    stream << JAR_VERSION;
    stream << quint32(list.size());
    for (int i = 0; i < list.size(); ++i)
        stream << list.at(i).toRawForm();
    return stream;
}
开发者ID:2gis,项目名称:2gisqt5android,代码行数:9,代码来源:cookiejar.cpp


示例5: quint32

QDataStream &operator<<(QDataStream &out, const HighlightingMarkContainer &container)
{
    out << container.line_;
    out << container.column_;
    out << container.length_;
    out << quint32(container.type_);

    return out;
}
开发者ID:KeeganRen,项目名称:qt-creator,代码行数:9,代码来源:highlightingmarkcontainer.cpp


示例6: sample

void
APG::ConstraintSolver::fill_population( Population& population )
{
    for ( int i = population.size(); quint32(i) < m_populationSize; i++ ) {
        Meta::TrackList* tl = new Meta::TrackList( sample( m_domain, playlist_size() ) );
        double s = m_constraintTreeRoot->satisfaction( (*tl) );
        population.insert( tl, s );
    }
}
开发者ID:KDE,项目名称:amarok,代码行数:9,代码来源:ConstraintSolver.cpp


示例7: ds

QByteArray QWindowsAudioDeviceInfo::defaultOutputDevice()
{
    QByteArray defaultDevice;
    QDataStream ds(&defaultDevice, QIODevice::WriteOnly);
    ds << quint32(WAVE_MAPPER) // device ID for default device
       << QStringLiteral("Default Output Device");

    return defaultDevice;
}
开发者ID:venkatarajasekhar,项目名称:Qt,代码行数:9,代码来源:qwindowsaudiodeviceinfo.cpp


示例8: writeUniverse

void DMXUSB::writeUniverse(quint32 universe, quint32 output, const QByteArray &data)
{
    if (output < quint32(m_outputs.size()))
    {
        QByteArray wholeuniverse(512, 0);
        wholeuniverse.replace(0, data.length(), data);
        m_outputs.at(output)->writeUniverse(universe, output, wholeuniverse);
    }
}
开发者ID:Babbsdrebbler,项目名称:qlcplus,代码行数:9,代码来源:dmxusb.cpp


示例9: quint32

/**
 * Update the object's timers
 */
void Telemetry::setUpdatePeriod(UAVObject *obj, qint32 periodMs)
{
    // Find object type (not instance!) and update its period
    for (int n = 0; n < objList.length(); ++n) {
        if (objList[n].obj->getObjID() == obj->getObjID()) {
            objList[n].updatePeriodMs     = periodMs;
            objList[n].timeToNextUpdateMs = quint32((float)periodMs * (float)qrand() / (float)RAND_MAX); // avoid bunching of updates
        }
    }
}
开发者ID:nongxiaoming,项目名称:QGroundStation,代码行数:13,代码来源:telemetry.cpp


示例10: QVERIFY

void QLCInputProfile_Test::channelNumber()
{
    QLCInputProfile ip;
    QVERIFY(ip.channels().size() == 0);

    QLCInputChannel* ich1 = new QLCInputChannel();
    ip.insertChannel(0, ich1);

    QLCInputChannel* ich2 = new QLCInputChannel();
    ip.insertChannel(6510, ich2);

    QLCInputChannel* ich3 = new QLCInputChannel();
    ip.insertChannel(5, ich3);

    QCOMPARE(ip.channelNumber(NULL), InputMap::invalidChannel());
    QCOMPARE(ip.channelNumber(ich1), quint32(0));
    QCOMPARE(ip.channelNumber(ich2), quint32(6510));
    QCOMPARE(ip.channelNumber(ich3), quint32(5));
}
开发者ID:CCLinck21,项目名称:qlcplus,代码行数:19,代码来源:qlcinputprofile_test.cpp


示例11: QVERIFY

void Bus_Test::defaults()
{
    QVERIFY(Bus::count() == 32);
    QVERIFY(Bus::defaultFade() == 0);
    QVERIFY(Bus::defaultHold() == 1);
    QCOMPARE(Bus::defaultPalette(), quint32(31));
    QVERIFY(Bus::instance()->name(0) == QString("Fade"));
    QVERIFY(Bus::instance()->name(1) == QString("Hold"));
    QCOMPARE(Bus::instance()->name(31), QString("Palette"));
}
开发者ID:alexpaulzor,项目名称:qlc,代码行数:10,代码来源:bus_test.cpp


示例12: toScriptValue

QScriptValue toScriptValue(QScriptEngine *eng, const Container &cont)
{
    QScriptValue a = eng->newArray();
    typename Container::const_iterator begin = cont.begin();
    typename Container::const_iterator end = cont.end();
    typename Container::const_iterator it;
    for (it = begin; it != end; ++it)
        a.setProperty(quint32(it - begin), qScriptValueFromValue(eng, *it));
    return a;
}
开发者ID:eagafonov,项目名称:qtmoko,代码行数:10,代码来源:main.cpp


示例13: quint32

quint32 SMFProcessor::estimateRemainingTime(const MidiEventList &midiEvents, int currentEventIx) {
	MasterClockNanos tick = midiTick;
	MasterClockNanos totalNanos = 0;
	for (int i = currentEventIx; i < midiEvents.count(); i++) {
		const MidiEvent &e = midiEvents.at(i);
		totalNanos += e.getTimestamp() * tick;
		if (e.getType() == SET_TEMPO) tick = parser.getMidiTick(e.getShortMessage());
	}
	return quint32(totalNanos / MasterClock::NANOS_PER_SECOND);
}
开发者ID:albundy122,项目名称:munt,代码行数:10,代码来源:SMFDriver.cpp


示例14: doc

void IntensityGenerator_Test::fullZeroScenes()
{
    Doc doc(this, m_fixtureDefCache);

    QList <Fixture*> fixtures;

    Fixture* fxi = new Fixture(&doc);
    fxi->setChannels(4);
    fixtures << fxi;

    Fixture* fxi2 = new Fixture(&doc);
    const QLCFixtureDef* def = m_fixtureDefCache.fixtureDef("Futurelight", "DJScan250");
    Q_ASSERT(def != NULL);
    Q_ASSERT(def->modes().first() != NULL);
    Q_ASSERT(def->modes().first()->channels().size() == 6);
    fxi2->setFixtureDefinition(def, def->modes().first());
    fixtures << fxi2;

    QList <Scene*> scenes = IntensityGenerator::fullZeroScenes(fixtures, &doc);
    QCOMPARE(scenes.size(), 2);

    QCOMPARE(scenes[1]->values().size(), 0);
    QCOMPARE(scenes[0]->values().size(), 5);
    QCOMPARE(scenes[0]->values()[0].fxi, fxi->id());
    QCOMPARE(scenes[0]->values()[0].channel, quint32(0));
    QCOMPARE(scenes[0]->values()[0].value, uchar(UCHAR_MAX));
    QCOMPARE(scenes[0]->values()[1].fxi, fxi->id());
    QCOMPARE(scenes[0]->values()[1].channel, quint32(1));
    QCOMPARE(scenes[0]->values()[1].value, uchar(UCHAR_MAX));
    QCOMPARE(scenes[0]->values()[2].fxi, fxi->id());
    QCOMPARE(scenes[0]->values()[2].channel, quint32(2));
    QCOMPARE(scenes[0]->values()[2].value, uchar(UCHAR_MAX));
    QCOMPARE(scenes[0]->values()[3].fxi, fxi->id());
    QCOMPARE(scenes[0]->values()[3].channel, quint32(3));
    QCOMPARE(scenes[0]->values()[3].value, uchar(UCHAR_MAX));
    QCOMPARE(scenes[0]->values()[4].fxi, fxi2->id());
    QCOMPARE(scenes[0]->values()[4].channel, quint32(5));
    QCOMPARE(scenes[0]->values()[4].value, uchar(128));

    QCOMPARE(scenes[1]->values().size(), 0);
    // Zero scene needs no values because non-participating HTP channels are faded
    // automatically to zero
}
开发者ID:alexpaulzor,项目名称:qlc,代码行数:43,代码来源:intensitygenerator_test.cpp


示例15: openOutput

bool Peperoni::openOutput(quint32 output)
{
    if (m_usbdmx == NULL)
        return false;

    if (output < quint32(m_devices.size()))
        return m_devices.at(output)->open();

    return false;
}
开发者ID:Babbsdrebbler,项目名称:qlcplus,代码行数:10,代码来源:peperoni.cpp


示例16: Q_ASSERT

void PlaybackController::jumpTo(int pos)
{
	Q_ASSERT(m_indexloader);

	if(pos == m_reader->currentIndex())
		return;

	if(waitForExporter())
		return;

	// If the target position is behind current position or sufficiently far ahead, jump
	// to the closest snapshot point first
	if(pos < m_reader->currentIndex() || pos - m_reader->currentIndex() > 500) {
		int seIdx=0;
		const Index &index = m_indexloader->index();
		for(int i=1;i<index.snapshots().size();++i) {
			const SnapshotEntry &next = index.snapshots().at(i);
			if(int(next.pos) > pos)
				break;

			seIdx = i;
		}

		// When jumping forward, don't restore the snapshot if the snapshot is behind
		// the current position
		if(pos < m_reader->currentIndex() || index.snapshots().at(seIdx).pos > quint32(m_reader->currentIndex()))
			jumptToSnapshot(seIdx);
	}

	// Now the current position is somewhere before the target position: replay commands
	while(m_reader->currentIndex() < pos && !m_reader->isEof()) {
		MessageRecord next = m_reader->readNext();
		switch(next.status) {
		case MessageRecord::OK:
			if(next.message->type() == protocol::MSG_INTERVAL) {
				// skip intervals
				delete next.message;
			} else {
				emit commandRead(protocol::MessagePtr(next.message));
			}
			break;
		case MessageRecord::INVALID:
			qWarning() << "Unrecognized command " << next.error.type << "of length" << next.error.len;
			break;
		case MessageRecord::END_OF_RECORDING:
			emit endOfFileReached();
			break;
		}
	}

	if(m_exporter && m_autosave)
		exportFrame();

	updateIndexPosition();
}
开发者ID:Rambo2015,项目名称:Drawpile,代码行数:55,代码来源:playbackcontroller.cpp


示例17: file

bool DataLoad::writeFile(const QString &fileName, const QString &tablename)
{
    QFile file(fileName);
    if (!file.open(QIODevice::WriteOnly)) {
        QMessageBox::warning(this, tr("Spreadsheet"),
                             tr("Cannot write file %1:\n%2.")
                             .arg(file.fileName())
                             .arg(file.errorString()));
        return false;
    }

    QDataStream out(&file);
    out.setVersion(QDataStream::Qt_4_8);

    out << quint32(0x12345678);

    QApplication::setOverrideCursor(Qt::WaitCursor);

    QSqlDatabase dbconn = QSqlDatabase::database("bosch");

    QSqlQuery *query = new QSqlQuery(dbconn);
    query->exec(QString("SELECT * FROM %1").arg(tablename));
    QSqlRecord sqlRecord;
    sqlRecord = query->record();
    out << quint32(sqlRecord.count());
    for (int i = 0; i < sqlRecord.count(); i++) {
        out << sqlRecord.fieldName(i);
    }
    quint32 num = 0;
    while (query->next()) num++;
    out << quint32(num);
    query->first();
    num = 0;
    do {
        for (int i = 0; i < sqlRecord.count(); i++) {
            out  << query->value(i).toString();
        }
    } while (query->next());

    QApplication::restoreOverrideCursor();
    return true;
}
开发者ID:niuyuxin,项目名称:crsui,代码行数:42,代码来源:dataload.cpp


示例18: fxi

void VCXYPadFixtureEditor_Test::accept()
{
    QList <VCXYPadFixture> list;

    VCXYPadFixture fxi(m_doc);
    fxi.setDisplayMode(VCXYPadFixture::Percentage);

    fxi.setHead(GroupHead(0, 0));
    fxi.setX(0, 1, false);
    fxi.setY(0, 1, false);
    list << fxi;

    fxi.setHead(GroupHead(1, 0));
    fxi.setX(0.5, 0.6, true);
    fxi.setY(0.5, 0.6, true);
    list << fxi;

    VCXYPadFixtureEditor fe(NULL, list);
    fe.m_xMin->setValue(10);
    fe.m_xMax->setValue(20);
    fe.m_yMin->setValue(30);
    fe.m_yMax->setValue(40);
    fe.accept();
    QCOMPARE(fe.m_xMin->value(), 10);
    QCOMPARE(fe.m_xMax->value(), 20);
    QCOMPARE(fe.m_yMin->value(), 30);
    QCOMPARE(fe.m_yMax->value(), 40);

    list = fe.fixtures();
    QCOMPARE(list[0].head().fxi, quint32(0));
    QCOMPARE(list[0].head().head, 0);
    QCOMPARE(list[0].xMin(), qreal(0.1));
    QCOMPARE(list[0].xMax(), qreal(0.2));
    QCOMPARE(list[0].yMin(), qreal(0.3));
    QCOMPARE(list[0].yMax(), qreal(0.4));
    QCOMPARE(list[1].head().fxi, quint32(1));
    QCOMPARE(list[1].head().head, 0);
    QCOMPARE(list[1].xMin(), qreal(0.1));
    QCOMPARE(list[1].xMax(), qreal(0.2));
    QCOMPARE(list[1].yMin(), qreal(0.3));
    QCOMPARE(list[1].yMax(), qreal(0.4));
}
开发者ID:PML369,项目名称:qlcplus,代码行数:42,代码来源:vcxypadfixtureeditor_test.cpp


示例19: serializeNodes

void SceneSerializer::serializeNodes(QDataStream* out, QObject* p)
{
    auto nodes = p->findChildren<Node*>(QString(),
                                        Qt::FindDirectChildrenOnly);
    *out << quint32(nodes.length());

    for (auto node : nodes)
    {
        serializeNode(out, node);
    }
}
开发者ID:denji,项目名称:antimony,代码行数:11,代码来源:serializer.cpp


示例20: QModelIndex

QModelIndex RecipeModel::index(int row, int column, const QModelIndex &parent) const
{
    if(!hasIndex(row, column, parent))
        return QModelIndex();

    if(!parent.isValid()) {
        return createIndex(row, column, quint32(row));
    }

    return QModelIndex();
}
开发者ID:DaneGardner,项目名称:ThreeBrooks,代码行数:11,代码来源:RecipeModel.cpp



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


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
C++ quint8函数代码示例发布时间:2022-05-30
下一篇:
C++ quint16函数代码示例发布时间:2022-05-30
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap