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