itom  3.0.0
sharedStructuresGraphics.h
1 /* ********************************************************************
2  itom software
3  URL: http://www.uni-stuttgart.de/ito
4  Copyright (C) 2016, Institut fuer Technische Optik (ITO),
5  Universitaet 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 fuer 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 SHAREDSTRUCTURESGRAPHICS_H
29 #define SHAREDSTRUCTURESGRAPHICS_H
30 
31 #include "typeDefs.h"
32 
33 #include <qstring.h>
34 #if QT_VERSION < 0x050000
35 #include <qcolor.h>
36 #else
37 #include <QtGui/qcolor.h>
38 #endif
39 #include <qpair.h>
40 #include <qvector.h>
41 
42 #if !defined(Q_MOC_RUN) || defined(ITOMCOMMONQT_MOC) //only moc this file in itomCommonQtLib but not in other libraries or executables linking against this itomCommonQtLib
43 
44 namespace ito
45 {
48  {
49  DataObjLine = 0x0001,
50  DataObjPlane = 0x0002,
51  DataObjPlaneStack = 0x0004,
52  PointCloud = 0x0008,
53  PolygonMesh = 0x0010
54  };
55  Q_DECLARE_FLAGS(PlotDataTypes, PlotDataType)
56 
57 
59  {
60  Format_Gray8 = 0x0001,
61  Format_Gray16 = 0x0002,
62  Format_Gray32 = 0x0004,
63  Format_RGB32 = 0x0008,
64  Format_ARGB32 = 0x0010,
65  Format_CMYK32 = 0x0020,
66  Format_Float32 = 0x0040,
67  Format_Float64 = 0x0080,
68  Format_Complex = 0x0100
69  };
70  Q_DECLARE_FLAGS(PlotDataFormats, PlotDataFormat)
71 
72 
74  {
75  Static = 0x0001,
76  Live = 0x0002,
77  Cartesian = 0x0004,
78  Polar = 0x0008,
79  Cylindrical = 0x0010,
80  OpenGl = 0x0020,
81  Cuda = 0x0040,
82  X3D = 0x0080,
83  PlotLine = 0x0100,
84  PlotImage = 0x0200,
85  PlotISO = 0x0400,
86  Plot3D = 0x0800
87  };
88  Q_DECLARE_FLAGS(PlotFeatures, PlotFeature)
89 
90 
91  class PluginInfo
92  {
93  public:
94  PluginInfo(void) : m_plotFeatures(Static) {}
95  PluginInfo(PlotDataTypes plotDataTypes, PlotDataFormats plotDataFormats, PlotFeatures plotFeatures)
96  : m_plotDataTypes(plotDataTypes),
97  m_plotDataFormats(plotDataFormats),
98  m_plotFeatures(plotFeatures)
99  {}
100 
101  PlotDataTypes m_plotDataTypes;
102  PlotDataFormats m_plotDataFormats;
103  PlotFeatures m_plotFeatures;
104  };
105 
106  enum tPalette
107  {
108  tPaletteNoType = 0x00,
109  tPaletteGray = 0x01,
110  tPaletteRGB = 0x02,
111  tPaletteFC = 0x04,
112  tPaletteIndexed = 0x08,
113  tPaletteLinear = 0x10,
114  tPaletteReadOnly = 0x20
115  };
116 
117  struct ItomPalette
118  {
119  ItomPalette() : type(0), name("") {}
120  int type;
121  QString name;
122  QVector<QPair<double, QColor> > colorStops;
123  QVector<ito::uint32> colorVector256; //corresponds to QVector<QRgb>
124  QColor inverseColorOne;
125  QColor inverseColorTwo;
126  QColor invalidColor;
127  };
128 
129 }
130 
131 Q_DECLARE_OPERATORS_FOR_FLAGS ( ito::PlotDataTypes )
132 Q_DECLARE_OPERATORS_FOR_FLAGS ( ito::PlotFeatures )
133 Q_DECLARE_OPERATORS_FOR_FLAGS ( ito::PlotDataFormats )
134 
135 #endif //#if !defined(Q_MOC_RUN) || defined(ITOMCOMMONQT_MOC)
136 
137 #endif //SHAREDSTRUCTURESGRAPHICS_H
Definition: sharedStructuresGraphics.h:50
Definition: sharedStructuresGraphics.h:53
Definition: apiFunctionsGraph.cpp:39
Definition: sharedStructuresGraphics.h:49
Definition: sharedStructuresGraphics.h:91
PlotFeature
this enumeration describe the features a designer plot widget provides concerning the visualization o...
Definition: sharedStructuresGraphics.h:73
Definition: sharedStructuresGraphics.h:52
PlotDataFormat
allowed data formats
Definition: sharedStructuresGraphics.h:58
PlotDataType
enumeration that describes the type of input data that a designer plot widget accepts ...
Definition: sharedStructuresGraphics.h:47
Definition: sharedStructuresGraphics.h:117
Definition: sharedStructuresGraphics.h:51