rock_widget_collection  0.1
Public Slots | Public Member Functions | Protected Member Functions | List of all members
RangeView Class Reference

#include <RangeView.h>

Inherits ImageViewOld.

Public Slots

void setOpenGL (bool flag)
 
void setRangeScan (double *data, int size)
 
void setRangeScan3 (const QList< double > &data)
 
- Public Slots inherited from ImageViewOld
void emitUserExport ()
 
void update ()
 
void update2 ()
 
void setDefaultImage ()
 
void setZoomEnabled (bool enabled)
 
virtual void openGL (bool flag)
 
bool onOpenGL ()
 
- Public Slots inherited from MultiWidget
void setActive (bool b)
 
QString getMinimizedLabel ()
 
void setMinimizedLabel (QString label)
 
void childEvent (QChildEvent *event)
 
bool event (QEvent *event)
 
bool isHiddenWhenMinimized () const
 
void hideWhenMin (bool b)
 
- Public Slots inherited from PaintWidget
QObject * addItem (QObject *object)
 
QObject * addPoints (const QList< int > &points_x, const QList< int > &points_y, int groupNr, const QColor &color)
 
QObject * addText (int xPos, int yPos, int groupNr, const QString &text)
 
QObject * addLine (int xPos, int yPos, int groupNr, const QColor &color, int endX, int endY)
 
QObject * addEllipse (int xPos, int yPos, int groupNr, const QColor &color, int width, int height)
 
QObject * addRectangle (int xPos, int yPos, int groupNr, const QColor &color, int width, int height)
 
QObject * addPolyline (int groupNr, const QColor &color, const QList< QPoint > &points)
 
QObject * addPolygon (int groupNr, const QColor &color, const QList< QPoint > &points)
 
QObject * removeItem (QObject *drawItem, bool delete_object)
 
void removeAllItems (bool delete_objects)
 

Public Member Functions

 RangeView (QWidget *parent=NULL, bool use_openGL=false)
 
virtual ~RangeView ()
 
- Public Member Functions inherited from ImageViewOld
 ImageViewOld (QWidget *parent=NULL, bool use_openGL=false)
 
virtual ~ImageViewOld ()
 
void contextMenuEvent (QContextMenuEvent *event)
 
int heightForWidth (int w)
 
void mouseDoubleClickEvent (QMouseEvent *event)
 
void setAspectRatio (bool value)
 
bool getAspectRatio ()
 
void saveImage (bool overlay=true)
 
bool saveImage2 (QString path, bool overlay=true)
 
bool saveImage3 (const QString &mode, int pixel_size, int width, int height, const char *pbuffer, QString path, QString format)
 
void resetCrop ()
 
void crop (int x, int y, int w, int h)
 
void addRawImage (const QString &mode, int pixel_size, int width, int height, const char *pbuffer, const int size)
 
void addFrame (const base::samples::frame::Frame &frame)
 
void addImage (const QImage &image)
 
void setGroupStatus (int groupNr, bool enable)
 
void clearGroups ()
 
int getHeight () const
 
int getWidth () const
 
int getFormat () const
 
- Public Member Functions inherited from MultiWidget
 MultiWidget (QWidget *parent=0)
 
- Public Member Functions inherited from PaintWidget
 PaintWidget (QWidget *parent)
 
 ~PaintWidget ()
 

Protected Member Functions

void keyPressEvent (QKeyEvent *event)
 
- Protected Member Functions inherited from ImageViewOld
void drawDrawItemsToImage (QImage &image, bool all=false)
 
void drawDrawItemsToPainter (QPainter &painter, bool all=false)
 
virtual void resizeEvent (QResizeEvent *event)
 
virtual void paintEvent (QPaintEvent *event)
 
void mousePressEvent (QMouseEvent *event)
 
void mouseReleaseEvent (QMouseEvent *event)
 
void calculateRects ()
 
std::pair< QPoint, bool > toImage (QPoint const &p)
 
- Protected Member Functions inherited from PaintWidget
void drawDrawItemsToImage (QImage &image, bool all=false)
 
void drawDrawItemsToPainter (QPainter &painter, bool all=false)
 
void paintEvent (QPaintEvent *event)
 

Additional Inherited Members

- Signals inherited from ImageViewOld
void clickImage (int x, int y)
 
void userExport ()
 
- Signals inherited from MultiWidget
void activityChanged (bool)
 
- Protected Attributes inherited from ImageViewOld
QMenu contextMenu
 
QAction * save_image_act
 
QAction * user_export_act
 
QString save_path
 
QImage originalImage
 
QImage image
 
QRect currentCrop
 
bool no_input
 
bool aspect_ratio
 
frame_helper::FrameQImageConverter frame_converter
 
ImageViewOldGLimage_view_gl
 
QRectF target
 
QRectF source
 
bool zoomEnabled
 
QPoint pressPoint
 
bool pressValid
 
- Protected Attributes inherited from MultiWidget
bool isActive
 
bool wasHidden
 
- Protected Attributes inherited from PaintWidget
QList< DrawItem * > items
 
QList< int > disabledGroups
 
bool isOpenGL
 
- Properties inherited from ImageViewOld
bool Use_OpenGL
 
bool Aspect_Ratio
 
- Properties inherited from MultiWidget
bool hideWhenMinimized
 
QString minimizedLabel
 

Detailed Description

Definition at line 12 of file RangeView.h.

Constructor & Destructor Documentation

RangeView::RangeView ( QWidget *  parent = NULL,
bool  use_openGL = false 
)

Definition at line 13 of file RangeView.cc.

13  :
14 ImageViewOld(parent,use_openGL)
15 {
16  image_view_gl = NULL;
17  //setOpenGL(use_openGL);
18  setOpenGL(true);
19 }
ImageViewOld(QWidget *parent=NULL, bool use_openGL=false)
Definition: ImageViewOld.cc:15
ImageViewOldGL * image_view_gl
Definition: ImageViewOld.h:195
void setOpenGL(bool flag)
Definition: RangeView.cc:26
RangeView::~RangeView ( )
virtual

Definition at line 22 of file RangeView.cc.

23 {
24 }

Member Function Documentation

void RangeView::keyPressEvent ( QKeyEvent *  event)
protected

Definition at line 70 of file RangeView.cc.

70  {
71  RangeViewGL *window = dynamic_cast<RangeViewGL*>(image_view_gl);
72  window->keyPressEvent(event);
73 }
ImageViewOldGL * image_view_gl
Definition: ImageViewOld.h:195
void keyPressEvent(QKeyEvent *event)
Definition: RangeViewGL.cc:68
bool event(QEvent *event)
Definition: MultiWidget.h:63
void RangeView::setOpenGL ( bool  flag)
slot

Definition at line 26 of file RangeView.cc.

27 {
28  if(flag)
29  {
30  //prevent activating if it is already activated
31  if(image_view_gl)
32  return;
33 
34  image_view_gl = new RangeViewGL(*this);
35  if (!image_view_gl)
36  return;
37  image_view_gl->resize(width(),height());
38  //image_view_gl->setAspectRatio(aspect_ratio);
39  image_view_gl->show();
40  }
41  else
42  {
43  delete image_view_gl;
44  image_view_gl = NULL;
45  }
46 
47 }
ImageViewOldGL * image_view_gl
Definition: ImageViewOld.h:195
void RangeView::setRangeScan ( double *  data,
int  size 
)
slot

Definition at line 53 of file RangeView.cc.

53  {
54  if(size%3!=0){
55  fprintf(stderr,"Cannot set data from non division of three\n");
56  }
57  RangeViewGL *window = dynamic_cast<RangeViewGL*>(image_view_gl);
58  if(!window){
59  fprintf(stderr,"Cannot set data have no widget?!\n");
60  return;
61  }
62  std::vector<Eigen::Vector3d> points;
63  for(int i=0;i<size;i+=3){
64  points.push_back(Eigen::Vector3d(data[i],data[i+1],data[i+2]));
65 
66  }
67  window->setData(points);
68 }
void setData(const std::vector< Eigen::Vector3d > data)
Definition: RangeViewGL.cc:45
ImageViewOldGL * image_view_gl
Definition: ImageViewOld.h:195
void RangeView::setRangeScan3 ( const QList< double > &  data)
slot

Definition at line 49 of file RangeView.cc.

49  {
50  setRangeScan(data.toVector().data(),data.size());
51 }
void setRangeScan(double *data, int size)
Definition: RangeView.cc:53

The documentation for this class was generated from the following files: