00001 /**************************************************************************** 00002 ** 00003 ** Copyright (C) 2005-2008 Trolltech ASA. All rights reserved. 00004 ** 00005 ** This file is part of the example classes of the Qt Toolkit. 00006 ** 00007 ** This file may be used under the terms of the GNU General Public 00008 ** License versions 2.0 or 3.0 as published by the Free Software 00009 ** Foundation and appearing in the files LICENSE.GPL2 and LICENSE.GPL3 00010 ** included in the packaging of this file. Alternatively you may (at 00011 ** your option) use any later version of the GNU General Public 00012 ** License if such license has been publicly approved by Trolltech ASA 00013 ** (or its successors, if any) and the KDE Free Qt Foundation. In 00014 ** addition, as a special exception, Trolltech gives you certain 00015 ** additional rights. These rights are described in the Trolltech GPL 00016 ** Exception version 1.1, which can be found at 00017 ** http://www.trolltech.com/products/qt/gplexception/ and in the file 00018 ** GPL_EXCEPTION.txt in this package. 00019 ** 00020 ** Please review the following information to ensure GNU General 00021 ** Public Licensing requirements will be met: 00022 ** http://trolltech.com/products/qt/licenses/licensing/opensource/. If 00023 ** you are unsure which license is appropriate for your use, please 00024 ** review the following information: 00025 ** http://trolltech.com/products/qt/licenses/licensing/licensingoverview 00026 ** or contact the sales department at sales@trolltech.com. 00027 ** 00028 ** In addition, as a special exception, Trolltech, as the sole 00029 ** copyright holder for Qt Designer, grants users of the Qt/Eclipse 00030 ** Integration plug-in the right for the Qt/Eclipse Integration to 00031 ** link to functionality provided by Qt Designer and its related 00032 ** libraries. 00033 ** 00034 ** This file is provided "AS IS" with NO WARRANTY OF ANY KIND, 00035 ** INCLUDING THE WARRANTIES OF DESIGN, MERCHANTABILITY AND FITNESS FOR 00036 ** A PARTICULAR PURPOSE. Trolltech reserves all rights not expressly 00037 ** granted herein. 00038 ** 00039 ** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE 00040 ** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. 00041 ** 00042 ****************************************************************************/ 00043 00044 #ifndef WINDOW_H 00045 #define WINDOW_H 00046 00047 #include <QWidget> 00048 00049 class QSlider; 00050 class vrGLWidget; 00051 00052 #include "VolumeBuffer.h" 00053 #include "gradients.h" 00054 00055 #include "sliceWidget1.h" 00056 class sliceWidget1; 00057 00058 #include "sliceWidget2.h" 00059 class sliceWidget2; 00060 00061 #include "pcWidget.h" 00062 class pcWidget; 00063 00064 class Window : public QWidget 00065 { 00066 Q_OBJECT 00067 00068 public: 00069 Window(); 00070 ~Window(); 00071 00072 public slots: 00073 void setdefaultVB1() { setdefaultVB(1); } 00074 void setdefaultVB2() { setdefaultVB(2); } 00075 void changeScale(int scale); 00076 00077 signals: 00078 void vbchanged(VolumeBuffer *vb); 00079 void sb1changed(VolumeBuffer *vb); 00080 void sb2changed(VolumeBuffer *vb); 00081 00082 //scale changed 00083 //void ms_gradientStopsChanged(const QGradientStops &stops); 00084 void ms_set_r_points(const QPolygonF &points); 00085 void ms_set_g_points(const QPolygonF &points); 00086 void ms_set_b_points(const QPolygonF &points); 00087 void ms_set_a_points(const QPolygonF &points); 00088 00089 private: 00090 QSlider *createSlider(); 00091 00092 vrGLWidget *m_vrGLWidget; 00093 QSlider *xSlider; 00094 QSlider *ySlider; 00095 QSlider *zSlider; 00096 QPushButton *load_button1; 00097 QPushButton *load_button2; 00098 00099 QTabWidget *tabWidget; 00100 00101 GradientWidget *tf_editor; 00102 GradientWidget *tf_editor1; 00103 GradientWidget *tf_editor2; 00104 GradientWidget *tf_editor3; 00105 00106 sliceWidget1 *m_sliceWidget1; 00107 sliceWidget2 *m_sliceWidget2; 00108 pcWidget *m_pcWidget; 00109 00110 //VolumeRender *m_vr; 00111 VolumeBuffer *m_vb; 00112 VolumeBuffer *m_sb1; 00113 VolumeBuffer *m_sb2; 00114 void setdefaultVB(int dataset); 00115 00116 int m_scale; 00117 }; 00118 00119 #endif 00120