QtiPlot 0.9.7.3
|
Widget with text format buttons (connected to a QTextEdit) More...
#include <TextFormatButtons.h>
Public Types | |
enum | Buttons { Plot3D, AxisLabel, Legend, Equation, TexLegend } |
Public Member Functions | |
void | setButtons (Buttons btns) |
TextFormatButtons (QTextEdit *textEdit, Buttons buttons=Plot3D, QWidget *parent=0) | |
Constructor. | |
Private Slots | |
void | addBold () |
Format seleted text to bold. | |
void | addCurve () |
Insert curve marker into the text. | |
void | addFraction () |
Format seleted text to fraction. | |
void | addItalics () |
Format seleted text to italics. | |
void | addSquareRoot () |
Format seleted text to square root. | |
void | addSubscript () |
Format seleted text to subscript. | |
void | addSuperscript () |
Format seleted text to superscript. | |
void | addSymbol (const QString &letter) |
Insert 'letter' into the text. | |
void | addUnderline () |
Format seleted text to underlined. | |
void | showArrowSymbols () |
Let the user insert arrow symbols. | |
void | showLowerGreek () |
Let the user insert lower case greek letters. | |
void | showMathSymbols () |
Let the user insert mathematical symbols. | |
void | showUpperGreek () |
Let the user insert capital greek letters. | |
Private Member Functions | |
void | formatText (const QString &prefix, const QString &postfix) |
Internal function: format selected text with prefix and postfix. | |
void | init (Buttons btns) |
Private Attributes | |
QTextEdit * | connectedTextEdit |
Buttons | d_buttons |
Widget with text format buttons (connected to a QTextEdit)
TextFormatButtons::TextFormatButtons | ( | QTextEdit * | textEdit, |
Buttons | buttons = Plot3D , |
||
QWidget * | parent = 0 |
||
) |
Constructor.
textEdit | the QTextEdit that the buttons shall affect |
parent | parent widget |
References init().
void TextFormatButtons::addBold | ( | ) | [private, slot] |
void TextFormatButtons::addCurve | ( | ) | [private, slot] |
void TextFormatButtons::addFraction | ( | ) | [private, slot] |
Format seleted text to fraction.
References d_buttons, Equation, formatText(), and TexLegend.
Referenced by init().
void TextFormatButtons::addItalics | ( | ) | [private, slot] |
void TextFormatButtons::addSquareRoot | ( | ) | [private, slot] |
Format seleted text to square root.
References d_buttons, Equation, formatText(), and TexLegend.
Referenced by init().
void TextFormatButtons::addSubscript | ( | ) | [private, slot] |
void TextFormatButtons::addSuperscript | ( | ) | [private, slot] |
void TextFormatButtons::addSymbol | ( | const QString & | letter | ) | [private, slot] |
Insert 'letter' into the text.
References connectedTextEdit, d_buttons, Equation, and TexLegend.
Referenced by showArrowSymbols(), showLowerGreek(), showMathSymbols(), and showUpperGreek().
void TextFormatButtons::addUnderline | ( | ) | [private, slot] |
void TextFormatButtons::formatText | ( | const QString & | prefix, |
const QString & | postfix | ||
) | [private] |
Internal function: format selected text with prefix and postfix.
References connectedTextEdit.
Referenced by addBold(), addCurve(), addFraction(), addItalics(), addSquareRoot(), addSubscript(), addSuperscript(), and addUnderline().
void TextFormatButtons::init | ( | Buttons | btns | ) | [private] |
References addBold(), addCurve(), addFraction(), addItalics(), addSquareRoot(), addSubscript(), addSuperscript(), addUnderline(), Equation, Legend, Plot3D, showArrowSymbols(), showLowerGreek(), showMathSymbols(), showUpperGreek(), and TexLegend.
Referenced by setButtons(), and TextFormatButtons().
void TextFormatButtons::setButtons | ( | Buttons | btns | ) |
References d_buttons, and init().
Referenced by EnrichmentDialog::updateButtons().
void TextFormatButtons::showArrowSymbols | ( | ) | [private, slot] |
Let the user insert arrow symbols.
References addSymbol(), SymbolDialog::arrowSymbols, connectedTextEdit, d_buttons, Equation, SymbolDialog::latexArrowSymbols, and TexLegend.
Referenced by init().
void TextFormatButtons::showLowerGreek | ( | ) | [private, slot] |
Let the user insert lower case greek letters.
References addSymbol(), connectedTextEdit, and SymbolDialog::lowerGreek.
Referenced by init().
void TextFormatButtons::showMathSymbols | ( | ) | [private, slot] |
Let the user insert mathematical symbols.
References addSymbol(), connectedTextEdit, d_buttons, Equation, SymbolDialog::latexMathSymbols, SymbolDialog::mathSymbols, and TexLegend.
Referenced by init().
void TextFormatButtons::showUpperGreek | ( | ) | [private, slot] |
Let the user insert capital greek letters.
References addSymbol(), connectedTextEdit, and SymbolDialog::upperGreek.
Referenced by init().
QTextEdit* TextFormatButtons::connectedTextEdit [private] |
Referenced by addSymbol(), formatText(), showArrowSymbols(), showLowerGreek(), showMathSymbols(), and showUpperGreek().
Buttons TextFormatButtons::d_buttons [private] |
Referenced by addFraction(), addSquareRoot(), addSubscript(), addSuperscript(), addSymbol(), setButtons(), showArrowSymbols(), and showMathSymbols().