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

C++ setHeader函数代码示例

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

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



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


示例16: setHeader

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

    this->groupDetails->setVisible(false);
    initPreviewTable(tableView,viewTrips);
    setButtonBox(buttonBox);
    setGroupDetails(groupDetails);
    setNewButton(pushNew);
    setEditButton(pushEdit);
    setRemoveButton(pushRemove);
    setNextButton(pushNext);
    setPreviousButton(pushPrevious);

    setUIPermissions();

    //initializing the container for the readonly!S
    m_lWidgets << cmbSampler;
    m_lWidgets << spinProf;
    m_lWidgets << spinPart;
    m_lWidgets << customDtStart;
    m_lWidgets << customDtEnd;
    m_lWidgets << catchInputCtrl;
    m_lWidgets << textComments;
    m_lWidgets << spinNOE;
    //m_lWidgets << spinNOC;
    //m_lWidgets << cmbFishingZone;
    m_lWidgets << listGears;
    m_lWidgets << listZones;
    m_lWidgets << cmbSite;
    m_lWidgets << pushClear;

    customDtStart->setIsUTC(false);
    customDtStart->setIsAuto(false);

    customDtEnd->setIsUTC(false);
    customDtEnd->setIsAuto(false);

    connect(customDtStart, SIGNAL(isDateTime(bool,int)), m_tDateTime,
        SLOT(amendDateTimeType(bool,int)));

    connect(customDtEnd, SIGNAL(isDateTime(bool,int)), m_tDateTime,
        SLOT(amendDateTimeType(bool,int)));
}
开发者ID:doublebyte1,项目名称:app_solution,代码行数:44,代码来源:frmtrip.cpp


示例17: getReadHandle

void MCF::parseMCF()
{
	if (m_bStopped)
		return;

	UTIL::FS::FileHandle hFile;
	getReadHandle(hFile);

	safe_delete(m_pFileList);

	MCFCore::MCFHeader tempHeader;
	tempHeader.readFromFile(hFile);
	setHeader(&tempHeader);

	hFile.seek(tempHeader.getXmlStart());

	uint32 xmlBuffLen = tempHeader.getXmlSize()+1;
	UTIL::MISC::Buffer xmlBuff(xmlBuffLen, true);

	hFile.read(xmlBuff, tempHeader.getXmlSize());


	if (getHeader()->getFlags() & MCFCore::MCFHeaderI::FLAG_NOTCOMPRESSED)
	{
		parseXml(xmlBuff, xmlBuffLen);
	}
	else
	{
		UTIL::MISC::BZ2Worker worker(UTIL::MISC::BZ2_DECOMPRESS);

		worker.write(xmlBuff, xmlBuffLen, true);
		worker.doWork();

		if (worker.getLastStatus() != BZ_STREAM_END)
			throw gcException(ERR_BZ2, worker.getLastStatus(), "Failed to decompress mcf header xml");

		size_t bz2BuffLen = worker.getReadSize();

		UTIL::MISC::Buffer bz2Buff(bz2BuffLen);

		worker.read(bz2Buff, bz2BuffLen);
		parseXml(bz2Buff, bz2BuffLen);
	}
}
开发者ID:Alasaad,项目名称:Desurium,代码行数:44,代码来源:MCF_Save.cpp


示例18: switch

void TEDemo::opt_menu_activated(int item)
{
  switch( item )
  {
    case 1: setMenuVisible(!b_menuvis);
            if (!b_menuvis)
            {
              setCaption("Use the right mouse button to bring back the menu");
              QTimer::singleShot(5000,this,SLOT(setHeader()));
            }
            break;
    case 2: setFrameVisible(!b_framevis);
            break;
    case 4: setBsHack(!b_bshack);
            break;
    case 8: saveProperties(kapp->getConfig());
            break;
  }
}
开发者ID:xwizard,项目名称:kde1,代码行数:19,代码来源:main.C


示例19: setHeader

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

    this->groupDetails->setVisible(false);
    initPreviewTable(tableView,viewOperations);
    setButtonBox(buttonBox);
    setGroupDetails(groupDetails);
    setNewButton(pushNew);
    setEditButton(pushEdit);
    setRemoveButton(pushRemove);
    setNextButton(pushNext);
    setPreviousButton(pushPrevious);

    setUIPermissions();

    //initializing the container for the readonly!S
    m_lWidgets << spinOrder;
    m_lWidgets << cmbFishingZone;
    m_lWidgets << cmbGear;
    m_lWidgets << customDtStart;
    m_lWidgets << customDtEnd;
    m_lWidgets << spinNoUnits;
    m_lWidgets << doubleSpinSize;
    m_lWidgets << catchInputCtrl;
    m_lWidgets << textComments;
    m_lWidgets << listCategories;
    m_lWidgets << pushClear;

    customDtStart->setIsUTC(false);
    customDtStart->setIsAuto(false);

    customDtEnd->setIsUTC(false);
    customDtEnd->setIsAuto(false);

    connect(customDtStart, SIGNAL(isDateTime(bool,int)), m_tDateTime,
        SLOT(amendDateTimeType(bool,int)));

    connect(customDtEnd, SIGNAL(isDateTime(bool,int)), m_tDateTime,
        SLOT(amendDateTimeType(bool,int)));

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


示例20: OSCollapsibleView

VariableItemView::VariableItemView(bool t_fixed)
  : OSCollapsibleView()
{
  setMaximumWidth(650);

  variableContentView = new VariableContentView(t_fixed); 
  setContent(variableContentView);

  variableHeaderView = new VariableHeaderView(t_fixed);
  setHeader(variableHeaderView);
 

  if (t_fixed)
  {
    setExpanded(false);
  } else {
    setExpanded(true);
  }
}
开发者ID:Anto-F,项目名称:OpenStudio,代码行数:19,代码来源:VariableView.cpp



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


鲜花

握手

雷人

路过

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

请发表评论

全部评论

专题导读
上一篇:
C++ setHeaderData函数代码示例发布时间:2022-05-30
下一篇:
C++ setHandle函数代码示例发布时间: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