Main Page   Class Hierarchy   Compound List   File List   Compound Members   File Members  

Txq3dFrame.h

Go to the documentation of this file.
00001 //--------------------------------------------------------------------
00002 //
00003 // File:    Txq3dFrame.h
00004 //
00005 // Purpose: A Txq3dFrame is a Qt Widget used to create a window
00006 //          for 3 dimensional scientific plotting using OpenGL
00007 //
00008 // Version: $Id: Txq3dFrame.h,v 1.12 2002/01/24 00:06:25 kgl Exp $
00009 //
00010 // Copyright (c) 2000 by Tech-X Corporation.  All rights reserved.
00011 //
00012 // Author:  Kelly G. Luetkemeyer
00013 //
00014 //--------------------------------------------------------------------
00015 
00016 #ifndef TXQ3D_FRAME_H
00017 #define TXQ3D_FRAME_H 
00018 
00019 // Qt includes
00020 #include <qstatusbar.h>
00021 #include <qcursor.h>
00022 #include <qpaintdevicemetrics.h>
00023 #include <qimage.h>
00024 
00025 // Txq includes
00026 #include <TxqFrame.h>
00027 #include <TxqPrintPixmapFrame.h>
00028 
00029 // Txq2d includes
00030 #include <Txq2dPrintFrame.h>
00031 
00032 // Txq3d includes
00033 #include "Txq3dCanvas.h"
00034 #include "TxqRotateDlog.h"
00035 #include "Txq3dPlotAttribs.h"
00036 #include "Txq3dOptionsDlog.h"
00037 
00038 
00051 class Txq3dFrame : public TxqFrame
00052 {
00053   Q_OBJECT
00054 
00055 public:
00056 
00067   Txq3dFrame(QWidget* parent=0, const char *nm=0, WFlags f = WType_TopLevel);
00068 
00072   virtual ~Txq3dFrame();
00073 
00078   void addCanvas(Txq3dCanvas* newCanvas);
00079 
00084   Txq3dCanvas* getCanvas() {return canvas;}
00085 
00091   void writeImage(QString fileName, QString ext);
00092 
00096   virtual void plot() {canvas->updateGL();}
00097 
00098 protected:
00099 
00103   void createTxq3dCanvas();
00104 
00108   virtual void addFileMenuItems();
00109 
00113   void addEditMenuItems();
00114 
00120   virtual void addWidgets();
00121 
00125   void createScaleMenu();
00126 
00130   void createProjectionMenu();
00131 
00136   void resizeEvent( QResizeEvent *event);
00137 
00142   void createPlotAttribs();
00143 
00147   void createRotationDlog();
00148 
00152   void addViewMenuItems();
00153 
00157   void addRotationMenuItem();
00158 
00162   void addProjectionMenuItem();
00163 
00167   void addScaleMenuItem();
00168 
00172   void addWireFrameMenuItem();
00173 
00177   void addCrossHairMenuItem();
00178 
00182   void addOptionsMenuItem();
00183  
00187   void addZoomMenuItem();
00188 
00192   void addInvertBWMenuItem();
00193 
00197   void createOptionsMenu();
00198 
00202   void createStatusBar();
00203 
00207   int zoomId;
00208 
00213   bool zooming;
00214 
00218   Txq3dPlotAttribs *plot3dAttribs;
00219 
00223   Txq3dOptionsDlog *optionsDlog;
00224 
00228    int invertId;
00229 
00230 signals:
00231 
00236   virtual void setOptionsSignal();
00237 
00238 public slots:
00239 
00247   virtual void setGeometry(int x, int y, int w, int h);
00248 
00254   virtual void setGeometry(const QRect &r) {QWidget::setGeometry(r);}
00255  
00260   void crossHair(int number);
00261 
00268   virtual void writeStatus(double x, double y, double z);
00269 
00270 public slots:
00271 
00276   void doOrtho(int number);
00277  
00282   void doPerspect(int number);
00283 
00288   void doDataScale(int number);
00289 
00294   void doAxesScale(int number);
00295 
00296 protected slots:
00297 
00303   void applyOptions();
00304  
00308   void setOptions();
00309 
00313   void doRotation();
00314 
00318   void applyRotation();
00319 
00323   void cancelRotation();
00324 
00329   void doWireFrame(int number);
00330 
00334   bool copy();
00335 
00339   void saveAs();
00340 
00345   void dumpData();
00346 
00350   void print();
00351 
00355   void printPreview();
00356 
00361   virtual void zoom(int id);
00362 
00368   void invert(int id);
00369 
00370 protected:
00371 
00375   TxqRotateDlog *rotateDlog;
00376 
00380   QPopupMenu *projection;
00381 
00385   QPopupMenu *scale;
00386 
00387 private:
00388 
00392   Txq3dCanvas* canvas;
00393 
00397   bool wireId;
00398 
00402   int orthoId;
00403 
00407   int perspectId;
00408 
00412   int sDataId;
00413 
00417   int sAxesId;
00418 
00422    int xRot;
00423 
00427    int yRot;
00428 
00432    int zRot;
00433 
00434 
00435 };
00436 
00437 
00438 #endif
Copyright Tech-X Corporation, all rights reserved.