本文整理汇总了C++中Marker::setSelected方法的典型用法代码示例。如果您正苦于以下问题:C++ Marker::setSelected方法的具体用法?C++ Marker::setSelected怎么用?C++ Marker::setSelected使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Marker
的用法示例。
在下文中一共展示了Marker::setSelected方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: signalMessage
int
MarkerSell::create (PluginData *pd)
{
if (! pd->data)
return 0;
Marker *sell = (Marker *) pd->data;
pd->status = PlotStatus::_MOVE;
sell->setSelected(TRUE);
emit signalMessage(QObject::tr("Place Sell marker"));
return 1;
}
示例2: signalMessage
int
MarkerRetracement::create (PluginData *pd)
{
if (! pd->data)
return 0;
Marker *m = (Marker *) pd->data;
pd->status = PlotStatus::_CREATE_MOVE;
m->setSelected(TRUE);
emit signalMessage(tr("Select highest starting point..."));
return 1;
}
示例3: signalMessage
int
MarkerTLine::create (PluginData *pd)
{
if (! pd->data)
return 0;
Marker *tline = (Marker *) pd->data;
pd->status = PlotStatus::_CREATE_MOVE;
tline->setSelected(TRUE);
emit signalMessage(tr("Place TLine marker..."));
return 1;
}
示例4: switch
int
MarkerSell::click (PluginData *pd)
{
if (! pd->data)
return 0;
Marker *sell = (Marker *) pd->data;
switch ((PlotStatus::Key) pd->status)
{
case PlotStatus::_SELECTED:
{
switch (pd->button)
{
case Qt::LeftButton:
if (sell->isGrabSelected(pd->point))
{
pd->status = PlotStatus::_MOVE;
return 1;
}
if (! sell->isSelected(pd->point))
{
pd->status = PlotStatus::_NONE;
sell->setSelected(FALSE);
Plot *tplot = (Plot *) sell->plot();
tplot->unselectMarker();
sell->plot()->replot();
return 1;
}
break;
case Qt::RightButton:
{
Plot *p = (Plot *) sell->plot();
p->showMarkerMenu();
break;
}
default:
break;
}
break;
}
case PlotStatus::_MOVE:
{
switch (pd->button)
{
case Qt::LeftButton:
pd->status = PlotStatus::_SELECTED;
return 1;
default:
break;
}
break;
}
default: // _None
{
switch (pd->button)
{
case Qt::LeftButton:
{
if (sell->isSelected(pd->point))
{
pd->status = PlotStatus::_SELECTED;
sell->setSelected(TRUE);
Plot *tplot = (Plot *) sell->plot();
tplot->selectMarker(sell->ID());
sell->plot()->replot();
return 1;
}
break;
}
default:
break;
}
break;
}
}
return 1;
}