ctkSizeGrip is a utility widget that allows widget in a layout to be manually resized. It is not meant to be used as is but with a third party that can change the size hint of a widget such as a container widget (e.g. ctkExpandableWidget). To resize a widget, the user must left click on the size grip and drag left/right to control the width and/or up/bottom to control the height. Left button double-click resets the size hint of the target widget to its default.
More...
#include <Libs/Widgets/ctkSizeGrip.h>
|
QScopedPointer< ctkSizeGripPrivate > | d_ptr |
|
ctkSizeGrip is a utility widget that allows widget in a layout to be manually resized. It is not meant to be used as is but with a third party that can change the size hint of a widget such as a container widget (e.g. ctkExpandableWidget). To resize a widget, the user must left click on the size grip and drag left/right to control the width and/or up/bottom to control the height. Left button double-click resets the size hint of the target widget to its default.
- See also
- ctkExpandableWidget
Definition at line 41 of file ctkSizeGrip.h.
◆ Superclass
◆ ctkSizeGrip() [1/2]
ctkSizeGrip::ctkSizeGrip |
( |
QWidget * |
parent | ) |
|
|
explicit |
◆ ctkSizeGrip() [2/2]
ctkSizeGrip::ctkSizeGrip |
( |
QWidget * |
widgetToResize, |
|
|
QWidget * |
parent |
|
) |
| |
|
explicit |
◆ ~ctkSizeGrip()
virtual ctkSizeGrip::~ctkSizeGrip |
( |
| ) |
|
|
virtual |
◆ event()
virtual bool ctkSizeGrip::event |
( |
QEvent * |
event | ) |
|
|
protectedvirtual |
◆ mouseDoubleClickEvent()
virtual void ctkSizeGrip::mouseDoubleClickEvent |
( |
QMouseEvent * |
mouseEvent | ) |
|
|
protectedvirtual |
◆ mouseMoveEvent()
virtual void ctkSizeGrip::mouseMoveEvent |
( |
QMouseEvent * |
mouseEvent | ) |
|
|
protectedvirtual |
◆ mousePressEvent()
virtual void ctkSizeGrip::mousePressEvent |
( |
QMouseEvent * |
mouseEvent | ) |
|
|
protectedvirtual |
◆ mouseReleaseEvent()
virtual void ctkSizeGrip::mouseReleaseEvent |
( |
QMouseEvent * |
mouseEvent | ) |
|
|
protectedvirtual |
◆ orientations()
Qt::Orientations ctkSizeGrip::orientations |
( |
| ) |
const |
◆ paintEvent()
virtual void ctkSizeGrip::paintEvent |
( |
QPaintEvent * |
paintEvent | ) |
|
|
protectedvirtual |
◆ resizeWidget()
bool ctkSizeGrip::resizeWidget |
( |
| ) |
const |
◆ setOrientations()
void ctkSizeGrip::setOrientations |
( |
Qt::Orientations |
orientations | ) |
|
◆ setResizeWidget()
void ctkSizeGrip::setResizeWidget |
( |
bool |
resize | ) |
|
◆ setWidgetSizeHint
void ctkSizeGrip::setWidgetSizeHint |
( |
QSize |
sizeHint | ) |
|
|
slot |
Expressively change the sizeHint of the widget to resize.
- See also
- widgetSizeHint()
◆ setWidgetToResize()
void ctkSizeGrip::setWidgetToResize |
( |
QWidget * |
target | ) |
|
◆ sizeHint()
virtual QSize ctkSizeGrip::sizeHint |
( |
| ) |
const |
|
virtual |
SizeHint of the size grip. It depends on the style in use, but it is typically a small (e.g. 13x13) square sizehint for Qt::Horizontal|Qt::Vertical orientations and a narrow rectangle for Qt::Horizontal or Qt::Vertical orientations.
◆ widgetSizeHint()
QSize ctkSizeGrip::widgetSizeHint |
( |
| ) |
const |
Return the sizeHint set by the user or programatically using setWidgetSizeHint(). If width or/and height is 0, it means the sizeHint has not been touched and the original widget sizeHint should be used instead. When the orientation is solely vertical, the returned width component of the sizeHint is 0. If the orientations is solely horizontal, the sizeHint height is 0.
◆ widgetSizeHintChanged
void ctkSizeGrip::widgetSizeHintChanged |
( |
QSize |
sizeHint | ) |
|
|
signal |
◆ widgetToResize()
QWidget* ctkSizeGrip::widgetToResize |
( |
| ) |
const |
◆ d_ptr
QScopedPointer<ctkSizeGripPrivate> ctkSizeGrip::d_ptr |
|
protected |
◆ orientations
Qt::Orientations ctkSizeGrip::orientations |
|
readwrite |
This property describes the movement of freedom of the sizeGrip. There are 3 supported orientations: Qt::Vertical, Qt::Horizontal and Qt::Horizontal|Qt::Vertical. If the orientation is solely Qt::Horizontal, the size grip only allows vertical resize. If the orientation is solely Qt::Vertical, only horizontal resizes are supported. Note that the orientations change the look of the widget. And it also probably means that the position of the widget should be changed: bottom side for Qt::Vertical, right side for Qt::Horizontal and bottom right corner for Qt::Horizontal|Qt::Vertical. Qt::Horizontal|Qt::Vertical by default.
Definition at line 1 of file ctkSizeGrip.h.
◆ resizeWidget
bool ctkSizeGrip::resizeWidget |
|
readwrite |
This property holds whether the size grip resizes the widget or not. If the size grip doesn't resize the widget, it still returns a valid widgetSizeHint that can be used by a third party. By default, the widget is resized. \tbd it is experimental and not really working.
Definition at line 1 of file ctkSizeGrip.h.
◆ widgetSizeHint
QSize ctkSizeGrip::widgetSizeHint |
|
readwrite |
This property holds the sizeHint set by the user via the size grip or programatically using setWidgetSizeHint(). If width or/and height is 0, it means the sizeHint has not been touched and the default widget sizeHint should be used instead. For example, if orientations is solely vertical (not also horizontal), the width component of the widget sizeHint is 0. If orientations is solely horizontal, the widgets izeHint height is 0. (0,0) by default (meaning the default widget sizehint should be used).
Definition at line 1 of file ctkSizeGrip.h.
The documentation for this class was generated from the following file: