当前位置: 首页>>代码示例>>C++>>正文


C++ AMDataSource::description方法代码示例

本文整理汇总了C++中AMDataSource::description方法的典型用法代码示例。如果您正苦于以下问题:C++ AMDataSource::description方法的具体用法?C++ AMDataSource::description怎么用?C++ AMDataSource::description使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在AMDataSource的用法示例。


在下文中一共展示了AMDataSource::description方法的8个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。

示例1:

void AM3DNormalizationABEditor::populateComboBox()
{
	AMDataSource *tempSource = 0;
	int inputCount = analysisBlock_->inputDataSourceCount();

	for (int i = 0; i < inputCount; i++){

		tempSource = analysisBlock_->inputDataSourceAt(i);

		if (analysisBlock_->name() != tempSource->name()){

			dataNames_->addItem(tempSource->description(), tempSource->name());
			normalizationNames_->addItem(tempSource->description(), tempSource->name());
		}
	}
}
开发者ID:acquaman,项目名称:acquaman,代码行数:16,代码来源:AM3DNormalizationABEditor.cpp

示例2: onDataSourceDescriptionChanged

void AMDataSourcesEditor::onDataSourceDescriptionChanged()
{
	QModelIndex index = scanSetView_->currentIndex();
	AMDataSource *dataSource = model_->dataSourceAt(index.parent().row(), index.row());
	if (dataSource){

		descriptionEdit_->setText(dataSource->description());
		scanSetView_->update(index);
	}
}
开发者ID:anukat2015,项目名称:acquaman,代码行数:10,代码来源:AMDataSourcesEditor.cpp

示例3: onSetViewIndexChanged

void AMDataSourcesEditor::onSetViewIndexChanged(const QModelIndex &selected, const QModelIndex &deselected) {

	removeDetailEditor();

	// Nothing selected?
	////////////////////////
	if(!selected.isValid()) {
		nameEdit_->clear();
		descriptionEdit_->clear();
		descriptionEdit_->setReadOnly(true);
		addDataSourceButton_->setDisabled(true);
		return;
	}

	addDataSourceButton_->setEnabled(true);

	// Scan selected? (No selected data source)
	/////////////////////////
	if(!selected.parent().isValid()) {
		nameEdit_->clear();
		descriptionEdit_->clear();
		descriptionEdit_->setReadOnly(true);
		return;
	}


	// Data source selected.
	/////////////////

	// Remove old connection to the data source description.
	int oldSi = deselected.parent().row();
	int oldDi = deselected.row();
	AMDataSource *oldDataSource = model_->dataSourceAt(oldSi, oldDi);
	if (oldDataSource)
		disconnect(oldDataSource->signalSource(), SIGNAL(infoChanged()), this, SLOT(onDataSourceDescriptionChanged()));

	// Setup new data source.
	int si = selected.parent().row();
	int di = selected.row();
	AMDataSource* dataSource = model_->dataSourceAt(si, di);
	if(!dataSource)
		return;

	connect(dataSource->signalSource(), SIGNAL(infoChanged()), this, SLOT(onDataSourceDescriptionChanged()));

	nameEdit_->setText(dataSource->name());
	descriptionEdit_->setText(dataSource->description());
	descriptionEdit_->setReadOnly(false);

	installDetailEditor(dataSource->createEditorWidget());

	// Set the new selected data source as the exclusive view preference.
	model_->setExclusiveDataSourceByName(dataSource->name());
}
开发者ID:anukat2015,项目名称:acquaman,代码行数:54,代码来源:AMDataSourcesEditor.cpp

示例4:

void AM1DBasicIntegralABEditor::populateComboBox()
{
    AMDataSource *tempSource = 0;

    for (int i = 0; i < analysisBlock_->inputDataSourceCount(); i++) {

        tempSource = analysisBlock_->inputDataSourceAt(i);

        if (analysisBlock_->name() != tempSource->name() && !tempSource->hiddenFromUsers())
            names_->addItem(tempSource->description(), tempSource->name());
    }
}
开发者ID:Cpppro,项目名称:acquaman,代码行数:12,代码来源:AM1DBasicIntegralABEditor.cpp

示例5:

void AM4DBinningABEditor::populateComboBox()
{
	AMDataSource *tempSource = 0;

	for (int i = 0; i < analysisBlock_->inputDataSourceCount(); i++){

		tempSource = analysisBlock_->inputDataSourceAt(i);

		if (analysisBlock_->name() != tempSource->name())
			names_->addItem(tempSource->description(), tempSource->name());
	}
}
开发者ID:anukat2015,项目名称:acquaman,代码行数:12,代码来源:AM4DBinningABEditor.cpp

示例6: populateComboBox

void AMOrderReductionABEditor::populateComboBox()
{
	AMDataSource *source = 0;

	for (int i = 0, size = analysisBlock_->inputDataSourceCount(); i < size; i++){

		source = analysisBlock_->inputDataSourceAt(i);

		if (analysisBlock_->name() != source->name())
			sourceNames_->addItem(source->description(), source->name());
	}

	if (analysisBlock_->rank() != 0){

		for (int i = 0, size = analysisBlock_->currentInputSource()->rank(); i < size; i++)
			reducedAxisOptions_->insertItem(i, analysisBlock_->currentInputSource()->axisInfoAt(i).description, i);
	}
}
开发者ID:Cpppro,项目名称:acquaman,代码行数:18,代码来源:AMOrderReductionABEditor.cpp

示例7: data

QVariant AMScanSetModel::data(const QModelIndex & index, int role) const {
	if(!index.isValid())
		return QVariant();

	// scan-level index:
	///////////////////////////
	if(index.internalId() == -1 && index.row() < scans_.count() && index.column() == 0) {
		AMScan* scan = scans_.at(index.row());

		switch(role) {
		case Qt::DisplayRole: {
				QString rv = scan->fullName();
				if(scan->modified())
					rv.append( " (modified)");
				return rv;
			}
			break;
		case Qt::DecorationRole:
			/// \bug this is temporary and meaningless. It's just the color of the first data source in the scan.
			if(scan->dataSourceCount() > 0)
				return sourcePlotSettings_.at(index.row()).at(0).linePen.color();
			else
				return QVariant();
			break;
		case Qt::ToolTipRole:
			return QString("%1, #%2 (sample: %3): %4").arg(scan->name()).arg(scan->number()).arg(scan->sampleName()).arg(AMDateTimeUtils::prettyDateTime(scan->dateTime(), "h:mm:ssap"));
			break;
		case AM::DescriptionRole:
			return QString("%1, on %2").arg(AMDateTimeUtils::prettyDateTime(scan->dateTime())).arg(scan->sampleName());
		case AM::DateTimeRole:
			return scan->dateTime();
		case Qt::CheckStateRole:
			return QVariant();	/// \todo For now... No checking/unchecking scans.
			break;
		case AM::PointerRole:
			return qVariantFromValue(scan);
			break;
		case AM::ModifiedRole:
			return scan->modified();
		case AM::CanCloseRole:	// allows views to show the 'close' button beside each scan, to delete it. Do we want this on?
			return true;
		case AM::NameRole: {
				return scan->fullName();
			}
			break;
		default:
			return QVariant();
			break;
		}
	}


	// data source-level index:
	////////////////////////////
	if(index.internalId() >= 0 && index.internalId() < scans_.count() ) {
		AMScan* scan = scans_.at(index.internalId());

		if(index.row() < scan->dataSourceCount() && index.column() == 0) {
			AMDataSource* dataSource = scan->dataSourceAt(index.row());

			switch(role) {
			case Qt::DisplayRole:
				return QString("%1 (%2)").arg(dataSource->description(), dataSource->name());
				break;
			case Qt::DecorationRole:
				return sourcePlotSettings_.at(index.internalId()).at(index.row()).linePen.color();
				break;
			case Qt::ToolTipRole:
			case AM::NameRole:
				return dataSource->name();
			case AM::DescriptionRole:
				return dataSource->description();
			case AM::DetailedDescriptionRole:
				return QString("%1 (%2) From scan: %3\n%4").arg(dataSource->description(),
																dataSource->name(),
																scan->name(),
																//scan->evaluatedName(),
																dataSource->typeDescription());
				break;
			case Qt::CheckStateRole:	// this controls visibility on plots.
				if(isVisible(index.internalId(), index.row()))
					return Qt::Checked;
				else
					return Qt::Unchecked;
				break;
			case AM::PointerRole:
				return qVariantFromValue(dataSource);
				break;
			case AM::PriorityRole:
				return sourcePlotSettings_.at(index.internalId()).at(index.row()).priority;
				break;
			case AM::CanCloseRole:	// allows views to show the 'close' button beside each scan, to delete it.
				return true;
			case AM::LinePenRole:
				return sourcePlotSettings_.at(index.internalId()).at(index.row()).linePen;
			case AM::RankRole:
				return dataSource->rank();
			case AMScanSetModel::ColorMapRole:
				return qVariantFromValue(sourcePlotSettings_.at(index.internalId()).at(index.row()).colorMap);
			case AMScanSetModel::MarkerColorRole:
//.........这里部分代码省略.........
开发者ID:acquaman,项目名称:acquaman,代码行数:101,代码来源:AMScanSetModel.cpp

示例8: onCloseButtonClicked

void AMDataSourcesEditor::onCloseButtonClicked(const QModelIndex &index) {

	// handle data source-level indexes only:
	if(!index.parent().isValid())
		return;

	int dataSourceIndex = index.row();
	int scanIndex = index.parent().row();

	AMScan* scan = model_->scanAt(scanIndex);
	if(!scan || dataSourceIndex >= scan->dataSourceCount())
		return;

	if (dataSourceIndex < scan->rawDataSourceCount()){

		QMessageBox::warning(this, "Can not remove raw data sources.", QString("Acquaman does not allow the deletion of raw data sources."));
		return;
	}

	AMDataSource* dataSource = scan->dataSourceAt(dataSourceIndex);
	int response = QMessageBox::question(this, "Remove Data Source?", QString("Remove this data source? \n\n'%1' (%2)\n\nThe data source will be deleted, and no longer visible in any plots. Any other data sources that depend on this data source will be reset.  Raw data will NOT be deleted, and you can re-create the data source later if you need it.").arg(dataSource->description()).arg(dataSource->name()), QMessageBox::Ok | QMessageBox::Cancel, QMessageBox::Ok);

	if(response == QMessageBox::Ok)
		scan->deleteDataSourceAt(dataSourceIndex);
}
开发者ID:anukat2015,项目名称:acquaman,代码行数:25,代码来源:AMDataSourcesEditor.cpp


注:本文中的AMDataSource::description方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。