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


C++ setHeader函数代码示例

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


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

示例1: setHeader

char *GetLinearVelocityResult::encode(int seq, int &sz)
{
	char *p = m_buf;
  
	p = setHeader(p, seq);
	BINARY_SET_STRING_INCR(p, m_name);
	BINARY_SET_DOUBLE_INCR(p, m_x);
	BINARY_SET_DOUBLE_INCR(p, m_y);
	BINARY_SET_DOUBLE_INCR(p, m_z);

	p = setFooter(p);
  
	sz = p - m_buf;
	setPacketSize(m_buf, sz);
	return m_buf;
}
开发者ID:Aharobot,项目名称:SIGServer,代码行数:16,代码来源:MoveControl.cpp

示例2: setRequest

KCHMNetworkReply::KCHMNetworkReply( const QNetworkRequest &request, const QUrl &url )
{
	setRequest( request );
	setOpenMode( QIODevice::ReadOnly );

	m_data = loadResource( url );
	m_length = m_data.length();

	setHeader( QNetworkRequest::ContentLengthHeader, QByteArray::number(m_data.length()) );
	QMetaObject::invokeMethod(this, "metaDataChanged", Qt::QueuedConnection);

	if ( m_length )
		QMetaObject::invokeMethod(this, "readyRead", Qt::QueuedConnection);

	QMetaObject::invokeMethod(this, "finished", Qt::QueuedConnection);
}
开发者ID:gyunaev,项目名称:kchmviewer,代码行数:16,代码来源:dataprovider_qwebkit.cpp

示例3: setHeader

void Request::setCookie(const String& name,
                        const String& value,
                        const DateTimeDuration& duration,
                        const String& path,
                        const String& domain, bool https)
{
	String str = name.urlEscape() + "=" + value.urlEscape();
	if (!domain.isNull())
		str += "; Domain=" + domain.replace(";", "");
	str += "; Path=" + path.replace(";", "");
	if (!duration.isNull())
		str += "; Expires=" + (DateTime::now() + duration).toRfc822();
	if (https)
		str += "; Secure";
	setHeader("Set-Cookie", str, true);
}
开发者ID:dreamsxin,项目名称:WebCpp,代码行数:16,代码来源:Request.cpp

示例4: dev

BookMarkModelRead::BookMarkModelRead( const QString file  )
 :   dev(new StreamMark),foundTree(false),treeLoop(-1)
{
   //////////qDebug() << "### BookMarkModelRead load from file   " << file;
    bold_base_font = qApp->font();
    bold_base_font.setBold ( true );
    internalLinkFound.clear();
    flags = Qt::ItemIsEditable | Qt::ItemIsEnabled | Qt::ItemIsSelectable;
    model = new QStandardItemModel();
    setHeader();
	dev->LoadFile(file);
    if (dev->isValid()) {
     doc = dev->Dom();
     read();
    }
}
开发者ID:SorinS,项目名称:fop-miniscribus,代码行数:16,代码来源:BookMarkModel.cpp

示例5: qt_static_metacall

int todoHeader::qt_metacall(QMetaObject::Call _c, int _id, void **_a)
{
    _id = QObject::qt_metacall(_c, _id, _a);
    if (_id < 0)
        return _id;
    if (_c == QMetaObject::InvokeMetaMethod) {
        if (_id < 1)
            qt_static_metacall(this, _c, _id, _a);
        _id -= 1;
    } else if (_c == QMetaObject::RegisterMethodArgumentMetaType) {
        if (_id < 1)
            *reinterpret_cast<int*>(_a[0]) = -1;
        _id -= 1;
    }
#ifndef QT_NO_PROPERTIES
      else if (_c == QMetaObject::ReadProperty) {
        void *_v = _a[0];
        switch (_id) {
        case 0: *reinterpret_cast< QString*>(_v) = header(); break;
        }
        _id -= 1;
    } else if (_c == QMetaObject::WriteProperty) {
        void *_v = _a[0];
        switch (_id) {
        case 0: setHeader(*reinterpret_cast< QString*>(_v)); break;
        }
        _id -= 1;
    } else if (_c == QMetaObject::ResetProperty) {
        _id -= 1;
    } else if (_c == QMetaObject::QueryPropertyDesignable) {
        _id -= 1;
    } else if (_c == QMetaObject::QueryPropertyScriptable) {
        _id -= 1;
    } else if (_c == QMetaObject::QueryPropertyStored) {
        _id -= 1;
    } else if (_c == QMetaObject::QueryPropertyEditable) {
        _id -= 1;
    } else if (_c == QMetaObject::QueryPropertyUser) {
        _id -= 1;
    } else if (_c == QMetaObject::RegisterPropertyMetaType) {
        if (_id < 1)
            *reinterpret_cast<int*>(_a[0]) = -1;
        _id -= 1;
    }
#endif // QT_NO_PROPERTIES
    return _id;
}
开发者ID:anpt,项目名称:SOM,代码行数:47,代码来源:moc_todoHeader.cpp

示例6: ROS_ASSERT

void IntraProcessPublisherLink::setPublisher(const IntraProcessSubscriberLinkPtr& publisher)
{
  publisher_ = publisher;

  SubscriptionPtr parent = parent_.lock();
  ROS_ASSERT(parent);

  Header header;
  M_stringPtr values = header.getValues();
  (*values)["callerid"] = this_node::getName();
  (*values)["topic"] = parent->getName();
  (*values)["type"] = publisher->getDataType();
  (*values)["md5sum"] = publisher->getMD5Sum();
  (*values)["message_definition"] = publisher->getMessageDefinition();
  (*values)["latching"] = publisher->isLatching() ? "1" : "0";
  setHeader(header);
}
开发者ID:NimbRo-Copter,项目名称:nimbro-op-ros,代码行数:17,代码来源:intraprocess_publisher_link.cpp

示例7: setHeader

void FrmCatch::initUI()
{
    setHeader();

    this->groupDetails->setVisible(false);
    initPreviewTable(tableView,viewCatch);

    //initializing the container for the readonly!S
    m_lWidgets << cmbCategory;
    m_lWidgets << catchInputCtrl;
    m_lWidgets << spinNoInd;
    m_lWidgets << doubleSpinWeight;
    m_lWidgets << cmbUnits;
    m_lWidgets << textComments;

    pushNext->setEnabled(false);
}
开发者ID:doublebyte1,项目名称:medfisis_nix,代码行数:17,代码来源:frmcatch.cpp

示例8: setItemDelegate

void TreeView::init()
{
	if (!check())
	{
		return;
	}
	m_treeViewDelegate->setParent(this);
	setItemDelegate(m_treeViewDelegate);
	setModel(m_treeViewModel);
	setHeader(m_treeViewHeader);
	setAttribute(Qt::WA_TranslucentBackground);
	setWindowFlags(windowFlags() | Qt::FramelessWindowHint);
	setFrameStyle(QFrame::NoFrame);
	//È¥µô×ó²à¿Õ°×
	setIndentation(0);
	setEditTriggers(TreeView::NoEditTriggers);
}
开发者ID:xylsxyls,项目名称:xueyelingshuang,代码行数:17,代码来源:TreeView.cpp

示例9: setHeader

void OnlineView::update(const Song &song, bool force)
{
    if (force || song!=currentSong) {
        currentSong=song;
        if (!isVisible()) {
            needToUpdate=true;
            return;
        }
        setHeader(song.describe(true));
        Covers::Image cImg=Covers::self()->requestImage(song, true);
        if (!cImg.img.isNull()) {
            setHtml(createPicTag(cImg.img, cImg.fileName));
        } else {
            setHtml(QString());
        }
    }
}
开发者ID:Civil,项目名称:cantata,代码行数:17,代码来源:onlineview.cpp

示例10: QStandardItemModel

void BookMarkModelRead::openRootBookmark( const QDomElement e )
{
    if (e.tagName() !="fo:bookmark-tree")
    {
        return;
    }
    foundTree = true;
    model = new QStandardItemModel();
    internalLinkFound.clear();
    setHeader();
    //////////////qDebug() << "### openRootBookmark -> " << e.tagName();
    QDomElement child = e.firstChildElement("fo:bookmark");
           while (!child.isNull()) {
                model->invisibleRootItem()->appendRow(Compose(child,0));
                child = child.nextSiblingElement("fo:bookmark");
           }
}
开发者ID:SorinS,项目名称:fop-miniscribus,代码行数:17,代码来源:BookMarkModel.cpp

示例11: setAttribute

PreviewTable::PreviewTable(int numRows, int numCols, QWidget * parent, const char * name)
:Q3Table(numRows, numCols, parent, name)
{
	setAttribute(Qt::WA_DeleteOnClose);
	setSelectionMode(Q3Table::NoSelection);
	setReadOnly(true);
	setRowMovingEnabled(false);
	setColumnMovingEnabled(false);
	verticalHeader()->setResizeEnabled(false);

	for (int i=0; i<numCols; i++){
		comments << "";
		col_label << QString::number(i+1);
	}
	setHeader();
	setMinimumHeight(2*horizontalHeader()->height());
	connect(horizontalHeader(), SIGNAL(sizeChange(int, int, int)), this, SLOT(setHeader()));
}
开发者ID:BackupTheBerlios,项目名称:qtiplot-svn,代码行数:18,代码来源:ImportASCIIDialog.cpp

示例12: setHeader

void ClientSchema::initializeHeaders()
{
    QVector<QString> clientHeaders;

    clientHeaders.append("Client_id");
    clientHeaders.append("Process_id");
    clientHeaders.append("Person_id");
    clientHeaders.append("Children");
    clientHeaders.append("Adult");
    clientHeaders.append("AttorneyName");
    clientHeaders.append("AttorneyPhone");
    clientHeaders.append("AttorneyEmail");
    clientHeaders.append("AssistantName");
    clientHeaders.append("AssistantPhone");
    clientHeaders.append("AssistantEmail");

    setHeader(clientHeaders);
}
开发者ID:jadmr,项目名称:cpts483_Summer2015_drc,代码行数:18,代码来源:client_schema.cpp

示例13: setHeader

void Application::queryQuoteRequest(FIX::Symbol symbol)
{
  getQuote=false;
  FIX42::QuoteRequest message;

  FIX::QuoteReqID genQuoteReqID;
  genQuoteReqID = m_generator.genOrderID();
  message.set(genQuoteReqID);

  FIX42::QuoteRequest::NoRelatedSym symbolGroup;
  symbolGroup.set( symbol );

  message.addGroup(symbolGroup);

  setHeader( message.getHeader() );

  FIX::Session::sendToTarget( message );
}
开发者ID:BackupGGCode,项目名称:fgv-master-quant,代码行数:18,代码来源:Application.cpp

示例14: setPCMMode

void setPCMMode(int startPortNumber) {
	OMX_AUDIO_PARAM_PCMMODETYPE sPCMMode;

	setHeader(&sPCMMode, sizeof(OMX_AUDIO_PARAM_PCMMODETYPE));
	sPCMMode.nPortIndex = startPortNumber;
	sPCMMode.nSamplingRate = 48000;
	sPCMMode.nChannels;

	err = OMX_SetParameter(handle, OMX_IndexParamAudioPcm, &sPCMMode);
	if(err != OMX_ErrorNone) {
		fprintf(stderr, "PCM mode unsupported\n");
		return;
	} else {
		fprintf(stderr, "PCM mode supported\n");
		fprintf(stderr, "PCM sampling rate %d\n", sPCMMode.nSamplingRate);
		fprintf(stderr, "PCM nChannels %d\n", sPCMMode.nChannels);
	}
}
开发者ID:bouncingnote,项目名称:omx-test,代码行数:18,代码来源:test-audio_render.c

示例15: base_audio_port_Constructor

OMX_ERRORTYPE base_audio_port_Constructor(OMX_COMPONENTTYPE *openmaxStandComp,omx_base_PortType **openmaxStandPort,OMX_U32 nPortIndex, OMX_BOOL isInput) {
	OMX_ERRORTYPE err;
	omx_base_audio_PortType *omx_base_audio_Port;

  DEBUG(DEB_LEV_FUNCTION_NAME, "In %s of component %x\n", __func__, (int)openmaxStandComp);
  if (!(*openmaxStandPort)) {
    *openmaxStandPort = calloc(1, sizeof(omx_base_audio_PortType));
  }

  if (!(*openmaxStandPort)) {
    return OMX_ErrorInsufficientResources;
  }

  err = base_port_Constructor(openmaxStandComp,openmaxStandPort,nPortIndex, isInput);
  if (err != OMX_ErrorNone) {
	  DEBUG(DEB_LEV_ERR, "In %s base port constructor failed\n", __func__);
	  return err;
  }

  omx_base_audio_Port = (omx_base_audio_PortType *)*openmaxStandPort;

  setHeader(&omx_base_audio_Port->sAudioParam, sizeof(OMX_AUDIO_PARAM_PORTFORMATTYPE));
  omx_base_audio_Port->sAudioParam.nPortIndex = nPortIndex;
  omx_base_audio_Port->sAudioParam.nIndex = 0;
  omx_base_audio_Port->sAudioParam.eEncoding = OMX_AUDIO_CodingUnused;

  omx_base_audio_Port->sPortParam.eDomain = OMX_PortDomainAudio;
  omx_base_audio_Port->sPortParam.format.audio.cMIMEType = malloc(DEFAULT_MIME_STRING_LENGTH);
  if (!omx_base_audio_Port->sPortParam.format.audio.cMIMEType) {
	  DEBUG(DEB_LEV_ERR, "Memory allocation failed in %s\n", __func__);
	  return OMX_ErrorInsufficientResources;
  }
  strcpy(omx_base_audio_Port->sPortParam.format.audio.cMIMEType, "raw/audio");
  omx_base_audio_Port->sPortParam.format.audio.pNativeRender = 0;
  omx_base_audio_Port->sPortParam.format.audio.bFlagErrorConcealment = OMX_FALSE;
  omx_base_audio_Port->sPortParam.format.audio.eEncoding = OMX_AUDIO_CodingUnused;

  omx_base_audio_Port->sPortParam.nBufferSize = (isInput == OMX_TRUE)?DEFAULT_IN_BUFFER_SIZE:DEFAULT_OUT_BUFFER_SIZE ;

  omx_base_audio_Port->PortDestructor = &base_audio_port_Destructor;

  DEBUG(DEB_LEV_FUNCTION_NAME, "Out of %s of component %x\n", __func__, (int)openmaxStandComp);
  return OMX_ErrorNone;
}
开发者ID:791254467,项目名称:android_cm11_fullsource,代码行数:44,代码来源:omx_base_audio_port.c


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