VR-Forces 5.0.2 Developer's Guide
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
List of all members | Public Member Functions | Protected Member Functions | Protected Attributes
makVrv::DtOrientedQTabWidget Class Reference

A specialized QTabWidget that supports re-orientating tab icons based on its tab bar's position based on a user-settable property.

Inheritance diagram for makVrv::DtOrientedQTabWidget:
Inheritance graph
[legend]

Public Member Functions

 DtOrientedQTabWidget (QWidget *parent=nullptr)
 
virtual ~DtOrientedQTabWidget ()
 
virtual void setTabBar (QTabBar *tabBar)
 
virtual void setTabPosition (QTabWidget::TabPosition position)
 
virtual void setTabIcon (int index, const QIcon &icon)
 
virtual void setIconsPerpendicularToTab (bool)
 
virtual bool iconsPerpendicularToTab () const
 

Protected Member Functions

virtual void rotateIconsIfNeeded ()
 
virtual void rotateIconIfNeeded (int index, int currentRotation)
 
virtual void rotateIcon (int index, int degrees)
 
virtual bool iconsNeedUpdate (int currentRotation) const
 

Protected Attributes

bool myIconsPerpendicularToTab
 
int myCurrentIconRotation
 

Constructor & Destructor Documentation

makVrv::DtOrientedQTabWidget::DtOrientedQTabWidget ( QWidget *  parent = nullptr)

CTOR.

virtual makVrv::DtOrientedQTabWidget::~DtOrientedQTabWidget ( )
virtual

DTOR.

Member Function Documentation

virtual void makVrv::DtOrientedQTabWidget::setTabBar ( QTabBar tabBar)
virtual

Akin to calling QTabWidget::setTabBar(QTabBar*)

virtual void makVrv::DtOrientedQTabWidget::setTabPosition ( QTabWidget::TabPosition  position)
virtual

Set the position of the tab widget. This function automatically updates all the icons.

virtual void makVrv::DtOrientedQTabWidget::setTabIcon ( int  index,
const QIcon &  icon 
)
virtual

Set the icon for a tab with the given index This function automatically updates the icon's rotation.

virtual void makVrv::DtOrientedQTabWidget::setIconsPerpendicularToTab ( bool  )
virtual

Set whether or not to rotate icons based on the tab bar's position If layout of tabs is in West or East mode, and, this flag is true, icons will always be perpendicular to the tab (90 degrees). This function automatically updates all the icons.

virtual bool makVrv::DtOrientedQTabWidget::iconsPerpendicularToTab ( ) const
virtual
virtual void makVrv::DtOrientedQTabWidget::rotateIconsIfNeeded ( )
protectedvirtual

Rotates all icons, if needed. Assumes all icons are already rotated by the amount specified by myCurrentIconRotation.

virtual void makVrv::DtOrientedQTabWidget::rotateIconIfNeeded ( int  index,
int  currentRotation 
)
protectedvirtual

Rotates a given icon, if needed.

Parameters
indexThe index of the icon to rotate, if needed.
currentRotationThe current (clock-wise) rotation of the icon of interest.
virtual void makVrv::DtOrientedQTabWidget::rotateIcon ( int  index,
int  degrees 
)
protectedvirtual

Rotates an icon at the specific index by a specified amount.

Parameters
indexThe index of the icon to rotate, if needed.
currentRotationThe current (clock-wise) rotation of the icon of interest.
virtual bool makVrv::DtOrientedQTabWidget::iconsNeedUpdate ( int  currentRotation) const
protectedvirtual

Check and return whether or not an icon needs updating.

Parameters
currentRotationThe current rotation of the icon being checked

Member Data Documentation

bool makVrv::DtOrientedQTabWidget::myIconsPerpendicularToTab
protected
int makVrv::DtOrientedQTabWidget::myCurrentIconRotation
protected

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

Document ID: Generated on Sun Dec 4 20:22:03 EST 2022 from SVN revision 249613
Copyright © 2005-2021 MAK Technologies. All Rights Reserved (www.mak.com)