本文整理汇总了C++中Universe::unmarkObject方法的典型用法代码示例。如果您正苦于以下问题:C++ Universe::unmarkObject方法的具体用法?C++ Universe::unmarkObject怎么用?C++ Universe::unmarkObject使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Universe
的用法示例。
在下文中一共展示了Universe::unmarkObject方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: slotMarkSelected
void DeepSkyBrowser::slotMarkSelected()
{
QItemSelectionModel* sm = treeView->selectionModel();
bool labelMarker = labelMarkerBox->checkState() == Qt::Checked;
bool convertOK = false;
QVariant markerData = markerSymbolBox->itemData(markerSymbolBox->currentIndex());
MarkerRepresentation::Symbol markerSymbol = (MarkerRepresentation::Symbol) markerData.toInt(&convertOK);
QVariant markerSize = markerSizeBox->itemData(markerSizeBox->currentIndex());
float size = (float) markerSize.toInt(&convertOK);
QColor markerColor = colorSwatch->color();
Color color((float) markerColor.redF(),
(float) markerColor.greenF(),
(float) markerColor.blueF());
Universe* universe = appCore->getSimulation()->getUniverse();
string label;
int nRows = dsoModel->rowCount(QModelIndex());
for (int row = 0; row < nRows; row++)
{
if (sm->isRowSelected(row, QModelIndex()))
{
DeepSkyObject* dso = dsoModel->itemAtRow((unsigned int) row);
if (dso != NULL)
{
if (convertOK)
{
if (labelMarker)
{
label = universe->getDSOCatalog()->getDSOName(dso, true);
label = ReplaceGreekLetterAbbr(label);
}
universe->markObject(Selection(dso),
MarkerRepresentation(markerSymbol, size, color, label),
1);
}
else
{
universe->unmarkObject(Selection(dso), 1);
}
}
} // isRowSelected
} // for
}
示例2: slotMarkSelected
void SolarSystemBrowser::slotMarkSelected()
{
#if 0
QItemSelectionModel* sm = treeView->selectionModel();
QModelIndexList rows = sm->selectedRows();
bool labelMarker = labelMarkerBox->checkState() == Qt::Checked;
bool convertOK = false;
QVariant markerData = markerSymbolBox->itemData(markerSymbolBox->currentIndex());
Marker::Symbol markerSymbol = (Marker::Symbol) markerData.toInt(&convertOK);
QColor markerColor = colorSwatch->color();
Color color((float) markerColor.redF(),
(float) markerColor.greenF(),
(float) markerColor.blueF());
Universe* universe = appCore->getSimulation()->getUniverse();
string label;
for (QModelIndexList::const_iterator iter = rows.begin();
iter != rows.end(); iter++)
{
Selection sel = solarSystemModel->objectAtIndex(*iter);
if (!sel.empty())
{
if (convertOK)
{
#if 0
if (labelMarker)
{
label = universe->getDSOCatalog()->getDSOName(dso);
label = ReplaceGreekLetterAbbr(label);
}
#endif
universe->markObject(sel, 10.0f,
color,
markerSymbol, 1, label);
}
else
{
universe->unmarkObject(sel, 1);
}
}
}
#endif
}