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


C++ ParameterList::pop_front方法代码示例

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


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

示例1: if

ClsQStateArrayViewHex::ClsQStateArrayViewHex( QWidget *parent, ClsBaseTopology *_clsBaseTopologyGroup,
						const char *_name, unsigned int _iSelectionMode ) :
    ClsBaseQStateArrayView(parent, _clsBaseTopologyGroup, _name, _iSelectionMode) {

    iCellSize = 20;
    iNrCellsX = 10;
    iNrCellsY = 10;

    setBackgroundColor(yellow);


    ParameterList parameterList = _clsBaseTopologyGroup->getListParameters();

    while (parameterList.size()) {
	string strParamName = parameterList.front()->getName();
	string strParamValue = parameterList.front()->getValueAsString();

//	cout << "ParamName: " << strParamName << ": " << strParamValue << endl;

	if(!strParamName.compare(ClsTagLibrary::TopologyWidthTag())) {
	    iNrCellsX = iqrUtils::string2int(strParamValue);

	}
	else if(!strParamName.compare(ClsTagLibrary::TopologyHeightTag())) {
	    iNrCellsY =  iqrUtils::string2int(strParamValue);
	}

	parameterList.pop_front();
    }

    iCellSize = iSizeMax / (iNrCellsX > iNrCellsY ? iNrCellsX : iNrCellsY);

    vCells.resize(iNrCellsX+1);
    for(int ii=0; ii<(iNrCellsX + 1);ii++){
	vCells[ii].resize(iNrCellsY+1);
    }


    iXPosStart = iYPosStart = 0;


    fValMin = 0;
    fValMax = 1.0;
    fScaleFactor = 255.0;
    this->setFrameStyle(  QFrame::WinPanel | QFrame::Raised );

    setMinimumSize( iNrCellsX * iCellSize + 2 * BORDER , iNrCellsY * iCellSize + 2 * BORDER );
    setMaximumSize( iNrCellsX * iCellSize + 2 * BORDER , iNrCellsY * iCellSize + 2 * BORDER );

    clear();
    createNullPixmap();

//    resize( maxi * SCALE + 2 * BORDER , maxj * SCALE + 2 * BORDER );
//    resize( iNrCellsX * iCellSize + 2 * BORDER , iNrCellsY * iCellSize + 2 * BORDER );

}
开发者ID:jeez,项目名称:iqr,代码行数:56,代码来源:ClsQStateArrayViewHex.cpp

示例2: if

ClsQStateArrayViewRect::ClsQStateArrayViewRect( QWidget *parent, ClsBaseTopology *_clsBaseTopologyGroup,
						const char *_name, unsigned int _iSelectionMode ) :
    ClsBaseQStateArrayView(parent, _clsBaseTopologyGroup, _name, _iSelectionMode) {
#ifdef DEBUG_CLSQSTATEARRAYVIEWRECT
    cout << "ClsQStateArrayViewRect( QWidget *parent, ClsBaseTopology *_clsBaseTopologyGroup, const char *_name, unsigned int _iSelectionMode ) " << endl;
#endif

    iCellSize = 20;
    iNrCellsX = 10;
    iNrCellsY = 10;

    ParameterList parameterList = _clsBaseTopologyGroup->getListParameters();

    while (parameterList.size()) {
	string strParamName = parameterList.front()->getName();
	string strParamValue = parameterList.front()->getValueAsString();
	if(!strParamName.compare(ClsTagLibrary::TopologyWidthTag())) {
	    iNrCellsX = iqrUtils::string2int(strParamValue);
	}
	else if(!strParamName.compare(ClsTagLibrary::TopologyHeightTag())) {
	    iNrCellsY =  iqrUtils::string2int(strParamValue);
	}
	parameterList.pop_front();
    }

    iCellSize = iSizeMax / (iNrCellsX > iNrCellsY ? iNrCellsX : iNrCellsY);
    if(iCellSize <=1){
	iCellSize = 2;
    }

    vCells.resize(iNrCellsX+1);
    for(int ii=0; ii<(iNrCellsX + 1);ii++){
	vCells[ii].resize(iNrCellsY+1);
    }

    this->setFrameStyle(  QFrame::WinPanel | QFrame::Raised );

    setMinimumSize( iNrCellsX * iCellSize + 2 * BORDER , iNrCellsY * iCellSize + 2 * BORDER );
    setMaximumSize( iNrCellsX * iCellSize + 2 * BORDER , iNrCellsY * iCellSize + 2 * BORDER );

    clear();
    createNullPixmap();


}
开发者ID:jeez,项目名称:iqr,代码行数:45,代码来源:ClsQStateArrayViewRect.cpp


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