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