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


C++ setName函数代码示例

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


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

示例1: PeakWPK10s

 PeakWPK10s()
 {
     setSecs(10);
     setSymbol("10s_peak_wpk");
     setName(tr("10 sec Peak WPK"));
 }
开发者ID:g3rg,项目名称:GoldenCheetah,代码行数:6,代码来源:WattsPerKilogram.cpp

示例2: setName

void LLParcel::unpackMessage(LLMessageSystem* msg)
{
	std::string buffer;
	
    msg->getU32Fast( _PREHASH_ParcelData,_PREHASH_ParcelFlags, mParcelFlags );
    msg->getS32Fast( _PREHASH_ParcelData,_PREHASH_SalePrice, mSalePrice );
    msg->getStringFast( _PREHASH_ParcelData,_PREHASH_Name, buffer );
    setName(buffer);
    msg->getStringFast( _PREHASH_ParcelData,_PREHASH_Desc, buffer );
    setDesc(buffer);
    msg->getStringFast( _PREHASH_ParcelData,_PREHASH_MusicURL, buffer );
    setMusicURL(buffer);
    msg->getStringFast( _PREHASH_ParcelData,_PREHASH_MediaURL, buffer );
    setMediaURL(buffer);
    
    // non-optimized version
    msg->getU8 ( "ParcelData", "MediaAutoScale", mMediaAutoScale );
    
    msg->getUUIDFast( _PREHASH_ParcelData,_PREHASH_MediaID, mMediaID );
    msg->getUUIDFast( _PREHASH_ParcelData,_PREHASH_GroupID, mGroupID );
    msg->getS32Fast( _PREHASH_ParcelData,_PREHASH_PassPrice, mPassPrice );
    msg->getF32Fast( _PREHASH_ParcelData,_PREHASH_PassHours, mPassHours );
    U8 category;
    msg->getU8Fast(	 _PREHASH_ParcelData,_PREHASH_Category, category);
    mCategory = (ECategory)category;
    msg->getUUIDFast( _PREHASH_ParcelData,_PREHASH_AuthBuyerID, mAuthBuyerID);
    msg->getUUIDFast( _PREHASH_ParcelData,_PREHASH_SnapshotID, mSnapshotID);
    msg->getVector3Fast(_PREHASH_ParcelData,_PREHASH_UserLocation, mUserLocation);
    msg->getVector3Fast(_PREHASH_ParcelData,_PREHASH_UserLookAt, mUserLookAt);
    U8 landing_type;
    msg->getU8Fast(	 _PREHASH_ParcelData,_PREHASH_LandingType, landing_type);
    mLandingType = (ELandingType)landing_type;

	// New Media Data
	// Note: the message has been converted to TCP
	if(msg->has("MediaData"))
	{
		msg->getString("MediaData", "MediaDesc", buffer);
		setMediaDesc(buffer);
		msg->getString("MediaData", "MediaType", buffer);
		setMediaType(buffer);
		msg->getS32("MediaData", "MediaWidth", mMediaWidth);
		msg->getS32("MediaData", "MediaHeight", mMediaHeight);
		msg->getU8 ( "MediaData", "MediaLoop", mMediaLoop );
	}
	else
	{
		setMediaType(std::string("")); 	//having mMediaType empty causes autodetect,
						// thats what we want -- AW
		setMediaDesc(std::string("No Description available without Server Upgrade"));
		mMediaLoop = true;
	}

	if(msg->getNumberOfBlocks("MediaLinkSharing") > 0)
	{
		msg->getString("MediaLinkSharing", "MediaCurrentURL", buffer);
		setMediaCurrentURL(buffer);
		msg->getU8 ( "MediaLinkSharing", "MediaAllowNavigate", mMediaAllowNavigate );
		msg->getU8 ( "MediaLinkSharing", "MediaURLFilterEnable", mMediaURLFilterEnable );
		msg->getU8 ( "MediaLinkSharing", "MediaPreventCameraZoom", mMediaPreventCameraZoom );
		msg->getF32( "MediaLinkSharing", "MediaURLTimeout", mMediaURLTimeout);
	}
	else
	{
		setMediaCurrentURL(LLStringUtil::null);
	}
	
}
开发者ID:y1k8a,项目名称:LifeStream1,代码行数:68,代码来源:llparcel.cpp

示例3: FontsAndTextDemo

    //==============================================================================
    FontsAndTextDemo()
        : boldButton ("Bold"),
          italicButton ("Italic"),
          sizeLabel (String::empty, "Size"),
          kerningLabel (String::empty, "Kerning"),
          horizontalScaleLabel (String::empty, "Scale")
    {
        setName ("Fonts");

        Font::findFonts (fonts);

        addAndMakeVisible (listBox = new ListBox ("fonts", this));
        listBox->setRowHeight (28);

        addAndMakeVisible (&textBox);

        textBox.setColour (TextEditor::backgroundColourId, Colours::white);
        textBox.setColour (TextEditor::outlineColourId, Colours::black.withAlpha (0.5f));

        textBox.setMultiLine (true, true);
        textBox.setReturnKeyStartsNewLine (true);
        textBox.setText ("The Quick Brown Fox Jumps Over The Lazy Dog\n\nAa Bb Cc Dd Ee Ff Gg Hh Ii Jj Kk Ll Mm Nn Oo Pp Qq Rr Ss Tt Uu Vv Ww Xx Yy Zz 0123456789");

        addAndMakeVisible (&boldButton);
        boldButton.addListener (this);

        addAndMakeVisible (&italicButton);
        italicButton.addListener (this);

        addAndMakeVisible (&sizeSlider);
        sizeSlider.setRange (3.0, 150.0, 0.1);
        sizeSlider.setValue (20.0);
        sizeSlider.addListener (this);
        sizeLabel.attachToComponent (&sizeSlider, true);

        addAndMakeVisible (&kerningSlider);
        kerningSlider.setRange (-1.0, 1.0, 0.01);
        kerningSlider.setValue (0.0);
        kerningSlider.addListener (this);
        kerningLabel.attachToComponent (&kerningSlider, true);

        addAndMakeVisible (&horizontalScaleSlider);
        horizontalScaleSlider.setRange (0.1, 4.0, 0.01);
        horizontalScaleSlider.setValue (1.0);
        horizontalScaleSlider.addListener (this);
        horizontalScaleLabel.attachToComponent (&horizontalScaleSlider, true);

        listBox->setColour (ListBox::outlineColourId, Colours::black.withAlpha (0.5f));
        listBox->setOutlineThickness (1);
        listBox->selectRow (Random::getSystemRandom().nextInt (fonts.size()));

        // set up the layout and resizer bars..

        verticalLayout.setItemLayout (0, -0.2, -0.8, -0.5);  // width of the font list must be
                                                             // between 20% and 80%, preferably 50%
        verticalLayout.setItemLayout (1, 8, 8, 8);           // the vertical divider drag-bar thing is always 8 pixels wide
        verticalLayout.setItemLayout (2, 150, -1.0, -0.5);   // the components on the right must be
                                                             // at least 150 pixels wide, preferably 50% of the total width

        verticalDividerBar = new StretchableLayoutResizerBar (&verticalLayout, 1, true);
        addAndMakeVisible (verticalDividerBar);
    }
开发者ID:furio,项目名称:pyplasm,代码行数:63,代码来源:FontsAndTextDemo.cpp

示例4: SetupTab

Setup_Joystick::Setup_Joystick(const Widget2 *const widget) :
    SetupTab(widget),
    mCalibrateLabel(new Label(this,
        // TRANSLATORS: joystick settings tab label
        _("Press the button to start calibration"))),
    // TRANSLATORS: joystick settings tab button
    mCalibrateButton(new Button(this, _("Calibrate"), "calibrate",
        BUTTON_SKIN, this)),
    // TRANSLATORS: joystick settings tab button
    mDetectButton(new Button(this, _("Detect joysticks"), "detect",
        BUTTON_SKIN, this)),
    // TRANSLATORS: joystick settings tab checkbox
    mJoystickEnabled(new CheckBox(this, _("Enable joystick"),
        false, nullptr, std::string())),
    mNamesModel(new NamesModel),
    mNamesDropDown(new DropDown(this, mNamesModel,
        false, Modal_false, nullptr, std::string())),
    mUseInactiveCheckBox(new CheckBox(this,
        // TRANSLATORS: joystick settings tab checkbox
        _("Use joystick if client window inactive"),
        config.getBoolValue("useInactiveJoystick"),
        nullptr, std::string())),
    mOriginalJoystickEnabled(config.getBoolValue("joystickEnabled"))
{
    // TRANSLATORS: joystick settings tab name
    setName(_("Joystick"));

    Joystick::getNames(mNamesModel->getNames());

    mJoystickEnabled->setSelected(mOriginalJoystickEnabled);
    mJoystickEnabled->setActionEventId("joystick");
    mJoystickEnabled->addActionListener(this);
    mCalibrateButton->setEnabled(mOriginalJoystickEnabled);

    mNamesDropDown->setActionEventId("name");
    mNamesDropDown->addActionListener(this);

    if (joystick != nullptr)
    {
        mNamesDropDown->setSelected(joystick->getNumber());
    }
    else
    {
        unsigned int sel = config.getIntValue("selectedJoystick");
        if (sel >= CAST_U32(mNamesModel->size()))
            sel = 0;
        mNamesDropDown->setSelected(sel);
    }

    // Do the layout
    LayoutHelper h(this);
    ContainerPlacer place = h.getPlacer(0, 0);

    place(0, 0, mJoystickEnabled, 1, 1);
    place(0, 1, mNamesDropDown, 1, 1);
    place(0, 2, mUseInactiveCheckBox, 1, 1);
    place(0, 3, mDetectButton, 1, 1);
    place(0, 4, mCalibrateLabel, 1, 1);
    place(0, 5, mCalibrateButton, 1, 1);

    setDimension(Rect(0, 0, 365, 75));
}
开发者ID:mekolat,项目名称:ManaPlus,代码行数:62,代码来源:setup_joystick.cpp

示例5: Node

OutputData::OutputData(const char* szName) : Node(OUTPUTD) 
{
    modOwner = NULL;
    setName(szName);
}
开发者ID:paulfitz,项目名称:yarp,代码行数:5,代码来源:data.cpp

示例6: PeakWPK20m

 PeakWPK20m()
 {
     setSecs(1200);
     setSymbol("20m_peak_wpk");
     setName(tr("20 min Peak WPK"));
 }
开发者ID:g3rg,项目名称:GoldenCheetah,代码行数:6,代码来源:WattsPerKilogram.cpp

示例7: PeakWPK30m

 PeakWPK30m()
 {
     setSecs(1800);
     setSymbol("30m_peak_wpk");
     setName(tr("30 min Peak WPK"));
 }
开发者ID:g3rg,项目名称:GoldenCheetah,代码行数:6,代码来源:WattsPerKilogram.cpp

示例8: PeakWPK5m

 PeakWPK5m()
 {
     setSecs(300);
     setSymbol("5m_peak_wpk");
     setName(tr("5 min Peak WPK"));
 }
开发者ID:g3rg,项目名称:GoldenCheetah,代码行数:6,代码来源:WattsPerKilogram.cpp

示例9: PeakWPK10m

 PeakWPK10m()
 {
     setSecs(600);
     setSymbol("10m_peak_wpk");
     setName(tr("10 min Peak WPK"));
 }
开发者ID:g3rg,项目名称:GoldenCheetah,代码行数:6,代码来源:WattsPerKilogram.cpp

示例10: PeakWPK30s

 PeakWPK30s()
 {
     setSecs(30);
     setSymbol("30s_peak_wpk");
     setName(tr("30 sec Peak WPK"));
 }
开发者ID:g3rg,项目名称:GoldenCheetah,代码行数:6,代码来源:WattsPerKilogram.cpp

示例11: PeakWPK20s

 PeakWPK20s()
 {
     setSecs(20);
     setSymbol("20s_peak_wpk");
     setName(tr("20 sec Peak WPK"));
 }
开发者ID:g3rg,项目名称:GoldenCheetah,代码行数:6,代码来源:WattsPerKilogram.cpp

示例12: PeakWPK15s

 PeakWPK15s()
 {
     setSecs(15);
     setSymbol("15s_peak_wpk");
     setName(tr("15 sec Peak WPK"));
 }
开发者ID:g3rg,项目名称:GoldenCheetah,代码行数:6,代码来源:WattsPerKilogram.cpp

示例13: _parent

Component::Component(const String& name)
: _parent(0), _name(name) {
    setParent(0);
    setName(name);
}
开发者ID:gitcommit,项目名称:simpleorm,代码行数:5,代码来源:component.cpp

示例14: QDialog

/*
 *  Constructs a CAdesDlg as a child of 'parent', with the
 *  name 'name' and widget flags set to 'f'.
 *
 *  The dialog will by default be modeless, unless you set 'modal' to
 *  TRUE to construct a modal dialog.
 */
CAdesDlg::CAdesDlg( QWidget* parent, const char* name, bool modal, WFlags fl )
    : QDialog( parent, name, modal, fl )
{
    if ( !name )
	setName( "CAdesDlg" );
    setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)7, (QSizePolicy::SizeType)7, 20, 20, sizePolicy().hasHeightForWidth() ) );
    setMaximumSize( QSize( 32767, 32767 ) );
    QFont f( font() );
    f.setFamily( "Liberation Mono Track" );
    f.setPointSize( 11 );
    setFont( f ); 
    setSizeGripEnabled( FALSE );

    pAlt1 = new QPushButton( this, "pAlt1" );
    pAlt1->setEnabled( FALSE );
    pAlt1->setGeometry( QRect( 6, 28, 86, 25 ) );
    QFont pAlt1_font(  pAlt1->font() );
    pAlt1_font.setFamily( "Liberation Mono Track" );
    pAlt1_font.setPointSize( 10 );
    pAlt1->setFont( pAlt1_font ); 
    pAlt1->setAutoDefault( TRUE );

    pAlt2 = new QPushButton( this, "pAlt2" );
    pAlt2->setEnabled( FALSE );
    pAlt2->setGeometry( QRect( 6, 58, 86, 25 ) );
    QFont pAlt2_font(  pAlt2->font() );
    pAlt2_font.setFamily( "Liberation Mono Track" );
    pAlt2_font.setPointSize( 10 );
    pAlt2->setFont( pAlt2_font ); 

    pArcid = new QLabel( this, "pArcid" );
    pArcid->setGeometry( QRect( 6, 5, 86, 18 ) );
    QFont pArcid_font(  pArcid->font() );
    pArcid_font.setFamily( "Liberation Mono Track" );
    pArcid_font.setPointSize( 10 );
    pArcid_font.setBold( TRUE );
    pArcid->setFont( pArcid_font ); 
    pArcid->setAlignment( int( QLabel::WordBreak | QLabel::AlignCenter ) );
    pArcid->setIndent( -1 );

    pListAdes = new QListBox( this, "pListAdes" );
    pListAdes->setGeometry( QRect( 6, 88, 86, 171 ) );
    pListAdes->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)0, (QSizePolicy::SizeType)7, 0, 0, pListAdes->sizePolicy().hasHeightForWidth() ) );
    QFont pListAdes_font(  pListAdes->font() );
    pListAdes_font.setFamily( "Liberation Mono Track" );
    pListAdes_font.setPointSize( 10 );
    pListAdes->setFont( pListAdes_font ); 
    pListAdes->setDragAutoScroll( FALSE );
    pListAdes->setColumnMode( QListBox::FixedNumber );
    pListAdes->setVariableHeight( FALSE );
    languageChange();
    resize( QSize(120, 264).expandedTo(minimumSizeHint()) );
    clearWState( WState_Polished );

    // signals and slots connections
    connect( pAlt1, SIGNAL( clicked() ), this, SLOT( pAlt1Clicked() ) );
    connect( pAlt2, SIGNAL( clicked() ), this, SLOT( pAlt2Clicked() ) );
    connect( pListAdes, SIGNAL( clicked(QListBoxItem*) ), this, SLOT( pListAdesClicked(QListBoxItem*) ) );
    connect( pListAdes, SIGNAL( returnPressed(QListBoxItem*) ), this, SLOT( pListAdesClicked(QListBoxItem*) ) );

    // tab order
    setTabOrder( pAlt1, pAlt2 );
    setTabOrder( pAlt2, pListAdes );
}
开发者ID:korusdipl,项目名称:albatross-display,代码行数:71,代码来源:Ades.cpp

示例15: freePlatformFont

//-----------------------------------------------------------------------------
CFontDesc::~CFontDesc ()
{
	freePlatformFont ();
	setName (0);
}
开发者ID:EQ4,项目名称:vstgui,代码行数:6,代码来源:cfont.cpp


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