本文整理汇总了C++中mantid::api::MatrixWorkspace_const_sptr::get方法的典型用法代码示例。如果您正苦于以下问题:C++ MatrixWorkspace_const_sptr::get方法的具体用法?C++ MatrixWorkspace_const_sptr::get怎么用?C++ MatrixWorkspace_const_sptr::get使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类mantid::api::MatrixWorkspace_const_sptr
的用法示例。
在下文中一共展示了MatrixWorkspace_const_sptr::get方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: MdiSubWindow
MantidMatrix::MantidMatrix(Mantid::API::MatrixWorkspace_const_sptr ws,
QWidget *parent, const QString &label,
const QString &name, int start, int end)
: MdiSubWindow(parent, label, name, 0), WorkspaceObserver(),
m_workspace(ws), y_start(0.0), y_end(0.0), m_histogram(false), m_min(0),
m_max(0), m_are_min_max_set(false), m_boundingRect(),
m_strName(name.toStdString()), m_selectedRows(), m_selectedCols() {
m_workspace = ws;
setup(ws, start, end);
setWindowTitle(name);
setName(name);
m_modelY = new MantidMatrixModel(this, ws.get(), m_rows, m_cols, m_startRow,
MantidMatrixModel::Y);
m_table_viewY = new QTableView();
connectTableView(m_table_viewY, m_modelY);
setColumnsWidth(0, MantidPreferences::MantidMatrixColumnWidthY());
setNumberFormat(0, MantidPreferences::MantidMatrixNumberFormatY(),
MantidPreferences::MantidMatrixNumberPrecisionY());
m_modelX = new MantidMatrixModel(this, ws.get(), m_rows, m_cols, m_startRow,
MantidMatrixModel::X);
m_table_viewX = new QTableView();
connectTableView(m_table_viewX, m_modelX);
setColumnsWidth(1, MantidPreferences::MantidMatrixColumnWidthX());
setNumberFormat(1, MantidPreferences::MantidMatrixNumberFormatX(),
MantidPreferences::MantidMatrixNumberPrecisionX());
m_modelE = new MantidMatrixModel(this, ws.get(), m_rows, m_cols, m_startRow,
MantidMatrixModel::E);
m_table_viewE = new QTableView();
connectTableView(m_table_viewE, m_modelE);
setColumnsWidth(2, MantidPreferences::MantidMatrixColumnWidthE());
setNumberFormat(2, MantidPreferences::MantidMatrixNumberFormatE(),
MantidPreferences::MantidMatrixNumberPrecisionE());
m_YTabLabel = QString("Y values");
m_XTabLabel = QString("X values");
m_ETabLabel = QString("Errors");
m_tabs = new QTabWidget(this);
m_tabs->insertTab(0, m_table_viewY, m_YTabLabel);
m_tabs->insertTab(1, m_table_viewX, m_XTabLabel);
m_tabs->insertTab(2, m_table_viewE, m_ETabLabel);
setWidget(m_tabs);
// for synchronizing the views
// index is zero for the defualt view
m_PrevIndex = 0;
// install event filter on these objects
m_table_viewY->installEventFilter(this);
m_table_viewX->installEventFilter(this);
m_table_viewE->installEventFilter(this);
connect(m_tabs, SIGNAL(currentChanged(int)), this, SLOT(viewChanged(int)));
setGeometry(50, 50,
qMin(5, numCols()) *
m_table_viewY->horizontalHeader()->sectionSize(0) +
55,
(qMin(10, numRows()) + 1) *
m_table_viewY->verticalHeader()->sectionSize(0) +
100);
// Add an extension for the DX component if required
if (ws->hasDx(0)) {
addMantidMatrixTabExtension(MantidMatrixModel::DX);
}
observeAfterReplace();
observePreDelete();
observeADSClear();
connect(this, SIGNAL(needWorkspaceChange(Mantid::API::MatrixWorkspace_sptr)),
this, SLOT(changeWorkspace(Mantid::API::MatrixWorkspace_sptr)));
connect(this, SIGNAL(needToClose()), this, SLOT(closeMatrix()));
connect(this, SIGNAL(closedWindow(MdiSubWindow *)), this,
SLOT(selfClosed(MdiSubWindow *)));
confirmClose(false);
}