CTK  0.1.0
The Common Toolkit is a community effort to provide support code for medical image analysis, surgical navigation, and related projects.
Public Types | Public Slots | Public Member Functions | Protected Member Functions | Protected Attributes | Properties | List of all members
ctkExpandableWidget Class Reference

Widget that can be resized by the user using a corner size grip. ctkExpandableWidget is a container widget that has a user customizable sizeHint. More...

#include <Libs/Widgets/ctkExpandableWidget.h>

Inheritance diagram for ctkExpandableWidget:
Inheritance graph
[legend]
Collaboration diagram for ctkExpandableWidget:
Collaboration graph
[legend]

Public Types

typedef QFrame Superclass
 

Public Slots

void updateSizeHint ()
 

Public Member Functions

 ctkExpandableWidget (QWidget *parent=0)
 
bool isSizeGripInside () const
 
virtual QSize minimumSizeHint () const
 
Qt::Orientations orientations () const
 
void setOrientations (Qt::Orientations orientations)
 
void setSizeGripInside (bool)
 
void setSizeGripMargins (QSize margins)
 
QSize sizeGripMargins () const
 
virtual QSize sizeHint () const
 
virtual ~ctkExpandableWidget ()
 

Protected Member Functions

virtual bool event (QEvent *event)
 
virtual void resizeEvent (QResizeEvent *event)
 

Protected Attributes

QScopedPointer< ctkExpandableWidgetPrivate > d_ptr
 

Properties

Qt::Orientations orientations
 
bool sizeGripInside
 
QSize sizeGripMargins
 

Detailed Description

Widget that can be resized by the user using a corner size grip. ctkExpandableWidget is a container widget that has a user customizable sizeHint.

Note
If the widget fails to be resized, consider tweaking the size policy of the parents and children widgets.
See also
ctkSizeGrip

Definition at line 39 of file ctkExpandableWidget.h.

Member Typedef Documentation

◆ Superclass

Definition at line 71 of file ctkExpandableWidget.h.

Constructor & Destructor Documentation

◆ ctkExpandableWidget()

ctkExpandableWidget::ctkExpandableWidget ( QWidget *  parent = 0)

◆ ~ctkExpandableWidget()

virtual ctkExpandableWidget::~ctkExpandableWidget ( )
virtual

Member Function Documentation

◆ event()

virtual bool ctkExpandableWidget::event ( QEvent *  event)
protectedvirtual

◆ isSizeGripInside()

bool ctkExpandableWidget::isSizeGripInside ( ) const

◆ minimumSizeHint()

virtual QSize ctkExpandableWidget::minimumSizeHint ( ) const
virtual

◆ orientations()

Qt::Orientations ctkExpandableWidget::orientations ( ) const

◆ resizeEvent()

virtual void ctkExpandableWidget::resizeEvent ( QResizeEvent *  event)
protectedvirtual

◆ setOrientations()

void ctkExpandableWidget::setOrientations ( Qt::Orientations  orientations)

◆ setSizeGripInside()

void ctkExpandableWidget::setSizeGripInside ( bool  )

◆ setSizeGripMargins()

void ctkExpandableWidget::setSizeGripMargins ( QSize  margins)

◆ sizeGripMargins()

QSize ctkExpandableWidget::sizeGripMargins ( ) const

◆ sizeHint()

virtual QSize ctkExpandableWidget::sizeHint ( ) const
virtual

◆ updateSizeHint

void ctkExpandableWidget::updateSizeHint ( )
slot

Recompute the size hint of the widget and resize with regard to the layout.

Member Data Documentation

◆ d_ptr

QScopedPointer<ctkExpandableWidgetPrivate> ctkExpandableWidget::d_ptr
protected

Definition at line 94 of file ctkExpandableWidget.h.

Property Documentation

◆ orientations

Qt::Orientations ctkExpandableWidget::orientations
readwrite

This property controls the movement of freedom allowed to resize the widget. The location of the size grip widget depends on the orientations:

  • bottom of the widget if Qt::Vertical
  • right of the widget if Qt::Horizontal
  • bottom right corner of the widget if Qt::Horizontal|Qt::Vertical. Bottom right corner of the widget with a Qt::Horizontal|Qt::Vertical resize movements of freedom by default.
    See also
    ctkSizeGrip::orientations, sizeGripInside, sizeGripMargins

Definition at line 1 of file ctkExpandableWidget.h.

◆ sizeGripInside

bool ctkExpandableWidget::sizeGripInside
readwrite

This property controls whether the size grip widget overlays the children widgets or it is moved into its own margin. Please note that QWidget::setContentsMargins is controlled by ctkExpandableWidget, any value set will be overwritten. You can still set the layout contents margins though. true by default.

See also
sizeGripMargins, orientations

Definition at line 1 of file ctkExpandableWidget.h.

◆ sizeGripMargins

QSize ctkExpandableWidget::sizeGripMargins
readwrite

This property controls the extra padding to give to the size grip widget. Depending on the contents of ctkExpandableWidget, the location of the size grip widget could look off and would benefit from being moved from a few pixels. When tweaking this property, you may want to make sure it works for all styles and platforms.

See also
sizeGripInside, orientations

Definition at line 1 of file ctkExpandableWidget.h.


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