Version: 9.15.0
QtxWorkstackTabBar Class Reference

Workstack tab bar widget. More...

#include <QtxWorkstack.h>

Inheritance diagram for QtxWorkstackTabBar:
Inheritance graph

Signals

void dragActiveTab ()
 Emitted when dragging operation is started. More...
 
void contextMenuRequested (QPoint)
 Emitted when context popup menu is requested. More...
 

Public Member Functions

 QtxWorkstackTabBar (QWidget *=0)
 Constructor. More...
 
virtual ~QtxWorkstackTabBar ()
 Destructor. More...
 
bool isActive () const
 Check if the tab bar is active. More...
 
void setActive (const bool)
 Set tab bar active/inactive. More...
 
int tabId (const int) const
 Get tab page identifier. More...
 
int indexOf (const int) const
 Get tab page index by specified identifier. More...
 
void setTabId (const int, const int)
 Set tab page identifier. More...
 
void updateActiveState ()
 Update tab bar according to the 'active' state. More...
 

Protected Member Functions

virtual void changeEvent (QEvent *)
 Process widget change state events (style, palette, enable state changing, etc). More...
 
virtual void mouseMoveEvent (QMouseEvent *)
 Customize mouse move event handler. More...
 
virtual void mousePressEvent (QMouseEvent *)
 Customize mouse press event handler. More...
 
virtual void mouseReleaseEvent (QMouseEvent *)
 Customize mouse release event handler. More...
 
virtual void contextMenuEvent (QContextMenuEvent *)
 Customize context menu event handler. More...
 

Private Slots

void onCurrentChanged (int)
 Called when current tab page is changed. More...
 

Private Attributes

int myId
 current tab page index More...
 
bool myActive
 "active" status More...
 

Detailed Description

Workstack tab bar widget.

Constructor & Destructor Documentation

◆ QtxWorkstackTabBar()

QtxWorkstackTabBar::QtxWorkstackTabBar ( QWidget parent = 0)

Constructor.

Parameters
parentparent widget

References onCurrentChanged().

◆ ~QtxWorkstackTabBar()

QtxWorkstackTabBar::~QtxWorkstackTabBar ( )
virtual

Destructor.

Member Function Documentation

◆ changeEvent()

void QtxWorkstackTabBar::changeEvent ( QEvent )
protectedvirtual

Process widget change state events (style, palette, enable state changing, etc).

Parameters
echange event (not used)

References updateActiveState().

◆ contextMenuEvent()

void QtxWorkstackTabBar::contextMenuEvent ( QContextMenuEvent *  e)
protectedvirtual

Customize context menu event handler.

Parameters
econtext menu event

References contextMenuRequested().

◆ contextMenuRequested

void QtxWorkstackTabBar::contextMenuRequested ( QPoint  p)
signal

Emitted when context popup menu is requested.

Parameters
ppoint popup menu to be shown at

◆ dragActiveTab

void QtxWorkstackTabBar::dragActiveTab ( )
signal

Emitted when dragging operation is started.

◆ indexOf()

int QtxWorkstackTabBar::indexOf ( const int  id) const

Get tab page index by specified identifier.

Parameters
idtab page ID
Returns
tab page index or -1 if not found

References tabId().

◆ isActive()

bool QtxWorkstackTabBar::isActive ( ) const

Check if the tab bar is active.

Returns
true if tab bar is active

References myActive.

◆ mouseMoveEvent()

void QtxWorkstackTabBar::mouseMoveEvent ( QMouseEvent *  e)
protectedvirtual

Customize mouse move event handler.

Parameters
emouse event

References dragActiveTab(), indexOf(), and myId.

◆ mousePressEvent()

void QtxWorkstackTabBar::mousePressEvent ( QMouseEvent *  e)
protectedvirtual

Customize mouse press event handler.

Parameters
emouse event

References myId, and tabId().

◆ mouseReleaseEvent()

void QtxWorkstackTabBar::mouseReleaseEvent ( QMouseEvent *  e)
protectedvirtual

Customize mouse release event handler.

Parameters
emouse event

References contextMenuRequested(), and myId.

◆ onCurrentChanged

void QtxWorkstackTabBar::onCurrentChanged ( int  )
privateslot

Called when current tab page is changed.

Parameters
idxtab page index (not used)

References updateActiveState().

◆ setActive()

void QtxWorkstackTabBar::setActive ( const bool  on)

Set tab bar active/inactive.

Parameters
onnew active state

References myActive, and updateActiveState().

◆ setTabId()

void QtxWorkstackTabBar::setTabId ( const int  index,
const int  id 
)

Set tab page identifier.

Parameters
indextab page index
idtab page ID

◆ tabId()

int QtxWorkstackTabBar::tabId ( const int  index) const

Get tab page identifier.

Parameters
indextab page index
Returns
tab page ID or -1 if index is out of range

◆ updateActiveState()

void QtxWorkstackTabBar::updateActiveState ( )

Update tab bar according to the 'active' state.

References isActive().

Member Data Documentation

◆ myActive

bool QtxWorkstackTabBar::myActive
private

"active" status

◆ myId

int QtxWorkstackTabBar::myId
private

current tab page index


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