2 * Copyright (C) 2014 Canonical, Ltd.
4 * This program is free software; you can redistribute it and/or modify
5 * it under the terms of the GNU General Public License as published by
6 * the Free Software Foundation; version 3.
8 * This program is distributed in the hope that it will be useful,
9 * but WITHOUT ANY WARRANTY; without even the implied warranty of
10 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 * GNU General Public License for more details.
13 * You should have received a copy of the GNU General Public License
14 * along with this program. If not, see <http://www.gnu.org/licenses/>.
17#include "DebugHelpers.h"
21QString touchPointStateToString(Qt::TouchPointState state)
24 case Qt::TouchPointPressed:
25 return QString("pressed");
26 case Qt::TouchPointMoved:
27 return QString("moved");
28 case Qt::TouchPointStationary:
29 return QString("stationary");
30 case Qt::TouchPointReleased:
31 return QString("released");
33 return QString("INVALID_STATE");
37QString touchEventToString(const QTouchEvent *ev)
42 case QEvent::TouchBegin:
43 message.append("TouchBegin ");
45 case QEvent::TouchUpdate:
46 message.append("TouchUpdate ");
48 case QEvent::TouchEnd:
49 message.append("TouchEnd ");
51 case QEvent::TouchCancel:
52 message.append("TouchCancel ");
55 message.append("INVALID_TOUCH_EVENT_TYPE ");
58 foreach(const QTouchEvent::TouchPoint& touchPoint, ev->touchPoints()) {
60 QString("(id:%1, state:%2, scenePos:(%3,%4)) ")
62 .arg(touchPointStateToString(touchPoint.state()))
63 .arg(touchPoint.scenePos().x())
64 .arg(touchPoint.scenePos().y())
71QString mouseEventToString(const QMouseEvent *ev)
76 case QEvent::MouseButtonPress:
77 message.append("MouseButtonPress ");
79 case QEvent::MouseButtonRelease:
80 message.append("MouseButtonRelease ");
82 case QEvent::MouseButtonDblClick:
83 message.append("MouseButtonDblClick ");
85 case QEvent::MouseMove:
86 message.append("MouseMove ");
89 message.append("INVALID_MOUSE_EVENT_TYPE ");
92 message.append(QString("pos(%1, %2)").arg(ev->x()).arg(ev->y()));
keysesc to close
- j k
- move down, up
- enter
- open
- esc
- back, or up a level
- 1 2 3 4
- readme, files, commits, refs
- /
- filter
- y
- copy the clone command
- c
- compare the chosen commit with another (or shift-click both)
- ?
- show or hide this list