itom 2.2.1
|
00001 /* ******************************************************************** 00002 itom software 00003 URL: http://www.uni-stuttgart.de/ito 00004 Copyright (C) 2013, Institut für Technische Optik (ITO), 00005 Universität 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 für 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 OBJLEGENDWIDGET_H 00029 #define OBJLEGENDWIDGET_H 00030 00031 #ifdef __APPLE__ 00032 extern "C++" { 00033 #endif 00034 00035 #include "../common/commonGlobal.h" 00036 #include "../common/typeDefs.h" 00037 00038 #include "commonWidgets.h" 00039 00040 #if QT_VERSION < 0x050000 00041 #include <qplaintextedit.h> 00042 #include <qpixmap.h> 00043 #else 00044 #include <QtWidgets/qplaintextedit.h> 00045 #include <QtGui/qpixmap.h> 00046 // 00047 #endif 00048 00049 class ITOMWIDGETS_EXPORT PlotInfoDObject : public QPlainTextEdit 00050 { 00051 Q_OBJECT 00052 00053 public: 00054 PlotInfoDObject(QWidget* parent = NULL); 00055 bool useDetailInfo() const { return m_addDetailInfo; } 00056 00057 private: 00058 QString m_infoHeader; 00059 QString m_infoDetail; 00060 bool m_valid; 00061 bool m_addDetailInfo; 00062 00063 public slots: 00064 00065 void updateInfoHeader(const QString newString); 00066 void updateInfoHeader(const QString typeString, const int dType, const int dims, const int sizes[]); 00067 void updateInfoDetail(const QString newString); 00068 void updateInfoDetail(const double minVal, const double maxVal, const double meanVal, const double devVal); 00069 void clearObjectInfo(); 00070 void setUseDetailInfo(const bool state); 00071 QPainterPath renderToPainterPath(const int xsize, const int ysize, const int fontSize); 00072 00073 private slots: 00074 00075 }; 00076 00077 #ifdef __APPLE__ 00078 } 00079 #endif 00080 00081 #endif // OBJLEGENDWIDGET_H