A tall skinny invisible widget providing left-right sliding column separator adjustment for a two-column QTreeView via mouse drags. Shows splitter cursor when mouse hovers over it. Uses event filtering to catch resize events for the parent.
More...
#include <splitter_handle.h>
|
| bool | eventFilter (QObject *event_target, QEvent *event) |
| | Catch resize events sent to parent to update splitter's geometry. Always returns false. More...
|
| |
| QColor | getColor () const |
| |
| float | getRatio () |
| | Get the ratio of the parent's left column to the parent widget width. More...
|
| |
| void | setColor (QColor color) |
| |
| void | setRatio (float ratio) |
| | Set the ratio of the parent's left column to the parent widget width. More...
|
| |
| | SplitterHandle (QTreeView *parent=0) |
| |
|
| void | updateGeometry () |
| | Update the parent's column widths and this splitter's geometry based on first_column_size_ratio_. More...
|
| |
A tall skinny invisible widget providing left-right sliding column separator adjustment for a two-column QTreeView via mouse drags. Shows splitter cursor when mouse hovers over it. Uses event filtering to catch resize events for the parent.
Definition at line 43 of file splitter_handle.h.
| rviz::SplitterHandle::SplitterHandle |
( |
QTreeView * |
parent = 0 | ) |
|
| bool rviz::SplitterHandle::eventFilter |
( |
QObject * |
event_target, |
|
|
QEvent * |
event |
|
) |
| |
Catch resize events sent to parent to update splitter's geometry. Always returns false.
Definition at line 52 of file splitter_handle.cpp.
| QColor rviz::SplitterHandle::getColor |
( |
| ) |
const |
|
inline |
| float rviz::SplitterHandle::getRatio |
( |
| ) |
|
Get the ratio of the parent's left column to the parent widget width.
Definition at line 82 of file splitter_handle.cpp.
| void rviz::SplitterHandle::mouseMoveEvent |
( |
QMouseEvent * |
event | ) |
|
|
protectedvirtual |
| void rviz::SplitterHandle::mousePressEvent |
( |
QMouseEvent * |
event | ) |
|
|
protectedvirtual |
| void rviz::SplitterHandle::paintEvent |
( |
QPaintEvent * |
event | ) |
|
|
protectedvirtual |
| void rviz::SplitterHandle::setColor |
( |
QColor |
color | ) |
|
|
inline |
| void rviz::SplitterHandle::setRatio |
( |
float |
ratio | ) |
|
Set the ratio of the parent's left column to the parent widget width.
Definition at line 76 of file splitter_handle.cpp.
| void rviz::SplitterHandle::updateGeometry |
( |
| ) |
|
|
private |
Update the parent's column widths and this splitter's geometry based on first_column_size_ratio_.
Definition at line 62 of file splitter_handle.cpp.
| QColor rviz::SplitterHandle::color_ |
|
private |
| float rviz::SplitterHandle::first_column_size_ratio_ |
|
private |
The ratio of the first column width to the entire widget width. Preserved during parent widget resize.
Definition at line 77 of file splitter_handle.h.
| QTreeView* rviz::SplitterHandle::parent_ |
|
private |
| int rviz::SplitterHandle::x_press_offset_ |
|
private |
The documentation for this class was generated from the following files: