Medical Imaging Interaction Toolkit  2026.06.00
Medical Imaging Interaction Toolkit
QmitkPlotDialog Class Reference

Dialog providing a GUI interface for plotting curves using QmitkPlotWidget. More...

#include <QmitkPlotDialog.h>

Inheritance diagram for QmitkPlotDialog:
Collaboration diagram for QmitkPlotDialog:

Public Member Functions

 QmitkPlotDialog (const char *title, QWidget *parent=nullptr, const char *name=nullptr)
 Construct the plot dialog. More...
 
 ~QmitkPlotDialog () override
 Destructor. More...
 
QmitkPlotWidget * GetPlot ()
 Get the embedded QmitkPlotWidget for configuring curves and axes. More...
 
QwtPlot * GetQwtPlot ()
 Get the underlying QwtPlot instance for low-level plot customization. More...
 

Protected Attributes

QmitkPlotWidget * m_Plot
 
QPushButton * m_CloseDialogButton
 

Detailed Description

Dialog providing a GUI interface for plotting curves using QmitkPlotWidget.

Wraps a QmitkPlotWidget in a QDialog with a "close" button. Usage example:

QmitkPlotDialog* dlg = new QmitkPlotDialog("My dialog title", this);
dlg->GetPlot()->SetAxisTitle(QwtPlot::xBottom, "X [mm]");
dlg->GetPlot()->SetAxisTitle(QwtPlot::yLeft, "Y [mm]");
int curveId = dlg->GetPlot()->InsertCurve("My data");
dlg->GetPlot()->SetCurveData(curveId, xValues, yValues);
dlg->GetPlot()->Replot();
dlg->exec();
Dialog providing a GUI interface for plotting curves using QmitkPlotWidget.
QmitkPlotDialog(const char *title, QWidget *parent=nullptr, const char *name=nullptr)
Construct the plot dialog.
QmitkPlotWidget * GetPlot()
Get the embedded QmitkPlotWidget for configuring curves and axes.
bool SetCurveData(unsigned int curveId, const DataVector &xValues, const DataVector &yValues)
Set curve data from separate x and y vectors.
unsigned int InsertCurve(const char *title, QColor color=QColor(Qt::black))
Insert a new curve into the plot.
void SetAxisTitle(int axis, const char *title)
Set the title of an axis.
void Replot()
Trigger a replot. Call after setting new data or changing appearance.
See also
QmitkPlotWidget, QwtPlot

Definition at line 37 of file QmitkPlotDialog.h.

Constructor & Destructor Documentation

◆ QmitkPlotDialog()

QmitkPlotDialog::QmitkPlotDialog ( const char *  title,
QWidget *  parent = nullptr,
const char *  name = nullptr 
)

Construct the plot dialog.

Parameters
[in]titleThe dialog window title.
[in]parentThe parent widget.
[in]nameObject name (unused, kept for compatibility).

◆ ~QmitkPlotDialog()

QmitkPlotDialog::~QmitkPlotDialog ( )
override

Destructor.

Member Function Documentation

◆ GetPlot()

QmitkPlotWidget* QmitkPlotDialog::GetPlot ( )

Get the embedded QmitkPlotWidget for configuring curves and axes.

Returns
Pointer to the QmitkPlotWidget.

◆ GetQwtPlot()

QwtPlot* QmitkPlotDialog::GetQwtPlot ( )

Get the underlying QwtPlot instance for low-level plot customization.

Returns
Pointer to the QwtPlot.

Member Data Documentation

◆ m_CloseDialogButton

QPushButton* QmitkPlotDialog::m_CloseDialogButton
protected

Definition at line 66 of file QmitkPlotDialog.h.

◆ m_Plot

QmitkPlotWidget* QmitkPlotDialog::m_Plot
protected

Definition at line 64 of file QmitkPlotDialog.h.


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