2
0
mirror of https://github.com/kotatogram/kotatogram-desktop synced 2025-08-31 06:35:14 +00:00

Profile members block displayed when mouse is over group members count.

This commit is contained in:
John Preston
2016-06-17 21:18:01 +03:00
parent 963000386f
commit f0a8356ff0
20 changed files with 532 additions and 68 deletions

View File

@@ -127,9 +127,9 @@ return qobject_cast<TWidget*>(parentWidget()); \
const TWidget *tparent() const { \
return qobject_cast<const TWidget*>(parentWidget()); \
} \
virtual void leaveToChildEvent(QEvent *e) { /* e -- from enterEvent() of child TWidget */ \
virtual void leaveToChildEvent(QEvent *e, QWidget *child) { /* e -- from enterEvent() of child TWidget */ \
} \
virtual void enterFromChildEvent(QEvent *e) { /* e -- from leaveEvent() of child TWidget */ \
virtual void enterFromChildEvent(QEvent *e, QWidget *child) { /* e -- from leaveEvent() of child TWidget */ \
} \
void moveToLeft(int x, int y, int outerw = 0) { \
move(rtl() ? ((outerw > 0 ? outerw : parentWidget()->width()) - x - width()) : x, y); \
@@ -158,12 +158,12 @@ void rtlupdate(int x, int y, int w, int h) { \
protected: \
void enterEvent(QEvent *e) override { \
TWidget *p(tparent()); \
if (p) p->leaveToChildEvent(e); \
if (p) p->leaveToChildEvent(e, this); \
return enterEventHook(e); \
} \
void leaveEvent(QEvent *e) override { \
TWidget *p(tparent()); \
if (p) p->enterFromChildEvent(e); \
if (p) p->enterFromChildEvent(e, this); \
return leaveEventHook(e); \
}
@@ -199,6 +199,9 @@ public:
}
}
virtual ~TWidget() {
}
protected:
void enterEventHook(QEvent *e) {
return QWidget::enterEvent(e);