mirror of
https://github.com/qTox/qTox.git
synced 2024-03-22 14:00:36 +08:00
feat: Add middle mouse clicked signal for GenericChatroom
This commit is contained in:
parent
8b4240776c
commit
65fc1dc266
|
@ -186,11 +186,14 @@ void GenericChatroomWidget::activate()
|
|||
|
||||
void GenericChatroomWidget::mouseReleaseEvent(QMouseEvent* event)
|
||||
{
|
||||
if (event->button() == Qt::LeftButton)
|
||||
if (event->button() == Qt::LeftButton) {
|
||||
emit chatroomWidgetClicked(this);
|
||||
else
|
||||
} else if (event->button() == Qt::MiddleButton) {
|
||||
emit middleMouseClicked();
|
||||
} else {
|
||||
event->ignore();
|
||||
}
|
||||
}
|
||||
|
||||
void GenericChatroomWidget::enterEvent(QEvent*)
|
||||
{
|
||||
|
|
|
@ -69,11 +69,12 @@ public slots:
|
|||
signals:
|
||||
void chatroomWidgetClicked(GenericChatroomWidget* widget);
|
||||
void newWindowOpened(GenericChatroomWidget* widget);
|
||||
void middleMouseClicked();
|
||||
|
||||
protected:
|
||||
virtual void mouseReleaseEvent(QMouseEvent* event) override;
|
||||
virtual void enterEvent(QEvent* e) override;
|
||||
virtual void leaveEvent(QEvent* e) override;
|
||||
void mouseReleaseEvent(QMouseEvent* event) override;
|
||||
void enterEvent(QEvent* e) override;
|
||||
void leaveEvent(QEvent* e) override;
|
||||
|
||||
QPoint dragStartPos;
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user