QElectroTech  0.8-dev
richtexteditor_p.h
Go to the documentation of this file.
1 /****************************************************************************
2 **
3 ** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
4 ** All rights reserved.
5 ** Contact: Nokia Corporation (qt-info@nokia.com)
6 **
7 ** This file is part of the Qt Designer of the Qt Toolkit.
8 **
9 ** $QT_BEGIN_LICENSE:LGPL$
10 ** No Commercial Usage
11 ** This file contains pre-release code and may not be distributed.
12 ** You may use this file in accordance with the terms and conditions
13 ** contained in the Technology Preview License Agreement accompanying
14 ** this package.
15 **
16 ** GNU Lesser General Public License Usage
17 ** Alternatively, this file may be used under the terms of the GNU Lesser
18 ** General Public License version 2.1 as published by the Free Software
19 ** Foundation and appearing in the file LICENSE.LGPL included in the
20 ** packaging of this file. Please review the following information to
21 ** ensure the GNU Lesser General Public License version 2.1 requirements
22 ** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
23 **
24 ** In addition, as a special exception, Nokia gives you certain additional
25 ** rights. These rights are described in the Nokia Qt LGPL Exception
26 ** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
27 **
28 ** If you have questions regarding the use of this file, please contact
29 ** Nokia at qt-info@nokia.com.
30 **
31 **
32 **
33 **
34 **
35 **
36 **
37 **
38 ** $QT_END_LICENSE$
39 **
40 ****************************************************************************/
41 
42 //
43 // W A R N I N G
44 // -------------
45 //
46 // This file is not part of the Qt API. It exists for the convenience
47 // of Qt Designer. This header
48 // file may change from version to version without notice, or even be removed.
49 //
50 // We mean it.
51 //
52 
53 #ifndef RICHTEXTEDITOR_H
54 #define RICHTEXTEDITOR_H
55 
56 #include <QDialog>
57 #include <QTextEdit>
58 
59 QT_BEGIN_NAMESPACE
60 
61 class QTabWidget;
62 class QToolBar;
63 
64 class QDesignerFormEditorInterface;
65 
66 namespace qdesigner_internal {
67 
68 class RichTextEditor;
69 
70 class RichTextEditorDialog : public QDialog
71 {
72  Q_OBJECT
73  public:
74  explicit RichTextEditorDialog(QWidget *parent = nullptr);
75  ~RichTextEditorDialog() override;
76 
77  int showDialog();
78  void setDefaultFont(const QFont &font);
79  void setText(const QString &text);
80  QString text(Qt::TextFormat format = Qt::AutoText) const;
81 
82  signals:
83  void applyEditText(const QString &);
84 
85  private slots:
86  void tabIndexChanged(int newIndex);
87  void richTextChanged();
88  void sourceChanged();
89  void on_buttonBox_accepted();
90 
91  private:
95  QTextEdit *m_text_edit;
96  QTabWidget *m_tab_widget;
98 };
99 
100 } // namespace qdesigner_internal
101 
102 QT_END_NAMESPACE
103 
104 #endif // RITCHTEXTEDITOR_H
qdesigner_internal::RichTextEditorToolBar::m_valign_sup_action
QAction * m_valign_sup_action
Definition: richtexteditor.cpp:440
qdesigner_internal::RichTextEditorToolBar::m_underline_action
QAction * m_underline_action
Definition: richtexteditor.cpp:439
qdesigner_internal::RichTextEditorDialog::richTextChanged
void richTextChanged()
Definition: richtexteditor.cpp:926
qdesigner_internal::RichTextEditor::setFontBold
void setFontBold(bool b)
Definition: richtexteditor.cpp:723
qdesigner_internal::RichTextEditor::setDefaultFont
void setDefaultFont(QFont font)
Definition: richtexteditor.cpp:752
qdesigner_internal::RichTextEditor::simplifyRichText
bool simplifyRichText() const
Definition: richtexteditor.cpp:226
qdesigner_internal::RichTextEditorDialog
Definition: richtexteditor_p.h:71
qdesigner_internal::ColorAction::setColor
void setColor(const QColor &color)
Definition: richtexteditor.cpp:393
qdesigner_internal::RichTextEditor::setSimplifyRichText
void setSimplifyRichText(bool v)
Definition: richtexteditor.cpp:744
qdesigner_internal::RichTextEditorDialog::sourceChanged
void sourceChanged()
Definition: richtexteditor.cpp:931
qdesigner_internal::RichTextEditorDialog::RichTextEditorDialog
RichTextEditorDialog(QWidget *parent=nullptr)
Definition: richtexteditor.cpp:797
qdesigner_internal::RichTextEditorToolBar::colorChanged
void colorChanged(const QColor &color)
Definition: richtexteditor.cpp:612
qdesigner_internal::RichTextEditorDialog::State
State
Definition: richtexteditor_p.h:93
qdesigner_internal::RichTextEditorDialog::setDefaultFont
void setDefaultFont(const QFont &font)
Definition: richtexteditor.cpp:870
qdesigner_internal::RichTextEditorToolBar
Definition: richtexteditor.cpp:417
qdesigner_internal::RichTextEditorToolBar::m_bold_action
QAction * m_bold_action
Definition: richtexteditor.cpp:437
qdesigner_internal::RichTextEditorToolBar::setVAlignSub
void setVAlignSub(bool sub)
Definition: richtexteditor.cpp:641
qdesigner_internal::RichTextEditor::setText
void setText(const QString &text)
Definition: richtexteditor.cpp:736
qdesigner_internal::RichTextEditor::createToolBar
QToolBar * createToolBar(QWidget *parent=nullptr)
Definition: richtexteditor.cpp:718
qdesigner_internal::RichTextEditorToolBar::m_italic_action
QAction * m_italic_action
Definition: richtexteditor.cpp:438
QET::Icons::sub
QIcon sub
Definition: qeticons.cpp:216
richtexteditor_p.h
qdesigner_internal::RichTextEditor::text
QString text(Qt::TextFormat format) const
Definition: richtexteditor.cpp:770
qdesigner_internal::RichTextEditorToolBar::m_simplify_richtext_action
QAction * m_simplify_richtext_action
Definition: richtexteditor.cpp:448
qdesigner_internal::RichTextEditorDialog::~RichTextEditorDialog
~RichTextEditorDialog() override
Definition: richtexteditor.cpp:848
qdesigner_internal::RichTextEditorDialog::TabIndex
TabIndex
Definition: richtexteditor_p.h:92
qdesigner_internal::HtmlTextEdit::contextMenuEvent
void contextMenuEvent(QContextMenuEvent *event) override
Definition: richtexteditor.cpp:327
qdesigner_internal::RichTextEditorDialog::RichTextChanged
@ RichTextChanged
Definition: richtexteditor_p.h:93
qdesigner_internal
Definition: richtexteditor.cpp:87
qdesigner_internal::RichTextEditorToolBar::insertLink
void insertLink()
Definition: richtexteditor.cpp:653
qdesigner_internal::ColorAction::color
const QColor & color() const
Definition: richtexteditor.cpp:372
QET::Icons::super
QIcon super
Definition: qeticons.cpp:215
qdesigner_internal::ColorAction
Definition: richtexteditor.cpp:366
qdesigner_internal::RichTextEditorToolBar::m_align_right_action
QAction * m_align_right_action
Definition: richtexteditor.cpp:444
qdesigner_internal::RichTextEditorDialog::m_tab_widget
QTabWidget * m_tab_widget
Definition: richtexteditor_p.h:96
qdesigner_internal::simplifyRichTextFilter
QString simplifyRichTextFilter(const QString &in, bool *isPlainTextPtr=nullptr)
Definition: richtexteditor.cpp:176
qdesigner_internal::RichTextEditorDialog::text
QString text(Qt::TextFormat format=Qt::AutoText) const
Definition: richtexteditor.cpp:885
qdesigner_internal::RichTextEditorDialog::SourceIndex
@ SourceIndex
Definition: richtexteditor_p.h:92
qdesigner_internal::RichTextEditorToolBar::updateActions
void updateActions()
Definition: richtexteditor.cpp:669
qdesigner_internal::RichTextEditor::stateChanged
void stateChanged()
qdesigner_internal::RichTextEditorDialog::RichTextIndex
@ RichTextIndex
Definition: richtexteditor_p.h:92
qdesigner_internal::RichTextEditorDialog::m_text_edit
QTextEdit * m_text_edit
Definition: richtexteditor_p.h:95
qdesigner_internal::RichTextEditor
Definition: richtexteditor.cpp:219
qdesigner_internal::RichTextEditorToolBar::insertImage
void insertImage()
Definition: richtexteditor.cpp:660
qdesigner_internal::HtmlTextEdit::actionTriggered
void actionTriggered(QAction *action)
Definition: richtexteditor.cpp:360
qdesigner_internal::RichTextEditorDialog::applyEditText
void applyEditText(const QString &)
qdesigner_internal::RichTextEditorToolBar::m_align_center_action
QAction * m_align_center_action
Definition: richtexteditor.cpp:443
qdesigner_internal::RichTextEditorDialog::SourceChanged
@ SourceChanged
Definition: richtexteditor_p.h:93
qdesigner_internal::HtmlTextEdit
Definition: richtexteditor.cpp:313
qdesigner_internal::RichTextEditorDialog::m_state
State m_state
Definition: richtexteditor_p.h:97
QET::Icons::it
QIcon it
Definition: qeticons.cpp:196
qdesigner_internal::HtmlTextEdit::HtmlTextEdit
HtmlTextEdit(QWidget *parent=nullptr)
Definition: richtexteditor.cpp:317
Ui
Definition: autonumberingdockwidget.h:25
qdesigner_internal::RichTextEditorToolBar::m_color_action
ColorAction * m_color_action
Definition: richtexteditor.cpp:449
qdesigner_internal::RichTextEditorToolBar::m_font_size_input
QComboBox * m_font_size_input
Definition: richtexteditor.cpp:450
qdesigner_internal::RichTextEditorToolBar::m_link_action
QAction * m_link_action
Definition: richtexteditor.cpp:446
qdesigner_internal::RichTextEditorToolBar::RichTextEditorToolBar
RichTextEditorToolBar(RichTextEditor *editor, QWidget *parent=nullptr)
Definition: richtexteditor.cpp:469
qdesigner_internal::RichTextEditorToolBar::m_align_justify_action
QAction * m_align_justify_action
Definition: richtexteditor.cpp:445
qdesigner_internal::RichTextEditorToolBar::setVAlignSuper
void setVAlignSuper(bool super)
Definition: richtexteditor.cpp:629
qdesigner_internal::ColorAction::m_color
QColor m_color
Definition: richtexteditor.cpp:382
qdesigner_internal::RichTextEditor::setFontPointSize
void setFontPointSize(double)
Definition: richtexteditor.cpp:731
qdesigner_internal::RichTextEditorDialog::tabIndexChanged
void tabIndexChanged(int newIndex)
Definition: richtexteditor.cpp:898
qdesigner_internal::RichTextEditorDialog::m_editor
RichTextEditor * m_editor
Definition: richtexteditor_p.h:94
qdesigner_internal::ColorAction::ColorAction
ColorAction(QObject *parent)
Definition: richtexteditor.cpp:385
QET::Horizontal
@ Horizontal
Horizontal segment.
Definition: qet.h:89
qdesigner_internal::RichTextEditorToolBar::sizeInputActivated
void sizeInputActivated(const QString &size)
Definition: richtexteditor.cpp:618
ui_addlinkdialog.h
qdesigner_internal::RichTextEditorToolBar::m_image_action
QAction * m_image_action
Definition: richtexteditor.cpp:447
qdesigner_internal::RichTextEditorToolBar::alignmentActionTriggered
void alignmentActionTriggered(QAction *action)
Definition: richtexteditor.cpp:593
qdesigner_internal::ColorAction::colorChanged
void colorChanged(const QColor &color)
qdesigner_internal::RichTextEditorToolBar::m_align_left_action
QAction * m_align_left_action
Definition: richtexteditor.cpp:442
qdesigner_internal::RichTextEditorDialog::on_buttonBox_accepted
void on_buttonBox_accepted()
RichTextEditorDialog::on_buttonBox_accepted.
Definition: richtexteditor.cpp:855
qdesigner_internal::RichTextEditor::m_simplifyRichText
bool m_simplifyRichText
Definition: richtexteditor.cpp:240
qdesigner_internal::RichTextEditorToolBar::m_valign_sub_action
QAction * m_valign_sub_action
Definition: richtexteditor.cpp:441
qdesigner_internal::RichTextEditorToolBar::m_editor
QPointer< RichTextEditor > m_editor
Definition: richtexteditor.cpp:452
QET::Icons::tr
QIcon tr
Definition: qeticons.cpp:206
qdesigner_internal::RichTextEditorDialog::Clean
@ Clean
Definition: richtexteditor_p.h:93
qdesigner_internal::RichTextEditor::RichTextEditor
RichTextEditor(QWidget *parent=nullptr)
Definition: richtexteditor.cpp:709
QET::Icons::Cancel
QIcon Cancel
Definition: qeticons.cpp:34
qdesigner_internal::RichTextEditorDialog::showDialog
int showDialog()
Definition: richtexteditor.cpp:861
QET::Icons::South
QIcon South
Definition: qeticons.cpp:161
qdesigner_internal::RichTextEditor::simplifyRichTextChanged
void simplifyRichTextChanged(bool)
qdesigner_internal::RichTextEditorDialog::setText
void setText(const QString &text)
Definition: richtexteditor.cpp:875
qdesigner_internal::ColorAction::chooseColor
void chooseColor()
Definition: richtexteditor.cpp:407