Seamly2D
Code documentation
mouse_coordinates.h
Go to the documentation of this file.
1 /******************************************************************************
2  * @file mouse_coordinates.h
3  ** @author DS Caskey
4  ** @date Nov 6, 2022
5  **
6  ** @brief
7  ** @copyright
8  **
9  ** Seamly2D is free software: you can redistribute it and/or modify
10  ** it under the terms of the GNU General Public License as published by
11  ** the Free Software Foundation, either version 3 of the License, or
12  ** (at your option) any later version.
13  **
14  ** Seamly2D is distributed in the hope that it will be useful,
15  ** but WITHOUT ANY WARRANTY; without even the implied warranty of
16  ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17  ** GNU General Public License for more details.
18  **
19  ** You should have received a copy of the GNU General Public License
20  ** along with Seamly2D. If not, see <http://www.gnu.org/licenses/>.
21  **
22  *****************************************************************************/
23 #ifndef MOUSE_COORDINATES_H
24 #define MOUSE_COORDINATES_H
25 
26 #include <QPointF>
27 #include <QWidget>
28 
29 #include "../vmisc/def.h"
30 
31 namespace Ui
32 {
33  class MouseCoordinates;
34 }
35 
36 QT_WARNING_PUSH
37 QT_WARNING_DISABLE_GCC("-Weffc++")
38 QT_WARNING_DISABLE_GCC("-Wnon-virtual-dtor")
39 
40 class MouseCoordinates: public QWidget
41 {
42  Q_OBJECT
43 
44 public:
45  MouseCoordinates(const Unit &units, QWidget *parent = nullptr);
46  virtual ~MouseCoordinates();
47 
48 public slots:
49  void updateCoordinates(const QPointF &scenePos);
50 
51 private:
52  Ui::MouseCoordinates *ui;
54 };
55 
57 
58 #endif
MouseCoordinates(const Unit &units, QWidget *parent=nullptr)
Ui::MouseCoordinates * ui
void updateCoordinates(const QPointF &scenePos)
Unit
Definition: def.h:105