TextDialog Class Reference

Options dialog for text labels/axes labels. More...

`#include <TextDialog.h>`

Inheritance diagram for TextDialog:

## Public Types

enum | TextType { AxisTitle, LayerTitle }
| Label types. More...

## Public Slots

void | setAlignment (int align)
| Set axis label alignment. More...
void | setGraph (Graph *g)
void | setText (const QString &t)
| Set the contents of the text editor box. More...

## Public Member Functions

int | alignment ()
| Return axis label alignment. More...
| TextDialog (TextType type, QWidget *parent=0, Qt::WFlags fl=0)
| Constructor. More...

## Private Slots

void | apply ()
| Apply changes. More...
void | customFont ()
| Let the user select another font. More...

## Private Member Functions

void | formatLayerLabels (Graph *g)

## Private Attributes

QComboBox * | alignmentBox
QComboBox * | backgroundBox
ColorButton * | backgroundBtn
QPushButton * | buttonApply
QPushButton * | buttonCancel
QPushButton * | buttonFont
ColorButton * | colorBtn
Graph * | d_graph
QwtScaleWidget * | d_scale
TextType | d_text_type
QSpinBox * | distanceBox
QComboBox * | formatApplyToBox
TextFormatButtons * | formatButtons
QGroupBox * | groupBox1
QGroupBox * | groupBox2
QCheckBox * | invertTitleBox
QFont | selectedFont
| current font More...
QTextEdit * | textEditBox

## Detailed Description

Options dialog for text labels/axes labels.

## Member Enumeration Documentation

## TextType

enum TextDialog::TextType

Label types.

Enumerator
AxisTitle | axis label
LayerTitle |

## Constructor & Destructor Documentation

## TextDialog()

TextDialog::TextDialog | ( | TextType | type,
|  | QWidget * | parent = `0`,
|  | Qt::WFlags | fl = `0`
| ) |  |

Constructor.

Parameters

  type | text type (TextMarker | AxisTitle)
  parent | parent widget
  fl | window flags

References alignmentBox, apply(), TextFormatButtons::AxisLabel, AxisTitle, buttonApply, buttonCancel, buttonFont, colorBtn, customFont(), d_graph, d_scale, d_text_type, distanceBox, formatApplyToBox, formatButtons, groupBox1, invertTitleBox, and textEditBox.

## Member Function Documentation

## alignment()

int TextDialog::alignment | ( |  | ) |

Return axis label alignment.

See also
  setAlignment()

References alignmentBox.

Referenced by apply(), and formatLayerLabels().

## apply

void TextDialog::apply | ( |  | ) |

private slot

Apply changes.

References alignment(), AxisTitle, ColorButton::color(), colorBtn, d_graph, d_scale, d_text_type, distanceBox, formatApplyToBox, formatLayerLabels(), invertTitleBox, MultiLayer::layersList(), LayerTitle, Graph::multiLayer(), Graph::notifyChanges(), selectedFont, Graph::setAxisTitle(), ApplicationWindow::setFormatBarFont(), textEditBox, Graph::updateMarkersBoundingRect(), and ApplicationWindow::windowsList().

Referenced by customFont(), and TextDialog().

## customFont

void TextDialog::customFont | ( |  | ) |

private slot

Let the user select another font.

References apply(), selectedFont, and textEditBox.

Referenced by TextDialog().

## formatLayerLabels()

void TextDialog::formatLayerLabels | ( | Graph * | g | ) |

private

References alignment(), AxisTitle, ColorButton::color(), colorBtn, d_text_type, distanceBox, invertTitleBox, selectedFont, and Graph::updateMarkersBoundingRect().

Referenced by apply().

## setAlignment

void TextDialog::setAlignment | ( | int | align | ) |

slot

Set axis label alignment.

Parameters

  align | alignment (can be -1 for invalid, Qt::AlignHCenter, Qt::AlignLeft, or Qt::AlignRight)

References alignmentBox.

Referenced by setGraph().

## setGraph

void TextDialog::setGraph | ( | Graph * | g | ) |

slot

References AxisTitle, Graph::axisTitleString(), colorBtn, Graph::currentScale(), d_graph, d_scale, d_text_type, distanceBox, invertTitleBox, LayerTitle, selectedFont, setAlignment(), ColorButton::setColor(), setText(), and textEditBox.

Referenced by ApplicationWindow::showAxisTitleDialog(), and ApplicationWindow::showTitleDialog().

## setText

void TextDialog::setText | ( | const QString & | t | ) |

slot

Set the contents of the text editor box.

References textEditBox.

Referenced by setGraph().

## Member Data Documentation

## alignmentBox

QComboBox* TextDialog::alignmentBox

private

Referenced by alignment(), setAlignment(), and TextDialog().

## backgroundBox

QComboBox* TextDialog::backgroundBox

private

## backgroundBtn

ColorButton * TextDialog::backgroundBtn

private

## buttonApply

QPushButton* TextDialog::buttonApply

private

Referenced by TextDialog().

## buttonCancel

QPushButton* TextDialog::buttonCancel

private

Referenced by TextDialog().

## buttonFont

QPushButton* TextDialog::buttonFont

private

Referenced by TextDialog().

## colorBtn

ColorButton* TextDialog::colorBtn

private

Referenced by apply(), formatLayerLabels(), setGraph(), and TextDialog().

## d_graph

Graph* TextDialog::d_graph

private

Referenced by apply(), setGraph(), and TextDialog().

## d_scale

QwtScaleWidget* TextDialog::d_scale

private

Referenced by apply(), setGraph(), and TextDialog().

## d_text_type

TextType TextDialog::d_text_type

private

Referenced by apply(), formatLayerLabels(), setGraph(), and TextDialog().

## distanceBox

QSpinBox* TextDialog::distanceBox

private

Referenced by apply(), formatLayerLabels(), setGraph(), and TextDialog().

## formatApplyToBox

QComboBox* TextDialog::formatApplyToBox

private

Referenced by apply(), and TextDialog().

## formatButtons

TextFormatButtons* TextDialog::formatButtons

private

Referenced by TextDialog().

## groupBox1

QGroupBox* TextDialog::groupBox1

private

Referenced by TextDialog().

## groupBox2

QGroupBox * TextDialog::groupBox2

private

## invertTitleBox

QCheckBox* TextDialog::invertTitleBox

private

Referenced by apply(), formatLayerLabels(), setGraph(), and TextDialog().

## selectedFont

QFont TextDialog::selectedFont

private

current font

Referenced by apply(), customFont(), formatLayerLabels(), and setGraph().

## textEditBox

QTextEdit* TextDialog::textEditBox

private

Referenced by apply(), customFont(), setGraph(), setText(), and TextDialog().

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

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