QTimeSeries Homepage

Main Page   Alphabetical List   Compound List   File List   Compound Members  

qts_graphicview.h

00001 /*****************************************************************************
00002 **  $Id: qts_graphicview.h,v 1.11 2002/11/03 01:38:18 andrew23 Exp $
00003 **
00004 **  This is part of the QCad GUI
00005 **  Copyright (C) 2001 Andrew Mustun
00006 **
00007 **  This program is free software; you can redistribute it and/or modify
00008 **  it under the terms of the GNU General Public License (version 2) as
00009 **  published by the Free Software Foundation.
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  USA
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     //virtual void viewChanged();
00046     virtual void adjustZoomControls();
00047     //virtual void zoomAuto(int border=20);
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     //QScrollBar* hZoomBar;
00092     //QScrollBar* vZoomBar;
00093 
00094     QTS_Document* document;
00095     //RS_EventHandler* eventHandler;
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 

Copyright © 2002, Andrew Mustun <andrew@mustun.com>. All rights reserved.
System documentation was generated using doxygen.