lib/FiboLine.h

Go to the documentation of this file.
00001 /*
00002  *  Qtstalker stock charter
00003  *
00004  *  Copyright (C) 2001-2007 Stefan S. Stratigakos
00005  *
00006  *  This program is free software; you can redistribute it and/or modify
00007  *  it under the terms of the GNU General Public License as published by
00008  *  the Free Software Foundation; either version 2 of the License, or
00009  *  (at your option) any later version.
00010  *
00011  *  This program is distributed in the hope that it will be useful,
00012  *  but WITHOUT ANY WARRANTY; without even the implied warranty of
00013  *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00014  *  GNU General Public License for more details.
00015  *
00016  *  You should have received a copy of the GNU General Public License
00017  *  along with this program; if not, write to the Free Software
00018  *  Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,
00019  *  USA.
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