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

TxqPlotAttribs.h

Go to the documentation of this file.
00001 //--------------------------------------------------------------------
00002 //
00003 // File:        TxqPlotAttribs.h
00004 //
00005 // Purpose:     Define the plot attribute
00006 //
00007 // Version:     $Id: TxqPlotAttribs.h,v 1.15 2001/10/09 23:36:44 kgl Exp $
00008 //
00009 // Copyright (c) 2000 by Tech-X Corporation.  All rights reserved.
00010 //
00011 // Author:  Kelly G. Luetkemeyer
00012 //
00013 //--------------------------------------------------------------------
00014 
00015 #ifndef TXQ_PLOTATTRIBS_H
00016 #define TXQ_PLOTATTRIBS_H
00017 
00018 #include "TxqAxisAttribs.h"
00019 #include <txc_streams.h>
00020 
00027 class TxqPlotAttribs
00028 {
00029   public:
00030 
00034   TxqPlotAttribs(){
00035 
00036 // set default values for the classs data attribute
00037     setDefaultPlotAttrib(x);
00038     setDefaultPlotAttrib(y);
00039   }
00040 
00061    TxqPlotAttribs(QString xtitle, QColor xtitlecolor, 
00062                   double xmin, double xmax, bool xlims,
00063                   bool xSciNote, QString xscaletype, int xscale,
00064                   QString ytitle, QColor ytitlecolor, 
00065                   double ymin, double ymax, bool ylims, 
00066                   bool ySciNote, QString yscaletype, int yscale) {
00067 
00068    // X attributes
00069      x.title = xtitle;
00070      x.titleColor = xtitlecolor;
00071      x.min = xmin;
00072      x.max = xmax;
00073      x.autoLims = xlims;
00074      x.sciNotation = xSciNote;
00075      x.scaleType = xscaletype;
00076      x.scale = xscale;
00077 
00078    // Y attributes
00079      y.title = ytitle;
00080      y.titleColor = ytitlecolor;
00081      y.min = ymin;
00082      y.max = ymax;
00083      y.autoLims = ylims;
00084      y.sciNotation = ySciNote;
00085      y.scaleType = yscaletype;
00086      y.scale = yscale;
00087    }
00088 
00093    void setDefaultPlotAttrib( TxqAxisAttribs a ) {
00094    // set the default values
00095      a.title = "";
00096      a.titleColor = "white";
00097      a.tickLabelColor = "white";
00098      a.min = 0.0;
00099      a.max = 1.0;
00100      a.autoLims = false;
00101      a.sciNotation = false;
00102      a.scaleType = "LINEAR";
00103      a.scale = SCALE_LINEAR;
00104    }
00105    
00109    void print() {
00110      cout << "Plot Attributes"        << endl
00111      << "X title: "<< x.title   << endl
00112      << "Y title: "<< y.title   << endl
00113      << "X titleColor: "<< x.titleColor.name()    << endl
00114      << "Y titleColor: "<< y.titleColor.name()   << endl
00115      << "X tickLabelColor: "<< x.tickLabelColor.name()    << endl
00116      << "Y tickLabelColor: "<< y.tickLabelColor.name()   << endl
00117      << "X min:   "<< x.min   << endl
00118      << "X max:   "<< x.max   << endl
00119      << "Y min:   "<< y.min   << endl
00120      << "Y max:   "<< y.max   << endl
00121      << "X auto:  "<< x.autoLims   << endl
00122      << "Y auto:  "<< y.autoLims   << endl
00123      << "X scientific:  "<< x.sciNotation << endl
00124      << "Y scientific:  "<< y.sciNotation << endl
00125      << "X type:  "<< x.scaleType   << endl
00126      << "X scale: "<< x.scale   << endl
00127      << "Y type:  "<< y.scaleType   << endl
00128      << "Y scale: "<< y.scale   << endl;
00129    }
00130 
00134    ~TxqPlotAttribs(){}
00135 
00136 //
00137 // Public Class data members
00138 //
00139 
00143   TxqAxisAttribs x;
00144 
00148   TxqAxisAttribs y;
00149 
00150 };
00151 #endif
Copyright Tech-X Corporation, all rights reserved.