itom 2.2.1
K:/git-itom/sources/itom/common/sharedStructuresGraphics.h
00001 /* ********************************************************************
00002     itom software
00003     URL: http://www.uni-stuttgart.de/ito
00004     Copyright (C) 2016, Institut fuer Technische Optik (ITO),
00005     Universitaet Stuttgart, Germany
00006 
00007     This file is part of itom and its software development toolkit (SDK).
00008 
00009     itom is free software; you can redistribute it and/or modify it
00010     under the terms of the GNU Library General Public Licence as published by
00011     the Free Software Foundation; either version 2 of the Licence, or (at
00012     your option) any later version.
00013    
00014     In addition, as a special exception, the Institut fuer Technische
00015     Optik (ITO) gives you certain additional rights.
00016     These rights are described in the ITO LGPL Exception version 1.0,
00017     which can be found in the file LGPL_EXCEPTION.txt in this package.
00018 
00019     itom is distributed in the hope that it will be useful, but
00020     WITHOUT ANY WARRANTY; without even the implied warranty of
00021     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU Library
00022     General Public Licence for more details.
00023 
00024     You should have received a copy of the GNU Library General Public License
00025     along with itom. If not, see <http://www.gnu.org/licenses/>.
00026 *********************************************************************** */
00027 
00028 #ifndef SHAREDSTRUCTURESGRAPHICS_H
00029 #define SHAREDSTRUCTURESGRAPHICS_H
00030 
00031 #include "typeDefs.h"
00032 
00033 #include <qstring.h>
00034 #if QT_VERSION < 0x050000
00035 #include <qcolor.h>
00036 #else
00037 #include <QtGui/qcolor.h>
00038 #endif
00039 #include <qpair.h>
00040 #include <qvector.h>
00041 
00042 #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
00043 
00044 namespace ito
00045 {
00047     enum PlotDataType
00048     {
00049         DataObjLine         = 0x0001, 
00050         DataObjPlane        = 0x0002, 
00051         DataObjPlaneStack   = 0x0004, 
00052         PointCloud          = 0x0008, 
00053         PolygonMesh         = 0x0010  
00054     };
00055     Q_DECLARE_FLAGS(PlotDataTypes, PlotDataType)
00056     
00057     
00058     enum PlotDataFormat
00059     {
00060         Format_Gray8    = 0x0001,
00061         Format_Gray16   = 0x0002,
00062         Format_Gray32   = 0x0004,
00063         Format_RGB32    = 0x0008,
00064         Format_ARGB32   = 0x0010,
00065         Format_CMYK32   = 0x0020,
00066         Format_Float32  = 0x0040,
00067         Format_Float64  = 0x0080,
00068         Format_Complex  = 0x0100
00069     };
00070     Q_DECLARE_FLAGS(PlotDataFormats, PlotDataFormat)
00071     
00072     
00073     enum PlotFeature
00074     {
00075         Static      = 0x0001,
00076         Live        = 0x0002,
00077         Cartesian   = 0x0004,
00078         Polar       = 0x0008,
00079         Cylindrical = 0x0010,
00080         OpenGl      = 0x0020,
00081         Cuda        = 0x0040,
00082         X3D         = 0x0080,
00083         PlotLine    = 0x0100,
00084         PlotImage   = 0x0200,
00085         PlotISO     = 0x0400,
00086         Plot3D      = 0x0800
00087     };
00088     Q_DECLARE_FLAGS(PlotFeatures, PlotFeature)
00089     
00090 
00091     class PluginInfo 
00092     {
00093         public:
00094             PluginInfo(void) : m_plotFeatures(Static) {}
00095             PluginInfo(PlotDataTypes plotDataTypes, PlotDataFormats plotDataFormats, PlotFeatures plotFeatures) 
00096                 : m_plotDataTypes(plotDataTypes), 
00097                 m_plotDataFormats(plotDataFormats), 
00098                 m_plotFeatures(plotFeatures) 
00099             {}
00100 
00101             PlotDataTypes m_plotDataTypes;
00102             PlotDataFormats m_plotDataFormats;
00103             PlotFeatures m_plotFeatures;
00104     };
00105 
00106     enum tPalette
00107     {
00108         tPaletteNoType      = 0x00,
00109         tPaletteGray        = 0x01,
00110         tPaletteRGB         = 0x02,
00111         tPaletteFC          = 0x04,
00112         tPaletteIndexed     = 0x08,
00113         tPaletteLinear      = 0x10,
00114         tPaletteReadOnly    = 0x20
00115     };
00116 
00117     struct ItomPalette
00118     {
00119         ItomPalette() : type(0), name("") {}
00120         int type;
00121         QString name;
00122         QVector<QPair<double, QColor> > colorStops;
00123         QVector<ito::uint32> colorVector256; //corresponds to QVector<QRgb>
00124         QColor inverseColorOne;
00125         QColor inverseColorTwo;
00126         QColor invalidColor;
00127     };
00128 
00129 }
00130 
00131 Q_DECLARE_OPERATORS_FOR_FLAGS ( ito::PlotDataTypes )
00132 Q_DECLARE_OPERATORS_FOR_FLAGS ( ito::PlotFeatures )
00133 Q_DECLARE_OPERATORS_FOR_FLAGS ( ito::PlotDataFormats )
00134 
00135 #endif //#if !defined(Q_MOC_RUN) || defined(ITOMCOMMONQT_MOC)
00136 
00137 #endif //SHAREDSTRUCTURESGRAPHICS_H
 All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator Properties Friends