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

Generated on Fri Mar 25 19:47:03 2005 for LabPlot by doxygen 1.3.6