forked from nemomobile/qtquickcontrols-nemo
-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[ApplicationWindow] Fixup touch events for swipe back
- Loading branch information
Showing
4 changed files
with
28 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,6 @@ | ||
/* | ||
* Copyright (C) 2017 Eetu Kahelin | ||
* Copyright (C) 2023 Chupligin Sergey <[email protected]> | ||
* | ||
* This library is free software; you can redistribute it and/or | ||
* modify it under the terms of the GNU Library General Public | ||
|
@@ -29,6 +30,10 @@ EditFilter::EditFilter(QObject* parent) | |
|
||
bool EditFilter::eventFilter(QObject* obj, QEvent* event) | ||
{ | ||
if (event->type() == QEvent::TouchBegin || event->type() == QEvent::TouchEnd) { | ||
emit touchEvent(event); | ||
} | ||
|
||
if (event->type() == QEvent::MouseButtonPress || event->type() == QEvent::TouchBegin) { | ||
NemoFocusSingleton* nemoFocus = NemoFocusSingleton::instance(); | ||
if (nemoFocus->edit() != NULL) { | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,6 @@ | ||
/* | ||
* Copyright (C) 2017 Eetu Kahelin | ||
* Copyright (C) 2023 Chupligin Sergey <[email protected]> | ||
* | ||
* This library is free software; you can redistribute it and/or | ||
* modify it under the terms of the GNU Library General Public | ||
|
@@ -16,6 +17,7 @@ | |
* the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, | ||
* Boston, MA 02110-1301, USA. | ||
*/ | ||
|
||
#ifndef EDITFILTER_H | ||
#define EDITFILTER_H | ||
|
||
|
@@ -27,6 +29,9 @@ class EditFilter : public QObject { | |
public: | ||
explicit EditFilter(QObject* parent = 0); | ||
|
||
signals: | ||
void touchEvent(QEvent* event); | ||
|
||
protected: | ||
bool eventFilter(QObject* obj, QEvent* event); | ||
}; | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters