Olive
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros
texteditex.h
Go to the documentation of this file.
1 /***
2 
3  Olive - Non-Linear Video Editor
4  Copyright (C) 2019 Olive Team
5 
6  This program is free software: you can redistribute it and/or modify
7  it under the terms of the GNU General Public License as published by
8  the Free Software Foundation, either version 3 of the License, or
9  (at your option) any later version.
10 
11  This program is distributed in the hope that it will be useful,
12  but WITHOUT ANY WARRANTY; without even the implied warranty of
13  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14  GNU General Public License for more details.
15 
16  You should have received a copy of the GNU General Public License
17  along with this program. If not, see <http://www.gnu.org/licenses/>.
18 
19 ***/
20 
21 #ifndef TEXTEDITEX_H
22 #define TEXTEDITEX_H
23 
24 #include <QTextEdit>
25 #include <QPushButton>
26 
27 class TextEditEx : public QWidget {
28  Q_OBJECT
29 public:
30  TextEditEx(QWidget* parent = nullptr, bool enable_rich_text = true);
31 
32  void setUndoRedoEnabled(bool e);
33  QTextDocument* document();
34  QTextCursor textCursor();
35  void setTextCursor(const QTextCursor &cursor);
36  void setTextHeight(int h);
37 public slots:
38  void setHtml(const QString &text);
39  void setPlainText(const QString &text);
40 signals:
41  void textModified(const QString& s);
42 private slots:
43  void text_edit_menu();
44  void open_text_edit();
45  void queue_text_modified();
46 private:
47  QTextEdit* text_editor_;
48 
50 };
51 
52 #endif // TEXTEDITEX_H
QTextCursor textCursor()
Definition: texteditex.cpp:63
QTextEdit * text_editor_
Definition: texteditex.h:47
void open_text_edit()
Definition: texteditex.cpp:96
void setTextHeight(int h)
Definition: texteditex.cpp:73
void setUndoRedoEnabled(bool e)
Definition: texteditex.cpp:53
void queue_text_modified()
Definition: texteditex.cpp:111
void textModified(const QString &s)
TextEditEx(QWidget *parent=nullptr, bool enable_rich_text=true)
Definition: texteditex.cpp:30
bool enable_rich_text_
Definition: texteditex.h:49
void text_edit_menu()
Definition: texteditex.cpp:88
void setHtml(const QString &text)
Definition: texteditex.cpp:78
Definition: texteditex.h:27
void setPlainText(const QString &text)
Definition: texteditex.cpp:83
void setTextCursor(const QTextCursor &cursor)
Definition: texteditex.cpp:68
QTextDocument * document()
Definition: texteditex.cpp:58