Main Page | Namespace List | Class Hierarchy | Class List | File List | Class Members | File Members

Axis.h

Go to the documentation of this file.
00001 //LabPlot: Axis.h
00002 
00003 #ifndef AXIS_H
00004 #define AXIS_H
00005 
00006 #include <qstring.h>
00007 #include <qfont.h>
00008 #include <qcolor.h>
00009 #include "Label.h"
00010 #include "scale.h"
00011 #include "ticsformat.h"
00012 
00013 class Axis {
00014 public:
00015         Axis();
00016         void enable(bool b=true) { e = b; }             
00017         bool enabled() { return e; }            
00018         void setScale(TScale s) { scale=s; }
00019         TScale Scale() { return scale; }
00020         void setLabel(Label *label) { l = label; }      
00021         void setScaling(double s) { scaling=s; }
00022         double Scaling() { return scaling; }
00023         void setShift(double s) { shift=s; }
00024         double Shift() { return shift; }
00025         Label *getLabel() { return l; }         
00026         Label *label() { return l; }            
00028         void setTicsLabelRotation(double r) { tlrotation = r; }
00029         double TicsLabelRotation() { return tlrotation; }
00030         void setTicsLabelPrefix(QString p) { tlprefix=p; }
00031         QString TicsLabelPrefix() { return tlprefix; }
00032         void setTicsLabelSuffix(QString s) { tlsuffix=s; }
00033         QString TicsLabelSuffix() { return tlsuffix; }
00034         void setTicsFont(QFont a) { tf = a; }   
00035         QFont TicsFont() { return tf; }         
00036         void setTicsColor(QColor col) { tc = col; }
00037         QColor TicsColor() { return tc; }
00038         void setTicsLabelColor(QColor col) { tlc = col; }
00039         QColor TicsLabelColor() { return tlc; }
00040         void setTicsLabelFormat(TFormat tmp) { atlf = tmp; }
00041         TFormat TicsLabelFormat() { return atlf; }
00042         void setDateTimeFormat(QString f) { datetimeformat = f; }
00043         QString DateTimeFormat() { return datetimeformat; }
00044         void setTicsLabelPrecision(int tmp) { tlp = tmp; }
00045         int TicsLabelPrecision() { return tlp; }
00046         void setTicsLabelGap(int g) { gap=g; }
00047         int TicsLabelGap() { return gap; }
00048         
00049         void setMajorTics(int t) { majortics = t; }     
00050         int MajorTics() { return majortics; }           
00051         void setMinorTics(int t) { minortics = t; }     
00052         int MinorTics() { return minortics; }           
00053         void enableMajorTics(bool b=true) { majorticse = b; }
00054         void enableMinorTics(bool b=true) { minorticse = b; }
00055         bool MajorTicsEnabled() { return majorticse; }
00056         bool MinorTicsEnabled() { return minorticse; }
00057         void setTicsPos(int tp) { ticspos = tp; }
00058         int TicsPos() { return ticspos; }
00059         void setMajorTicsWidth(int w) { majorticswidth = w; }
00060         int majorTicsWidth() { return majorticswidth; }
00061         void setMinorTicsWidth(int w) { minorticswidth = w; }
00062         int minorTicsWidth() { return minorticswidth; }
00063         
00064         void setBorderColor(QColor col) { bc = col; }
00065         QColor BorderColor() { return bc; }
00066         void setBorderWidth(int b) { borderwidth = b; }
00067         int borderWidth() { return borderwidth; }
00068 
00069         void setMajorGridColor(QColor c) { majorgridcolor = c; }
00070         QColor majorGridColor() { return majorgridcolor; }
00071         void setMinorGridColor(QColor c) { minorgridcolor = c; }
00072         QColor minorGridColor() { return minorgridcolor; }
00073         void setMajorGridType(Qt::PenStyle t) { majorgridtype = t; }
00074         Qt::PenStyle MajorGridType() { return majorgridtype; }
00075         void setMinorGridType(Qt::PenStyle t) { minorgridtype = t; }
00076         Qt::PenStyle MinorGridType() { return minorgridtype; }
00077         void setMajorGridWidth(int w) { majorgridwidth = w; }
00078         int majorGridWidth() { return majorgridwidth; }
00079         void setMinorGridWidth(int w) { minorgridwidth = w; }
00080         int minorGridWidth() { return minorgridwidth; }
00081 private:
00082         bool e;                         
00083         TScale scale;
00084         double scaling, shift;  
00085         Label *l;
00086         double tlrotation;              
00087         QString tlprefix, tlsuffix;     
00088         QFont tf;                               
00089         QColor tc, tlc;
00090         TFormat atlf;                   
00091         QString datetimeformat; 
00092         int tlp;                                
00093         int ticspos;                    
00094         int majortics;                  
00095         int minortics;                  
00096         bool majorticse;                
00097         bool minorticse;                
00098         int gap;                                
00099         QColor bc;                      
00100         QColor majorgridcolor, minorgridcolor;  //<! major/minor grid color
00101         Qt::PenStyle majorgridtype;             
00102         Qt::PenStyle minorgridtype;             
00103         int majorticswidth, minorticswidth;
00104         int borderwidth;
00105         int majorgridwidth, minorgridwidth;
00106 };
00107 
00108 #endif  //AXIS_H

Generated on Fri Aug 19 21:34:44 2005 for LabPlot by doxygen 1.3.6