本文整理汇总了C++中project::ExporterIterator::canLaunchProject方法的典型用法代码示例。如果您正苦于以下问题:C++ ExporterIterator::canLaunchProject方法的具体用法?C++ ExporterIterator::canLaunchProject怎么用?C++ ExporterIterator::canLaunchProject使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类project::ExporterIterator
的用法示例。
在下文中一共展示了ExporterIterator::canLaunchProject方法的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: updateExporters
//======================================================================
void HeaderComponent::updateExporters() noexcept
{
auto selectedName = getSelectedExporterName();
exporterBox.clear();
auto preferredExporterIndex = -1;
int i = 0;
for (Project::ExporterIterator exporter (*project); exporter.next(); ++i)
{
exporterBox.addItem (exporter->getName(), i + 1);
if (selectedName == exporter->getName())
exporterBox.setSelectedId (i + 1);
if (exporter->canLaunchProject() && preferredExporterIndex == -1)
preferredExporterIndex = i;
}
if (exporterBox.getSelectedItemIndex() == -1)
exporterBox.setSelectedItemIndex (preferredExporterIndex != -1 ? preferredExporterIndex
: 0);
updateExporterButton();
}
示例2: canCurrentExporterLaunchProject
bool HeaderComponent::canCurrentExporterLaunchProject() const noexcept
{
for (Project::ExporterIterator exporter (*project); exporter.next();)
if (exporter->getName() == getSelectedExporterName() && exporter->canLaunchProject())
return true;
return false;
}
示例3: getExportersWhichCanLaunch
StringArray ProjectContentComponent::getExportersWhichCanLaunch() const
{
StringArray s;
if (project != nullptr)
for (Project::ExporterIterator exporter (*project); exporter.next();)
if (exporter->canLaunchProject())
s.add (exporter->getName());
return s;
}
示例4: openInIDE
void ProjectContentComponent::openInIDE (int exporterIndex, bool saveFirst)
{
if (saveFirst)
saveProject();
int i = 0;
if (project != nullptr)
for (Project::ExporterIterator exporter (*project); exporter.next();)
if (exporter->canLaunchProject())
if (i++ == exporterIndex && exporter->launchProject())
break;
}
示例5: openInSelectedIDE
void ProjectContentComponent::openInSelectedIDE (bool saveFirst)
{
if (project != nullptr)
{
if (auto* headerComp = dynamic_cast<HeaderComponent*> (header.get()))
{
auto selectedIDE = headerComp->getSelectedExporterName();
for (Project::ExporterIterator exporter (*project); exporter.next();)
{
if (exporter->canLaunchProject() && exporter->getName() == selectedIDE)
{
if (saveFirst && ! saveProject (exporter->isXcode()))
return;
exporter->launchProject();
break;
}
}
}
}
}
示例6: createDefaultModulePaths
void ProjectExporter::createDefaultModulePaths()
{
for (Project::ExporterIterator exporter (project); exporter.next();)
{
if (areCompatibleExporters (*this, *exporter))
{
for (int i = project.getModules().getNumModules(); --i >= 0;)
{
String modID (project.getModules().getModuleID(i));
getPathForModuleValue (modID) = exporter->getPathForModuleValue (modID).getValue();
}
return;
}
}
for (Project::ExporterIterator exporter (project); exporter.next();)
{
if (exporter->canLaunchProject())
{
for (int i = project.getModules().getNumModules(); --i >= 0;)
{
String modID (project.getModules().getModuleID(i));
getPathForModuleValue (modID) = exporter->getPathForModuleValue (modID).getValue();
}
return;
}
}
for (int i = project.getModules().getNumModules(); --i >= 0;)
{
String modID (project.getModules().getModuleID(i));
getPathForModuleValue (modID) = "../../juce";
}
}