BibleTime
btedittextpage.h
Go to the documentation of this file.
1 /*********
2 *
3 * In the name of the Father, and of the Son, and of the Holy Spirit.
4 *
5 * This file is part of BibleTime's source code, https://bibletime.info/
6 *
7 * Copyright 1999-2021 by the BibleTime developers.
8 * The BibleTime source code is licensed under the GNU General Public License
9 * version 2.0.
10 *
11 **********/
12 
13 #pragma once
14 
15 #include <QWizardPage>
16 
17 #include <QColor>
18 #include <QFont>
19 #include <QObject>
20 #include <QString>
21 
22 
23 class BtColorWidget;
24 class BtEditTextWizard;
25 class BtFontSizeWidget;
26 class QAction;
27 class QFontComboBox;
28 class QTextEdit;
29 class QToolBar;
30 
31 class BtEditTextPage final: public QWizardPage {
32 
33  Q_OBJECT
34 
35 public: // methods:
36 
38 
39  void setFont(const QFont& font);
40  void setText(const QString& text);
41  void setTitle(const QString& text);
42  QString text() const;
43 
44  void cleanupPage() final override;
45  void initializePage() final override;
46  bool validatePage() final override;
47 
48 Q_SIGNALS:
49 
50  void signalFontChanged(const QFont &);
51  void signalFontColorChanged(const QColor &);
53 
54 private:
55  void alignmentChanged(int);
56  void initActions();
57  QFont initHtmlFont();
58  void retranslateUi();
59  void setupToolBar();
60 
61 
66  QFontComboBox * m_fontFamilyComboBox;
70 
72  QString m_text;
73 
74  struct {
78 
82  }
84 };
BtEditTextPage(BtEditTextWizard &parent)
BtEditTextWizard & m_wizard
QAction * alignLeft
QAction * alignCenter
QTextEdit * m_plainTextEdit
void cleanupPage() final override
bool validatePage() final override
BtFontSizeWidget * m_fontSizeWidget
BtColorWidget * m_fontColorChooser
void setText(const QString &text)
void alignmentChanged(int)
QFontComboBox * m_fontFamilyComboBox
QAction * italic
void signalFontColorChanged(const QColor &)
void signalFontChanged(const QFont &)
QToolBar * m_toolBar
struct BtEditTextPage::@8 m_actions
void initializePage() final override
QAction * bold
bool m_handingFormatChangeFromEditor
void setFont(const QFont &font)
QAction * underline
QTextEdit * m_htmlTextEdit
void signalFontSizeChanged(int)
void setTitle(const QString &text)
QAction * alignRight
QString text() const
The Edit Text wizard for editing the personal commentary.