| 1 | /* |
| 2 | * Copyright (C) 2016, Mike Walters <[email protected]> |
| 3 | * |
| 4 | * This file is part of inspectrum. |
| 5 | * |
| 6 | * This program is free software: you can redistribute it and/or modify |
| 7 | * it under the terms of the GNU General Public License as published by |
| 8 | * the Free Software Foundation, either version 3 of the License, or |
| 9 | * (at your option) any later version. |
| 10 | * |
| 11 | * This program is distributed in the hope that it will be useful, |
| 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| 14 | * GNU General Public License for more details. |
| 15 | * |
| 16 | * You should have received a copy of the GNU General Public License |
| 17 | * along with this program. If not, see <http://www.gnu.org/licenses/>. |
| 18 | */ |
| 19 | |
| 20 | #pragma once |
| 21 | |
| 22 | #include <QMouseEvent> |
| 23 | #include <QObject> |
| 24 | #include <QPainter> |
| 25 | #include <QPoint> |
| 26 | #include "cursor.h"cxx . . $ `<file>/src/cursor.h`/ |
| 27 | #include "util.h"cxx . . $ `<file>/src/util.h`/ |
| 28 | |
| 29 | class Cursorscxx . . $ Cursors# : public QObjectcxx . . $ QObject# |
| 30 | { |
| 31 | Q_OBJECTcxx . . $ Cursors#tr(75d9f1c324b4579d). |
| 32 | |
| 33 | public: |
| 34 | Cursorscxx . . $ Cursors#Cursors(749de1b6ae65bddd).(QObjectcxx . . $ QObject# * parent); |
| 35 | int segmentscxx . . $ Cursors#segments(b126dc7c1de90089).(); |
| 36 | bool mouseEventcxx . . $ Cursors#mouseEvent(bf65bbe40893342c).(QEventcxx . . $ QEvent#::Typecxx . . $ QEvent#Type# type, QMouseEventcxx . . $ QMouseEvent# *event); |
| 37 | void leaveEventcxx . . $ Cursors#leaveEvent(49f6e7a06ebc5aa8).(); |
| 38 | void paintFrontcxx . . $ Cursors#paintFront(dba2c6533854c69f).(QPaintercxx . . $ QPainter# &painter, QRectcxx . . $ QRect# &rect, range_tcxx . . $ range_t#<size_t> sampleRange); |
| 39 | range_tcxx . . $ range_t#<int> selectioncxx . . $ Cursors#selection(8edf043d21a94c0c).(); |
| 40 | void setSegmentscxx . . $ Cursors#setSegments(d4f767463ce0a6b3).(int segments); |
| 41 | void setSelectioncxx . . $ Cursors#setSelection(3ae39a1630889ffb).(range_tcxx . . $ range_t#<int> selection); |
| 42 | |
| 43 | public slotscxx . . $ `<external>/1208926524888476972/qobjectdefs.h:88:14`!: |
| 44 | void cursorMovedcxx . . $ Cursors#cursorMoved(49f6e7a06ebc5aa8).(); |
| 45 | |
| 46 | signalscxx . . $ `<external>/1208926524888476972/qobjectdefs.h:89:14`!: |
| 47 | void cursorsMovedcxx . . $ Cursors#cursorsMoved(49f6e7a06ebc5aa8).(); |
| 48 | |
| 49 | private: |
| 50 | bool pointWithinDragRegioncxx . . $ Cursors#pointWithinDragRegion(578814ae554e72f6).(QPointcxx . . $ QPoint# point); |
| 51 | |
| 52 | Cursorcxx . . $ Cursor# *minCursorcxx . . $ Cursors#minCursor.; |
| 53 | Cursorcxx . . $ Cursor# *maxCursorcxx . . $ Cursors#maxCursor.; |
| 54 | int segmentCountcxx . . $ Cursors#segmentCount. = 1; |
| 55 | |
| 56 | QPointcxx . . $ QPoint# dragPoscxx . . $ Cursors#dragPos.; // keep track of dragging distance |
| 57 | bool cursorOverridecxx . . $ Cursors#cursorOverride. = false; // used to record if cursor is overridden |
| 58 | bool draggingcxx . . $ Cursors#dragging. = false; // record if mouse is dragging |
| 59 | }; |