itom
Loading...
Searching...
No Matches
userInteractionWatcher.h
1/* ********************************************************************
2 itom software
3 URL: http://www.uni-stuttgart.de/ito
4 Copyright (C) 2020, Institut für Technische Optik (ITO),
5 Universität Stuttgart, Germany
6
7 This file is part of itom.
8
9 itom is free software; you can redistribute it and/or modify it
10 under the terms of the GNU Library General Public Licence as published by
11 the Free Software Foundation; either version 2 of the Licence, or (at
12 your option) any later version.
13
14 itom is distributed in the hope that it will be useful, but
15 WITHOUT ANY WARRANTY; without even the implied warranty of
16 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library
17 General Public Licence for more details.
18
19 You should have received a copy of the GNU Library General Public License
20 along with itom. If not, see <http://www.gnu.org/licenses/>.
21*********************************************************************** */
22
23#ifndef USERINTERACTIONWATCHER_H
24#define USERINTERACTIONWATCHER_H
25
26#include <qobject.h>
27
28#include "../global.h"
29#include "common/sharedStructuresQt.h"
30#include "DataObject/dataobj.h"
31#include "common/shape.h"
32
33#include <qpolygon.h>
34#include <qvector.h>
35#include <qsharedpointer.h>
36
37namespace ito
38{
39
40class UserInteractionWatcher : public QObject
41{
42 Q_OBJECT
43
44public:
45 UserInteractionWatcher(QWidget *plotWidget, ito::Shape::ShapeType type, int maxNrOfPoints, QSharedPointer<QVector<ito::Shape> > shapes, ItomSharedSemaphore *semaphore, QObject *parent = 0); //constructor
46 virtual ~UserInteractionWatcher(); //destructor
47
48private:
49 const QWidget *m_pPlotWidget;
50 ItomSharedSemaphore *m_pSemaphore;
51 int m_maxNrOfPoints;
52 bool m_waiting;
53 QSharedPointer<QVector<ito::Shape> > m_shapes;
54
55private slots:
56 void plotWidgetDestroyed(QObject *obj);
57 void userInteractionDone(int type, bool aborted, QVector<ito::Shape> shapes);
58
59 public slots:
60
61
62signals:
63 void finished();
64 void userInteractionStart(int type, bool start, int maxNrOfPoints);
65
66};
67
68} //end namespace ito
69
70#endif
semaphore which can be used for asynchronous thread communication. By using this class it is possible...
Definition sharedStructuresQt.h:58
ShapeType
Definition shape.h:60
Definition userInteractionWatcher.h:41
void plotWidgetDestroyed(QObject *obj)
shortdesc
Definition userInteractionWatcher.cpp:110
void userInteractionDone(int type, bool aborted, QVector< ito::Shape > shapes)
shortdesc
Definition userInteractionWatcher.cpp:137
Definition apiFunctionsGraph.cpp:40