00001
00002
00003
00004
00005
00006
00007 #ifndef BALL_VIEW_KERNEL_MODULARWIDGET_H
00008 # include <BALL/VIEW/KERNEL/modularWidget.h>
00009 #endif
00010
00011 #ifndef BALL_VIEW_WIDGETS_CANVASWIDGET_H
00012 # include <BALL/VIEW/WIDGETS/canvasWidget.h>
00013 #endif
00014
00015 #ifndef BALL_DATATYPE_REGULARDATA1D_H
00016 # include <BALL/DATATYPE/regularData1D.h>
00017 #endif
00018
00019 #ifndef BALL_VIEW_WIDGETS_DOCKWIDGET_H
00020 # include <BALL/VIEW/WIDGETS/dockWidget.h>
00021 #endif
00022
00023 #include <QtGui/qcolor.h>
00024
00025 #include <QContextMenuEvent>
00026 #include <QResizeEvent>
00027
00028 namespace BALL
00029 {
00030 namespace VIEW
00031 {
00035 class BALL_VIEW_EXPORT RegularData1DWidget
00036 : public CanvasWidget,
00037 public ModularWidget
00038 {
00039 Q_OBJECT
00040
00041 public:
00042
00043 BALL_EMBEDDABLE(RegularData1DWidget, ModularWidget)
00044
00045
00047 RegularData1DWidget(const RegularData1D* data, QWidget *parent = 0);
00048
00051 ~RegularData1DWidget();
00052
00056 virtual void onNotify(Message *message);
00057
00058 public slots:
00059
00062 void createPlot();
00063
00064 protected:
00065
00066 RegularData1DWidget(RegularData1DWidget* widget);
00067
00068 const RegularData1D* data_;
00069 QColor diagram_color_;
00070 QColor background_color_;
00071 QColor axis_color_;
00072 };
00073
00074
00076 class BALL_VIEW_EXPORT DockableRegularData1DWidget
00077 : public DockWidget
00078 {
00079 Q_OBJECT
00080
00081 public:
00082
00084 DockableRegularData1DWidget(const RegularData1D* data, QWidget *parent=0 );
00085
00087 ~DockableRegularData1DWidget();
00088
00090 void plot();
00091
00092 public slots:
00093
00095 virtual void zoomToFit();
00096
00098 virtual void zoomIn();
00099
00101 virtual void zoomOut();
00102
00103 protected slots:
00104 virtual void resizeEvent(QResizeEvent* e);
00105 virtual void contextMenuEvent(QContextMenuEvent* e);
00106
00107 protected:
00108 DockableRegularData1DWidget(const DockableRegularData1DWidget& dockcanwid);
00109 QSize sizeHint() const;
00110
00111 RegularData1DWidget canWidget_;
00112 };
00113
00114 }
00115 }