From b85a292ce06475d560bfa1195b63a8bfe211f22d Mon Sep 17 00:00:00 2001 From: Timothy Pearson Date: Wed, 11 Jul 2012 14:15:27 -0500 Subject: Add 0.2.7 release of qwtplot3d for future TQt3 conversion and use --- lib/tqwtplot3d/examples/mesh2/src/lightingdlg.h | 100 ++++++++++++++++++++++++ 1 file changed, 100 insertions(+) create mode 100644 lib/tqwtplot3d/examples/mesh2/src/lightingdlg.h (limited to 'lib/tqwtplot3d/examples/mesh2/src/lightingdlg.h') diff --git a/lib/tqwtplot3d/examples/mesh2/src/lightingdlg.h b/lib/tqwtplot3d/examples/mesh2/src/lightingdlg.h new file mode 100644 index 0000000..2dd79b1 --- /dev/null +++ b/lib/tqwtplot3d/examples/mesh2/src/lightingdlg.h @@ -0,0 +1,100 @@ +#ifndef lightingdlg_h__2004_03_07_13_35_begin_guarded_code +#define lightingdlg_h__2004_03_07_13_35_begin_guarded_code + +#include +#include +#include "../../../include/qwt3d_parametricsurface.h" +#include "../../../include/qwt3d_surfaceplot.h" +#include "../../../include/qwt3d_enrichment.h" +#include "../../../include/qwt3d_color.h" + +#if QT_VERSION < 0x040000 +#include "lightingdlgbase.h" +#else +#include "ui_lightingdlgbase4.h" +#endif + +class Pointer : public Qwt3D::VertexEnrichment +{ +public: + Pointer(double rad); + ~Pointer(); + + Qwt3D::Enrichment* clone() const {return new Pointer(*this);} + + void configure(double rad); + void drawBegin(); + void draw(Qwt3D::Triple const&){} + void setPos(double x, double y, double z) {pos_ = Qwt3D::Triple(x,y,z);} + +private: + double radius_; + Qwt3D::Triple pos_; +}; + +struct SColor : public Qwt3D::Color +{ + Qwt3D::RGBA operator()(double, double, double) const {return Qwt3D::RGBA(0.8,0,0,0.5);} +}; + +typedef Qwt3D::SurfacePlot SPlot; // moc/VC6 issue in Qt 4.0.0 + +class Plot : public SPlot +{ + Q_OBJECT + +public: + Plot(QWidget* parent); + Pointer* stick; + void reset(); +}; + +//MOC_SKIP_BEGIN +#if QT_VERSION < 0x040000 + class LightingBase : public LightingDlgBase + { + public: + LightingBase(QWidget* parent = 0) + : LightingDlgBase(parent) + { + } + }; +#else + class LightingBase : public QDialog, protected Ui::Dialog + { + public: + LightingBase(QWidget* parent = 0) + : QDialog(parent) + { + } + }; +#endif +//MOC_SKIP_END + + + +class LightingDlg : public LightingBase +{ + Q_OBJECT + +public: + LightingDlg(QWidget *parent=0); + ~LightingDlg(); + + void assign(Qwt3D::Plot3D* pl); + + Plot* plot; + Qwt3D::Plot3D* dataPlot; + +public slots: + void setDistance(int); + void setEmission(int); + void setDiff(int); + void setSpec(int); + void setShin(int); + void reset(); + void setRotation(double x, double y, double z); +}; + + +#endif /* include guarded */ -- cgit v1.2.3