BALL  1.4.1
regularData1DWidget.h
Go to the documentation of this file.
00001 // -*- Mode: C++; tab-width: 2; -*-
00002 // vi: set ts=2:
00003 //
00004 
00005 #ifndef BALL_VIEW_KERNEL_MODULARWIDGET_H
00006 # include <BALL/VIEW/KERNEL/modularWidget.h>
00007 #endif
00008 
00009 #ifndef BALL_VIEW_WIDGETS_CANVASWIDGET_H
00010 # include <BALL/VIEW/WIDGETS/canvasWidget.h>
00011 #endif
00012 
00013 #ifndef BALL_DATATYPE_REGULARDATA1D_H
00014 # include <BALL/DATATYPE/regularData1D.h>
00015 #endif
00016 
00017 #ifndef BALL_VIEW_WIDGETS_DOCKWIDGET_H
00018 # include <BALL/VIEW/WIDGETS/dockWidget.h>
00019 #endif
00020 
00021 #include <QtGui/QColor>
00022 //Added by qt3to4:
00023 #include <QContextMenuEvent>
00024 #include <QResizeEvent>
00025 
00026 namespace BALL
00027 {
00028   namespace VIEW
00029   {
00033     class BALL_VIEW_EXPORT RegularData1DWidget
00034       : public CanvasWidget,
00035         public ModularWidget
00036     {
00037       Q_OBJECT  
00038         
00039       public:
00040     
00041       BALL_EMBEDDABLE(RegularData1DWidget, ModularWidget)
00042       
00043       
00045       RegularData1DWidget(const RegularData1D* data, QWidget *parent = 0);
00046 
00049       ~RegularData1DWidget();
00050 
00054       virtual void onNotify(Message *message);
00055 
00056       public slots: 
00057 
00060       void createPlot();
00061       
00062       protected:
00063 
00064       RegularData1DWidget(RegularData1DWidget* widget);
00065 
00066       const RegularData1D* data_;
00067       QColor diagram_color_;
00068       QColor background_color_;
00069       QColor axis_color_;
00070     }; 
00071 
00072 
00074     class BALL_VIEW_EXPORT DockableRegularData1DWidget
00075       : public DockWidget
00076     {
00077       Q_OBJECT 
00078 
00079       public:
00080 
00082       DockableRegularData1DWidget(const RegularData1D* data, QWidget *parent=0 );
00083 
00085       ~DockableRegularData1DWidget();
00086 
00088       void plot();
00089   
00090     public slots:
00091     
00093       virtual void zoomToFit();
00094     
00096       virtual void zoomIn();
00097 
00099       virtual void zoomOut();
00100 
00101     protected slots:
00102       virtual void resizeEvent(QResizeEvent* e);
00103       virtual void contextMenuEvent(QContextMenuEvent* e);
00104 
00105     protected:
00106       DockableRegularData1DWidget(const DockableRegularData1DWidget& dockcanwid);
00107       QSize sizeHint() const;
00108 
00109       RegularData1DWidget canWidget_;
00110     };
00111     
00112   } //end of namespace VIEW
00113 }//end of namespace BALL
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Defines