21 #ifndef TEXTEDITDIALOG_H
22 #define TEXTEDITDIALOG_H
25 #include <QPlainTextEdit>
26 #include <QFontComboBox>
62 TextEditDialog(QWidget* parent =
nullptr,
const QString& s =
nullptr,
bool rich_text =
true);
81 virtual void accept()
override;
179 #endif // TEXTEDITDIALOG_H
QString result_str
Internal storage of text entered, saved when the user clicks OK.
Definition: texteditdialog.h:121
void UpdateUIFromTextCursor()
Slot for when the text edit widget's cursor moves so the rich text toolbar can stay up to date...
Definition: texteditdialog.cpp:189
QFontComboBox * font_list
ComboBox for the list of font families that the selected text can be set to.
Definition: texteditdialog.h:141
QPushButton * right_align_button
Button for setting the current text row(s) to right alignment.
Definition: texteditdialog.h:171
virtual void accept() override
Override of accept() to store the entered text string so it can be retrieved by get_string().
Definition: texteditdialog.cpp:173
The LabelSlider class.
Definition: labelslider.h:33
QPushButton * italic_button
Toggle button for setting the italic state of the currently selected text.
Definition: texteditdialog.h:131
QPushButton * center_align_button
Button for setting the current text row(s) to center alignment.
Definition: texteditdialog.h:166
bool rich_text_
Internal rich text mode value.
Definition: texteditdialog.h:116
QPushButton * underline_button
Toggle button for setting the underlined state of the currently selected text.
Definition: texteditdialog.h:136
TextEditDialog(QWidget *parent=nullptr, const QString &s=nullptr, bool rich_text=true)
TextEditDialog Constructor.
Definition: texteditdialog.cpp:31
QComboBox * font_weight
ComboBox for the list of font weights that the selected text can be set to.
Definition: texteditdialog.h:146
QTextEdit * textEdit
Main text editing widget.
Definition: texteditdialog.h:126
LabelSlider * font_size
A slider to set the current font size.
Definition: texteditdialog.h:151
The TextEditDialog class.
Definition: texteditdialog.h:40
void SetAlignmentFromProperty()
Slot for text alignment buttons to set alignment based on their properties.
Definition: texteditdialog.cpp:183
const QString & get_string()
Retrieve the current text in the dialog.
Definition: texteditdialog.cpp:169
QPushButton * left_align_button
Button for setting the current text row(s) to left alignment.
Definition: texteditdialog.h:161
QPushButton * justify_align_button
Button for setting the current text row(s) to justified alignment.
Definition: texteditdialog.h:176
ColorButton * font_color
A color selector for setting the current text color.
Definition: texteditdialog.h:156
void SetFontWeight(int i)
Slot for the font_weight combobox to set the font weight based on its data value. ...
Definition: texteditdialog.cpp:178