本文整理汇总了C++中Marker::readOnly方法的典型用法代码示例。如果您正苦于以下问题:C++ Marker::readOnly方法的具体用法?C++ Marker::readOnly怎么用?C++ Marker::readOnly使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Marker
的用法示例。
在下文中一共展示了Marker::readOnly方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: mouseClick
void Plot::mouseClick (int button, QPoint p)
{
if (! g_symbol)
return;
if (_plotSettings.selected)
{
_plotSettings.selected->click(_plotSettings.status, button, p);
return;
}
QHashIterator<QString, Marker *> it(_plotSettings.markers);
while (it.hasNext())
{
it.next();
Marker *co = it.value();
if (co->readOnly())
continue;
if (! co->isSelected(p))
continue;
_plotSettings.selected = co;
_plotSettings.selected->click(_plotSettings.status, button, p);
return;
}
}
示例2: pit
void
PlotWidget::saveMarkers (DataBase &db)
{
// save plot markers
QHashIterator<QString, Plot *> pit(_plots);
while (pit.hasNext())
{
pit.next();
Plot *p = pit.value();
QHash<QString, Marker *> markers = p->markers();
QHashIterator<QString, Marker *> mit(markers);
while (mit.hasNext())
{
mit.next();
Marker *m = mit.value();
if (m->readOnly())
continue;
if (! m->modified())
continue;
Entity *e = m->settings();
e->setName(mit.key());
db.transaction();
db.set(e);
db.commit();
m->setModified(FALSE);
}
}
}
示例3: deleteAllMarkers
void Plot::deleteAllMarkers ()
{
QStringList dl;
QHashIterator<QString, Marker *> it(_plotSettings.markers);
while (it.hasNext())
{
it.next();
Marker *co = it.value();
if (co->readOnly())
continue;
delete co;
dl << it.key();
_plotSettings.markers.remove(it.key());
}
emit signalDeleteMarkers(dl);
setHighLow();
replot();
}