本文整理汇总了C++中MultiLayer::layer方法的典型用法代码示例。如果您正苦于以下问题:C++ MultiLayer::layer方法的具体用法?C++ MultiLayer::layer怎么用?C++ MultiLayer::layer使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类MultiLayer
的用法示例。
在下文中一共展示了MultiLayer::layer方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: init
void CurvesDialog::init()
{
if (d_app){
bool currentFolderOnly = d_app->d_show_current_folder;
boxShowCurrentFolder->setChecked(currentFolderOnly);
showCurrentFolder(currentFolderOnly);
QStringList matrices = d_app->matrixNames();
if (!matrices.isEmpty ()){
boxMatrixStyle->show();
available->addItems(matrices);
}
int style = d_app->defaultCurveStyle;
if (style == Graph::Line)
boxStyle->setCurrentItem(0);
else if (style == Graph::Scatter)
boxStyle->setCurrentItem(1);
else if (style == Graph::LineSymbols)
boxStyle->setCurrentItem(2);
else if (style == Graph::VerticalDropLines)
boxStyle->setCurrentItem(3);
else if (style == Graph::Spline)
boxStyle->setCurrentItem(4);
else if (style == Graph::VerticalSteps)
boxStyle->setCurrentItem(5);
else if (style == Graph::HorizontalSteps)
boxStyle->setCurrentItem(6);
else if (style == Graph::Area)
boxStyle->setCurrentItem(7);
else if (style == Graph::VerticalBars)
boxStyle->setCurrentItem(8);
else if (style == Graph::HorizontalBars)
boxStyle->setCurrentItem(9);
}
QList<MdiSubWindow *> wList = d_app->windowsList();
foreach(MdiSubWindow* w, wList)
{
MultiLayer* ml = dynamic_cast<MultiLayer*>(w);
if (ml)// layers are numbered starting from 1
{
for(int i=1;i<=ml->layers();i++)
{
Graph* g = ml->layer(i);
if (g)
{
for(int j=0;j<g->curves();j++)
{
MantidMatrixCurve* c = dynamic_cast<MantidMatrixCurve*>(g->curve(j));
if (c)
{
available->addItem(c->title().text());
// Store copies of the curves
// Necessary because a curve is deleted when it's removed from a plot
d_plotCurves[c->title().text()] = c->clone(g);
ml->setCloseOnEmpty(false);
}
}
}
}
}
}