增加通讯协议
This commit is contained in:
@@ -19,6 +19,7 @@ public:
|
||||
void setText(const QString& t);
|
||||
void setTextPixelSize(int px) { m_textPx = px; updateGeometry(); update(); } // 文字字号
|
||||
void setRadius(int r) { m_radius = r; updateGeometry(); update(); } // 圆形指示点半径
|
||||
void setDotAfterText(bool after) { m_dotAfter = after; updateGeometry(); update(); } // 圆点画在文字后面
|
||||
State state() const { return m_state; }
|
||||
|
||||
QSize sizeHint() const override; // 宽度按文字实际宽度计算,避免文字被裁
|
||||
@@ -35,6 +36,7 @@ private:
|
||||
bool m_on = true;
|
||||
int m_radius = 16; // 圆形指示点 32×32
|
||||
int m_textPx = 24; // 文字字号
|
||||
bool m_dotAfter = false; // false=圆点在文字前,true=圆点在文字后
|
||||
};
|
||||
|
||||
#endif // LEDINDICATOR_H
|
||||
|
||||
Reference in New Issue
Block a user