initial upload
This commit is contained in:
34
include/richtexteditor.h
Normal file
34
include/richtexteditor.h
Normal file
@@ -0,0 +1,34 @@
|
||||
#ifndef RICHTEXTEDITOR_H
|
||||
#define RICHTEXTEDITOR_H
|
||||
|
||||
#include <QTextEdit>
|
||||
#include <QToolBar>
|
||||
|
||||
class RichTextEditor : public QTextEdit
|
||||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
explicit RichTextEditor(QWidget *parent = nullptr);
|
||||
void setDefaultFont(QFont font);
|
||||
|
||||
QToolBar *createToolBar(QWidget *parent = nullptr);
|
||||
|
||||
QString text(Qt::TextFormat format) const;
|
||||
|
||||
bool simplifyRichText() const { return m_simplifyRichText; }
|
||||
|
||||
public Q_SLOTS:
|
||||
void setFontBold(bool b);
|
||||
void setFontPointSize(double);
|
||||
void setText(const QString &text);
|
||||
void setSimplifyRichText(bool v);
|
||||
|
||||
Q_SIGNALS:
|
||||
void stateChanged();
|
||||
void simplifyRichTextChanged(bool);
|
||||
|
||||
private:
|
||||
bool m_simplifyRichText;
|
||||
};
|
||||
|
||||
#endif // RICHTEXTEDITOR_H
|
||||
Reference in New Issue
Block a user