05Robot 3.0

- Main Page
- Modules
- Classes
- Files

- Class List
- Class Index
- Class Hierarchy
- Class Members

Public Types | Public Slots | Signals | Public Member Functions | Public Attributes | Protected Member Functions | Properties | List of all members
ObjectManipulationWindow Class Reference
ObjectManipulationGUIModule

Object manipulation window. More...

`#include <ObjectManipulationWindow.h>`

Inheritance diagram for ObjectManipulationWindow:

## Public Types

## Public Slots
void | on_stackedWidget_currentChanged (int)
| Triggers interface redraw. More...
void | on_toolButton_refresh_clicked ()
| Triggers single image preview update in paused mode. More...
void | on_toolButton_rotate_left_clicked ()
| Rotates image counterclockwise. More...
void | on_toolButton_rotate_right_clicked ()
| Rotates image clockwise. More...
void | on_toolButton_zoom_in_clicked ()
| Zooms in image. More...
void | on_toolButton_zoom_out_clicked ()
| Zooms out image. More...
void | on_toolButton_view_left_clicked ()
| Moves current viewport left. More...
void | on_toolButton_view_right_clicked ()
| Moves current viewport right. More...
void | on_toolButton_view_up_clicked ()
| Moves current viewport up. More...
void | on_toolButton_view_down_clicked ()
| Moves current viewport down. More...
void | on_toolButton_view_reset_clicked ()
| Resets viewport to fit current selected object. More...
void | on_toolButton_cancel_clicked ()
| Returns to preview mode. More...
void | reset_buttons ()
| Resets buttons capacity counters. More...
void | zoom_rect_widget (QRect rectangle)
| Sets current object manipulation viewport. More...
void | look_at (QPointF point)
| Sets current viewport center. More...
void | zoom_rect (QRectF rectangle)
| Sets current object manipulation viewport. More...
void | zoom_rect_start (QPointF point)
| Starts setting current object manipulation viewport. More...
void | zoom_rect_stop (QPointF point)
| Ends setting current object manipulation viewport. More...
void | update_interface ()
| Redraws current interface. More...
void | bin_button_clicked (int button_i)
| Performs action assigned to selected bin button. More...
void | preview_clicked (QPointF point)
| Tries to select an object, if an object was under given coordinates switches to object manipulation mode. More...
void | preview_mouse_moved (QPointF point)
| Mouse movement over preview window slot, highlights underlying objects. More...
void | preview_mode ()
| Switches interface to preview mode, resets all selections, turns on live camera preview. More...
void | manipulation_mode ()
| Switches interface to object manipulation mode if an object was selected, pauses camera preview. More...
void | commandStarted ()
| Locks interface as robot starts performing trajectory. More...
void | commandExecuted ()
| Unlocks interface after robot finishes performing trajectory. More...
void | robotEmergencyStopped ()
| Locks interface when robot emergency signal is active. More...

## Signals
void | logEvent (ObjectManipulationWindow::interfaceLogEvents eventID, int selected_object, int param, QPointF point, QPointF size, float angle)
| emited on all manipulation events More...
void | pickObject (QVector3D pointInMeters, float object_height, float angle, int bin)
| emited after clicking a bin button in object manipulation mode More...

## Public Member Functions
| Q_ENUM (interfaceLogEvents) Q_PROPERTY(int Interface_size READ interface_size WRITE set_interface_size DESIGNABLE true USER true) Q_CLASSINFO("Interface_size"
| Base button size in pixels. More...
| Q_CLASSINFO ("Initial_rotation","minimum=0;maximum=359;singleStep=1;")
| Q_CLASSINFO ("Rotation_step","minimum=90;maximum=270;singleStep=90;")
| Q_CLASSINFO ("View_scroll_step","minimum=0.01;maximum=1;singleStep=0.01;")
| Q_CLASSINFO ("Zoom_in_out_factor","minimum=0.01;maximum=10.0;singleStep=0.1;")
| ObjectManipulationWindow (QWidget *parent=0, Qt::WindowFlags flags=0)
| Default constructor, initializes object manipulation window. More...
| ~ObjectManipulationWindow ()
| Default destructor, cleans up. More...
int | interface_size () const
| Gets base button size in pixels. More...
void | set_interface_size (int interface_size_)
| Sets base button size in pixels. More...
int | initial_rotation () const
| Gets initial rotation in degrees. More...
void | set_initial_rotation (int initial_rotation)
| Sets initial rotation in degrees. More...
int | rotation_step () const
| Gets rotation step in degrees. More...
void | set_rotation_step (int rotation_step)
| Sets rotation step in degrees. More...
float | view_scroll_step () const
| Gets view scroll step (fraction of view window) More...
void | set_view_scroll_step (float view_scroll_step)
| Sets view scroll step in pixels. More...
float | zoom_in_out_factor () const
| Gets zoom in/out factor. More...
void | set_zoom_in_out_factor (float zoom_in_out_factor)
| Sets zoom in/out factor. More...
QString | bin_descriptors () const
| Gets bin descriptors. More...
void | set_bin_descriptors (const QString &bin_descriptors)
| Sets bin descriptors. More...
QString | image_file () const
| Gets image file. More...
void | set_image_file (const QString &image_file)
| Sets image file. More...
QString | object_list_file () const
| Gets object list file. More...
void | set_object_list_file (const QString &object_list_file)
| Sets object list file. More...
void | show_gestures_legend (int is_show)
| Shows help for complex gestures. More...
QGraphicsView * | getPreviewWidget ()
| returns preview QGraphicsView widget More...
QGraphicsView * | getManipulationWidget ()
| returns object manipulaion QGraphicsView widget More...
previev_types_t | getPreviewId ()

## Public Attributes
| minimum =20
| maximum =300
| singleStep =1

## Protected Member Functions
void | resizeEvent (QResizeEvent *event)

## Properties
int | Initial_rotation
| Initial rotation in degrees units. More...
int | Rotation_step
| Rotation step in degrees. More...
float | View_scroll_step
| View scroll step (fraction of view window) More...
float | Zoom_in_out_factor
| Zoom in/out factor. More...
QString | Bin_descriptors
| Bin descriptors. More...
QString | Image_file
| Static image file to display, disables live camera input and switches to object manipulation mode. More...
QString | Object_list_file
| Object list file. More...

## Detailed Description

Object manipulation window.

Integrated object manipulation widget. Includes two modes: preview, where whole source image is visible with all detected objects highlighted. After selecting an object, switches to object manipulation mode, where view fits selected object. Viewport can be further adjusted and proper action selected using one of bin buttons.

## Member Enumeration Documentation

enum interfaceLogEvents

Log event types.

Enumerator
manipulation_mode_selected |
preview_mode_selected |
move_up_selected |
move_down_selected |
move_left_selected |
move_right_selected |
rotate_right_selected |
rotate_left_selected |
zoom_in_selected |
zoom_out_selected |
zoom_rect_selected |
cancel_action_selected |
bin_button_selected |
look_at_selected |
robot_move_started |
robot_move_finished |
bin_button_toggled |

enum previev_types_t

Enumerator
preview_id |
object_manipultion_id |

## Constructor & Destructor Documentation

ObjectManipulationWindow | ( | QWidget * | parent = `0`,
|  | Qt::WindowFlags | flags = `0`
| ) |  |

Default constructor, initializes object manipulation window.

Parameters

  parent | pointer to parent widget
  flags | window flags

~ObjectManipulationWindow | ( |  | ) |

Default destructor, cleans up.

## Member Function Documentation

void bin_button_clicked | ( | int | button_i | ) |
| slot

Performs action assigned to selected bin button.

Parameters

  button_i | button index

QString bin_descriptors | ( |  | ) | const

Gets bin descriptors.

void commandExecuted | ( |  | ) |
| slot

Unlocks interface after robot finishes performing trajectory.

void commandStarted | ( |  | ) |
| slot

Locks interface as robot starts performing trajectory.

QGraphicsView* getManipulationWidget | ( |  | ) |

returns object manipulaion QGraphicsView widget

previev_types_t getPreviewId | ( |  | ) |
| inline

QGraphicsView* getPreviewWidget | ( |  | ) |

returns preview QGraphicsView widget

QString image_file | ( |  | ) | const

Gets image file.

int initial_rotation | ( |  | ) | const

Gets initial rotation in degrees.

int interface_size | ( |  | ) | const

Gets base button size in pixels.

void logEvent | ( | ObjectManipulationWindow::interfaceLogEvents | eventID,
|  | int | selected_object,
|  | int | param,
|  | QPointF | point,
|  | QPointF | size,
|  | float | angle
| ) |  |
| signal

emited on all manipulation events

void look_at | ( | QPointF | point | ) |
| slot

Sets current viewport center.

Parameters

  point | point to look at, in window coordinates

void manipulation_mode | ( |  | ) |
| slot

Switches interface to object manipulation mode if an object was selected, pauses camera preview.

QString object_list_file | ( |  | ) | const

Gets object list file.

void on_stackedWidget_currentChanged | ( | int |  | ) |
| inline slot

Triggers interface redraw.

void on_toolButton_cancel_clicked | ( |  | ) |
| slot

Returns to preview mode.

void on_toolButton_refresh_clicked | ( |  | ) |
| slot

Triggers single image preview update in paused mode.

void on_toolButton_rotate_left_clicked | ( |  | ) |
| slot

Rotates image counterclockwise.

void on_toolButton_rotate_right_clicked | ( |  | ) |
| slot

Rotates image clockwise.

void on_toolButton_view_down_clicked | ( |  | ) |
| slot

Moves current viewport down.

void on_toolButton_view_left_clicked | ( |  | ) |
| slot

Moves current viewport left.

void on_toolButton_view_reset_clicked | ( |  | ) |
| slot

Resets viewport to fit current selected object.

void on_toolButton_view_right_clicked | ( |  | ) |
| slot

Moves current viewport right.

void on_toolButton_view_up_clicked | ( |  | ) |
| slot

Moves current viewport up.

void on_toolButton_zoom_in_clicked | ( |  | ) |
| slot

Zooms in image.

void on_toolButton_zoom_out_clicked | ( |  | ) |
| slot

Zooms out image.

void pickObject | ( | QVector3D | pointInMeters,
|  | float | object_height,
|  | float | angle,
|  | int | bin
| ) |  |
| signal

emited after clicking a bin button in object manipulation mode

Parameters

  pointInMeters | point to pick object at, in scene coordinates, in meters
  angle | angle to grab object, in radians
  bin | id of category in which object should be placed

void preview_clicked | ( | QPointF | point | ) |
| slot

Tries to select an object, if an object was under given coordinates switches to object manipulation mode.

Parameters

  point | mouse location, in preview image coordinates

void preview_mode | ( |  | ) |
| slot

Switches interface to preview mode, resets all selections, turns on live camera preview.

void preview_mouse_moved | ( | QPointF | point | ) |
| slot

Mouse movement over preview window slot, highlights underlying objects.

Parameters

  point | mouse location, in preview image coordinates

Q_CLASSINFO | ( | "Initial_rotation" |  | ) |

Q_CLASSINFO | ( | "Rotation_step" |  | ) |

Q_CLASSINFO | ( | "View_scroll_step" |  | ) |

Q_CLASSINFO | ( | "Zoom_in_out_factor" |  | ) |

Q_ENUM | ( | interfaceLogEvents |  | ) |

Base button size in pixels.

void reset_buttons | ( |  | ) |
| slot

Resets buttons capacity counters.

void resizeEvent | ( | QResizeEvent * | event | ) |
| protected

void robotEmergencyStopped | ( |  | ) |
| slot

Locks interface when robot emergency signal is active.

int rotation_step | ( |  | ) | const

Gets rotation step in degrees.

void set_bin_descriptors | ( | const QString & | bin_descriptors | ) |

Sets bin descriptors.

void set_image_file | ( | const QString & | image_file | ) |

Sets image file.

void set_initial_rotation | ( | int | initial_rotation | ) |

Sets initial rotation in degrees.

void set_interface_size | ( | int | interface_size_ | ) |

Sets base button size in pixels.

void set_object_list_file | ( | const QString & | object_list_file | ) |

Sets object list file.

void set_rotation_step | ( | int | rotation_step | ) |

Sets rotation step in degrees.

void set_view_scroll_step | ( | float | view_scroll_step | ) |

Sets view scroll step in pixels.

void set_zoom_in_out_factor | ( | float | zoom_in_out_factor | ) |

Sets zoom in/out factor.

void show_gestures_legend | ( | int | is_show | ) |

Shows help for complex gestures.

void update_interface | ( |  | ) |
| slot

Redraws current interface.

float view_scroll_step | ( |  | ) | const

Gets view scroll step (fraction of view window)

float zoom_in_out_factor | ( |  | ) | const

Gets zoom in/out factor.

void zoom_rect | ( | QRectF | rectangle | ) |
| slot

Sets current object manipulation viewport.

Parameters

  rectangle | new viewport in image coordinates

void zoom_rect_start | ( | QPointF | point | ) |
| slot

Starts setting current object manipulation viewport.

Parameters

  point | top-left point of new viewport

void zoom_rect_stop | ( | QPointF | point | ) |
| slot

Ends setting current object manipulation viewport.

Parameters

  point | bottom-right point of new viewport

void zoom_rect_widget | ( | QRect | rectangle | ) |
| slot

Sets current object manipulation viewport.

Parameters

  rectangle | new viewport in window coordinates

## Member Data Documentation

maximum =300

minimum =20

singleStep =1

## Property Documentation

QString Bin_descriptors
| read write

Bin descriptors.

QString Image_file
| read write

Static image file to display, disables live camera input and switches to object manipulation mode.

int Initial_rotation
| read write

Initial rotation in degrees units.

QString Object_list_file
| read write

Object list file.

int Rotation_step
| read write

Rotation step in degrees.

float View_scroll_step
| read write

View scroll step (fraction of view window)

float Zoom_in_out_factor
| read write

Zoom in/out factor.

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

- interface/ObjectManipulationWindow.h