本文整理汇总了C++中PlotCurve::rtti方法的典型用法代码示例。如果您正苦于以下问题:C++ PlotCurve::rtti方法的具体用法?C++ PlotCurve::rtti怎么用?C++ PlotCurve::rtti使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类PlotCurve
的用法示例。
在下文中一共展示了PlotCurve::rtti方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: activateCurve
void SmoothCurveDialog::activateCurve(int curveIndex)
{
if (smooth_method == SmoothFilter::Average){
PlotCurve *c = graph->curve(curveIndex);
if (!c || c->rtti() != QwtPlotItem::Rtti_PlotCurve)
return;
boxPointsLeft->setMaxValue(c->dataSize()/2);
}
}
示例2: symbolsMaxWidth
int LegendWidget::symbolsMaxWidth()
{
QList<int> cvs = d_plot->curveKeys();
int curves = cvs.count();
if (!curves)
return 0;
// RJT (22/09/09): For rest of method, copied in code from current
// QtiPlot (rev. 1373) to fix infinite loop if closing bracket missing
int maxL = 0;
QString text = d_text->text();
QStringList titles = text.split("\n", QString::KeepEmptyParts);
for (int i=0; i<(int)titles.count(); i++){
QString s = titles[i];
while (s.contains("\\l(",Qt::CaseInsensitive)){
int pos = s.indexOf("\\l(", 0,Qt::CaseInsensitive);
int pos1 = s.indexOf("(", pos);
int pos2 = s.indexOf(")", pos1);
int pos3 = s.indexOf(",",pos1);
if (pos3 != -1 && pos3 < pos2 ) pos2=pos3; // for pi charts get dataset number
if (pos2 == -1){
s = s.right(s.length() - pos1 - 1);
continue;
}
int point = 0;
PlotCurve* c = getCurve(s.mid(pos1 + 1, pos2 - pos1 - 1), point);
if (c && c->type() == Graph::Pie){
maxL = 2*d_text->font().pointSize();//10;
line_length = 0;
s = s.right(s.length() - pos2 - 1);
continue;
}
if (c && c->rtti() != QwtPlotItem::Rtti_PlotSpectrogram) {
if (c->type() == Graph::Pie ||
c->type() == Graph::VerticalBars ||
c->type() == Graph::HorizontalBars ||
c->type() == Graph::Histogram ||
c->type() == Graph::Box){
maxL = 2*d_text->font().pointSize();//10;
line_length = 0;
} else {
int l = c->symbol().size().width();
if (l < 3)
l = 3;
else if (l > 15)
l = 15;
if (l>maxL && c->symbol().style() != QwtSymbol::NoSymbol)
maxL = l;
}
}
s = s.right(s.length() - pos2 - 1);
}
if (titles[i].contains("\\p{")){ // old syntax for pie charts
maxL = 2*d_text->font().pointSize();//10;
line_length = 0;
}
}
return maxL;
}