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


C++ PackageInfoRef::Title方法代码示例

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


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

示例1: SharedBitmapStringField

void
PackageRow::UpdateTitle()
{
	if (fPackage.Get() == NULL)
		return;

	SetField(new SharedBitmapStringField(fPackage->Icon(),
			SharedBitmap::SIZE_16, fPackage->Title()), kTitleColumn);
}
开发者ID:orangejua,项目名称:haiku,代码行数:9,代码来源:PackageListView.cpp

示例2: AcceptsPackage

	virtual bool AcceptsPackage(const PackageInfoRef& package) const
	{
		if (package.Get()==NULL)
			return false;

		printf("TEST %s\n", package->Title().String());

		for (int32 i = 0; i < fPackageLists.CountItems(); i++) {
			if (fPackageLists.ItemAtFast(i)->Contains(package)) {
				printf("  contained in %" B_PRId32 "\n", i);
				return false;
			}
		}
		return true;
	}
开发者ID:,项目名称:,代码行数:15,代码来源:

示例3:

void
ScreenshotWindow::SetPackage(const PackageInfoRef& package)
{
	if (fPackage == package)
		return;

	fPackage = package;

	BString title = B_TRANSLATE("Screenshot");
	if (package.Get() != NULL) {
		title = package->Title();
		_DownloadScreenshot();
	}
	SetTitle(title);
}
开发者ID:AmirAbrams,项目名称:haiku,代码行数:15,代码来源:ScreenshotWindow.cpp

示例4: PackageInfoRef

PackageInfoRef
PackageAction::FindPackageByName(const BString& name)
{
	Model* model = GetModel();
	const DepotList& depots = model->Depots();
	// TODO: optimize!
	for (int32 i = 0; i < depots.CountItems(); i++) {
		const DepotInfo& depot = depots.ItemAtFast(i);
		const PackageList& packages = depot.Packages();
		for (int32 j = 0; j < packages.CountItems(); j++) {
			PackageInfoRef info = packages.ItemAtFast(j);
			if (info->Title() == name)
				return info;
		}
	}

	return PackageInfoRef();
}
开发者ID:DonCN,项目名称:haiku,代码行数:18,代码来源:PackageAction.cpp

示例5:

void
ScreenshotWindow::SetPackage(const PackageInfoRef& package)
{
	if (fPackage == package)
		return;

	fPackage = package;

	BString title = B_TRANSLATE("Screenshot");
	if (package.Get() != NULL) {
		title = package->Title();
		_DownloadScreenshot();
	}
	SetTitle(title);

	atomic_set(&fCurrentScreenshotIndex, 0);

	_UpdateToolBar();
}
开发者ID:looncraz,项目名称:haiku,代码行数:19,代码来源:ScreenshotWindow.cpp

示例6: locker

void
RatePackageWindow::SetPackage(const PackageInfoRef& package)
{
	BAutolock locker(this);
	if (!locker.IsLocked() || fWorkerThread >= 0)
		return;

	fPackage = package;

	BString windowTitle(B_TRANSLATE("Rate %Package%"));
	windowTitle.ReplaceAll("%Package%", package->Title());
	SetTitle(windowTitle);

	// See if the user already made a rating for this package,
	// pre-fill the UI with that rating. (When sending the rating, the
	// old one will be replaced.)
	thread_id thread = spawn_thread(&_QueryRatingThreadEntry,
		"Query rating", B_NORMAL_PRIORITY, this);
	if (thread >= 0)
		_SetWorkerThread(thread);
}
开发者ID:,项目名称:,代码行数:21,代码来源:

示例7: manager


//.........这里部分代码省略.........
		else {
			// Add new package info
			BString publisherURL;
			if (repoPackageInfo.URLList().CountStrings() > 0)
				publisherURL = repoPackageInfo.URLList().StringAt(0);

			BString publisherName = repoPackageInfo.Vendor();
			const BStringList& rightsList = repoPackageInfo.CopyrightList();
			if (rightsList.CountStrings() > 0)
				publisherName = rightsList.StringAt(0);

			modelInfo.SetTo(new(std::nothrow) PackageInfo(
					repoPackageInfo.Name(),
					repoPackageInfo.Version().ToString(),
					PublisherInfo(BitmapRef(), publisherName,
					"", publisherURL), repoPackageInfo.Summary(),
					repoPackageInfo.Description(),
					repoPackageInfo.Flags()),
				true);

			if (modelInfo.Get() == NULL)
				return;

			foundPackages[repoPackageInfo.Name()] = modelInfo;
		}

		modelInfo->SetIcon(defaultIcon);
		modelInfo->AddListener(this);

		BSolverRepository* repository = package->Repository();
		if (dynamic_cast<BPackageManager::RemoteRepository*>(repository)
				!= NULL) {
			depots[repository->Name()].AddPackage(modelInfo);
			remotePackages[modelInfo->Title()] = modelInfo;
		} else {
			if (repository == static_cast<const BSolverRepository*>(
					manager.SystemRepository())) {
				modelInfo->AddInstallationLocation(
					B_PACKAGE_INSTALLATION_LOCATION_SYSTEM);
				if (!modelInfo->IsSystemPackage()) {
					systemInstalledPackages[repoPackageInfo.FileName()]
						= modelInfo;
				}
			} else if (repository == static_cast<const BSolverRepository*>(
					manager.HomeRepository())) {
				modelInfo->AddInstallationLocation(
					B_PACKAGE_INSTALLATION_LOCATION_HOME);
			}
		}

		if (modelInfo->IsSystemPackage())
			systemFlaggedPackages.Add(repoPackageInfo.FileName());
	}

	BAutolock lock(fModel.Lock());

	fModel.Clear();

	// filter remote packages from the found list
	// any packages remaining will be locally installed packages
	// that weren't acquired from a repository
	for (PackageInfoMap::iterator it = remotePackages.begin();
			it != remotePackages.end(); it++) {
		foundPackages.erase(it->first);
	}
开发者ID:pipe0xffff,项目名称:haiku,代码行数:66,代码来源:MainWindow.cpp


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