first commit
This commit is contained in:
@@ -0,0 +1,76 @@
|
||||
#ifndef FONTSETWIDGET_H
|
||||
#define FONTSETWIDGET_H
|
||||
|
||||
#include <QWidget>
|
||||
#include <QTextEdit>
|
||||
#include "ParaSettingUI.h"
|
||||
|
||||
#include <QLabel>
|
||||
#include <QPushButton>
|
||||
#include <QComboBox>
|
||||
#include <QLineEdit>
|
||||
#include <QCheckBox>
|
||||
|
||||
namespace Ui {
|
||||
class FontSetWidget;
|
||||
}
|
||||
|
||||
class FontSetWidget : public QWidget,public ParaSettingUI
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
explicit FontSetWidget(QWidget *parent = 0);
|
||||
~FontSetWidget();
|
||||
|
||||
void bindTxTEdit(QTextEdit* textEdit);
|
||||
|
||||
int getValueFont();
|
||||
void setValueFont(int value);
|
||||
QFont font;
|
||||
QString getFontFamily();
|
||||
QFont getFont();
|
||||
|
||||
void mergeFormatOnWordOrSelection(const QTextCharFormat &format);
|
||||
void setFontFormat(int fontsize,QString fontfamily);
|
||||
|
||||
void on_buttonSelectFont_pressed();
|
||||
void onDialogLineSpaceAccepted();
|
||||
|
||||
void bindSysPara(SysPara *sysPara);
|
||||
|
||||
void getValueLineSpace(int *lineSpace,int *charSpace);
|
||||
void setValueLineSpace(int lineSpace,int charSpace);
|
||||
|
||||
public slots:
|
||||
void updateFontSelect(int);
|
||||
|
||||
private:
|
||||
Ui::FontSetWidget *ui;
|
||||
void init();
|
||||
void applyStyleSheet(); // 应用样式表
|
||||
void adjustValue(QLineEdit* edit, int delta);
|
||||
QTextEdit* m_textEdit;
|
||||
|
||||
QLineEdit* lineSpaceEdit;
|
||||
QPushButton* lineSpaceMinusBtn;
|
||||
QPushButton* lineSpacePlusBtn;
|
||||
QLineEdit* charSpaceEdit;
|
||||
QPushButton* charSpaceMinusBtn;
|
||||
QPushButton* charSpacePlusBtn;
|
||||
QComboBox* fontCBox;
|
||||
|
||||
QMap<int, int> comboxIndexMap;
|
||||
int fontSize = 12;
|
||||
|
||||
|
||||
bool flagOfLeft;
|
||||
bool flagOfRight;
|
||||
|
||||
signals:
|
||||
void sendButtonClickedSignal(int index);
|
||||
private slots:
|
||||
void on_comboBoxFont_currentIndexChanged(int index);
|
||||
};
|
||||
|
||||
#endif // FONTSETWIDGET_H
|
||||
Reference in New Issue
Block a user