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


C++ Q3ValueList::size方法代码示例

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


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

示例1: QCOMPARE

void tst_Q3ValueList::size()
{
    Q3ValueList<int> a;
    QCOMPARE( (int)a.size(), 0 );

    a.append( 1 );
    QCOMPARE( (int)a.size(), 1 );

    a.append( 2 );
    QCOMPARE( (int)a.size(), 2 );

    a.append( 3 );
    QCOMPARE( (int)a.size(), 3 );

    a.clear();
    QCOMPARE( (int)a.size(), 0 );
}
开发者ID:Mr-Kumar-Abhishek,项目名称:qt,代码行数:17,代码来源:tst_q3valuelist.cpp

示例2: slotRefreshUI

void WSWindow::slotRefreshUI()
{

  if (!service || !service->isLoggedIn())
    {
      widget->existingAlbum->setEnabled(false);
      widget->newAlbum->setEnabled(false);
      widget->addToAlbum->setEnabled(false);
      widget->uploadAlbums->setEnabled(false);
      widget->uploadAllAlbums->setEnabled(false);
      widget->album->setEnabled(false);
      widget->addPhotosToNewAlbumName->setEnabled(false);
      widget->configuration->setEnabled(false);
      widget->category->setEnabled(false);
      widget->subcategory->setEnabled(false);
      widget->matchCategories->setEnabled(false);
      widget->privateMode->setEnabled(false);

      return;
    }

  widget->existingAlbum->setEnabled(true);
  widget->newAlbum->setEnabled(true);




  widget->matchCategories->setEnabled(true);
  widget->privateMode->setEnabled(true);





  // Update lists of albums we can upload to
  replaceContents(widget->album,service->availableAlbums());



  // Fix count in upload all albums
  if(service->availableAlbums().size())
    {
      Q3ValueList<KIPI::ImageCollection> ic = interface->allAlbums();
      int newAlbums=0;

      if (service->availableAlbums().size() && ic.size())
	{	  
	  for (unsigned int i=0; i<ic.size(); i++)
	    if (service->name(ic[i]).length() &&
		!service->albumExists(service->name(ic[i])))
	      
	      newAlbums++;
	}

      if (newAlbums)
	{
	  widget->uploadAllAlbums->setEnabled(true);
	  widget->uploadAllAlbums->setText(tr(
					      "Upload all (%1) albums " 
					      "that do not exist already").
					   arg(newAlbums));
	}
      else
	{
	  widget->uploadAllAlbums->setEnabled(false);
	  widget->uploadAllAlbums->setText(tr("Upload all albums "
					      "that do not exist already"));
	}
    }  /* Albums available? */

    

  // Update list of possible configurations if applicable

  if(service->supportsConfigurations() && 
     service->availableConfigurations().size())
    {
    replaceContents(widget->configuration,
		    service->availableConfigurations());
    widget->configuration->setEnabled(true);
    }
  else
    widget->configuration->setEnabled(false);

  // Update list of possible categories  
  if(service->supportsCategories() && service->availableCategories().size())
    {
      replaceContents(widget->category,
		      service->availableCategories());
      widget->category->setEnabled(true);
    }
  else
    widget->category->setEnabled(false);
  
  if(service->supportsSubcategories() && 
     service->availableSubcategories().size())
    {
    replaceContents(widget->subcategory,
		    service->availableSubcategories());
    widget->subcategory->setEnabled(true);
//.........这里部分代码省略.........
开发者ID:pontus,项目名称:wsexport,代码行数:101,代码来源:wswindow.cpp


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