00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022 #ifndef FIBOLINE_HPP
00023 #define FIBOLINE_HPP
00024
00025 #include "COBase.h"
00026 #include "Setting.h"
00027 #include <qpointarray.h>
00028 #include <qdict.h>
00029 #include <qpoint.h>
00030 #include <qfont.h>
00031 #include <qdatetime.h>
00032
00033 class FiboLine : public COBase
00034 {
00035 Q_OBJECT
00036
00037 public:
00038 FiboLine ();
00039 ~FiboLine ();
00040 void draw (QPixmap &, Scaler &, int, int, int);
00041 void newObject (QString &, QString &);
00042 double getHigh ();
00043 double getLow ();
00044 void drawMovingPointer (QPixmap &, QPoint &);
00045 void loadDefaults ();
00046 void saveDefaults ();
00047 double getY (double v, double high, double low);
00048 void getSettings (Setting &);
00049 void setSettings (Setting &);
00050 int isGrabSelected (QPoint point);
00051 double getLine (int);
00052 void adjustForSplit (QDateTime &, double);
00053
00054 public slots:
00055 void prefDialog ();
00056 COBase::Status pointerClick (QPoint &, QDateTime &, double);
00057 void pointerMoving (QPixmap &, QPoint &, QDateTime &, double);
00058
00059 protected:
00060 int moveFlag;
00061 QDateTime tx;
00062 double ty;
00063 int mpx, mpx2, mpy, mpy2;
00064 QFont font;
00065 double line1;
00066 double line2;
00067 double line3;
00068 double line4;
00069 double line5;
00070 double line6;
00071 QDateTime startDate;
00072 QDateTime endDate;
00073 double high;
00074 double low;
00075 bool extend;
00076 QString highLabel;
00077 QString lowLabel;
00078 QString sdateLabel;
00079 QString edateLabel;
00080 QString extendLabel;
00081 QString l1Label;
00082 QString l2Label;
00083 QString l3Label;
00084 QString l4Label;
00085 QString l5Label;
00086 QString l6Label;
00087 };
00088
00089 #endif