本文整理汇总了C++中setName函数的典型用法代码示例。如果您正苦于以下问题:C++ setName函数的具体用法?C++ setName怎么用?C++ setName使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了setName函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的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
示例16: _normalMap
Material::Material() : _normalMap(0)
{
setName("Material");
}
开发者ID:john1995,项目名称:raytracer,代码行数:4,代码来源:Material.cpp
示例17: setIsHDPanel
//.........这里部分代码省略.........
int extH = getExtendHeight();
this->m_listNode->setContentSize(CCSize(m_listNode->getContentSize().width, m_listNode->getContentSize().height + extH));
m_downNode->setPositionY(m_downNode->getPositionY() - extH);
m_bgNode->setPositionY(m_bgNode->getPositionY() - extH);
// m_nodeContent->setPositionY(m_nodeContent->getPositionY() - extH);
auto tbg = CCLoadSprite::loadResource("Mail_diban.png");
auto tBatchNode = CCSpriteBatchNode::createWithTexture(tbg->getTexture());
auto picBg1 = CCLoadSprite::createSprite("Mail_diban.png");
picBg1->setAnchorPoint(ccp(0, 0));
picBg1->setPosition(ccp(0, 0));
tBatchNode->addChild(picBg1);
int maxHeight = CCDirector::sharedDirector()->getWinSize().height;
int curHeight = picBg1->getContentSize().height;
while(curHeight < maxHeight)
{
auto picBg2 = CCLoadSprite::createSprite("Mail_diban.png");
picBg2->setAnchorPoint(ccp(0, 0));
picBg2->setPosition(ccp(0, curHeight));
tBatchNode->addChild(picBg2);
curHeight += picBg2->getContentSize().height;
}
m_bgNode->addChild(tBatchNode);
}
// CCSize wNodeSize = this->m_waitingNode->getContentSize();
// m_waitingNode->setContentSize(CCSize(wNodeSize.width,wNodeSize.height + dh));
// m_waitingNode->setPositionY(m_waitingNode->getPositionY() - dh*0.5);
// this->m_nameText->setString(_lang("105505").c_str());
// this->m_titleText->setString(_lang("105503").c_str());
// this->m_contentText->setString(_lang("105504").c_str());
CCNode *searchnode = CCNode::create();
auto spr1 = CCLoadSprite::createScale9Sprite("button_dark.png");
CCControlButton *shareBtn = CCControlButton::create(spr1);
searchnode->addChild(shareBtn);
shareBtn->addTargetWithActionForControlEvents(this, cccontrol_selector(MailWritePopUpView::onChooseName), CCControlEventTouchUpInside);
CCSprite* sprIcon = CCLoadSprite::createSprite("search_icon.png");
CCSize sprSize = sprIcon->getContentSize();
searchnode->addChild(sprIcon);
CCCommonUtils::setSpriteMaxSize(sprIcon, 40);
shareBtn->setPreferredSize(CCSize(60, 60));
this->m_nameContainer->addChild(searchnode);
searchnode->setPosition(440, 0);
// CCScrollView *scrollView = CCScrollView::create(m_listNode->getContentSize());
// scrollView->setTouchPriority(Touch_Popup_Item);
// scrollView->setDirection(kCCScrollViewDirectionVertical);
// m_nodeContent->removeFromParentAndCleanup(false);
// scrollView->addChild(m_nodeContent);
// scrollView->setTag(10000);
m_nameEditBox = InputFieldMultiLine::create(CCSizeMake(380,40),"Mail_write.png",24);
// m_nameEditBox->setTouchPriority(Touch_Default);
m_nameEditBox->setMaxChars(30);
m_nameEditBox->setPosition(ccp(0, -20));
m_nameEditBox->setLineNumber(1);
m_nameEditBox->setFontColor({63,44,27});
this->m_nameContainer->addChild(m_nameEditBox);
m_nameEditBox->setEnabled(false);
m_contentEditBox = InputFieldMultiLine::create(m_contentContainer->getContentSize(),"Mail_write.png",24);
m_contentEditBox->setTouchPriority(Touch_Default);
m_contentEditBox->setMaxChars(300);
m_contentEditBox->setLineNumber(5);
m_contentEditBox->setPosition(ccp(0, 0));
m_contentEditBox->setFontColor({63,44,27});
this->m_contentContainer->addChild(m_contentEditBox);
m_contentEditBox->setText(_lang("150536"));
m_contentEditBox->setEnabled(false);
CCSize liseNodeSize = this->m_listNode->getContentSize() * m_listNode->getScale();
// MailGiftCell *mailGiftCell = MailGiftCell::create(CCSize(liseNodeSize.width, liseNodeSize.height - 110),mPropID,giftID);
// scrollView->addChild(mailGiftCell);
// mailGiftCell->setTag(10000);
// CCSize cellSize = mailGiftCell->getContentSize();
// int needH = ceil(cellSize.height + 400);
// int nowH = m_listNode->getContentSize().height;
// m_nodeContent->setPosition(ccp(300,cellSize.height + 100));
// mailGiftCell->setPosition(ccp(0,0));
// m_listNode->addChild(scrollView);
// scrollView->setContentSize(CCSize(600,400 + cellSize.height));
// scrollView->setContentOffset(ccp(0, nowH - needH));
// if(needH>nowH){
// scrollView->setTouchEnabled(true);
// }else{
// scrollView->setTouchEnabled(false);
// }
// if(!m_toName.empty()){
// m_nameEditBox->setText(m_toName.c_str());
// m_nameEditBox->setEnabled(false);
// }
m_sprMailIcon->setVisible(false);
auto nodeicon = Node::create();
nodeicon->setName("nodeicon");
m_sendBtn->getParent()->addChild(nodeicon);
nodeicon->setPosition(m_sendBtn->getPosition());
ActivityController::getInstance()->createGoodsIcon(nodeicon, CC_ITOA(ITEM_SEND_HEART), 40);
updateBtnStatus();
return true;
}
开发者ID:ourgames,项目名称:dc208,代码行数:101,代码来源:MailWritePopUpView.cpp
示例18: QGraphicsWidget
UpcomingEventsWidget::UpcomingEventsWidget( const LastFmEventPtr &event,
QGraphicsItem *parent,
Qt::WindowFlags wFlags )
: QGraphicsWidget( parent, wFlags )
, m_mapButton( 0 )
, m_urlButton( 0 )
, m_image( new QLabel )
, m_event( event )
{
setSizePolicy( QSizePolicy::Expanding, QSizePolicy::Maximum );
m_image->setText( i18n("Loading picture...") );
m_image->setAttribute( Qt::WA_NoSystemBackground );
m_image->setAlignment( Qt::AlignCenter );
m_image->setFixedSize( 128, 128 );
QGraphicsProxyWidget *imageProxy = new QGraphicsProxyWidget( this );
imageProxy->setWidget( m_image );
m_attendance = createLabel();
m_date = createLabel();
m_location = createLabel();
m_name = createLabel();
m_participants = createLabel();
m_tags = createLabel();
m_venue = createLabel();
QGraphicsLinearLayout *buttonsLayout = new QGraphicsLinearLayout( Qt::Horizontal );
buttonsLayout->setSizePolicy( QSizePolicy::Maximum, QSizePolicy::Fixed );
if( event && event->venue() && event->venue()->location )
{
QPointF geo( event->venue()->location->longitude, event->venue()->location->latitude );
if( !geo.isNull() )
{
m_mapButton = new Plasma::PushButton( this );
m_mapButton->setMaximumSize( QSizeF( 22, 22 ) );
m_mapButton->setIcon( KIcon("edit-find") ); // TODO: a map icon would be nice
m_mapButton->setToolTip( i18n( "View map" ) );
buttonsLayout->addItem( m_mapButton );
}
}
if( event && event->url().isValid() )
{
m_urlButton = new Plasma::PushButton( this );
m_urlButton->setMaximumSize( QSizeF( 22, 22 ) );
m_urlButton->setIcon( KIcon("applications-internet") );
m_urlButton->setToolTip( i18n( "Open Last.fm webpage for this event" ) );
connect( m_urlButton, SIGNAL(clicked()), this, SLOT(openUrl()) );
buttonsLayout->addItem( m_urlButton );
}
QSizePolicy::Policy minPol = QSizePolicy::Minimum;
QGraphicsWidget *supportLabel, *venueLabel, *locationLabel, *dateLabel, *attendLabel, *tagsLabel;
supportLabel = createLabel( i18nc("@label:textbox Supporing acts for an event", "Supporting:"), minPol );
venueLabel = createLabel( i18nc("@label:textbox", "Venue:"), minPol );
locationLabel = createLabel( i18nc("@label:textbox", "Location:"), minPol );
dateLabel = createLabel( i18nc("@label:textbox", "Date:"), minPol );
attendLabel = createLabel( i18nc("@label:textbox", "Attending:"), minPol );
tagsLabel = createLabel( i18nc("@label:textbox", "Tags:"), minPol );
QGraphicsGridLayout *infoLayout = new QGraphicsGridLayout;
infoLayout->addItem( supportLabel, 0, 0 );
infoLayout->addItem( venueLabel, 1, 0 );
infoLayout->addItem( locationLabel, 2, 0 );
infoLayout->addItem( dateLabel, 3, 0 );
infoLayout->addItem( attendLabel, 4, 0 );
infoLayout->addItem( tagsLabel, 5, 0 );
infoLayout->addItem( m_participants, 0, 1 );
infoLayout->addItem( m_venue, 1, 1 );
infoLayout->addItem( m_location, 2, 1 );
infoLayout->addItem( m_date, 3, 1 );
infoLayout->addItem( m_attendance, 4, 1 );
infoLayout->addItem( m_tags, 5, 1 );
QGraphicsGridLayout *layout = new QGraphicsGridLayout;
layout->addItem( imageProxy, 0, 0, 2, 1, Qt::AlignCenter );
layout->addItem( m_name, 0, 1 );
layout->addItem( buttonsLayout, 0, 2, Qt::AlignRight );
layout->addItem( infoLayout, 1, 1, 1, 2 );
setLayout( layout );
QString name = event->name();
if( event->isCancelled() )
name = i18nc( "@label:textbox Title for a canceled upcoming event", "<s>%1</s> (Canceled)", name );
setName( name );
setDate( event->date() );
setLocation( event->venue()->location );
setVenue( event->venue() );
setAttendance( event->attendance() );
setParticipants( event->participants() );
setTags( event->tags() );
setImage( event->imageUrl(LastFmEvent::Large) );
}
开发者ID:cancamilo,项目名称:amarok,代码行数:93,代码来源:UpcomingEventsWidget.cpp
示例19: age
// ########## Delegated Constructor ##########
Person::Person(const char *n, int a) : age (a) { setName(n); info(); }
开发者ID:darkn3rd,项目名称:oop-tut,代码行数:2,代码来源:Person.cpp
示例20: clientRegister
void clientRegister() {
printf("Please enter your name: ");
char str[20];
scanf("%s", str);
setName(str);
}
开发者ID:aioc,项目名称:spies,代码行数:6,代码来源:spies_human.cpp
注:本文中的setName函数示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论