#include <TextFormatButtons.h>
Public Member Functions | |
TextFormatButtons (QTextEdit *textEdit, QWidget *parent=0) | |
Constructor. | |
void | toggleCurveButton (bool enable) |
Show/Hide the "add curve" button. | |
Private Slots | |
void | addBold () |
Format seleted text to bold. | |
void | addCurve () |
Insert curve marker into the text. | |
void | addItalics () |
Format seleted text to italics. | |
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. | |
Private Attributes | |
QPushButton * | buttonArrowSymbols |
QPushButton * | buttonBold |
QPushButton * | buttonCurve |
QPushButton * | buttonItalics |
QPushButton * | buttonLowerGreek |
QPushButton * | buttonMathSymbols |
QPushButton * | buttonSubscript |
QPushButton * | buttonSuperscript |
QPushButton * | buttonUnderline |
QPushButton * | buttonUpperGreek |
QTextEdit * | connectedTextEdit |
TextFormatButtons::TextFormatButtons | ( | QTextEdit * | textEdit, | |
QWidget * | parent = 0 | |||
) |
Constructor.
textEdit | the QTextEdit that the buttons shall affect | |
parent | parent widget |
void TextFormatButtons::addBold | ( | ) | [private, slot] |
Format seleted text to bold.
void TextFormatButtons::addCurve | ( | ) | [private, slot] |
Insert curve marker into the text.
void TextFormatButtons::addItalics | ( | ) | [private, slot] |
Format seleted text to italics.
void TextFormatButtons::addSubscript | ( | ) | [private, slot] |
Format seleted text to subscript.
void TextFormatButtons::addSuperscript | ( | ) | [private, slot] |
Format seleted text to superscript.
void TextFormatButtons::addSymbol | ( | const QString & | letter | ) | [private, slot] |
Insert 'letter' into the text.
void TextFormatButtons::addUnderline | ( | ) | [private, slot] |
Format seleted text to underlined.
void TextFormatButtons::formatText | ( | const QString & | prefix, | |
const QString & | postfix | |||
) | [private] |
Internal function: format selected text with prefix and postfix.
void TextFormatButtons::showArrowSymbols | ( | ) | [private, slot] |
Let the user insert arrow symbols.
void TextFormatButtons::showLowerGreek | ( | ) | [private, slot] |
Let the user insert lower case greek letters.
void TextFormatButtons::showMathSymbols | ( | ) | [private, slot] |
Let the user insert mathematical symbols.
void TextFormatButtons::showUpperGreek | ( | ) | [private, slot] |
Let the user insert capital greek letters.
void TextFormatButtons::toggleCurveButton | ( | bool | enable | ) |
Show/Hide the "add curve" button.
QPushButton* TextFormatButtons::buttonArrowSymbols [private] |
QPushButton* TextFormatButtons::buttonBold [private] |
QPushButton* TextFormatButtons::buttonCurve [private] |
QPushButton* TextFormatButtons::buttonItalics [private] |
QPushButton* TextFormatButtons::buttonLowerGreek [private] |
QPushButton* TextFormatButtons::buttonMathSymbols [private] |
QPushButton* TextFormatButtons::buttonSubscript [private] |
QPushButton* TextFormatButtons::buttonSuperscript [private] |
QPushButton* TextFormatButtons::buttonUnderline [private] |
QPushButton* TextFormatButtons::buttonUpperGreek [private] |
QTextEdit* TextFormatButtons::connectedTextEdit [private] |