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

TxqViewPort.h

Go to the documentation of this file.
00001 //--------------------------------------------------------------------
00002 //
00003 // File:    TxqViewPort.h
00004 //
00005 // Purpose: Interface class to define the pixel to XY coordinate 
00006 //          transformations and scale
00007 //
00008 // Version: $Id: TxqViewPort.h,v 1.14 2001/10/12 18:51:23 kgl Exp $
00009 //
00010 // Author:  Kelly G. Luetkemeyer
00011 //
00012 // Copyright (c) 2000 by Tech-X Corporation.  All rights reserved.
00013 //---------------------------------------------------------------------------
00014 
00015 #ifndef TXQ_VIEWPORT_H
00016 #define TXQ_VIEWPORT_H
00017 
00018 // system includes
00019 #if defined(_MSC_VER)
00020 #include <limits>
00021 #else
00022 #include <limits.h>
00023 #endif
00024 
00025 // Qt includes
00026 #include <qpoint.h>
00027 #include <qrect.h>
00028 
00042 class TxqViewPort 
00043 {
00044 
00045 public:
00046 
00050   TxqViewPort();
00051 
00057   virtual double getXmin(); 
00058  
00064   virtual double getXmax(); 
00065  
00071   virtual double getYmin(); 
00072  
00078   virtual double getYmax(); 
00079  
00086   virtual double pixelToX( const QPoint & p)=0;
00087  
00094   virtual double pixelToY( const QPoint & p)=0;
00095  
00103   virtual QPoint xyToPixel( double x, double y );
00104  
00112   virtual short xToPixel( double x )=0;
00113  
00121   virtual short yToPixel( double y )=0;
00122 
00128   virtual void setXmin(double val)=0; 
00129  
00135   virtual void setXmax(double val)=0; 
00136  
00142   virtual void setYmin(double val)=0; 
00143  
00149   virtual void setYmax(double val)=0; 
00150  
00163    virtual void setBounds(double plxmin, double plymin, 
00164                   double plxmax, double plymax,
00165                   int cwidth,     int cheight ); 
00166 
00181    virtual void setBounds(double plxmin, double plymin,
00182                   double plxmax, double plymax,
00183                   int transx,     int transy,
00184                   int cwidth,     int cheight ); 
00196    virtual void setBounds(double plxmin, double plymin,
00197                   double plxmax, double plymax ); 
00198 
00212    virtual void setPlotRegion( int transx, int transy,
00213                       int cwidth, int cheight ); 
00214 
00219   virtual QRect getPlotRegion();
00220 
00225   virtual int width(); 
00226 
00231   virtual int getWidth(); 
00232 
00237   virtual int height(); 
00238 
00243   virtual int getHeight(); 
00244 
00249    virtual void setScreenCoordinates(bool b);
00250  
00255    virtual bool isScreenCoordinates();
00256 
00260  virtual ~TxqViewPort();
00261 
00262 protected:
00263 
00267   double xmin;
00271   double xmax;
00275   double ymin;
00279   double ymax;
00280 
00284    int xwidth;
00285 
00289    int  yheight;
00290 
00294   QRect plotRect;
00295 
00299   bool scFlag;
00300 
00301 private:
00302 
00303 
00304 };
00305 #endif
Copyright Tech-X Corporation, all rights reserved.