SciDAVis  1.D4
Public Types | Public Slots | Signals | Public Member Functions | Protected Attributes | Private Slots
TextDialog Class Reference

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

#include <TextDialog.h>

List of all members.

Public Types

enum  TextType { TextMarker, AxisTitle }
 Label types. More...

Public Slots

void setAlignment (int align)
 Set axis label alignment.
void setAngle (int angle)
 Set rotation angle (not yet implemented)
void setBackgroundColor (QColor c)
 Set the background color to 'c'.
void setBackgroundType (int bkg)
 Set label background type.
void setFont (const QFont &fnt)
 Set the current font to 'fnt'.
void setText (const QString &t)
 Set the contents of the text editor box.
void setTextColor (QColor c)
 Set the text color to 'c'.

Signals

void changeAlignment (int)
 Signal for axes labels: change text alignment.
void changeColor (const QColor &)
 Signal for axes labels: change text color.
void changeFont (const QFont &)
 Signal for axes labels: change font.
void changeText (const QString &)
 Signal for axes labels: change text.
void values (const QString &text, int angle, int bkg, const QFont &fnt, const QColor &textColor, const QColor &backgroundColor)
 Emit all current values.

Public Member Functions

int alignment ()
 Return axis label alignment.
int angle ()
 Return rotation angle (not yet implemented)
 TextDialog (TextType type, QWidget *parent=0, Qt::WFlags fl=0)
 Constructor.
 ~TextDialog ()
 Destructor.

Protected Attributes

QComboBox * alignmentBox
QComboBox * backgroundBox
ColorButtonbackgroundBtn
QSpinBox * boxBackgroundTransparency
QPushButton * buttonApply
QPushButton * buttonCancel
QPushButton * buttonDefault
QPushButton * buttonFont
QPushButton * buttonOk
ColorButtoncolorBtn
TextFormatButtonsformatButtons
QGroupBox * groupBox1
QGroupBox * groupBox2
QComboBox * rotateBox
QFont selectedFont
 current font
QTextEdit * textEditBox
TextType textType

Private Slots

void accept ()
 Accept changes and close dialog.
void apply ()
 Apply changes.
void customFont ()
 Let the user select another font.
void pickBackgroundColor ()
 Let the user pick the background color.
void pickTextColor ()
 Let the user pick the text color.
void setDefaultValues ()
void updateTransparency (int alpha)

Detailed Description

Options dialog for text labels/axes labels.


Member Enumeration Documentation

Label types.

Enumerator:
TextMarker 

normal text label

AxisTitle 

axis label


Constructor & Destructor Documentation

TextDialog::TextDialog ( TextType  type,
QWidget *  parent = 0,
Qt::WFlags  fl = 0 
)
TextDialog::~TextDialog ( )
inline

Destructor.


Member Function Documentation

void TextDialog::accept ( )
privateslot

Accept changes and close dialog.

References apply().

Referenced by TextDialog().

int TextDialog::alignment ( )

Return axis label alignment.

See also:
setAlignment()

References alignmentBox.

Referenced by apply().

int TextDialog::angle ( )

Return rotation angle (not yet implemented)

Referenced by apply().

void TextDialog::apply ( )
privateslot
void TextDialog::changeAlignment ( int  )
signal

Signal for axes labels: change text alignment.

Referenced by apply().

void TextDialog::changeColor ( const QColor &  )
signal

Signal for axes labels: change text color.

Referenced by apply().

void TextDialog::changeFont ( const QFont &  )
signal

Signal for axes labels: change font.

Referenced by customFont().

void TextDialog::changeText ( const QString &  )
signal

Signal for axes labels: change text.

Referenced by apply().

void TextDialog::customFont ( )
privateslot

Let the user select another font.

References changeFont(), and selectedFont.

Referenced by TextDialog().

void TextDialog::pickBackgroundColor ( )
privateslot

Let the user pick the background color.

References backgroundBtn, ColorButton::color(), and ColorButton::setColor().

Referenced by TextDialog().

void TextDialog::pickTextColor ( )
privateslot

Let the user pick the text color.

References ColorButton::color(), colorBtn, and ColorButton::setColor().

Referenced by TextDialog().

void TextDialog::setAlignment ( int  align)
slot

Set axis label alignment.

Parameters:
alignalignment (can be -1 for invalid, Qt::AlignHCenter, Qt::AlignLeft, or Qt::AlignRight)

References alignmentBox.

Referenced by ApplicationWindow::showRightAxisTitleDialog(), ApplicationWindow::showTitleDialog(), ApplicationWindow::showTopAxisTitleDialog(), ApplicationWindow::showXAxisTitleDialog(), and ApplicationWindow::showYAxisTitleDialog().

void TextDialog::setAngle ( int  angle)
slot

Set rotation angle (not yet implemented)

Referenced by ApplicationWindow::showTextDialog().

void TextDialog::setBackgroundColor ( QColor  c)
slot

Set the background color to 'c'.

References backgroundBtn, boxBackgroundTransparency, and ColorButton::setColor().

Referenced by ApplicationWindow::showTextDialog().

void TextDialog::setBackgroundType ( int  bkg)
slot

Set label background type.

Parameters:
bkglabel background type 0 -> plain, no border 1 -> with border 2 -> border + shadow

References backgroundBox.

Referenced by ApplicationWindow::showTextDialog().

void TextDialog::setDefaultValues ( )
privateslot
void TextDialog::setFont ( const QFont &  fnt)
slot
void TextDialog::setText ( const QString &  t)
slot
void TextDialog::setTextColor ( QColor  c)
slot
void TextDialog::updateTransparency ( int  alpha)
privateslot

References backgroundBtn.

Referenced by TextDialog().

void TextDialog::values ( const QString &  text,
int  angle,
int  bkg,
const QFont &  fnt,
const QColor &  textColor,
const QColor &  backgroundColor 
)
signal

Emit all current values.

Parameters:
textthe label text
anglethe rotation angle
bkgthe background type
fntthe text font
textColorthe text color
backgroundColorthe backgroundcolor

Referenced by apply().


Member Data Documentation

QComboBox* TextDialog::alignmentBox
protected

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

QComboBox* TextDialog::backgroundBox
protected
ColorButton * TextDialog::backgroundBtn
protected
QSpinBox* TextDialog::boxBackgroundTransparency
protected
QPushButton* TextDialog::buttonApply
protected

Referenced by TextDialog().

QPushButton* TextDialog::buttonCancel
protected

Referenced by TextDialog().

QPushButton* TextDialog::buttonDefault
protected

Referenced by TextDialog().

QPushButton* TextDialog::buttonFont
protected

Referenced by TextDialog().

QPushButton* TextDialog::buttonOk
protected

Referenced by TextDialog().

ColorButton* TextDialog::colorBtn
protected
TextFormatButtons* TextDialog::formatButtons
protected

Referenced by TextDialog().

QGroupBox* TextDialog::groupBox1
protected

Referenced by TextDialog().

QGroupBox * TextDialog::groupBox2
protected
QComboBox* TextDialog::rotateBox
protected
QFont TextDialog::selectedFont
protected

current font

Referenced by apply(), customFont(), setDefaultValues(), and setFont().

QTextEdit* TextDialog::textEditBox
protected

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

TextType TextDialog::textType
protected

Referenced by apply(), and TextDialog().


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