本文整理汇总了C++中TQStringList::last方法的典型用法代码示例。如果您正苦于以下问题:C++ TQStringList::last方法的具体用法?C++ TQStringList::last怎么用?C++ TQStringList::last使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类TQStringList
的用法示例。
在下文中一共展示了TQStringList::last方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: load
void TDMAppearanceWidget::load()
{
config->setGroup("X-*-Greeter");
// Read the greeting string
greetstr_lined->setText(config->readEntry("GreetString", i18n("Welcome to %n")));
// Regular logo or clock
TQString logoArea = config->readEntry("LogoArea", "Logo" );
if (logoArea == "Clock") {
clockRadio->setChecked(true);
slotAreaRadioClicked(KdmClock);
} else if (logoArea == "Logo") {
logoRadio->setChecked(true);
slotAreaRadioClicked(KdmLogo);
} else {
noneRadio->setChecked(true);
slotAreaRadioClicked(KdmNone);
}
// See if we use alternate logo
setLogo(config->readEntry("LogoPixmap"));
// Check the current compositor type
compositorcombo->setCurrentId(config->readEntry("Compositor"));
// Check the GUI type
guicombo->setCurrentId(config->readEntry("GUIStyle"));
// Check the Color Scheme
colcombo->setCurrentId(config->readEntry("ColorScheme"));
// Check the echo mode
echocombo->setCurrentId(config->readEntry("EchoMode", "OneStar"));
TQStringList sl = config->readListEntry( "GreeterPos" );
if (sl.count() != 2) {
xLineEdit->setText( "50" );
yLineEdit->setText( "50" );
} else {
xLineEdit->setText( sl.first() );
yLineEdit->setText( sl.last() );
}
// get the language
langcombo->setCurrentItem(config->readEntry("Language", "C"));
// See if the SAK is enabled
if (!sakwarning) {
if (config->hasGroup("X-:*-Greeter")) {
config->setGroup("X-:*-Greeter");
}
else {
config->setGroup("X-*-Greeter");
}
sakbox->setChecked(config->readBoolEntry("UseSAK", false));
}
else {
sakbox->setChecked(false);
}
}
示例2: addPageWidget
void KJanusWidget::addPageWidget( TQFrame *page, const TQStringList &items,
const TQString &header,const TQPixmap &pixmap )
{
connect(page, TQT_SIGNAL(destroyed(TQObject*)), TQT_SLOT(pageGone(TQObject*)));
if( mFace == Tabbed )
{
mTabControl->addTab (page, items.last());
d->mIntToPage[d->mNextPageIndex] = static_cast<TQWidget*>(page);
d->mPageToInt[static_cast<TQWidget*>(page)] = d->mNextPageIndex;
d->mNextPageIndex++;
}
else if( mFace == TreeList || mFace == IconList )
{
d->mIntToPage[d->mNextPageIndex] = static_cast<TQWidget*>(page);
d->mPageToInt[static_cast<TQWidget*>(page)] = d->mNextPageIndex;
mPageStack->addWidget( page, 0 );
if (items.isEmpty()) {
kdDebug() << "Invalid TQStringList, with zero items" << endl;
return;
}
if( mFace == TreeList )
{
InsertTreeListItem(items, pixmap, page);
}
else // mFace == IconList
{
TQString itemName = items.last();
IconListItem *item = new IconListItem( mIconList, pixmap, itemName );
mIconListToPageStack.insert(item, page);
mIconList->invalidateHeight();
mIconList->invalidateWidth();
if (mIconList->isVisible())
mIconList->updateWidth();
}
//
// Make sure the title label is sufficiently wide
//
TQString lastName = items.last();
const TQString &title = (!header.isNull() ? header : lastName);
TQRect r = mTitleLabel->fontMetrics().boundingRect( title );
if( mTitleLabel->minimumWidth() < r.width() )
{
mTitleLabel->setMinimumWidth( r.width() );
}
d->mIntToTitle[d->mNextPageIndex] = title;
if( d->mIntToTitle.count() == 1 )
{
showPage(0);
}
d->mNextPageIndex++;
}
else
{
kdDebug() << "KJanusWidget::addPageWidget: can only add a page in Tabbed, TreeList or IconList modes" << endl;
}
}