QtiPlot  0.9.8.2
Public Member Functions | Protected Slots | Private Member Functions | Private Attributes | List of all members
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...
 
Spectrogramd_spectrogram
 
QPushButton * deleteBtn
 
QPushButton * insertBtn
 
ColorButtonpenColorBox
 
QDialog * penDialog
 
PenStyleBoxpenStyleBox
 
DoubleSpinBoxpenWidthBox
 
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.

color_map_editor.png

Constructor & Destructor Documentation

◆ ContourLinesEditor()

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

Constructor.

Parameters
parentparent 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 ( )
protectedslot

References d_pen_list, and table.

Referenced by ContourLinesEditor().

◆ enableButtons

void ContourLinesEditor::enableButtons ( int  row)
protectedslot

References deleteBtn, and insertBtn.

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

◆ eventFilter

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

References showPenDialog(), and table.

◆ insertLevel

void ContourLinesEditor::insertLevel ( )
protectedslot

◆ 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 
)
protectedslot

◆ spinBoxActivated

void ContourLinesEditor::spinBoxActivated ( DoubleSpinBox sb)
protectedslot

References enableButtons(), and table.

Referenced by insertLevel(), and updateContents().

◆ updateContents()

void ContourLinesEditor::updateContents ( )

◆ 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 ( )

◆ updatePen

void ContourLinesEditor::updatePen ( )
protectedslot

◆ 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

◆ 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

◆ deleteBtn

QPushButton * ContourLinesEditor::deleteBtn
private

◆ insertBtn

QPushButton* ContourLinesEditor::insertBtn
private

◆ penColorBox

ColorButton* ContourLinesEditor::penColorBox
private

Referenced by showPenDialog(), and updatePen().

◆ penDialog

QDialog* ContourLinesEditor::penDialog
private

◆ 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: