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


C++ TQStringList::last方法代码示例

本文整理汇总了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);
  }
}
开发者ID:Fat-Zer,项目名称:tdebase,代码行数:61,代码来源:tdm-appear.cpp

示例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;
  }

}
开发者ID:Fat-Zer,项目名称:tdelibs,代码行数:62,代码来源:kjanuswidget.cpp


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