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

Legend.h

Go to the documentation of this file.
00001 //LabPlot: Legend.h
00002 
00003 #ifndef LEGEND_H
00004 #define LEGEND_H
00005 
00006 #include <qfont.h>
00007 #include <qpainter.h>
00008 #include "GraphList.h"
00009 #include "Symbol.h"
00010 
00011 class Legend {
00012 public:
00013         Legend();
00014         void save(QTextStream *t);
00015         void open(QTextStream *t, int version);
00016         void setFont(QFont font) { f = font; }
00017         QFont font() { return f; }
00018         void enable(bool b) { e = b; }
00019         bool enabled() { return e; }
00020         void setPosition(double X, double Y) { x = X; y = Y; }
00021         double X() { return x; }
00022         double Y() { return y; }
00023         void enableBorder(bool b) { border = b; }
00024         bool borderEnabled() { return border; }
00025         void draw(QPainter *p, PType type, GraphList *graphlist, Point pos, Point size,int w, int h);
00026         bool inside(int X, int Y);
00027 private:
00028         double x,y;                     // position 0..1
00029         int x1, y1, x2, y2;             // legend box
00030         QFont f;        
00031         bool border;                    // border enabled
00032         bool e;                         // legend enabled
00033         int namelength;         // legend width
00034 };
00035 
00036 #endif //LEGEND_H

Generated on Sun Aug 29 14:56:04 2004 for LabPlot by doxygen 1.3.6