77 lines
2.0 KiB
C++
77 lines
2.0 KiB
C++
#ifndef ETEXTATTR_H
|
|
#define ETEXTATTR_H
|
|
|
|
#include <QDebug>
|
|
#include <QColorDialog>
|
|
#include <QPushButton>
|
|
#include <QTextOption>
|
|
#include "eattr.h"
|
|
#include "etext.h"
|
|
#include "erichedit.h"
|
|
#include "etextflipattr.h"
|
|
#include "etextscrollattr.h"
|
|
#include "etextstaticattr.h"
|
|
#include "QStackedWidget"
|
|
namespace Ui {
|
|
class eTextAttr;
|
|
}
|
|
|
|
class eTextAttr : public eAttr
|
|
{
|
|
Q_OBJECT
|
|
public:
|
|
explicit eTextAttr(const eText::Data &data, QWidget *parent = nullptr);
|
|
~eTextAttr();
|
|
eTextFlipAttr *m_pTextFlipAttr ;
|
|
eTextScrollAttr *m_pTextScrollAttr ;
|
|
eTextStaticAttr *m_pTextStaticAttr;
|
|
QStackedWidget *m_pStackedW;
|
|
private:
|
|
void init(const eText::Data &data);
|
|
void mergeFormatOnWordOrSelection(const QTextCharFormat &format);
|
|
|
|
signals: // Widget
|
|
void sFontFamilyChanged(const QString&);
|
|
void sFontSizeChanged(int);
|
|
void sFontBoldChanged(bool);
|
|
void sFontItalicsChanged(bool);
|
|
void sFontUnderlineChanged(bool);
|
|
void sTextHAlignChanged(int);
|
|
void sTextVAlignChanged(int);
|
|
void sTextColorChanged(const QColor&);
|
|
void sTextShadowColorChanged(const QColor&);
|
|
void sBackgroundColorChanged(const QColor&);
|
|
void sTextLetterSpacingChanged(int);
|
|
void sTextLineSpacingChanged(int);
|
|
void sPageIndexPreview(int);
|
|
void signalPlayStyle();
|
|
void sigRefreshPaint();
|
|
void sPageCountChanged(int);
|
|
signals:
|
|
void sTextChanged(const QString &);
|
|
void sTextRickChanged(const QString &);
|
|
|
|
|
|
signals: //Play
|
|
void sPlayStyleChanged(int);
|
|
protected slots:
|
|
void onFontFamilySetting(const QFont &font);
|
|
void onTextChanged();
|
|
//富文本
|
|
void textUnderline(bool b);
|
|
void textBold(bool b);
|
|
void textItalic(bool b);
|
|
void textFamily(const QFont &);
|
|
void textSize(int iFontSize) ;
|
|
void textColor(const QColor & cr);
|
|
void TextShadowColor(const QColor & cr);
|
|
void BackgroundColor(const QColor & col);
|
|
void OnPageCountChanged(int icount);
|
|
void OnPageIndexPreview(int index);
|
|
private:
|
|
Ui::eTextAttr *ui;
|
|
|
|
};
|
|
|
|
#endif // ETEXTATTR_H
|