itom  3.0.0
plotInfoPicker.h
1 /* ********************************************************************
2  itom software
3  URL: http://www.uni-stuttgart.de/ito
4  Copyright (C) 2013, Institut für Technische Optik (ITO),
5  Universität Stuttgart, Germany
6 
7  This file is part of itom and its software development toolkit (SDK).
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  In addition, as a special exception, the Institut für Technische
15  Optik (ITO) gives you certain additional rights.
16  These rights are described in the ITO LGPL Exception version 1.0,
17  which can be found in the file LGPL_EXCEPTION.txt in this package.
18 
19  itom is distributed in the hope that it will be useful, but
20  WITHOUT ANY WARRANTY; without even the implied warranty of
21  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library
22  General Public Licence for more details.
23 
24  You should have received a copy of the GNU Library General Public License
25  along with itom. If not, see <http://www.gnu.org/licenses/>.
26 *********************************************************************** */
27 
28 #ifndef PICKERLEGENDWIDGET_H
29 #define PICKERLEGENDWIDGET_H
30 
31 #ifdef __APPLE__
32 extern "C++" {
33 #endif
34 
35 #include "../common/commonGlobal.h"
36 #include "../common/typeDefs.h"
37 #include "../common/shape.h"
38 
39 #include "commonWidgets.h"
40 
41 #include <qpoint.h>
42 #include <qvector3d.h>
43 #include <qvector4d.h>
44 #if QT_VERSION < 0x050000
45 #include <qtreewidget.h>
46 #include <qhash.h>
47 #include <qpixmap.h>
48 #else
49 #include <QtWidgets/qtreewidget.h>
50 #include <QtGui/qpixmap.h>
51 //
52 #endif
53 
54  class ITOMWIDGETS_EXPORT PlotInfoPicker : public QTreeWidget
55 {
56  Q_OBJECT
57 
58  public:
59  PlotInfoPicker(QWidget* parent = NULL);
60 
61  private:
62  QHash< int, QPair <int, int> > m_relationHash;
63 
64  public slots:
65  void updatePicker(const int index, const QPointF position);
66  void updatePickers(const QVector<int> indices, const QVector< QPointF> positions);
67  void updatePicker(const int index, const QVector3D position);
68  void updatePickers(const QVector<int> indices, const QVector< QVector3D> positions);
69 
70  void updateChildPlot(const int index, int type, const QVector4D positionAndDirection);
71  void updateChildPlots(const QVector<int> indices, const QVector<int> type, const QVector<QVector4D> positionAndDirection);
72  void removeChildPlot(int index);
73  void removeChildPlots();
74 
75  void removePicker(int index);
76  void removePickers();
77 
78  QPainterPath renderToPainterPath(const int xsize, const int ysize, const int fontSize);
79 
80  private slots:
81 };
82 
83 #ifdef __APPLE__
84 }
85 #endif
86 
87 #endif // MARKERLEGENDWIDGET_H
Definition: plotInfoPicker.h:54