BornAgain  1.19.0
Simulate and fit neutron and x-ray scattering at grazing incidence
gui2::GraphCanvasWidget Class Reference

Widget to show canvas with graph collection. More...

Inheritance diagram for gui2::GraphCanvasWidget:
[legend]
Collaboration diagram for gui2::GraphCanvasWidget:
[legend]

Public Member Functions

 GraphCanvasWidget (QWidget *parent=nullptr)
 
void setItem (CanvasItem *canvas_item)
 
void updateViewport ()
 

Private Attributes

ModelView::GraphCanvasm_graphCanvas {nullptr}
 

Detailed Description

Widget to show canvas with graph collection.

Occupies the right part of ImportDataEditor.

Definition at line 32 of file graphcanvaswidget.h.

Constructor & Destructor Documentation

◆ GraphCanvasWidget()

gui2::GraphCanvasWidget::GraphCanvasWidget ( QWidget *  parent = nullptr)

Definition at line 22 of file graphcanvaswidget.cpp.

23  : QWidget(parent), m_graphCanvas(new ModelView::GraphCanvas)
24 {
25  auto layout = new QVBoxLayout(this);
26  layout->addWidget(m_graphCanvas);
27  layout->setContentsMargins(0, 5, 5, 5);
28 }
Widget to show scientific figure with multiple 1D graphs.
Definition: graphcanvas.h:30
ModelView::GraphCanvas * m_graphCanvas

References m_graphCanvas.

Member Function Documentation

◆ setItem()

void gui2::GraphCanvasWidget::setItem ( CanvasItem canvas_item)

Definition at line 30 of file graphcanvaswidget.cpp.

31 {
32  m_graphCanvas->setItem(canvas_item);
33 }
void setItem(GraphViewportItem *viewport_item)

References m_graphCanvas, and ModelView::GraphCanvas::setItem().

Referenced by gui2::ImportDataEditor::setupConnections().

Here is the call graph for this function:

◆ updateViewport()

void gui2::GraphCanvasWidget::updateViewport ( )

Definition at line 35 of file graphcanvaswidget.cpp.

36 {
38 }
void setViewportToContent(double left, double top, double right, double bottom)

References m_graphCanvas, and ModelView::GraphCanvas::setViewportToContent().

Referenced by gui2::ImportDataEditor::setupConnections().

Here is the call graph for this function:

Member Data Documentation

◆ m_graphCanvas

ModelView::GraphCanvas* gui2::GraphCanvasWidget::m_graphCanvas {nullptr}
private

Definition at line 43 of file graphcanvaswidget.h.

Referenced by GraphCanvasWidget(), setItem(), and updateViewport().


The documentation for this class was generated from the following files: