添加update信号
This commit is contained in:
parent
2ef64272f7
commit
9cee15a935
|
|
@ -204,3 +204,7 @@ bool PresentIndex::isValid() const
|
||||||
{
|
{
|
||||||
return row != INT_MAX && col != INT_MAX;
|
return row != INT_MAX && col != INT_MAX;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
UnitPresentDelegate::UnitPresentDelegate(QObject* parent /*= nullptr*/)
|
||||||
|
:QObject(parent) {
|
||||||
|
}
|
||||||
|
|
|
||||||
|
|
@ -42,9 +42,12 @@ struct PresentOption {
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 데禱삥齡官辜
|
/// 데禱삥齡官辜
|
||||||
/// </summary>
|
/// </summary>
|
||||||
class UnitPresentDelegate {
|
class UnitPresentDelegate : public QObject {
|
||||||
|
Q_OBJECT
|
||||||
public:
|
public:
|
||||||
|
UnitPresentDelegate(QObject* parent = nullptr);
|
||||||
virtual ~UnitPresentDelegate() = default;
|
virtual ~UnitPresentDelegate() = default;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 튈토데禱잚謹
|
/// 튈토데禱잚謹
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
|
@ -56,6 +59,12 @@ public:
|
||||||
/// <param name="p"></param>
|
/// <param name="p"></param>
|
||||||
/// <param name="option"></param>
|
/// <param name="option"></param>
|
||||||
virtual void paint(QPainter* p, const PresentOption& option) = 0;
|
virtual void paint(QPainter* p, const PresentOption& option) = 0;
|
||||||
|
|
||||||
|
signals:
|
||||||
|
/// <summary>
|
||||||
|
/// 更新通知/重绘请求
|
||||||
|
/// </summary>
|
||||||
|
void updateRequest();
|
||||||
};
|
};
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
|
|
@ -106,7 +115,7 @@ public:
|
||||||
signals:
|
signals:
|
||||||
void mouseIn();
|
void mouseIn();
|
||||||
void mouseOut();
|
void mouseOut();
|
||||||
void mouseHover(const PresentIndex &unit_index);
|
void mouseHover(const PresentIndex& unit_index);
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
void paintEvent(QPaintEvent* ev) override;
|
void paintEvent(QPaintEvent* ev) override;
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue