00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021 #ifndef QTS_GRAPHICVIEW_H
00022 #define QTS_GRAPHICVIEW_H
00023
00024 #include <qwidget.h>
00025
00026 #include "qg_graphicview.h"
00027 #include "qg_painter.h"
00028
00029 #include "rs_eventhandler.h"
00030
00031 #include "qts_document.h"
00032
00037 class QTS_GraphicView : public QG_GraphicView {
00038 Q_OBJECT
00039
00040 public:
00041 QTS_GraphicView(QTS_Document* document, QWidget* parent=0);
00042 virtual ~QTS_GraphicView();
00043
00044 virtual void drawIt();
00045
00046 virtual void adjustZoomControls();
00047
00048
00049 virtual void drawEntityPlain(RS_Entity* e, bool del);
00050
00051 public slots:
00052 void slotEditUndo();
00053 void slotEditRedo();
00054 void slotViewScale(bool toggle);
00055 void slotViewHolidays(bool toggle);
00056 void slotViewLabels(bool toggle);
00057 void slotViewThicker(bool toggle);
00058 void slotZoomIn();
00059 void slotZoomInX();
00060 void slotZoomInY();
00061 void slotZoomOut();
00062 void slotZoomOutX();
00063 void slotZoomOutY();
00064 void slotZoomAuto();
00065 void slotZoomAutoY();
00066 void slotZoomWindow();
00067 void slotZoomPan();
00068 void slotLayersAdd();
00069 void slotLayersRemove();
00070 void slotLayersEdit();
00071 void slotDrawFreehand();
00072 void slotDrawPoint();
00073 void slotDrawLine();
00074 void slotDrawLabel();
00075 void slotModifyDelete();
00076 void slotModifyDeleteFree();
00077
00078 void slotUpdateRecord(QTS_Record* record);
00079
00080 protected:
00081 virtual void resizeEvent(QResizeEvent* e);
00082 virtual void mouseMoveEvent(QMouseEvent* e);
00083 virtual void keyPressEvent(QKeyEvent* e);
00084 virtual void keyReleaseEvent(QKeyEvent* e);
00085
00086 private slots:
00087 void slotHZoomed(int value);
00088 void slotVZoomed(int value);
00089
00090 private:
00091
00092
00093
00094 QTS_Document* document;
00095
00096 RS_Color colLabel;
00097 RS_Color colGrid;
00098 RS_Color colDefault;
00099 RS_Color colBackground;
00100 RS_Color colHolidays;
00101 RS_Color colLabelBox;
00102 RS_Color colLabelLine;
00103 RS_Color colLabelText;
00104
00105 bool zoomAutoY;
00106 bool viewScale;
00107 bool viewHolidays;
00108 bool viewLabels;
00109 bool viewThicker;
00110 int mouseX;
00111 int mouseY;
00112 };
00113
00114 #endif
00115