ContourLinesEditor Class Reference

A complex widget allowing to customize contour line plots. More...

`#include <ContourLinesEditor.h>`

Inheritance diagram for ContourLinesEditor:

## Public Member Functions

| ContourLinesEditor (const QLocale &locale=QLocale::system(), int precision=6, QWidget *parent=0)
| Constructor. More...
void | setSpectrogram (Spectrogram *sp)
| Use this function to initialize the values. More...
void | showPenColumn (bool on=true)
void | updateContents ()
| Updates cell items when spectrogram contour lines changed. More...
void | updateContourLevels ()
| Updates levels in the target spectrogram and replots it. More...
void | updateContourPens ()
| ~ContourLinesEditor ()

## Protected Slots

void | deleteLevel ()
void | enableButtons (int row)
bool | eventFilter (QObject *object, QEvent *e)
void | insertLevel ()
void | showPenDialog (int row, int col)
void | spinBoxActivated (DoubleSpinBox *)
void | updatePen ()

## Private Member Functions

void | updatePenColumn ()

## Private Attributes

QCheckBox * | applyAllColorBox
QCheckBox * | applyAllStyleBox
QCheckBox * | applyAllWidthBox
QLocale | d_locale
| Locale settings used to display level values. More...
int | d_pen_index
QList< QPen > | d_pen_list
int | d_precision
| Precision used to display level values. More...
Spectrogram * | d_spectrogram
QPushButton * | deleteBtn
QPushButton * | insertBtn
ColorButton * | penColorBox
QDialog * | penDialog
PenStyleBox * | penStyleBox
DoubleSpinBox * | penWidthBox
QTableWidget * | table
| Table displaying the values ranges in the first column and their corresponding pens in the second column. More...

## Detailed Description

A complex widget allowing to customize contour line plots.

It uses a QTableWidget to display the values in one column and their corresponding pen in a second column. A click on a table color pops-up a dialog allowing to customize the pen.

## Constructor & Destructor Documentation

## ContourLinesEditor()

ContourLinesEditor::ContourLinesEditor | ( | const QLocale & | locale = `QLocale::system()`,
|  | int | precision = `6`,
|  | QWidget * | parent = `0`
| ) |  |

Constructor.

Parameters

  parent | parent widget (only affects placement of the widget)

References deleteBtn, deleteLevel(), insertBtn, insertLevel(), penDialog, showPenDialog(), and table.

## ~ContourLinesEditor()

ContourLinesEditor::~ContourLinesEditor | ( |  | ) |

References penDialog.

## Member Function Documentation

## deleteLevel

void ContourLinesEditor::deleteLevel | ( |  | ) |

protected slot

References d_pen_list, and table.

Referenced by ContourLinesEditor().

## enableButtons

void ContourLinesEditor::enableButtons | ( | int | row | ) |

protected slot

References deleteBtn, and insertBtn.

Referenced by insertLevel(), showPenDialog(), and spinBoxActivated().

## eventFilter

bool ContourLinesEditor::eventFilter | ( | QObject * | object,
|  | QEvent * | e
| ) |  |

protected slot

References showPenDialog(), and table.

## insertLevel

void ContourLinesEditor::insertLevel | ( |  | ) |

protected slot

References Spectrogram::contourPen(), d_locale, d_pen_list, d_precision, d_spectrogram, enableButtons(), Spectrogram::range(), DoubleSpinBox::setDecimals(), DoubleSpinBox::setRange(), DoubleSpinBox::setValue(), spinBoxActivated(), table, and DoubleSpinBox::value().

Referenced by ContourLinesEditor().

## setSpectrogram()

void ContourLinesEditor::setSpectrogram | ( | Spectrogram * | sp | ) |

Use this function to initialize the values.

References d_spectrogram, and updateContents().

Referenced by PlotDialog::setActiveCurve().

## showPenColumn()

void ContourLinesEditor::showPenColumn | ( | bool | on = `true` | ) |

References table.

Referenced by PlotDialog::showCustomPenColumn().

## showPenDialog

void ContourLinesEditor::showPenDialog | ( | int | row,
|  | int | col
| ) |  |

protected slot

References applyAllColorBox, applyAllStyleBox, applyAllWidthBox, d_pen_index, d_pen_list, d_spectrogram, enableButtons(), penColorBox, penDialog, penStyleBox, penWidthBox, ColorButton::setColor(), PenStyleBox::setStyle(), DoubleSpinBox::setValue(), and updatePen().

Referenced by ContourLinesEditor(), and eventFilter().

## spinBoxActivated

void ContourLinesEditor::spinBoxActivated | ( | DoubleSpinBox * | sb | ) |

protected slot

References enableButtons(), and table.

Referenced by insertLevel(), and updateContents().

## updateContents()

void ContourLinesEditor::updateContents | ( |  | ) |

Updates cell items when spectrogram contour lines changed.

References Spectrogram::contourPen(), d_locale, d_pen_list, d_precision, d_spectrogram, Spectrogram::range(), DoubleSpinBox::setDecimals(), DoubleSpinBox::setRange(), DoubleSpinBox::setValue(), spinBoxActivated(), and table.

Referenced by PlotDialog::setEquidistantLevels(), and setSpectrogram().

## updateContourLevels()

void ContourLinesEditor::updateContourLevels | ( |  | ) |

Updates levels in the target spectrogram and replots it.

References d_spectrogram, Spectrogram::setContourLevels(), and table.

Referenced by PlotDialog::acceptParams().

## updateContourPens()

void ContourLinesEditor::updateContourPens | ( |  | ) |

References d_pen_list, d_spectrogram, Spectrogram::setContourPenList(), and table.

Referenced by PlotDialog::acceptParams().

## updatePen

void ContourLinesEditor::updatePen | ( |  | ) |

protected slot

References applyAllColorBox, applyAllStyleBox, applyAllWidthBox, ColorButton::color(), d_pen_index, d_pen_list, penColorBox, penDialog, penStyleBox, penWidthBox, PenStyleBox::style(), updatePenColumn(), and DoubleSpinBox::value().

Referenced by showPenDialog().

## updatePenColumn()

void ContourLinesEditor::updatePenColumn | ( |  | ) |

private

References d_pen_list, and table.

Referenced by updatePen().

## Member Data Documentation

## applyAllColorBox

QCheckBox* ContourLinesEditor::applyAllColorBox

private

Referenced by showPenDialog(), and updatePen().

## applyAllStyleBox

QCheckBox * ContourLinesEditor::applyAllStyleBox

private

Referenced by showPenDialog(), and updatePen().

## applyAllWidthBox

QCheckBox * ContourLinesEditor::applyAllWidthBox

private

Referenced by showPenDialog(), and updatePen().

## d_locale

QLocale ContourLinesEditor::d_locale

private

Locale settings used to display level values.

Referenced by insertLevel(), and updateContents().

## d_pen_index

int ContourLinesEditor::d_pen_index

private

Referenced by showPenDialog(), and updatePen().

## d_pen_list

QList<QPen> ContourLinesEditor::d_pen_list

private

Referenced by deleteLevel(), insertLevel(), showPenDialog(), updateContents(), updateContourPens(), updatePen(), and updatePenColumn().

## d_precision

int ContourLinesEditor::d_precision

private

Precision used to display level values.

Referenced by insertLevel(), and updateContents().

## d_spectrogram

Spectrogram* ContourLinesEditor::d_spectrogram

private

Referenced by insertLevel(), setSpectrogram(), showPenDialog(), updateContents(), updateContourLevels(), and updateContourPens().

## deleteBtn

QPushButton * ContourLinesEditor::deleteBtn

private

Referenced by ContourLinesEditor(), and enableButtons().

## insertBtn

QPushButton* ContourLinesEditor::insertBtn

private

Referenced by ContourLinesEditor(), and enableButtons().

## penColorBox

ColorButton* ContourLinesEditor::penColorBox

private

Referenced by showPenDialog(), and updatePen().

## penDialog

QDialog* ContourLinesEditor::penDialog

private

Referenced by ContourLinesEditor(), showPenDialog(), updatePen(), and ~ContourLinesEditor().

## penStyleBox

PenStyleBox* ContourLinesEditor::penStyleBox

private

Referenced by showPenDialog(), and updatePen().

## penWidthBox

DoubleSpinBox* ContourLinesEditor::penWidthBox

private

Referenced by showPenDialog(), and updatePen().

## table

QTableWidget* ContourLinesEditor::table

private

Table displaying the values ranges in the first column and their corresponding pens in the second column.

Referenced by ContourLinesEditor(), deleteLevel(), eventFilter(), insertLevel(), showPenColumn(), spinBoxActivated(), updateContents(), updateContourLevels(), updateContourPens(), and updatePenColumn().

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

- qtiplot/src/plot2D/dialogs/ContourLinesEditor.h
- qtiplot/src/plot2D/dialogs/ContourLinesEditor.cpp