DAWorkbench 0.0.1
DAWorkbench API
载入中...
搜索中...
未找到
DAFontEditPannelWidget.h
1#ifndef DAFONTEDITPANNELWIDGET_H
2#define DAFONTEDITPANNELWIDGET_H
3#include "DACommonWidgetsAPI.h"
4#include <QWidget>
5class SAColorMenu;
6namespace Ui
7{
8class DAFontEditPannelWidget;
9}
10namespace DA
11{
12class DACOMMONWIDGETS_API DAFontEditPannelWidget : public QWidget
13{
14 Q_OBJECT
15
16public:
17 explicit DAFontEditPannelWidget(QWidget* parent = nullptr);
19 //字体颜色
20 QColor getCurrentFontColor() const;
21 void setCurrentFontColor(const QColor& c);
22 //设置当前的字体
23 void setCurrentFont(const QFont& f);
24 QFont getCurrentFont();
25 //字体大小
26 void setFontWeight(int w);
27 int getFontWeight() const;
28private slots:
29 void onFontComboBoxCurrentFontChanged(const QFont& f);
30 void onComboBoxFontSizeTextChanged(const QString& t);
31 void onFontSizeAdd();
32 void onFontSizeSub();
33 //发射字体改变的信号
34 void signalEmitFontChanged();
35signals:
40 void currentFontChanged(const QFont& f);
45 void currentFontColorChanged(const QColor& c);
46
47private:
48 Ui::DAFontEditPannelWidget* ui;
49 int mFontPointSize;
50 SAColorMenu* mColorMenu;
51};
52}
53#endif // DAFONTEDITPANNELWIDGET_H
Definition DAFontEditPannelWidget.h:13
void currentFontChanged(const QFont &f)
当前字体改变发射的信号
void currentFontColorChanged(const QColor &c)
当前字体颜色改变发射的信号
序列化类都是带异常的,使用中需要处理异常
Definition AppMainWindow.cpp:44