本文整理汇总了C++中AMDataSource::axes方法的典型用法代码示例。如果您正苦于以下问题:C++ AMDataSource::axes方法的具体用法?C++ AMDataSource::axes怎么用?C++ AMDataSource::axes使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类AMDataSource
的用法示例。
在下文中一共展示了AMDataSource::axes方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: MPlotImageBasic
void AM2DSummingABEditor::onAnalysisBlockInputDataSourcesChanged() {
if(image_) {
delete image_;
image_ = 0;
}
AMDataSource* inputSource;
if(analysisBlock_->inputDataSourceCount() > 0 && (inputSource=analysisBlock_->inputDataSourceAt(0))) {
// inputSource is a valid data source
axisSelector_->setEnabled(false);
rangeMinControl_->setEnabled(true);
rangeMaxControl_->setEnabled(true);
QList<AMAxisInfo> inputSourceAxes = inputSource->axes();
// we know (according to AM2DSummingAB's check of input source validity) that there are two axes here.
axisSelector_->setItemText(0, inputSourceAxes.at(0).name + ": " + inputSourceAxes.at(0).description);
axisSelector_->setItemText(1, inputSourceAxes.at(1).name + ": " + inputSourceAxes.at(1).description);
// set the current status of the controls to reflect the (but don't have then trigger our slots)
int sumAxis = analysisBlock_->sumAxis();
axisSelector_->blockSignals(true);
axisSelector_->setCurrentIndex(sumAxis);
axisSelector_->blockSignals(false);
rangeMinControl_->blockSignals(true);
rangeMinControl_->setMaximum(inputSourceAxes.at(sumAxis).size-1);
rangeMinControl_->setValue(analysisBlock_->sumRangeMin());
rangeMinControl_->blockSignals(false);
rangeMaxControl_->blockSignals(true);
rangeMaxControl_->setMaximum(inputSourceAxes.at(sumAxis).size-1);
rangeMaxControl_->setValue(analysisBlock_->sumRangeMax());
rangeMaxControl_->blockSignals(false);
image_ = new MPlotImageBasic();
AMDataSourceImageData *model = new AMDataSourceImageData;
model->setDataSource(inputSource);
image_->setModel(model, true);
plot_->addItem(image_);
}
else {
// no input source. Not much we can do.
axisSelector_->setEnabled(false);
rangeMinControl_->setEnabled(false);
rangeMaxControl_->setEnabled(false);
}
placeRangeRectangle();
}
示例2:
void AM4DBinningABEditor::onAnalysisBlockInputDataSourcesChanged()
{
AMDataSource* inputSource;
if(analysisBlock_->inputDataSourceCount() > 0 && (inputSource=analysisBlock_->inputDataSourceAt(0))) {
// inputSource is a valid data source
axisSelector_->setEnabled(true);
rangeMinControl_->setEnabled(true);
rangeMaxControl_->setEnabled(true);
QList<AMAxisInfo> inputSourceAxes = inputSource->axes();
// we know (according to AM3DBinningAB's check of input source validity) that there are two axes here.
axisSelector_->setItemText(0, inputSourceAxes.at(0).name + ": " + inputSourceAxes.at(0).description);
axisSelector_->setItemText(1, inputSourceAxes.at(1).name + ": " + inputSourceAxes.at(1).description);
axisSelector_->setItemText(2, inputSourceAxes.at(2).name + ": " + inputSourceAxes.at(2).description);
axisSelector_->setItemText(2, inputSourceAxes.at(3).name + ": " + inputSourceAxes.at(3).description);
// set the current status of the controls to reflect the (but don't have then trigger our slots)
int sumAxis = analysisBlock_->sumAxis();
axisSelector_->blockSignals(true);
axisSelector_->setCurrentIndex(sumAxis);
axisSelector_->blockSignals(false);
rangeMinControl_->blockSignals(true);
rangeMinControl_->setMaximum(inputSourceAxes.at(sumAxis).size-1);
rangeMinControl_->setValue(analysisBlock_->sumRangeMin());
rangeMinControl_->blockSignals(false);
rangeMaxControl_->blockSignals(true);
rangeMaxControl_->setMaximum(inputSourceAxes.at(sumAxis).size-1);
rangeMaxControl_->setValue(analysisBlock_->sumRangeMax());
rangeMaxControl_->blockSignals(false);
updateSeriesData();
}
else {
// no input source. Not much we can do.
axisSelector_->setEnabled(false);
rangeMinControl_->setEnabled(false);
rangeMaxControl_->setEnabled(false);
}
placeRangeRectangle();
}