本文整理汇总了C++中QSharedPointer::WavelengthQVector方法的典型用法代码示例。如果您正苦于以下问题:C++ QSharedPointer::WavelengthQVector方法的具体用法?C++ QSharedPointer::WavelengthQVector怎么用?C++ QSharedPointer::WavelengthQVector使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类QSharedPointer
的用法示例。
在下文中一共展示了QSharedPointer::WavelengthQVector方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: QDialog
///
/// \brief SpectrumViewer::SpectrumViewer
/// A constructor for using a spectrum viewer to view VCA endmembers
/// \param parent
/// \param dataset
/// \param endmember
/// \param directory
///
SpectrumViewer::SpectrumViewer(DataViewer *parent,
QSharedPointer<VespucciDataset> dataset,
int endmember,
QString directory,
QString type) :
QDialog(parent),
ui(new Ui::SpectrumViewer)
{
ui->setupUi(this);
dataset_ = dataset;
coordinate_label_ = findChild<QLabel *>("coordinateLabel");
value_label_ = findChild<QLabel *>("valueLabel");
coordinate_label_->setVisible(false);
value_label_->setVisible(false);
spectrum_plot_ = findChild<QCustomPlot *>("spectrum");
spectrum_plot_->addGraph();
spectrum_plot_->xAxis->setLabel(dataset->x_axis_description());
spectrum_plot_->yAxis->setLabel(dataset->y_axis_description());
QVector<double> plot_data;
spectrum_plot_->replot();
if (type == "VCA"){
plot_data = dataset_->vertex_components_data()->EndmemberQVec(endmember);
}
QVector<double> wavelength = dataset->WavelengthQVector();
coordinate_label_ = findChild<QLabel *>("coordinateLabel");
value_label_ = findChild<QLabel *>("valueLabel");
spectrum_plot_->graph(0)->addData(wavelength, plot_data);
directory_ = directory;
spectrum_plot_->setInteraction(QCP::iRangeDrag, true);
spectrum_plot_->setInteraction(QCP::iRangeZoom, true);
spectrum_plot_->rescaleAxes();
}